This repository was archived by the owner on Sep 5, 2023. It is now read-only.
File tree Expand file tree Collapse file tree
samples/generated_samples
tests/unit/gapic/batch_v1 Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -611,9 +611,21 @@ class NetworkInterface(proto.Message):
611611
612612 Attributes:
613613 network (str):
614- The URL of the network resource.
614+ The URL of an existing network resource.
615+ You can specify the network as a full or partial
616+ URL. For example, the following are all valid
617+ URLs:
618+ https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}
619+ projects/{project}/global/networks/{network}
620+ global/networks/{network}
615621 subnetwork (str):
616- The URL of the Subnetwork resource.
622+ The URL of an existing subnetwork resource in
623+ the network. You can specify the subnetwork as a
624+ full or partial URL. For example, the following
625+ are all valid URLs:
626+ https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/subnetworks/{subnetwork}
627+ projects/{project}/regions/{region}/subnetworks/{subnetwork}
628+ regions/{region}/subnetworks/{subnetwork}
617629 no_external_ip_address (bool):
618630 Default is false (with an external IP
619631 address). Required if no external public IP
Original file line number Diff line number Diff line change @@ -528,13 +528,53 @@ class Environment(proto.Message):
528528 variables (MutableMapping[str, str]):
529529 A map of environment variable names to
530530 values.
531+ secret_variables (MutableMapping[str, str]):
532+ A map of environment variable names to Secret
533+ Manager secret names. The VM will access the
534+ named secrets to set the value of each
535+ environment variable.
536+ encrypted_variables (google.cloud.batch_v1.types.Environment.KMSEnvMap):
537+ An encrypted JSON dictionary where the
538+ key/value pairs correspond to environment
539+ variable names and their values.
531540 """
532541
542+ class KMSEnvMap (proto .Message ):
543+ r"""
544+
545+ Attributes:
546+ key_name (str):
547+ The name of the KMS key that will be used to
548+ decrypt the cipher text.
549+ cipher_text (str):
550+ The value of the cipherText response from the ``encrypt``
551+ method.
552+ """
553+
554+ key_name : str = proto .Field (
555+ proto .STRING ,
556+ number = 1 ,
557+ )
558+ cipher_text : str = proto .Field (
559+ proto .STRING ,
560+ number = 2 ,
561+ )
562+
533563 variables : MutableMapping [str , str ] = proto .MapField (
534564 proto .STRING ,
535565 proto .STRING ,
536566 number = 1 ,
537567 )
568+ secret_variables : MutableMapping [str , str ] = proto .MapField (
569+ proto .STRING ,
570+ proto .STRING ,
571+ number = 2 ,
572+ )
573+ encrypted_variables : KMSEnvMap = proto .Field (
574+ proto .MESSAGE ,
575+ number = 3 ,
576+ message = KMSEnvMap ,
577+ )
538578
539579
540580__all__ = tuple (sorted (__protobuf__ .manifest ))
Original file line number Diff line number Diff line change @@ -713,9 +713,21 @@ class NetworkInterface(proto.Message):
713713
714714 Attributes:
715715 network (str):
716- The URL of the network resource.
716+ The URL of an existing network resource.
717+ You can specify the network as a full or partial
718+ URL. For example, the following are all valid
719+ URLs:
720+ https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}
721+ projects/{project}/global/networks/{network}
722+ global/networks/{network}
717723 subnetwork (str):
718- The URL of the Subnetwork resource.
724+ The URL of an existing subnetwork resource in
725+ the network. You can specify the subnetwork as a
726+ full or partial URL. For example, the following
727+ are all valid URLs:
728+ https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/subnetworks/{subnetwork}
729+ projects/{project}/regions/{region}/subnetworks/{subnetwork}
730+ regions/{region}/subnetworks/{subnetwork}
719731 no_external_ip_address (bool):
720732 Default is false (with an external IP
721733 address). Required if no external public IP
Original file line number Diff line number Diff line change 88 ],
99 "language" : " PYTHON" ,
1010 "name" : " google-cloud-batch" ,
11- "version" : " 0.6 .0"
11+ "version" : " 0.1 .0"
1212 },
1313 "snippets" : [
1414 {
Original file line number Diff line number Diff line change 88 ],
99 "language" : " PYTHON" ,
1010 "name" : " google-cloud-batch" ,
11- "version" : " 0.6 .0"
11+ "version" : " 0.1 .0"
1212 },
1313 "snippets" : [
1414 {
Original file line number Diff line number Diff line change @@ -2543,7 +2543,14 @@ def test_create_job_rest(request_type):
25432543 "ignore_exit_status" : True ,
25442544 "background" : True ,
25452545 "always_run" : True ,
2546- "environment" : {"variables" : {}},
2546+ "environment" : {
2547+ "variables" : {},
2548+ "secret_variables" : {},
2549+ "encrypted_variables" : {
2550+ "key_name" : "key_name_value" ,
2551+ "cipher_text" : "cipher_text_value" ,
2552+ },
2553+ },
25472554 "timeout" : {"seconds" : 751 , "nanos" : 543 },
25482555 }
25492556 ],
@@ -2878,7 +2885,14 @@ def test_create_job_rest_bad_request(
28782885 "ignore_exit_status" : True ,
28792886 "background" : True ,
28802887 "always_run" : True ,
2881- "environment" : {"variables" : {}},
2888+ "environment" : {
2889+ "variables" : {},
2890+ "secret_variables" : {},
2891+ "encrypted_variables" : {
2892+ "key_name" : "key_name_value" ,
2893+ "cipher_text" : "cipher_text_value" ,
2894+ },
2895+ },
28822896 "timeout" : {"seconds" : 751 , "nanos" : 543 },
28832897 }
28842898 ],
You can’t perform that action at this time.
0 commit comments