chore: regens API reference docs (#889)
diff --git a/docs/dyn/compute_beta.instanceTemplates.html b/docs/dyn/compute_beta.instanceTemplates.html
index 1cf3b6d..941f2c0 100644
--- a/docs/dyn/compute_beta.instanceTemplates.html
+++ b/docs/dyn/compute_beta.instanceTemplates.html
@@ -81,10 +81,10 @@
<code><a href="#get">get(project, instanceTemplate)</a></code></p>
<p class="firstline">Returns the specified instance template. Gets a list of available instance templates by making a list() request.</p>
<p class="toc_element">
- <code><a href="#getIamPolicy">getIamPolicy(project, resource)</a></code></p>
+ <code><a href="#getIamPolicy">getIamPolicy(project, resource, optionsRequestedPolicyVersion=None)</a></code></p>
<p class="firstline">Gets the access control policy for a resource. May be empty if no such policy or resource exists.</p>
<p class="toc_element">
- <code><a href="#insert">insert(project, body, requestId=None)</a></code></p>
+ <code><a href="#insert">insert(project, body=None, requestId=None)</a></code></p>
<p class="firstline">Creates an instance template in the specified project using the data that is included in the request. If you are creating a new template to update an existing instance group, your new instance template must use the same network or, if applicable, the same subnetwork as the original template.</p>
<p class="toc_element">
<code><a href="#list">list(project, orderBy=None, maxResults=None, pageToken=None, filter=None)</a></code></p>
@@ -93,10 +93,10 @@
<code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
<p class="firstline">Retrieves the next page of results.</p>
<p class="toc_element">
- <code><a href="#setIamPolicy">setIamPolicy(project, resource, body)</a></code></p>
+ <code><a href="#setIamPolicy">setIamPolicy(project, resource, body=None)</a></code></p>
<p class="firstline">Sets the access control policy on the specified resource. Replaces any existing policy.</p>
<p class="toc_element">
- <code><a href="#testIamPermissions">testIamPermissions(project, resource, body)</a></code></p>
+ <code><a href="#testIamPermissions">testIamPermissions(project, resource, body=None)</a></code></p>
<p class="firstline">Returns permissions that a caller has on the specified resource.</p>
<h3>Method Details</h3>
<div class="method">
@@ -117,26 +117,30 @@
{ # Represents an Operation resource.
#
+ # Google Compute Engine has three Operation resources:
+ #
+ # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
+ #
# You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
#
# Operations can be global, regional or zonal.
- # - For global operations, use the globalOperations resource.
- # - For regional operations, use the regionOperations resource.
- # - For zonal operations, use the zonalOperations resource.
+ # - For global operations, use the `globalOperations` resource.
+ # - For regional operations, use the `regionOperations` resource.
+ # - For zonal operations, use the `zonalOperations` resource.
#
- # For more information, read Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
+ # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
"targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
"clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
"creationTimestamp": "A String", # [Deprecated] This field is deprecated.
- "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
+ "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
"zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
"insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
- "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
- "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
+ "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
+ "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
"progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
- "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found.
+ "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a `404` means the resource was not found.
"statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
- "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
+ "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
"description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
"warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
{
@@ -151,10 +155,10 @@
],
},
],
- "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
+ "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
"startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
- "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
- "name": "A String", # [Output Only] Name of the resource.
+ "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
+ "name": "A String", # [Output Only] Name of the operation.
"region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
"error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
"errors": [ # [Output Only] The array of errors encountered while processing this operation.
@@ -184,7 +188,7 @@
{ # Represents an Instance Template resource.
#
- # You can use instance templates to create VM instances and managed instance groups. For more information, read Instance Templates. (== resource_for beta.instanceTemplates ==) (== resource_for v1.instanceTemplates ==)
+ # You can use instance templates to create VM instances and managed instance groups. For more information, read Instance Templates. (== resource_for {$api_version}.instanceTemplates ==)
"kind": "compute#instanceTemplate", # [Output Only] The resource type, which is always compute#instanceTemplate for instance templates.
"sourceInstanceParams": { # A specification of the parameters to use when creating the instance template from a source instance. # The source instance params to use to create this instance template.
"diskConfigs": [ # Attached disks configuration. If not provided, defaults are applied: For boot disk and any other R/W disks, new custom images will be created from each disk. For read-only disks, they will be attached in read-only mode. Local SSD disks will be created as blank volumes.
@@ -208,11 +212,11 @@
# - projects/project/zones/zone/instances/instance
"creationTimestamp": "A String", # [Output Only] The creation timestamp for this instance template in RFC3339 text format.
"properties": { # The instance properties for this instance template.
- "reservationAffinity": { # AllocationAffinity is the configuration of desired allocation which this instance could take capacity from. # The configuration of desired reservations which this Instance could consume capacity from.
- "values": [ # Corresponds to the label values of reservation resource.
+ "reservationAffinity": { # Specifies the reservations that this instance can consume from. # Specifies the reservations that this instance can consume from.
+ "values": [ # Corresponds to the label values of a reservation resource.
"A String",
],
- "key": "A String", # Corresponds to the label key of reservation resource.
+ "key": "A String", # Corresponds to the label key of a reservation resource. To target a SPECIFIC_RESERVATION by name, specify googleapis.com/reservation-name as the key and specify the name of your reservation as its value.
"consumeReservationType": "A String", # Specifies the type of reservation from which this instance can consume resources: ANY_RESERVATION (default), SPECIFIC_RESERVATION, or NO_RESERVATION. See Consuming reserved instances for examples.
},
"disks": [ # An array of disks that are associated with the instances that are created from this template.
@@ -227,6 +231,7 @@
#
# Instance templates do not store customer-supplied encryption keys, so you cannot use your own keys to encrypt disks in a managed instance group.
"rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
+ "kmsKeyServiceAccount": "A String", # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
"sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
"rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
#
@@ -245,15 +250,16 @@
# This property is mutually exclusive with the source property; you can only define one or the other, but not both.
#
# This property is mutually exclusive with the source property; you can only define one or the other, but not both.
- "sourceSnapshot": "A String", # The source snapshot to create this disk. When creating a new instance, one of initializeParams.sourceSnapshot or disks.source is required except for local SSD.
+ "sourceSnapshot": "A String", # The source snapshot to create this disk. When creating a new instance, one of initializeParams.sourceSnapshot or initializeParams.sourceImage or disks.source is required except for local SSD.
#
# To create a disk with a snapshot that you created, specify the snapshot name in the following format:
# global/snapshots/my-backup
#
#
# If the source snapshot is deleted later, this field will not be set.
- "diskName": "A String", # Specifies the disk name. If not specified, the default is to use the name of the instance. If the disk with the instance name exists already in the given zone/region, a new name will be automatically generated.
+ "diskName": "A String", # Specifies the disk name. If not specified, the default is to use the name of the instance. If a disk with the same name already exists in the given region, the existing disk is attached to the new instance and the new disk is not created.
"description": "A String", # An optional description. Provide this property when creating the disk.
+ "onUpdateAction": "A String", # Specifies which action to take on instance update with this disk. Default is to use the existing disk.
"labels": { # Labels to apply to this disk. These can be later modified by the disks.setLabels method. This field is only applicable for persistent disks.
"a_key": "A String",
},
@@ -261,6 +267,7 @@
#
# Instance templates do not store customer-supplied encryption keys, so you cannot create disks for instances in a managed instance group if the source images are encrypted with your own keys.
"rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
+ "kmsKeyServiceAccount": "A String", # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
"sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
"rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
#
@@ -285,11 +292,11 @@
"type": "A String", # The ID of a supported feature. Read Enabling guest operating system features to see a list of available options.
},
],
- "diskSizeGb": "A String", # Specifies the size of the disk in base-2 GB.
+ "diskSizeGb": "A String", # Specifies the size of the disk in base-2 GB. The size must be at least 10 GB. If you specify a sourceImage, which is required for boot disks, the default size is the size of the sourceImage. If you do not specify a sourceImage, the default disk size is 500 GB.
"resourcePolicies": [ # Resource policies applied to this disk for automatic snapshot creations. Specified using the full or partial URL. For instance template, specify only the resource policy name.
"A String",
],
- "sourceImage": "A String", # The source image to create this disk. When creating a new instance, one of initializeParams.sourceImage or disks.source is required except for local SSD.
+ "sourceImage": "A String", # The source image to create this disk. When creating a new instance, one of initializeParams.sourceImage or initializeParams.sourceSnapshot or disks.source is required except for local SSD.
#
# To create a disk with one of the public operating system images, specify the image by its family name. For example, specify family/debian-9 to use the latest Debian 9 image:
# projects/debian-cloud/global/images/family/debian-9
@@ -310,6 +317,7 @@
# If the source image is deleted later, this field will not be set.
"sourceSnapshotEncryptionKey": { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source snapshot.
"rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
+ "kmsKeyServiceAccount": "A String", # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
"sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
"rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
#
@@ -323,18 +331,43 @@
"autoDelete": True or False, # Specifies whether the disk will be auto-deleted when the instance is deleted (but not when the disk is detached from the instance).
"index": 42, # [Output Only] A zero-based index to this disk, where 0 is reserved for the boot disk. If you have many disks attached to an instance, each disk would have a unique index number.
"boot": True or False, # Indicates that this is a boot disk. The virtual machine will use the first partition of the disk for its root filesystem.
+ "shieldedInstanceInitialState": { # Initial State for shielded instance, these are public keys which are safe to store in public # [Output Only] shielded vm initial state stored on disk
+ "dbxs": [ # The forbidden key database (dbx).
+ {
+ "content": "A String", # The raw content in the secure keys file.
+ "fileType": "A String",
+ },
+ ],
+ "dbs": [ # The Key Database (db).
+ {
+ "content": "A String", # The raw content in the secure keys file.
+ "fileType": "A String",
+ },
+ ],
+ "keks": [ # The Key Exchange Key (KEK).
+ {
+ "content": "A String", # The raw content in the secure keys file.
+ "fileType": "A String",
+ },
+ ],
+ "pk": { # The Platform Key (PK).
+ "content": "A String", # The raw content in the secure keys file.
+ "fileType": "A String",
+ },
+ },
"guestOsFeatures": [ # A list of features to enable on the guest operating system. Applicable only for bootable images. Read Enabling guest operating system features to see a list of available options.
{ # Guest OS features.
"type": "A String", # The ID of a supported feature. Read Enabling guest operating system features to see a list of available options.
},
],
+ "diskSizeGb": "A String", # The size of the disk in GB.
+ "mode": "A String", # The mode in which to attach this disk, either READ_WRITE or READ_ONLY. If not specified, the default is to attach the disk in READ_WRITE mode.
+ "interface": "A String", # Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. The default is SCSI. Persistent disks must always use SCSI and the request will fail if you attempt to attach a persistent disk in any other format than SCSI. Local SSDs can use either NVME or SCSI. For performance characteristics of SCSI over NVMe, see Local SSD performance.
"licenses": [ # [Output Only] Any valid publicly visible licenses.
"A String",
],
- "mode": "A String", # The mode in which to attach this disk, either READ_WRITE or READ_ONLY. If not specified, the default is to attach the disk in READ_WRITE mode.
- "interface": "A String", # Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. The default is SCSI. Persistent disks must always use SCSI and the request will fail if you attempt to attach a persistent disk in any other format than SCSI. Local SSDs can use either NVME or SCSI. For performance characteristics of SCSI over NVMe, see Local SSD performance. TODO(b/131765817): Update documentation when NVME is supported.
"type": "A String", # Specifies the type of the disk, either SCRATCH or PERSISTENT. If not specified, the default is PERSISTENT.
- "source": "A String", # Specifies a valid partial or full URL to an existing Persistent Disk resource. When creating a new instance, one of initializeParams.sourceImage or disks.source is required except for local SSD.
+ "source": "A String", # Specifies a valid partial or full URL to an existing Persistent Disk resource. When creating a new instance, one of initializeParams.sourceImage or initializeParams.sourceSnapshot or disks.source is required except for local SSD.
#
# If desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks.
#
@@ -367,11 +400,15 @@
"displayDevice": { # A set of Display Device options # Display Device properties to enable support for remote display products like: Teradici, VNC and TeamViewer
"enableDisplay": True or False, # Defines whether the instance has Display enabled.
},
+ "privateIpv6GoogleAccess": "A String", # The private IPv6 google access type for the VM. If not specified, use INHERIT_FROM_SUBNETWORK as default.
"shieldedInstanceConfig": { # A set of Shielded Instance options.
"enableVtpm": True or False, # Defines whether the instance has the vTPM enabled.
"enableIntegrityMonitoring": True or False, # Defines whether the instance has integrity monitoring enabled.
"enableSecureBoot": True or False, # Defines whether the instance has Secure Boot enabled.
},
+ "resourcePolicies": [ # Resource policies (names, not ULRs) applied to instances created from this template.
+ "A String",
+ ],
"networkInterfaces": [ # An array of network access configurations for this interface.
{ # A network interface resource attached to an instance.
"kind": "compute#networkInterface", # [Output Only] Type of the resource. Always compute#networkInterface for network interfaces.
@@ -381,12 +418,8 @@
"ipCidrRange": "A String", # The IP alias ranges to allocate for this interface. This IP CIDR range must belong to the specified subnetwork and cannot contain IP addresses reserved by system or used by other network interfaces. This range may be a single IP address (such as 10.2.3.4), a netmask (such as /24) or a CIDR-formatted string (such as 10.1.2.0/24).
},
],
- "network": "A String", # URL of the network resource for this instance. When creating an instance, if neither the network nor the subnetwork is specified, the default network global/networks/default is used; if the network is not specified but the subnetwork is specified, the network is inferred.
- #
- # If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
- # - https://www.googleapis.com/compute/v1/projects/project/global/networks/network
- # - projects/project/global/networks/network
- # - global/networks/default
+ "name": "A String", # [Output Only] The name of the network interface, which is generated by the server. For network devices, these are eth0, eth1, etc.
+ "ipv6Address": "A String", # [Output Only] An IPv6 internal network address for this network interface.
"accessConfigs": [ # An array of configurations for this interface. Currently, only one access config, ONE_TO_ONE_NAT, is supported. If there are no accessConfigs specified, then this instance will have no external internet access.
{ # An access configuration attached to an instance's network interface. Only one access config per instance is supported.
"kind": "compute#accessConfig", # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
@@ -407,24 +440,30 @@
"subnetwork": "A String", # The URL of the Subnetwork resource for this instance. If the network resource is in legacy mode, do not specify this field. If the network is in auto subnet mode, specifying the subnetwork is optional. If the network is in custom subnet mode, specifying the subnetwork is required. If you specify this field, you can specify the subnetwork as a full or partial URL. For example, the following are all valid URLs:
# - https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork
# - regions/region/subnetworks/subnetwork
- "name": "A String", # [Output Only] The name of the network interface, which is generated by the server. For network devices, these are eth0, eth1, etc.
+ "network": "A String", # URL of the network resource for this instance. When creating an instance, if neither the network nor the subnetwork is specified, the default network global/networks/default is used; if the network is not specified but the subnetwork is specified, the network is inferred.
+ #
+ # If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
+ # - https://www.googleapis.com/compute/v1/projects/project/global/networks/network
+ # - projects/project/global/networks/network
+ # - global/networks/default
},
],
"minCpuPlatform": "A String", # Minimum cpu/platform to be used by this instance. The instance may be scheduled on the specified or newer cpu/platform. Applicable values are the friendly names of CPU platforms, such as minCpuPlatform: "Intel Haswell" or minCpuPlatform: "Intel Sandy Bridge". For more information, read Specifying a Minimum CPU Platform.
- "scheduling": { # Sets the scheduling options for an Instance. NextID: 9 # Specifies the scheduling options for the instances that are created from this template.
+ "scheduling": { # Sets the scheduling options for an Instance. NextID: 10 # Specifies the scheduling options for the instances that are created from this template.
"preemptible": True or False, # Defines whether the instance is preemptible. This can only be set during instance creation, it cannot be set or changed after the instance has been created.
"automaticRestart": True or False, # Specifies whether the instance should be automatically restarted if it is terminated by Compute Engine (not terminated by a user). You can only set the automatic restart option for standard instances. Preemptible instances cannot be automatically restarted.
#
# By default, this is set to true so an instance is automatically restarted if it is terminated by Compute Engine.
- "nodeAffinities": [ # A set of node affinity and anti-affinity.
+ "nodeAffinities": [ # A set of node affinity and anti-affinity configurations. Refer to Configuring node affinity for more information. Overrides reservationAffinity.
{ # Node Affinity: the configuration of desired nodes onto which this Instance could be scheduled.
- "operator": "A String", # Defines the operation of node selection.
+ "operator": "A String", # Defines the operation of node selection. Valid operators are IN for affinity and NOT_IN for anti-affinity.
"values": [ # Corresponds to the label values of Node resource.
"A String",
],
"key": "A String", # Corresponds to the label key of Node resource.
},
],
+ "minNodeCpus": 42, # The minimum number of virtual CPUs this instance will consume when running on a sole-tenant node.
"onHostMaintenance": "A String", # Defines the maintenance behavior for this instance. For standard instances, the default behavior is MIGRATE. For preemptible instances, the default and only possible behavior is TERMINATE. For more information, see Setting Instance Scheduling Options.
},
"machineType": "A String", # The machine type to use for instances that are created from this template.
@@ -456,33 +495,34 @@
</div>
<div class="method">
- <code class="details" id="getIamPolicy">getIamPolicy(project, resource)</code>
+ <code class="details" id="getIamPolicy">getIamPolicy(project, resource, optionsRequestedPolicyVersion=None)</code>
<pre>Gets the access control policy for a resource. May be empty if no such policy or resource exists.
Args:
project: string, Project ID for this request. (required)
resource: string, Name or id of the resource for this request. (required)
+ optionsRequestedPolicyVersion: integer, Requested IAM Policy version.
Returns:
An object of the form:
- { # Defines an Identity and Access Management (IAM) policy. It is used to specify access control policies for Cloud Platform resources.
+ { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources.
#
#
#
- # A `Policy` consists of a list of `bindings`. A `binding` binds a list of `members` to a `role`, where the members can be user accounts, Google groups, Google domains, and service accounts. A `role` is a named list of permissions defined by IAM.
+ # A `Policy` is a collection of `bindings`. A `binding` binds one or more `members` to a single `role`. Members can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role.
#
- # **JSON Example**
+ # Optionally, a `binding` can specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both.
#
- # { "bindings": [ { "role": "roles/owner", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-other-app@appspot.gserviceaccount.com" ] }, { "role": "roles/viewer", "members": ["user:sean@example.com"] } ] }
+ # **JSON example:**
#
- # **YAML Example**
+ # { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": ["user:eve@example.com"], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }
#
- # bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-other-app@appspot.gserviceaccount.com role: roles/owner - members: - user:sean@example.com role: roles/viewer
+ # **YAML example:**
#
+ # bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') - etag: BwWWja0YfJA= - version: 3
#
- #
- # For a description of IAM and its features, see the [IAM developer's guide](https://cloud.google.com/iam/docs).
+ # For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).
"auditConfigs": [ # Specifies cloud audit logging configuration for this policy.
{ # Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or more AuditLogConfigs.
#
@@ -490,21 +530,22 @@
#
# Example Policy with multiple AuditConfigs:
#
- # { "audit_configs": [ { "service": "allServices" "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:foo@gmail.com" ] }, { "log_type": "DATA_WRITE", }, { "log_type": "ADMIN_READ", } ] }, { "service": "fooservice.googleapis.com" "audit_log_configs": [ { "log_type": "DATA_READ", }, { "log_type": "DATA_WRITE", "exempted_members": [ "user:bar@gmail.com" ] } ] } ] }
+ # { "audit_configs": [ { "service": "allServices" "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:jose@example.com" ] }, { "log_type": "DATA_WRITE", }, { "log_type": "ADMIN_READ", } ] }, { "service": "sampleservice.googleapis.com" "audit_log_configs": [ { "log_type": "DATA_READ", }, { "log_type": "DATA_WRITE", "exempted_members": [ "user:aliya@example.com" ] } ] } ] }
#
- # For fooservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts foo@gmail.com from DATA_READ logging, and bar@gmail.com from DATA_WRITE logging.
+ # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts jose@example.com from DATA_READ logging, and aliya@example.com from DATA_WRITE logging.
"exemptedMembers": [
"A String",
],
"auditLogConfigs": [ # The configuration for logging of each type of permission.
{ # Provides the configuration for logging a type of permissions. Example:
#
- # { "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:foo@gmail.com" ] }, { "log_type": "DATA_WRITE", } ] }
+ # { "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:jose@example.com" ] }, { "log_type": "DATA_WRITE", } ] }
#
- # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting foo@gmail.com from DATA_READ logging.
+ # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting jose@example.com from DATA_READ logging.
"exemptedMembers": [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][].
"A String",
],
+ "ignoreChildExemptions": True or False,
"logType": "A String", # The log type that this config enables.
},
],
@@ -523,14 +564,18 @@
#
# Supported field names: - "authority", which is "[token]" if IAMContext.token is present, otherwise the value of IAMContext.authority_selector if present, and otherwise a representation of IAMContext.principal; or - "iam_principal", a representation of IAMContext.principal even if a token or authority selector is present; or - "" (empty string), resulting in a counter with no fields.
#
- # Examples: counter { metric: "/debug_access_count" field: "iam_principal" } ==> increment counter /iam/policy/backend_debug_access_count {iam_principal=[value of IAMContext.principal]}
- #
- # At this time we do not support multiple field names (though this may be supported in the future).
+ # Examples: counter { metric: "/debug_access_count" field: "iam_principal" } ==> increment counter /iam/policy/debug_access_count {iam_principal=[value of IAMContext.principal]}
"field": "A String", # The field value to attribute.
+ "customFields": [ # Custom fields.
+ { # Custom fields. These can be used to create a counter with arbitrary field/value pairs. See: go/rpcsp-custom-fields.
+ "name": "A String", # Name is the field name.
+ "value": "A String", # Value is the field value. It is important that in contrast to the CounterOptions.field, the value here is a constant that is not derived from the IAMContext.
+ },
+ ],
"metric": "A String", # The metric to update.
},
"dataAccess": { # Write a Data Access (Gin) log # Data access options.
- "logMode": "A String", # Whether Gin logging should happen in a fail-closed manner at the caller. This is relevant only in the LocalIAM implementation, for now.
+ "logMode": "A String", # Whether Gin logging should happen in a fail-closed manner at the caller. This is currently supported in the LocalIAM implementation, Stubby C++, and Stubby Java. For Apps Framework, see go/af-audit-logging#failclosed. TODO(b/77591626): Add support for Stubby Go. TODO(b/129671387): Add support for Scaffolding.
},
"cloudAudit": { # Write a Cloud Audit log # Cloud audit options.
"logName": "A String", # The log_name to populate in the Cloud Audit Record.
@@ -564,11 +609,21 @@
"description": "A String", # Human-readable description of the rule.
},
],
- "version": 42, # Deprecated.
+ "version": 42, # Specifies the format of the policy.
+ #
+ # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected.
+ #
+ # Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations:
+ #
+ # * Getting a policy that includes a conditional role binding * Adding a conditional role binding to a policy * Changing a conditional role binding in a policy * Removing any role binding, with or without a condition, from a policy that includes conditions
+ #
+ # **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost.
+ #
+ # If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset.
"etag": "A String", # `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy.
#
- # If no `etag` is provided in the call to `setIamPolicy`, then the existing policy is overwritten blindly.
- "bindings": [ # Associates a list of `members` to a `role`. `bindings` with no members will result in an error.
+ # **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost.
+ "bindings": [ # Associates a list of `members` to a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one member.
{ # Associates `members` with a `role`.
"role": "A String", # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
"members": [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
@@ -577,7 +632,7 @@
#
# * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
#
- # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@gmail.com` .
+ # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
#
#
#
@@ -585,20 +640,40 @@
#
# * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
#
+ # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding.
+ #
+ # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding.
+ #
+ # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding.
+ #
#
#
# * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.
"A String",
],
- "condition": { # Represents an expression text. Example: # The condition that is associated with this binding. NOTE: An unsatisfied condition will not allow user access via current binding. Different bindings, including their conditions, are examined independently.
+ "condition": { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. # The condition that is associated with this binding. NOTE: An unsatisfied condition will not allow user access via current binding. Different bindings, including their conditions, are examined independently.
#
- # title: "User account presence" description: "Determines whether the request has a user account" expression: "size(request.user) > 0"
- "title": "A String", # An optional title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
+ # Example (Comparison):
+ #
+ # title: "Summary size limit" description: "Determines if a summary is less than 100 chars" expression: "document.summary.size() < 100"
+ #
+ # Example (Equality):
+ #
+ # title: "Requestor is owner" description: "Determines if requestor is the document owner" expression: "document.owner == request.auth.claims.email"
+ #
+ # Example (Logic):
+ #
+ # title: "Public documents" description: "Determine whether the document should be publicly visible" expression: "document.type != 'private' && document.type != 'internal'"
+ #
+ # Example (Data Manipulation):
+ #
+ # title: "Notification string" description: "Create a notification string with a timestamp." expression: "'New message received at ' + string(document.create_time)"
+ #
+ # The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information.
+ "title": "A String", # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
"expression": "A String", # Textual representation of an expression in Common Expression Language syntax.
- #
- # The application context of the containing message determines which well-known feature set of CEL is supported.
- "description": "A String", # An optional description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
- "location": "A String", # An optional string indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
+ "description": "A String", # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
+ "location": "A String", # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
},
},
],
@@ -607,17 +682,17 @@
</div>
<div class="method">
- <code class="details" id="insert">insert(project, body, requestId=None)</code>
+ <code class="details" id="insert">insert(project, body=None, requestId=None)</code>
<pre>Creates an instance template in the specified project using the data that is included in the request. If you are creating a new template to update an existing instance group, your new instance template must use the same network or, if applicable, the same subnetwork as the original template.
Args:
project: string, Project ID for this request. (required)
- body: object, The request body. (required)
+ body: object, The request body.
The object takes the form of:
{ # Represents an Instance Template resource.
#
- # You can use instance templates to create VM instances and managed instance groups. For more information, read Instance Templates. (== resource_for beta.instanceTemplates ==) (== resource_for v1.instanceTemplates ==)
+ # You can use instance templates to create VM instances and managed instance groups. For more information, read Instance Templates. (== resource_for {$api_version}.instanceTemplates ==)
"kind": "compute#instanceTemplate", # [Output Only] The resource type, which is always compute#instanceTemplate for instance templates.
"sourceInstanceParams": { # A specification of the parameters to use when creating the instance template from a source instance. # The source instance params to use to create this instance template.
"diskConfigs": [ # Attached disks configuration. If not provided, defaults are applied: For boot disk and any other R/W disks, new custom images will be created from each disk. For read-only disks, they will be attached in read-only mode. Local SSD disks will be created as blank volumes.
@@ -641,11 +716,11 @@
# - projects/project/zones/zone/instances/instance
"creationTimestamp": "A String", # [Output Only] The creation timestamp for this instance template in RFC3339 text format.
"properties": { # The instance properties for this instance template.
- "reservationAffinity": { # AllocationAffinity is the configuration of desired allocation which this instance could take capacity from. # The configuration of desired reservations which this Instance could consume capacity from.
- "values": [ # Corresponds to the label values of reservation resource.
+ "reservationAffinity": { # Specifies the reservations that this instance can consume from. # Specifies the reservations that this instance can consume from.
+ "values": [ # Corresponds to the label values of a reservation resource.
"A String",
],
- "key": "A String", # Corresponds to the label key of reservation resource.
+ "key": "A String", # Corresponds to the label key of a reservation resource. To target a SPECIFIC_RESERVATION by name, specify googleapis.com/reservation-name as the key and specify the name of your reservation as its value.
"consumeReservationType": "A String", # Specifies the type of reservation from which this instance can consume resources: ANY_RESERVATION (default), SPECIFIC_RESERVATION, or NO_RESERVATION. See Consuming reserved instances for examples.
},
"disks": [ # An array of disks that are associated with the instances that are created from this template.
@@ -660,6 +735,7 @@
#
# Instance templates do not store customer-supplied encryption keys, so you cannot use your own keys to encrypt disks in a managed instance group.
"rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
+ "kmsKeyServiceAccount": "A String", # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
"sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
"rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
#
@@ -678,15 +754,16 @@
# This property is mutually exclusive with the source property; you can only define one or the other, but not both.
#
# This property is mutually exclusive with the source property; you can only define one or the other, but not both.
- "sourceSnapshot": "A String", # The source snapshot to create this disk. When creating a new instance, one of initializeParams.sourceSnapshot or disks.source is required except for local SSD.
+ "sourceSnapshot": "A String", # The source snapshot to create this disk. When creating a new instance, one of initializeParams.sourceSnapshot or initializeParams.sourceImage or disks.source is required except for local SSD.
#
# To create a disk with a snapshot that you created, specify the snapshot name in the following format:
# global/snapshots/my-backup
#
#
# If the source snapshot is deleted later, this field will not be set.
- "diskName": "A String", # Specifies the disk name. If not specified, the default is to use the name of the instance. If the disk with the instance name exists already in the given zone/region, a new name will be automatically generated.
+ "diskName": "A String", # Specifies the disk name. If not specified, the default is to use the name of the instance. If a disk with the same name already exists in the given region, the existing disk is attached to the new instance and the new disk is not created.
"description": "A String", # An optional description. Provide this property when creating the disk.
+ "onUpdateAction": "A String", # Specifies which action to take on instance update with this disk. Default is to use the existing disk.
"labels": { # Labels to apply to this disk. These can be later modified by the disks.setLabels method. This field is only applicable for persistent disks.
"a_key": "A String",
},
@@ -694,6 +771,7 @@
#
# Instance templates do not store customer-supplied encryption keys, so you cannot create disks for instances in a managed instance group if the source images are encrypted with your own keys.
"rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
+ "kmsKeyServiceAccount": "A String", # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
"sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
"rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
#
@@ -718,11 +796,11 @@
"type": "A String", # The ID of a supported feature. Read Enabling guest operating system features to see a list of available options.
},
],
- "diskSizeGb": "A String", # Specifies the size of the disk in base-2 GB.
+ "diskSizeGb": "A String", # Specifies the size of the disk in base-2 GB. The size must be at least 10 GB. If you specify a sourceImage, which is required for boot disks, the default size is the size of the sourceImage. If you do not specify a sourceImage, the default disk size is 500 GB.
"resourcePolicies": [ # Resource policies applied to this disk for automatic snapshot creations. Specified using the full or partial URL. For instance template, specify only the resource policy name.
"A String",
],
- "sourceImage": "A String", # The source image to create this disk. When creating a new instance, one of initializeParams.sourceImage or disks.source is required except for local SSD.
+ "sourceImage": "A String", # The source image to create this disk. When creating a new instance, one of initializeParams.sourceImage or initializeParams.sourceSnapshot or disks.source is required except for local SSD.
#
# To create a disk with one of the public operating system images, specify the image by its family name. For example, specify family/debian-9 to use the latest Debian 9 image:
# projects/debian-cloud/global/images/family/debian-9
@@ -743,6 +821,7 @@
# If the source image is deleted later, this field will not be set.
"sourceSnapshotEncryptionKey": { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source snapshot.
"rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
+ "kmsKeyServiceAccount": "A String", # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
"sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
"rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
#
@@ -756,18 +835,43 @@
"autoDelete": True or False, # Specifies whether the disk will be auto-deleted when the instance is deleted (but not when the disk is detached from the instance).
"index": 42, # [Output Only] A zero-based index to this disk, where 0 is reserved for the boot disk. If you have many disks attached to an instance, each disk would have a unique index number.
"boot": True or False, # Indicates that this is a boot disk. The virtual machine will use the first partition of the disk for its root filesystem.
+ "shieldedInstanceInitialState": { # Initial State for shielded instance, these are public keys which are safe to store in public # [Output Only] shielded vm initial state stored on disk
+ "dbxs": [ # The forbidden key database (dbx).
+ {
+ "content": "A String", # The raw content in the secure keys file.
+ "fileType": "A String",
+ },
+ ],
+ "dbs": [ # The Key Database (db).
+ {
+ "content": "A String", # The raw content in the secure keys file.
+ "fileType": "A String",
+ },
+ ],
+ "keks": [ # The Key Exchange Key (KEK).
+ {
+ "content": "A String", # The raw content in the secure keys file.
+ "fileType": "A String",
+ },
+ ],
+ "pk": { # The Platform Key (PK).
+ "content": "A String", # The raw content in the secure keys file.
+ "fileType": "A String",
+ },
+ },
"guestOsFeatures": [ # A list of features to enable on the guest operating system. Applicable only for bootable images. Read Enabling guest operating system features to see a list of available options.
{ # Guest OS features.
"type": "A String", # The ID of a supported feature. Read Enabling guest operating system features to see a list of available options.
},
],
+ "diskSizeGb": "A String", # The size of the disk in GB.
+ "mode": "A String", # The mode in which to attach this disk, either READ_WRITE or READ_ONLY. If not specified, the default is to attach the disk in READ_WRITE mode.
+ "interface": "A String", # Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. The default is SCSI. Persistent disks must always use SCSI and the request will fail if you attempt to attach a persistent disk in any other format than SCSI. Local SSDs can use either NVME or SCSI. For performance characteristics of SCSI over NVMe, see Local SSD performance.
"licenses": [ # [Output Only] Any valid publicly visible licenses.
"A String",
],
- "mode": "A String", # The mode in which to attach this disk, either READ_WRITE or READ_ONLY. If not specified, the default is to attach the disk in READ_WRITE mode.
- "interface": "A String", # Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. The default is SCSI. Persistent disks must always use SCSI and the request will fail if you attempt to attach a persistent disk in any other format than SCSI. Local SSDs can use either NVME or SCSI. For performance characteristics of SCSI over NVMe, see Local SSD performance. TODO(b/131765817): Update documentation when NVME is supported.
"type": "A String", # Specifies the type of the disk, either SCRATCH or PERSISTENT. If not specified, the default is PERSISTENT.
- "source": "A String", # Specifies a valid partial or full URL to an existing Persistent Disk resource. When creating a new instance, one of initializeParams.sourceImage or disks.source is required except for local SSD.
+ "source": "A String", # Specifies a valid partial or full URL to an existing Persistent Disk resource. When creating a new instance, one of initializeParams.sourceImage or initializeParams.sourceSnapshot or disks.source is required except for local SSD.
#
# If desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks.
#
@@ -800,11 +904,15 @@
"displayDevice": { # A set of Display Device options # Display Device properties to enable support for remote display products like: Teradici, VNC and TeamViewer
"enableDisplay": True or False, # Defines whether the instance has Display enabled.
},
+ "privateIpv6GoogleAccess": "A String", # The private IPv6 google access type for the VM. If not specified, use INHERIT_FROM_SUBNETWORK as default.
"shieldedInstanceConfig": { # A set of Shielded Instance options.
"enableVtpm": True or False, # Defines whether the instance has the vTPM enabled.
"enableIntegrityMonitoring": True or False, # Defines whether the instance has integrity monitoring enabled.
"enableSecureBoot": True or False, # Defines whether the instance has Secure Boot enabled.
},
+ "resourcePolicies": [ # Resource policies (names, not ULRs) applied to instances created from this template.
+ "A String",
+ ],
"networkInterfaces": [ # An array of network access configurations for this interface.
{ # A network interface resource attached to an instance.
"kind": "compute#networkInterface", # [Output Only] Type of the resource. Always compute#networkInterface for network interfaces.
@@ -814,12 +922,8 @@
"ipCidrRange": "A String", # The IP alias ranges to allocate for this interface. This IP CIDR range must belong to the specified subnetwork and cannot contain IP addresses reserved by system or used by other network interfaces. This range may be a single IP address (such as 10.2.3.4), a netmask (such as /24) or a CIDR-formatted string (such as 10.1.2.0/24).
},
],
- "network": "A String", # URL of the network resource for this instance. When creating an instance, if neither the network nor the subnetwork is specified, the default network global/networks/default is used; if the network is not specified but the subnetwork is specified, the network is inferred.
- #
- # If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
- # - https://www.googleapis.com/compute/v1/projects/project/global/networks/network
- # - projects/project/global/networks/network
- # - global/networks/default
+ "name": "A String", # [Output Only] The name of the network interface, which is generated by the server. For network devices, these are eth0, eth1, etc.
+ "ipv6Address": "A String", # [Output Only] An IPv6 internal network address for this network interface.
"accessConfigs": [ # An array of configurations for this interface. Currently, only one access config, ONE_TO_ONE_NAT, is supported. If there are no accessConfigs specified, then this instance will have no external internet access.
{ # An access configuration attached to an instance's network interface. Only one access config per instance is supported.
"kind": "compute#accessConfig", # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
@@ -840,24 +944,30 @@
"subnetwork": "A String", # The URL of the Subnetwork resource for this instance. If the network resource is in legacy mode, do not specify this field. If the network is in auto subnet mode, specifying the subnetwork is optional. If the network is in custom subnet mode, specifying the subnetwork is required. If you specify this field, you can specify the subnetwork as a full or partial URL. For example, the following are all valid URLs:
# - https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork
# - regions/region/subnetworks/subnetwork
- "name": "A String", # [Output Only] The name of the network interface, which is generated by the server. For network devices, these are eth0, eth1, etc.
+ "network": "A String", # URL of the network resource for this instance. When creating an instance, if neither the network nor the subnetwork is specified, the default network global/networks/default is used; if the network is not specified but the subnetwork is specified, the network is inferred.
+ #
+ # If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
+ # - https://www.googleapis.com/compute/v1/projects/project/global/networks/network
+ # - projects/project/global/networks/network
+ # - global/networks/default
},
],
"minCpuPlatform": "A String", # Minimum cpu/platform to be used by this instance. The instance may be scheduled on the specified or newer cpu/platform. Applicable values are the friendly names of CPU platforms, such as minCpuPlatform: "Intel Haswell" or minCpuPlatform: "Intel Sandy Bridge". For more information, read Specifying a Minimum CPU Platform.
- "scheduling": { # Sets the scheduling options for an Instance. NextID: 9 # Specifies the scheduling options for the instances that are created from this template.
+ "scheduling": { # Sets the scheduling options for an Instance. NextID: 10 # Specifies the scheduling options for the instances that are created from this template.
"preemptible": True or False, # Defines whether the instance is preemptible. This can only be set during instance creation, it cannot be set or changed after the instance has been created.
"automaticRestart": True or False, # Specifies whether the instance should be automatically restarted if it is terminated by Compute Engine (not terminated by a user). You can only set the automatic restart option for standard instances. Preemptible instances cannot be automatically restarted.
#
# By default, this is set to true so an instance is automatically restarted if it is terminated by Compute Engine.
- "nodeAffinities": [ # A set of node affinity and anti-affinity.
+ "nodeAffinities": [ # A set of node affinity and anti-affinity configurations. Refer to Configuring node affinity for more information. Overrides reservationAffinity.
{ # Node Affinity: the configuration of desired nodes onto which this Instance could be scheduled.
- "operator": "A String", # Defines the operation of node selection.
+ "operator": "A String", # Defines the operation of node selection. Valid operators are IN for affinity and NOT_IN for anti-affinity.
"values": [ # Corresponds to the label values of Node resource.
"A String",
],
"key": "A String", # Corresponds to the label key of Node resource.
},
],
+ "minNodeCpus": 42, # The minimum number of virtual CPUs this instance will consume when running on a sole-tenant node.
"onHostMaintenance": "A String", # Defines the maintenance behavior for this instance. For standard instances, the default behavior is MIGRATE. For preemptible instances, the default and only possible behavior is TERMINATE. For more information, see Setting Instance Scheduling Options.
},
"machineType": "A String", # The machine type to use for instances that are created from this template.
@@ -898,26 +1008,30 @@
{ # Represents an Operation resource.
#
+ # Google Compute Engine has three Operation resources:
+ #
+ # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
+ #
# You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
#
# Operations can be global, regional or zonal.
- # - For global operations, use the globalOperations resource.
- # - For regional operations, use the regionOperations resource.
- # - For zonal operations, use the zonalOperations resource.
+ # - For global operations, use the `globalOperations` resource.
+ # - For regional operations, use the `regionOperations` resource.
+ # - For zonal operations, use the `zonalOperations` resource.
#
- # For more information, read Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
+ # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
"targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
"clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
"creationTimestamp": "A String", # [Deprecated] This field is deprecated.
- "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
+ "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
"zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
"insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
- "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
- "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
+ "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
+ "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
"progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
- "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found.
+ "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a `404` means the resource was not found.
"statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
- "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
+ "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
"description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
"warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
{
@@ -932,10 +1046,10 @@
],
},
],
- "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
+ "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
"startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
- "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
- "name": "A String", # [Output Only] Name of the resource.
+ "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
+ "name": "A String", # [Output Only] Name of the operation.
"region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
"error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
"errors": [ # [Output Only] The array of errors encountered while processing this operation.
@@ -960,18 +1074,18 @@
project: string, Project ID for this request. (required)
orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
-You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
+You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
-Currently, only sorting by name or creationTimestamp desc is supported.
- maxResults: integer, The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)
- pageToken: string, Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.
- filter: string, A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, >, or <.
+Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ maxResults: integer, The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
+ pageToken: string, Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
+ filter: string, A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
-For example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.
+For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
-You can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
+You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
-To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true).
+To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
Returns:
An object of the form:
@@ -982,7 +1096,7 @@
"items": [ # A list of InstanceTemplate resources.
{ # Represents an Instance Template resource.
#
- # You can use instance templates to create VM instances and managed instance groups. For more information, read Instance Templates. (== resource_for beta.instanceTemplates ==) (== resource_for v1.instanceTemplates ==)
+ # You can use instance templates to create VM instances and managed instance groups. For more information, read Instance Templates. (== resource_for {$api_version}.instanceTemplates ==)
"kind": "compute#instanceTemplate", # [Output Only] The resource type, which is always compute#instanceTemplate for instance templates.
"sourceInstanceParams": { # A specification of the parameters to use when creating the instance template from a source instance. # The source instance params to use to create this instance template.
"diskConfigs": [ # Attached disks configuration. If not provided, defaults are applied: For boot disk and any other R/W disks, new custom images will be created from each disk. For read-only disks, they will be attached in read-only mode. Local SSD disks will be created as blank volumes.
@@ -1006,11 +1120,11 @@
# - projects/project/zones/zone/instances/instance
"creationTimestamp": "A String", # [Output Only] The creation timestamp for this instance template in RFC3339 text format.
"properties": { # The instance properties for this instance template.
- "reservationAffinity": { # AllocationAffinity is the configuration of desired allocation which this instance could take capacity from. # The configuration of desired reservations which this Instance could consume capacity from.
- "values": [ # Corresponds to the label values of reservation resource.
+ "reservationAffinity": { # Specifies the reservations that this instance can consume from. # Specifies the reservations that this instance can consume from.
+ "values": [ # Corresponds to the label values of a reservation resource.
"A String",
],
- "key": "A String", # Corresponds to the label key of reservation resource.
+ "key": "A String", # Corresponds to the label key of a reservation resource. To target a SPECIFIC_RESERVATION by name, specify googleapis.com/reservation-name as the key and specify the name of your reservation as its value.
"consumeReservationType": "A String", # Specifies the type of reservation from which this instance can consume resources: ANY_RESERVATION (default), SPECIFIC_RESERVATION, or NO_RESERVATION. See Consuming reserved instances for examples.
},
"disks": [ # An array of disks that are associated with the instances that are created from this template.
@@ -1025,6 +1139,7 @@
#
# Instance templates do not store customer-supplied encryption keys, so you cannot use your own keys to encrypt disks in a managed instance group.
"rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
+ "kmsKeyServiceAccount": "A String", # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
"sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
"rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
#
@@ -1043,15 +1158,16 @@
# This property is mutually exclusive with the source property; you can only define one or the other, but not both.
#
# This property is mutually exclusive with the source property; you can only define one or the other, but not both.
- "sourceSnapshot": "A String", # The source snapshot to create this disk. When creating a new instance, one of initializeParams.sourceSnapshot or disks.source is required except for local SSD.
+ "sourceSnapshot": "A String", # The source snapshot to create this disk. When creating a new instance, one of initializeParams.sourceSnapshot or initializeParams.sourceImage or disks.source is required except for local SSD.
#
# To create a disk with a snapshot that you created, specify the snapshot name in the following format:
# global/snapshots/my-backup
#
#
# If the source snapshot is deleted later, this field will not be set.
- "diskName": "A String", # Specifies the disk name. If not specified, the default is to use the name of the instance. If the disk with the instance name exists already in the given zone/region, a new name will be automatically generated.
+ "diskName": "A String", # Specifies the disk name. If not specified, the default is to use the name of the instance. If a disk with the same name already exists in the given region, the existing disk is attached to the new instance and the new disk is not created.
"description": "A String", # An optional description. Provide this property when creating the disk.
+ "onUpdateAction": "A String", # Specifies which action to take on instance update with this disk. Default is to use the existing disk.
"labels": { # Labels to apply to this disk. These can be later modified by the disks.setLabels method. This field is only applicable for persistent disks.
"a_key": "A String",
},
@@ -1059,6 +1175,7 @@
#
# Instance templates do not store customer-supplied encryption keys, so you cannot create disks for instances in a managed instance group if the source images are encrypted with your own keys.
"rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
+ "kmsKeyServiceAccount": "A String", # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
"sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
"rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
#
@@ -1083,11 +1200,11 @@
"type": "A String", # The ID of a supported feature. Read Enabling guest operating system features to see a list of available options.
},
],
- "diskSizeGb": "A String", # Specifies the size of the disk in base-2 GB.
+ "diskSizeGb": "A String", # Specifies the size of the disk in base-2 GB. The size must be at least 10 GB. If you specify a sourceImage, which is required for boot disks, the default size is the size of the sourceImage. If you do not specify a sourceImage, the default disk size is 500 GB.
"resourcePolicies": [ # Resource policies applied to this disk for automatic snapshot creations. Specified using the full or partial URL. For instance template, specify only the resource policy name.
"A String",
],
- "sourceImage": "A String", # The source image to create this disk. When creating a new instance, one of initializeParams.sourceImage or disks.source is required except for local SSD.
+ "sourceImage": "A String", # The source image to create this disk. When creating a new instance, one of initializeParams.sourceImage or initializeParams.sourceSnapshot or disks.source is required except for local SSD.
#
# To create a disk with one of the public operating system images, specify the image by its family name. For example, specify family/debian-9 to use the latest Debian 9 image:
# projects/debian-cloud/global/images/family/debian-9
@@ -1108,6 +1225,7 @@
# If the source image is deleted later, this field will not be set.
"sourceSnapshotEncryptionKey": { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source snapshot.
"rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
+ "kmsKeyServiceAccount": "A String", # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
"sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
"rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
#
@@ -1121,18 +1239,43 @@
"autoDelete": True or False, # Specifies whether the disk will be auto-deleted when the instance is deleted (but not when the disk is detached from the instance).
"index": 42, # [Output Only] A zero-based index to this disk, where 0 is reserved for the boot disk. If you have many disks attached to an instance, each disk would have a unique index number.
"boot": True or False, # Indicates that this is a boot disk. The virtual machine will use the first partition of the disk for its root filesystem.
+ "shieldedInstanceInitialState": { # Initial State for shielded instance, these are public keys which are safe to store in public # [Output Only] shielded vm initial state stored on disk
+ "dbxs": [ # The forbidden key database (dbx).
+ {
+ "content": "A String", # The raw content in the secure keys file.
+ "fileType": "A String",
+ },
+ ],
+ "dbs": [ # The Key Database (db).
+ {
+ "content": "A String", # The raw content in the secure keys file.
+ "fileType": "A String",
+ },
+ ],
+ "keks": [ # The Key Exchange Key (KEK).
+ {
+ "content": "A String", # The raw content in the secure keys file.
+ "fileType": "A String",
+ },
+ ],
+ "pk": { # The Platform Key (PK).
+ "content": "A String", # The raw content in the secure keys file.
+ "fileType": "A String",
+ },
+ },
"guestOsFeatures": [ # A list of features to enable on the guest operating system. Applicable only for bootable images. Read Enabling guest operating system features to see a list of available options.
{ # Guest OS features.
"type": "A String", # The ID of a supported feature. Read Enabling guest operating system features to see a list of available options.
},
],
+ "diskSizeGb": "A String", # The size of the disk in GB.
+ "mode": "A String", # The mode in which to attach this disk, either READ_WRITE or READ_ONLY. If not specified, the default is to attach the disk in READ_WRITE mode.
+ "interface": "A String", # Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. The default is SCSI. Persistent disks must always use SCSI and the request will fail if you attempt to attach a persistent disk in any other format than SCSI. Local SSDs can use either NVME or SCSI. For performance characteristics of SCSI over NVMe, see Local SSD performance.
"licenses": [ # [Output Only] Any valid publicly visible licenses.
"A String",
],
- "mode": "A String", # The mode in which to attach this disk, either READ_WRITE or READ_ONLY. If not specified, the default is to attach the disk in READ_WRITE mode.
- "interface": "A String", # Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. The default is SCSI. Persistent disks must always use SCSI and the request will fail if you attempt to attach a persistent disk in any other format than SCSI. Local SSDs can use either NVME or SCSI. For performance characteristics of SCSI over NVMe, see Local SSD performance. TODO(b/131765817): Update documentation when NVME is supported.
"type": "A String", # Specifies the type of the disk, either SCRATCH or PERSISTENT. If not specified, the default is PERSISTENT.
- "source": "A String", # Specifies a valid partial or full URL to an existing Persistent Disk resource. When creating a new instance, one of initializeParams.sourceImage or disks.source is required except for local SSD.
+ "source": "A String", # Specifies a valid partial or full URL to an existing Persistent Disk resource. When creating a new instance, one of initializeParams.sourceImage or initializeParams.sourceSnapshot or disks.source is required except for local SSD.
#
# If desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks.
#
@@ -1165,11 +1308,15 @@
"displayDevice": { # A set of Display Device options # Display Device properties to enable support for remote display products like: Teradici, VNC and TeamViewer
"enableDisplay": True or False, # Defines whether the instance has Display enabled.
},
+ "privateIpv6GoogleAccess": "A String", # The private IPv6 google access type for the VM. If not specified, use INHERIT_FROM_SUBNETWORK as default.
"shieldedInstanceConfig": { # A set of Shielded Instance options.
"enableVtpm": True or False, # Defines whether the instance has the vTPM enabled.
"enableIntegrityMonitoring": True or False, # Defines whether the instance has integrity monitoring enabled.
"enableSecureBoot": True or False, # Defines whether the instance has Secure Boot enabled.
},
+ "resourcePolicies": [ # Resource policies (names, not ULRs) applied to instances created from this template.
+ "A String",
+ ],
"networkInterfaces": [ # An array of network access configurations for this interface.
{ # A network interface resource attached to an instance.
"kind": "compute#networkInterface", # [Output Only] Type of the resource. Always compute#networkInterface for network interfaces.
@@ -1179,12 +1326,8 @@
"ipCidrRange": "A String", # The IP alias ranges to allocate for this interface. This IP CIDR range must belong to the specified subnetwork and cannot contain IP addresses reserved by system or used by other network interfaces. This range may be a single IP address (such as 10.2.3.4), a netmask (such as /24) or a CIDR-formatted string (such as 10.1.2.0/24).
},
],
- "network": "A String", # URL of the network resource for this instance. When creating an instance, if neither the network nor the subnetwork is specified, the default network global/networks/default is used; if the network is not specified but the subnetwork is specified, the network is inferred.
- #
- # If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
- # - https://www.googleapis.com/compute/v1/projects/project/global/networks/network
- # - projects/project/global/networks/network
- # - global/networks/default
+ "name": "A String", # [Output Only] The name of the network interface, which is generated by the server. For network devices, these are eth0, eth1, etc.
+ "ipv6Address": "A String", # [Output Only] An IPv6 internal network address for this network interface.
"accessConfigs": [ # An array of configurations for this interface. Currently, only one access config, ONE_TO_ONE_NAT, is supported. If there are no accessConfigs specified, then this instance will have no external internet access.
{ # An access configuration attached to an instance's network interface. Only one access config per instance is supported.
"kind": "compute#accessConfig", # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
@@ -1205,24 +1348,30 @@
"subnetwork": "A String", # The URL of the Subnetwork resource for this instance. If the network resource is in legacy mode, do not specify this field. If the network is in auto subnet mode, specifying the subnetwork is optional. If the network is in custom subnet mode, specifying the subnetwork is required. If you specify this field, you can specify the subnetwork as a full or partial URL. For example, the following are all valid URLs:
# - https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork
# - regions/region/subnetworks/subnetwork
- "name": "A String", # [Output Only] The name of the network interface, which is generated by the server. For network devices, these are eth0, eth1, etc.
+ "network": "A String", # URL of the network resource for this instance. When creating an instance, if neither the network nor the subnetwork is specified, the default network global/networks/default is used; if the network is not specified but the subnetwork is specified, the network is inferred.
+ #
+ # If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
+ # - https://www.googleapis.com/compute/v1/projects/project/global/networks/network
+ # - projects/project/global/networks/network
+ # - global/networks/default
},
],
"minCpuPlatform": "A String", # Minimum cpu/platform to be used by this instance. The instance may be scheduled on the specified or newer cpu/platform. Applicable values are the friendly names of CPU platforms, such as minCpuPlatform: "Intel Haswell" or minCpuPlatform: "Intel Sandy Bridge". For more information, read Specifying a Minimum CPU Platform.
- "scheduling": { # Sets the scheduling options for an Instance. NextID: 9 # Specifies the scheduling options for the instances that are created from this template.
+ "scheduling": { # Sets the scheduling options for an Instance. NextID: 10 # Specifies the scheduling options for the instances that are created from this template.
"preemptible": True or False, # Defines whether the instance is preemptible. This can only be set during instance creation, it cannot be set or changed after the instance has been created.
"automaticRestart": True or False, # Specifies whether the instance should be automatically restarted if it is terminated by Compute Engine (not terminated by a user). You can only set the automatic restart option for standard instances. Preemptible instances cannot be automatically restarted.
#
# By default, this is set to true so an instance is automatically restarted if it is terminated by Compute Engine.
- "nodeAffinities": [ # A set of node affinity and anti-affinity.
+ "nodeAffinities": [ # A set of node affinity and anti-affinity configurations. Refer to Configuring node affinity for more information. Overrides reservationAffinity.
{ # Node Affinity: the configuration of desired nodes onto which this Instance could be scheduled.
- "operator": "A String", # Defines the operation of node selection.
+ "operator": "A String", # Defines the operation of node selection. Valid operators are IN for affinity and NOT_IN for anti-affinity.
"values": [ # Corresponds to the label values of Node resource.
"A String",
],
"key": "A String", # Corresponds to the label key of Node resource.
},
],
+ "minNodeCpus": 42, # The minimum number of virtual CPUs this instance will consume when running on a sole-tenant node.
"onHostMaintenance": "A String", # Defines the maintenance behavior for this instance. For standard instances, the default behavior is MIGRATE. For preemptible instances, the default and only possible behavior is TERMINATE. For more information, see Setting Instance Scheduling Options.
},
"machineType": "A String", # The machine type to use for instances that are created from this template.
@@ -1283,33 +1432,33 @@
</div>
<div class="method">
- <code class="details" id="setIamPolicy">setIamPolicy(project, resource, body)</code>
+ <code class="details" id="setIamPolicy">setIamPolicy(project, resource, body=None)</code>
<pre>Sets the access control policy on the specified resource. Replaces any existing policy.
Args:
project: string, Project ID for this request. (required)
resource: string, Name or id of the resource for this request. (required)
- body: object, The request body. (required)
+ body: object, The request body.
The object takes the form of:
{
- "policy": { # Defines an Identity and Access Management (IAM) policy. It is used to specify access control policies for Cloud Platform resources. # REQUIRED: The complete policy to be applied to the 'resource'. The size of the policy is limited to a few 10s of KB. An empty policy is in general a valid policy but certain services (like Projects) might reject them.
+ "policy": { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. # REQUIRED: The complete policy to be applied to the 'resource'. The size of the policy is limited to a few 10s of KB. An empty policy is in general a valid policy but certain services (like Projects) might reject them.
#
#
#
- # A `Policy` consists of a list of `bindings`. A `binding` binds a list of `members` to a `role`, where the members can be user accounts, Google groups, Google domains, and service accounts. A `role` is a named list of permissions defined by IAM.
+ # A `Policy` is a collection of `bindings`. A `binding` binds one or more `members` to a single `role`. Members can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role.
#
- # **JSON Example**
+ # Optionally, a `binding` can specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both.
#
- # { "bindings": [ { "role": "roles/owner", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-other-app@appspot.gserviceaccount.com" ] }, { "role": "roles/viewer", "members": ["user:sean@example.com"] } ] }
+ # **JSON example:**
#
- # **YAML Example**
+ # { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": ["user:eve@example.com"], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }
#
- # bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-other-app@appspot.gserviceaccount.com role: roles/owner - members: - user:sean@example.com role: roles/viewer
+ # **YAML example:**
#
+ # bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') - etag: BwWWja0YfJA= - version: 3
#
- #
- # For a description of IAM and its features, see the [IAM developer's guide](https://cloud.google.com/iam/docs).
+ # For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).
"auditConfigs": [ # Specifies cloud audit logging configuration for this policy.
{ # Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or more AuditLogConfigs.
#
@@ -1317,21 +1466,22 @@
#
# Example Policy with multiple AuditConfigs:
#
- # { "audit_configs": [ { "service": "allServices" "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:foo@gmail.com" ] }, { "log_type": "DATA_WRITE", }, { "log_type": "ADMIN_READ", } ] }, { "service": "fooservice.googleapis.com" "audit_log_configs": [ { "log_type": "DATA_READ", }, { "log_type": "DATA_WRITE", "exempted_members": [ "user:bar@gmail.com" ] } ] } ] }
+ # { "audit_configs": [ { "service": "allServices" "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:jose@example.com" ] }, { "log_type": "DATA_WRITE", }, { "log_type": "ADMIN_READ", } ] }, { "service": "sampleservice.googleapis.com" "audit_log_configs": [ { "log_type": "DATA_READ", }, { "log_type": "DATA_WRITE", "exempted_members": [ "user:aliya@example.com" ] } ] } ] }
#
- # For fooservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts foo@gmail.com from DATA_READ logging, and bar@gmail.com from DATA_WRITE logging.
+ # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts jose@example.com from DATA_READ logging, and aliya@example.com from DATA_WRITE logging.
"exemptedMembers": [
"A String",
],
"auditLogConfigs": [ # The configuration for logging of each type of permission.
{ # Provides the configuration for logging a type of permissions. Example:
#
- # { "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:foo@gmail.com" ] }, { "log_type": "DATA_WRITE", } ] }
+ # { "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:jose@example.com" ] }, { "log_type": "DATA_WRITE", } ] }
#
- # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting foo@gmail.com from DATA_READ logging.
+ # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting jose@example.com from DATA_READ logging.
"exemptedMembers": [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][].
"A String",
],
+ "ignoreChildExemptions": True or False,
"logType": "A String", # The log type that this config enables.
},
],
@@ -1350,14 +1500,18 @@
#
# Supported field names: - "authority", which is "[token]" if IAMContext.token is present, otherwise the value of IAMContext.authority_selector if present, and otherwise a representation of IAMContext.principal; or - "iam_principal", a representation of IAMContext.principal even if a token or authority selector is present; or - "" (empty string), resulting in a counter with no fields.
#
- # Examples: counter { metric: "/debug_access_count" field: "iam_principal" } ==> increment counter /iam/policy/backend_debug_access_count {iam_principal=[value of IAMContext.principal]}
- #
- # At this time we do not support multiple field names (though this may be supported in the future).
+ # Examples: counter { metric: "/debug_access_count" field: "iam_principal" } ==> increment counter /iam/policy/debug_access_count {iam_principal=[value of IAMContext.principal]}
"field": "A String", # The field value to attribute.
+ "customFields": [ # Custom fields.
+ { # Custom fields. These can be used to create a counter with arbitrary field/value pairs. See: go/rpcsp-custom-fields.
+ "name": "A String", # Name is the field name.
+ "value": "A String", # Value is the field value. It is important that in contrast to the CounterOptions.field, the value here is a constant that is not derived from the IAMContext.
+ },
+ ],
"metric": "A String", # The metric to update.
},
"dataAccess": { # Write a Data Access (Gin) log # Data access options.
- "logMode": "A String", # Whether Gin logging should happen in a fail-closed manner at the caller. This is relevant only in the LocalIAM implementation, for now.
+ "logMode": "A String", # Whether Gin logging should happen in a fail-closed manner at the caller. This is currently supported in the LocalIAM implementation, Stubby C++, and Stubby Java. For Apps Framework, see go/af-audit-logging#failclosed. TODO(b/77591626): Add support for Stubby Go. TODO(b/129671387): Add support for Scaffolding.
},
"cloudAudit": { # Write a Cloud Audit log # Cloud audit options.
"logName": "A String", # The log_name to populate in the Cloud Audit Record.
@@ -1391,11 +1545,21 @@
"description": "A String", # Human-readable description of the rule.
},
],
- "version": 42, # Deprecated.
+ "version": 42, # Specifies the format of the policy.
+ #
+ # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected.
+ #
+ # Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations:
+ #
+ # * Getting a policy that includes a conditional role binding * Adding a conditional role binding to a policy * Changing a conditional role binding in a policy * Removing any role binding, with or without a condition, from a policy that includes conditions
+ #
+ # **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost.
+ #
+ # If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset.
"etag": "A String", # `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy.
#
- # If no `etag` is provided in the call to `setIamPolicy`, then the existing policy is overwritten blindly.
- "bindings": [ # Associates a list of `members` to a `role`. `bindings` with no members will result in an error.
+ # **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost.
+ "bindings": [ # Associates a list of `members` to a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one member.
{ # Associates `members` with a `role`.
"role": "A String", # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
"members": [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
@@ -1404,7 +1568,7 @@
#
# * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
#
- # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@gmail.com` .
+ # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
#
#
#
@@ -1412,20 +1576,40 @@
#
# * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
#
+ # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding.
+ #
+ # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding.
+ #
+ # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding.
+ #
#
#
# * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.
"A String",
],
- "condition": { # Represents an expression text. Example: # The condition that is associated with this binding. NOTE: An unsatisfied condition will not allow user access via current binding. Different bindings, including their conditions, are examined independently.
+ "condition": { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. # The condition that is associated with this binding. NOTE: An unsatisfied condition will not allow user access via current binding. Different bindings, including their conditions, are examined independently.
#
- # title: "User account presence" description: "Determines whether the request has a user account" expression: "size(request.user) > 0"
- "title": "A String", # An optional title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
+ # Example (Comparison):
+ #
+ # title: "Summary size limit" description: "Determines if a summary is less than 100 chars" expression: "document.summary.size() < 100"
+ #
+ # Example (Equality):
+ #
+ # title: "Requestor is owner" description: "Determines if requestor is the document owner" expression: "document.owner == request.auth.claims.email"
+ #
+ # Example (Logic):
+ #
+ # title: "Public documents" description: "Determine whether the document should be publicly visible" expression: "document.type != 'private' && document.type != 'internal'"
+ #
+ # Example (Data Manipulation):
+ #
+ # title: "Notification string" description: "Create a notification string with a timestamp." expression: "'New message received at ' + string(document.create_time)"
+ #
+ # The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information.
+ "title": "A String", # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
"expression": "A String", # Textual representation of an expression in Common Expression Language syntax.
- #
- # The application context of the containing message determines which well-known feature set of CEL is supported.
- "description": "A String", # An optional description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
- "location": "A String", # An optional string indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
+ "description": "A String", # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
+ "location": "A String", # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
},
},
],
@@ -1440,7 +1624,7 @@
#
# * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
#
- # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@gmail.com` .
+ # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
#
#
#
@@ -1448,20 +1632,40 @@
#
# * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
#
+ # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding.
+ #
+ # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding.
+ #
+ # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding.
+ #
#
#
# * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.
"A String",
],
- "condition": { # Represents an expression text. Example: # The condition that is associated with this binding. NOTE: An unsatisfied condition will not allow user access via current binding. Different bindings, including their conditions, are examined independently.
+ "condition": { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. # The condition that is associated with this binding. NOTE: An unsatisfied condition will not allow user access via current binding. Different bindings, including their conditions, are examined independently.
#
- # title: "User account presence" description: "Determines whether the request has a user account" expression: "size(request.user) > 0"
- "title": "A String", # An optional title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
+ # Example (Comparison):
+ #
+ # title: "Summary size limit" description: "Determines if a summary is less than 100 chars" expression: "document.summary.size() < 100"
+ #
+ # Example (Equality):
+ #
+ # title: "Requestor is owner" description: "Determines if requestor is the document owner" expression: "document.owner == request.auth.claims.email"
+ #
+ # Example (Logic):
+ #
+ # title: "Public documents" description: "Determine whether the document should be publicly visible" expression: "document.type != 'private' && document.type != 'internal'"
+ #
+ # Example (Data Manipulation):
+ #
+ # title: "Notification string" description: "Create a notification string with a timestamp." expression: "'New message received at ' + string(document.create_time)"
+ #
+ # The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information.
+ "title": "A String", # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
"expression": "A String", # Textual representation of an expression in Common Expression Language syntax.
- #
- # The application context of the containing message determines which well-known feature set of CEL is supported.
- "description": "A String", # An optional description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
- "location": "A String", # An optional string indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
+ "description": "A String", # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
+ "location": "A String", # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
},
},
],
@@ -1472,23 +1676,23 @@
Returns:
An object of the form:
- { # Defines an Identity and Access Management (IAM) policy. It is used to specify access control policies for Cloud Platform resources.
+ { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources.
#
#
#
- # A `Policy` consists of a list of `bindings`. A `binding` binds a list of `members` to a `role`, where the members can be user accounts, Google groups, Google domains, and service accounts. A `role` is a named list of permissions defined by IAM.
+ # A `Policy` is a collection of `bindings`. A `binding` binds one or more `members` to a single `role`. Members can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role.
#
- # **JSON Example**
+ # Optionally, a `binding` can specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both.
#
- # { "bindings": [ { "role": "roles/owner", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-other-app@appspot.gserviceaccount.com" ] }, { "role": "roles/viewer", "members": ["user:sean@example.com"] } ] }
+ # **JSON example:**
#
- # **YAML Example**
+ # { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": ["user:eve@example.com"], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }
#
- # bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-other-app@appspot.gserviceaccount.com role: roles/owner - members: - user:sean@example.com role: roles/viewer
+ # **YAML example:**
#
+ # bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') - etag: BwWWja0YfJA= - version: 3
#
- #
- # For a description of IAM and its features, see the [IAM developer's guide](https://cloud.google.com/iam/docs).
+ # For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).
"auditConfigs": [ # Specifies cloud audit logging configuration for this policy.
{ # Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or more AuditLogConfigs.
#
@@ -1496,21 +1700,22 @@
#
# Example Policy with multiple AuditConfigs:
#
- # { "audit_configs": [ { "service": "allServices" "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:foo@gmail.com" ] }, { "log_type": "DATA_WRITE", }, { "log_type": "ADMIN_READ", } ] }, { "service": "fooservice.googleapis.com" "audit_log_configs": [ { "log_type": "DATA_READ", }, { "log_type": "DATA_WRITE", "exempted_members": [ "user:bar@gmail.com" ] } ] } ] }
+ # { "audit_configs": [ { "service": "allServices" "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:jose@example.com" ] }, { "log_type": "DATA_WRITE", }, { "log_type": "ADMIN_READ", } ] }, { "service": "sampleservice.googleapis.com" "audit_log_configs": [ { "log_type": "DATA_READ", }, { "log_type": "DATA_WRITE", "exempted_members": [ "user:aliya@example.com" ] } ] } ] }
#
- # For fooservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts foo@gmail.com from DATA_READ logging, and bar@gmail.com from DATA_WRITE logging.
+ # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts jose@example.com from DATA_READ logging, and aliya@example.com from DATA_WRITE logging.
"exemptedMembers": [
"A String",
],
"auditLogConfigs": [ # The configuration for logging of each type of permission.
{ # Provides the configuration for logging a type of permissions. Example:
#
- # { "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:foo@gmail.com" ] }, { "log_type": "DATA_WRITE", } ] }
+ # { "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:jose@example.com" ] }, { "log_type": "DATA_WRITE", } ] }
#
- # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting foo@gmail.com from DATA_READ logging.
+ # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting jose@example.com from DATA_READ logging.
"exemptedMembers": [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][].
"A String",
],
+ "ignoreChildExemptions": True or False,
"logType": "A String", # The log type that this config enables.
},
],
@@ -1529,14 +1734,18 @@
#
# Supported field names: - "authority", which is "[token]" if IAMContext.token is present, otherwise the value of IAMContext.authority_selector if present, and otherwise a representation of IAMContext.principal; or - "iam_principal", a representation of IAMContext.principal even if a token or authority selector is present; or - "" (empty string), resulting in a counter with no fields.
#
- # Examples: counter { metric: "/debug_access_count" field: "iam_principal" } ==> increment counter /iam/policy/backend_debug_access_count {iam_principal=[value of IAMContext.principal]}
- #
- # At this time we do not support multiple field names (though this may be supported in the future).
+ # Examples: counter { metric: "/debug_access_count" field: "iam_principal" } ==> increment counter /iam/policy/debug_access_count {iam_principal=[value of IAMContext.principal]}
"field": "A String", # The field value to attribute.
+ "customFields": [ # Custom fields.
+ { # Custom fields. These can be used to create a counter with arbitrary field/value pairs. See: go/rpcsp-custom-fields.
+ "name": "A String", # Name is the field name.
+ "value": "A String", # Value is the field value. It is important that in contrast to the CounterOptions.field, the value here is a constant that is not derived from the IAMContext.
+ },
+ ],
"metric": "A String", # The metric to update.
},
"dataAccess": { # Write a Data Access (Gin) log # Data access options.
- "logMode": "A String", # Whether Gin logging should happen in a fail-closed manner at the caller. This is relevant only in the LocalIAM implementation, for now.
+ "logMode": "A String", # Whether Gin logging should happen in a fail-closed manner at the caller. This is currently supported in the LocalIAM implementation, Stubby C++, and Stubby Java. For Apps Framework, see go/af-audit-logging#failclosed. TODO(b/77591626): Add support for Stubby Go. TODO(b/129671387): Add support for Scaffolding.
},
"cloudAudit": { # Write a Cloud Audit log # Cloud audit options.
"logName": "A String", # The log_name to populate in the Cloud Audit Record.
@@ -1570,11 +1779,21 @@
"description": "A String", # Human-readable description of the rule.
},
],
- "version": 42, # Deprecated.
+ "version": 42, # Specifies the format of the policy.
+ #
+ # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected.
+ #
+ # Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations:
+ #
+ # * Getting a policy that includes a conditional role binding * Adding a conditional role binding to a policy * Changing a conditional role binding in a policy * Removing any role binding, with or without a condition, from a policy that includes conditions
+ #
+ # **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost.
+ #
+ # If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset.
"etag": "A String", # `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy.
#
- # If no `etag` is provided in the call to `setIamPolicy`, then the existing policy is overwritten blindly.
- "bindings": [ # Associates a list of `members` to a `role`. `bindings` with no members will result in an error.
+ # **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost.
+ "bindings": [ # Associates a list of `members` to a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one member.
{ # Associates `members` with a `role`.
"role": "A String", # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
"members": [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
@@ -1583,7 +1802,7 @@
#
# * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
#
- # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@gmail.com` .
+ # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
#
#
#
@@ -1591,20 +1810,40 @@
#
# * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
#
+ # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding.
+ #
+ # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding.
+ #
+ # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding.
+ #
#
#
# * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.
"A String",
],
- "condition": { # Represents an expression text. Example: # The condition that is associated with this binding. NOTE: An unsatisfied condition will not allow user access via current binding. Different bindings, including their conditions, are examined independently.
+ "condition": { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. # The condition that is associated with this binding. NOTE: An unsatisfied condition will not allow user access via current binding. Different bindings, including their conditions, are examined independently.
#
- # title: "User account presence" description: "Determines whether the request has a user account" expression: "size(request.user) > 0"
- "title": "A String", # An optional title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
+ # Example (Comparison):
+ #
+ # title: "Summary size limit" description: "Determines if a summary is less than 100 chars" expression: "document.summary.size() < 100"
+ #
+ # Example (Equality):
+ #
+ # title: "Requestor is owner" description: "Determines if requestor is the document owner" expression: "document.owner == request.auth.claims.email"
+ #
+ # Example (Logic):
+ #
+ # title: "Public documents" description: "Determine whether the document should be publicly visible" expression: "document.type != 'private' && document.type != 'internal'"
+ #
+ # Example (Data Manipulation):
+ #
+ # title: "Notification string" description: "Create a notification string with a timestamp." expression: "'New message received at ' + string(document.create_time)"
+ #
+ # The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information.
+ "title": "A String", # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
"expression": "A String", # Textual representation of an expression in Common Expression Language syntax.
- #
- # The application context of the containing message determines which well-known feature set of CEL is supported.
- "description": "A String", # An optional description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
- "location": "A String", # An optional string indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
+ "description": "A String", # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
+ "location": "A String", # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
},
},
],
@@ -1613,13 +1852,13 @@
</div>
<div class="method">
- <code class="details" id="testIamPermissions">testIamPermissions(project, resource, body)</code>
+ <code class="details" id="testIamPermissions">testIamPermissions(project, resource, body=None)</code>
<pre>Returns permissions that a caller has on the specified resource.
Args:
project: string, Project ID for this request. (required)
resource: string, Name or id of the resource for this request. (required)
- body: object, The request body. (required)
+ body: object, The request body.
The object takes the form of:
{