blob: c1c2ef272ae94609d66938ae49228f55e7bcf2fa [file] [log] [blame]
<html><body>
<style>
body, h1, h2, h3, div, span, p, pre, a {
margin: 0;
padding: 0;
border: 0;
font-weight: inherit;
font-style: inherit;
font-size: 100%;
font-family: inherit;
vertical-align: baseline;
}
body {
font-size: 13px;
padding: 1em;
}
h1 {
font-size: 26px;
margin-bottom: 1em;
}
h2 {
font-size: 24px;
margin-bottom: 1em;
}
h3 {
font-size: 20px;
margin-bottom: 1em;
margin-top: 1em;
}
pre, code {
line-height: 1.5;
font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
}
pre {
margin-top: 0.5em;
}
h1, h2, h3, p {
font-family: Arial, sans serif;
}
h1, h2, h3 {
border-bottom: solid #CCC 1px;
}
.toc_element {
margin-top: 0.5em;
}
.firstline {
margin-left: 2 em;
}
.method {
margin-top: 1em;
border: solid 1px #CCC;
padding: 1em;
background: #EEE;
}
.details {
font-weight: bold;
font-size: 14px;
}
</style>
<h1><a href="compute_alpha.html">Compute Engine API</a> . <a href="compute_alpha.projects.html">projects</a></h1>
<h2>Instance Methods</h2>
<p class="toc_element">
<code><a href="#disableXpnHost">disableXpnHost(project, requestId=None)</a></code></p>
<p class="firstline">Disable this project as a shared VPC host project.</p>
<p class="toc_element">
<code><a href="#disableXpnResource">disableXpnResource(project, body=None, requestId=None)</a></code></p>
<p class="firstline">Disable a service resource (also known as service project) associated with this host project.</p>
<p class="toc_element">
<code><a href="#enableXpnHost">enableXpnHost(project, requestId=None)</a></code></p>
<p class="firstline">Enable this project as a shared VPC host project.</p>
<p class="toc_element">
<code><a href="#enableXpnResource">enableXpnResource(project, body=None, requestId=None)</a></code></p>
<p class="firstline">Enable service resource (a.k.a service project) for a host project, so that subnets in the host project can be used by instances in the service project.</p>
<p class="toc_element">
<code><a href="#get">get(project)</a></code></p>
<p class="firstline">Returns the specified Project resource.</p>
<p class="toc_element">
<code><a href="#getXpnHost">getXpnHost(project)</a></code></p>
<p class="firstline">Gets the shared VPC host project that this project links to. May be empty if no link exists.</p>
<p class="toc_element">
<code><a href="#getXpnResources">getXpnResources(project, filter=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</a></code></p>
<p class="firstline">Gets service resources (a.k.a service project) associated with this host project.</p>
<p class="toc_element">
<code><a href="#getXpnResources_next">getXpnResources_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="#listXpnHosts">listXpnHosts(project, body=None, filter=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</a></code></p>
<p class="firstline">Lists all shared VPC host projects visible to the user in an organization.</p>
<p class="toc_element">
<code><a href="#listXpnHosts_next">listXpnHosts_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="#moveDisk">moveDisk(project, body=None, requestId=None)</a></code></p>
<p class="firstline">Moves a persistent disk from one zone to another.</p>
<p class="toc_element">
<code><a href="#moveInstance">moveInstance(project, body=None, requestId=None)</a></code></p>
<p class="firstline">Moves an instance and its attached persistent disks from one zone to another.</p>
<p class="toc_element">
<code><a href="#setCommonInstanceMetadata">setCommonInstanceMetadata(project, body=None, requestId=None)</a></code></p>
<p class="firstline">Sets metadata common to all instances within the specified project using the data included in the request.</p>
<p class="toc_element">
<code><a href="#setDefaultNetworkTier">setDefaultNetworkTier(project, body=None, requestId=None)</a></code></p>
<p class="firstline">Sets the default network tier of the project. The default network tier is used when an address/forwardingRule/instance is created without specifying the network tier field.</p>
<p class="toc_element">
<code><a href="#setDefaultServiceAccount">setDefaultServiceAccount(project, body=None, requestId=None)</a></code></p>
<p class="firstline">Sets the default service account of the project. The default service account is used when a VM instance is created with the service account email address set to "default".</p>
<p class="toc_element">
<code><a href="#setUsageExportBucket">setUsageExportBucket(project, body=None, requestId=None)</a></code></p>
<p class="firstline">Enables the usage export feature and sets the usage export bucket where reports are stored. If you provide an empty request body using this method, the usage export feature will be disabled.</p>
<h3>Method Details</h3>
<div class="method">
<code class="details" id="disableXpnHost">disableXpnHost(project, requestId=None)</code>
<pre>Disable this project as a shared VPC host project.
Args:
project: string, Project ID for this request. (required)
requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Returns:
An object of the form:
{ # 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 more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
&quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
&quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
&quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
&quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
&quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
&quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
{
&quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
&quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
&quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
},
],
},
&quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
&quot;httpErrorStatusCode&quot;: 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.
&quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
&quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
&quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
&quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
&quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
&quot;progress&quot;: 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.
&quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
&quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
&quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
&quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
&quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
&quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
&quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
&quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
&quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
&quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
{
&quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
&quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
# &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
{
&quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
&quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
},
],
&quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
},
],
&quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
}</pre>
</div>
<div class="method">
<code class="details" id="disableXpnResource">disableXpnResource(project, body=None, requestId=None)</code>
<pre>Disable a service resource (also known as service project) associated with this host project.
Args:
project: string, Project ID for this request. (required)
body: object, The request body.
The object takes the form of:
{
&quot;xpnResource&quot;: { # Service resource (a.k.a service project) ID. # Service resource (a.k.a service project) ID.
&quot;id&quot;: &quot;A String&quot;, # The ID of the service resource. In the case of projects, this field supports project id (e.g., my-project-123) and project number (e.g. 12345678).
&quot;type&quot;: &quot;A String&quot;, # The type of the service resource.
},
}
requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Returns:
An object of the form:
{ # 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 more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
&quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
&quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
&quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
&quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
&quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
&quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
{
&quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
&quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
&quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
},
],
},
&quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
&quot;httpErrorStatusCode&quot;: 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.
&quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
&quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
&quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
&quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
&quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
&quot;progress&quot;: 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.
&quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
&quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
&quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
&quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
&quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
&quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
&quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
&quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
&quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
&quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
{
&quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
&quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
# &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
{
&quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
&quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
},
],
&quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
},
],
&quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
}</pre>
</div>
<div class="method">
<code class="details" id="enableXpnHost">enableXpnHost(project, requestId=None)</code>
<pre>Enable this project as a shared VPC host project.
Args:
project: string, Project ID for this request. (required)
requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Returns:
An object of the form:
{ # 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 more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
&quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
&quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
&quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
&quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
&quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
&quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
{
&quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
&quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
&quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
},
],
},
&quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
&quot;httpErrorStatusCode&quot;: 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.
&quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
&quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
&quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
&quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
&quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
&quot;progress&quot;: 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.
&quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
&quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
&quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
&quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
&quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
&quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
&quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
&quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
&quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
&quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
{
&quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
&quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
# &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
{
&quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
&quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
},
],
&quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
},
],
&quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
}</pre>
</div>
<div class="method">
<code class="details" id="enableXpnResource">enableXpnResource(project, body=None, requestId=None)</code>
<pre>Enable service resource (a.k.a service project) for a host project, so that subnets in the host project can be used by instances in the service project.
Args:
project: string, Project ID for this request. (required)
body: object, The request body.
The object takes the form of:
{
&quot;xpnResource&quot;: { # Service resource (a.k.a service project) ID. # Service resource (a.k.a service project) ID.
&quot;id&quot;: &quot;A String&quot;, # The ID of the service resource. In the case of projects, this field supports project id (e.g., my-project-123) and project number (e.g. 12345678).
&quot;type&quot;: &quot;A String&quot;, # The type of the service resource.
},
}
requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Returns:
An object of the form:
{ # 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 more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
&quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
&quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
&quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
&quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
&quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
&quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
{
&quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
&quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
&quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
},
],
},
&quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
&quot;httpErrorStatusCode&quot;: 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.
&quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
&quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
&quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
&quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
&quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
&quot;progress&quot;: 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.
&quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
&quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
&quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
&quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
&quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
&quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
&quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
&quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
&quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
&quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
{
&quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
&quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
# &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
{
&quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
&quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
},
],
&quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
},
],
&quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
}</pre>
</div>
<div class="method">
<code class="details" id="get">get(project)</code>
<pre>Returns the specified Project resource.
Args:
project: string, Project ID for this request. (required)
Returns:
An object of the form:
{ # Represents a Project resource.
#
# A project is used to organize resources in a Google Cloud Platform environment. For more information, read about the Resource Hierarchy. (== resource_for {$api_version}.projects ==)
&quot;commonInstanceMetadata&quot;: { # A metadata key/value entry. # Metadata key/value pairs available to all instances contained in this project. See Custom metadata for more information.
&quot;fingerprint&quot;: &quot;A String&quot;, # Specifies a fingerprint for this request, which is essentially a hash of the metadata&#x27;s contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata, otherwise the request will fail with error 412 conditionNotMet.
#
# To see the latest fingerprint, make a get() request to retrieve the resource.
&quot;items&quot;: [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
{
&quot;key&quot;: &quot;A String&quot;, # Key for the metadata entry. Keys must conform to the following regexp: [a-zA-Z0-9-_]+, and be less than 128 bytes in length. This is reflected as part of a URL in the metadata server. Additionally, to avoid ambiguity, keys must not conflict with any other metadata keys for the project.
&quot;value&quot;: &quot;A String&quot;, # Value for the metadata entry. These are free-form strings, and only have meaning as interpreted by the image running in the instance. The only restriction placed on values is that their size must be less than or equal to 262144 bytes (256 KiB).
},
],
&quot;kind&quot;: &quot;compute#metadata&quot;, # [Output Only] Type of the resource. Always compute#metadata for metadata.
},
&quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
&quot;defaultNetworkTier&quot;: &quot;A String&quot;, # This signifies the default network tier used for configuring resources of the project and can only take the following values: PREMIUM, STANDARD. Initially the default network tier is PREMIUM.
&quot;defaultServiceAccount&quot;: &quot;A String&quot;, # [Output Only] Default service account used by VMs running in this project.
&quot;description&quot;: &quot;A String&quot;, # An optional textual description of the resource.
&quot;enabledFeatures&quot;: [ # Restricted features enabled for use on this project.
&quot;A String&quot;,
],
&quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server. This is not the project ID, and is just a unique ID used by Compute Engine to identify resources.
&quot;kind&quot;: &quot;compute#project&quot;, # [Output Only] Type of the resource. Always compute#project for projects.
&quot;name&quot;: &quot;A String&quot;, # The project ID. For example: my-example-project. Use the project ID to make requests to Compute Engine.
&quot;quotas&quot;: [ # [Output Only] Quotas assigned to this project.
{ # A quotas entry.
&quot;limit&quot;: 3.14, # [Output Only] Quota limit for this metric.
&quot;metric&quot;: &quot;A String&quot;, # [Output Only] Name of the quota metric.
&quot;owner&quot;: &quot;A String&quot;, # [Output Only] Owning resource. This is the resource on which this quota is applied.
&quot;usage&quot;: 3.14, # [Output Only] Current usage of this metric.
},
],
&quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
&quot;usageExportLocation&quot;: { # The location in Cloud Storage and naming method of the daily usage report. Contains bucket_name and report_name prefix. # The naming prefix for daily usage reports and the Google Cloud Storage bucket where they are stored.
&quot;bucketName&quot;: &quot;A String&quot;, # The name of an existing bucket in Cloud Storage where the usage report object is stored. The Google Service Account is granted write access to this bucket. This can either be the bucket name by itself, such as example-bucket, or the bucket name with gs:// or https://storage.googleapis.com/ in front of it, such as gs://example-bucket.
&quot;reportNamePrefix&quot;: &quot;A String&quot;, # An optional prefix for the name of the usage report object stored in bucketName. If not supplied, defaults to usage. The report is stored as a CSV file named report_name_prefix_gce_YYYYMMDD.csv where YYYYMMDD is the day of the usage according to Pacific Time. If you supply a prefix, it should conform to Cloud Storage object naming conventions.
},
&quot;xpnProjectStatus&quot;: &quot;A String&quot;, # [Output Only] The role this project has in a shared VPC configuration. Currently only HOST projects are differentiated.
}</pre>
</div>
<div class="method">
<code class="details" id="getXpnHost">getXpnHost(project)</code>
<pre>Gets the shared VPC host project that this project links to. May be empty if no link exists.
Args:
project: string, Project ID for this request. (required)
Returns:
An object of the form:
{ # Represents a Project resource.
#
# A project is used to organize resources in a Google Cloud Platform environment. For more information, read about the Resource Hierarchy. (== resource_for {$api_version}.projects ==)
&quot;commonInstanceMetadata&quot;: { # A metadata key/value entry. # Metadata key/value pairs available to all instances contained in this project. See Custom metadata for more information.
&quot;fingerprint&quot;: &quot;A String&quot;, # Specifies a fingerprint for this request, which is essentially a hash of the metadata&#x27;s contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata, otherwise the request will fail with error 412 conditionNotMet.
#
# To see the latest fingerprint, make a get() request to retrieve the resource.
&quot;items&quot;: [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
{
&quot;key&quot;: &quot;A String&quot;, # Key for the metadata entry. Keys must conform to the following regexp: [a-zA-Z0-9-_]+, and be less than 128 bytes in length. This is reflected as part of a URL in the metadata server. Additionally, to avoid ambiguity, keys must not conflict with any other metadata keys for the project.
&quot;value&quot;: &quot;A String&quot;, # Value for the metadata entry. These are free-form strings, and only have meaning as interpreted by the image running in the instance. The only restriction placed on values is that their size must be less than or equal to 262144 bytes (256 KiB).
},
],
&quot;kind&quot;: &quot;compute#metadata&quot;, # [Output Only] Type of the resource. Always compute#metadata for metadata.
},
&quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
&quot;defaultNetworkTier&quot;: &quot;A String&quot;, # This signifies the default network tier used for configuring resources of the project and can only take the following values: PREMIUM, STANDARD. Initially the default network tier is PREMIUM.
&quot;defaultServiceAccount&quot;: &quot;A String&quot;, # [Output Only] Default service account used by VMs running in this project.
&quot;description&quot;: &quot;A String&quot;, # An optional textual description of the resource.
&quot;enabledFeatures&quot;: [ # Restricted features enabled for use on this project.
&quot;A String&quot;,
],
&quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server. This is not the project ID, and is just a unique ID used by Compute Engine to identify resources.
&quot;kind&quot;: &quot;compute#project&quot;, # [Output Only] Type of the resource. Always compute#project for projects.
&quot;name&quot;: &quot;A String&quot;, # The project ID. For example: my-example-project. Use the project ID to make requests to Compute Engine.
&quot;quotas&quot;: [ # [Output Only] Quotas assigned to this project.
{ # A quotas entry.
&quot;limit&quot;: 3.14, # [Output Only] Quota limit for this metric.
&quot;metric&quot;: &quot;A String&quot;, # [Output Only] Name of the quota metric.
&quot;owner&quot;: &quot;A String&quot;, # [Output Only] Owning resource. This is the resource on which this quota is applied.
&quot;usage&quot;: 3.14, # [Output Only] Current usage of this metric.
},
],
&quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
&quot;usageExportLocation&quot;: { # The location in Cloud Storage and naming method of the daily usage report. Contains bucket_name and report_name prefix. # The naming prefix for daily usage reports and the Google Cloud Storage bucket where they are stored.
&quot;bucketName&quot;: &quot;A String&quot;, # The name of an existing bucket in Cloud Storage where the usage report object is stored. The Google Service Account is granted write access to this bucket. This can either be the bucket name by itself, such as example-bucket, or the bucket name with gs:// or https://storage.googleapis.com/ in front of it, such as gs://example-bucket.
&quot;reportNamePrefix&quot;: &quot;A String&quot;, # An optional prefix for the name of the usage report object stored in bucketName. If not supplied, defaults to usage. The report is stored as a CSV file named report_name_prefix_gce_YYYYMMDD.csv where YYYYMMDD is the day of the usage according to Pacific Time. If you supply a prefix, it should conform to Cloud Storage object naming conventions.
},
&quot;xpnProjectStatus&quot;: &quot;A String&quot;, # [Output Only] The role this project has in a shared VPC configuration. Currently only HOST projects are differentiated.
}</pre>
</div>
<div class="method">
<code class="details" id="getXpnResources">getXpnResources(project, filter=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</code>
<pre>Gets service resources (a.k.a service project) associated with this host project.
Args:
project: string, Project ID for this request. (required)
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 `=`, `!=`, `&gt;`, or `&lt;`.
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.
To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = &quot;Intel Skylake&quot;) ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = &quot;Intel Skylake&quot;) OR (cpuPlatform = &quot;Intel Broadwell&quot;) AND (scheduling.automaticRestart = true) ```
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`)
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=&quot;creationTimestamp desc&quot;`. 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.
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.
returnPartialSuccess: boolean, Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
Returns:
An object of the form:
{
&quot;kind&quot;: &quot;compute#projectsGetXpnResources&quot;, # [Output Only] Type of resource. Always compute#projectsGetXpnResources for lists of service resources (a.k.a service projects)
&quot;nextPageToken&quot;: &quot;A String&quot;, # [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.
&quot;resources&quot;: [ # Service resources (a.k.a service projects) attached to this project as their shared VPC host.
{ # Service resource (a.k.a service project) ID.
&quot;id&quot;: &quot;A String&quot;, # The ID of the service resource. In the case of projects, this field supports project id (e.g., my-project-123) and project number (e.g. 12345678).
&quot;type&quot;: &quot;A String&quot;, # The type of the service resource.
},
],
}</pre>
</div>
<div class="method">
<code class="details" id="getXpnResources_next">getXpnResources_next(previous_request, previous_response)</code>
<pre>Retrieves the next page of results.
Args:
previous_request: The request for the previous page. (required)
previous_response: The response from the request for the previous page. (required)
Returns:
A request object that you can call &#x27;execute()&#x27; on to request the next
page. Returns None if there are no more items in the collection.
</pre>
</div>
<div class="method">
<code class="details" id="listXpnHosts">listXpnHosts(project, body=None, filter=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</code>
<pre>Lists all shared VPC host projects visible to the user in an organization.
Args:
project: string, Project ID for this request. (required)
body: object, The request body.
The object takes the form of:
{
&quot;organization&quot;: &quot;A String&quot;, # Optional organization ID managed by Cloud Resource Manager, for which to list shared VPC host projects. If not specified, the organization will be inferred from the project.
}
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 `=`, `!=`, `&gt;`, or `&lt;`.
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.
To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = &quot;Intel Skylake&quot;) ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = &quot;Intel Skylake&quot;) OR (cpuPlatform = &quot;Intel Broadwell&quot;) AND (scheduling.automaticRestart = true) ```
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`)
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=&quot;creationTimestamp desc&quot;`. 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.
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.
returnPartialSuccess: boolean, Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
Returns:
An object of the form:
{
&quot;id&quot;: &quot;A String&quot;, # [Output Only] Unique identifier for the resource; defined by the server.
&quot;items&quot;: [ # [Output Only] A list of shared VPC host project URLs.
{ # Represents a Project resource.
#
# A project is used to organize resources in a Google Cloud Platform environment. For more information, read about the Resource Hierarchy. (== resource_for {$api_version}.projects ==)
&quot;commonInstanceMetadata&quot;: { # A metadata key/value entry. # Metadata key/value pairs available to all instances contained in this project. See Custom metadata for more information.
&quot;fingerprint&quot;: &quot;A String&quot;, # Specifies a fingerprint for this request, which is essentially a hash of the metadata&#x27;s contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata, otherwise the request will fail with error 412 conditionNotMet.
#
# To see the latest fingerprint, make a get() request to retrieve the resource.
&quot;items&quot;: [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
{
&quot;key&quot;: &quot;A String&quot;, # Key for the metadata entry. Keys must conform to the following regexp: [a-zA-Z0-9-_]+, and be less than 128 bytes in length. This is reflected as part of a URL in the metadata server. Additionally, to avoid ambiguity, keys must not conflict with any other metadata keys for the project.
&quot;value&quot;: &quot;A String&quot;, # Value for the metadata entry. These are free-form strings, and only have meaning as interpreted by the image running in the instance. The only restriction placed on values is that their size must be less than or equal to 262144 bytes (256 KiB).
},
],
&quot;kind&quot;: &quot;compute#metadata&quot;, # [Output Only] Type of the resource. Always compute#metadata for metadata.
},
&quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
&quot;defaultNetworkTier&quot;: &quot;A String&quot;, # This signifies the default network tier used for configuring resources of the project and can only take the following values: PREMIUM, STANDARD. Initially the default network tier is PREMIUM.
&quot;defaultServiceAccount&quot;: &quot;A String&quot;, # [Output Only] Default service account used by VMs running in this project.
&quot;description&quot;: &quot;A String&quot;, # An optional textual description of the resource.
&quot;enabledFeatures&quot;: [ # Restricted features enabled for use on this project.
&quot;A String&quot;,
],
&quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server. This is not the project ID, and is just a unique ID used by Compute Engine to identify resources.
&quot;kind&quot;: &quot;compute#project&quot;, # [Output Only] Type of the resource. Always compute#project for projects.
&quot;name&quot;: &quot;A String&quot;, # The project ID. For example: my-example-project. Use the project ID to make requests to Compute Engine.
&quot;quotas&quot;: [ # [Output Only] Quotas assigned to this project.
{ # A quotas entry.
&quot;limit&quot;: 3.14, # [Output Only] Quota limit for this metric.
&quot;metric&quot;: &quot;A String&quot;, # [Output Only] Name of the quota metric.
&quot;owner&quot;: &quot;A String&quot;, # [Output Only] Owning resource. This is the resource on which this quota is applied.
&quot;usage&quot;: 3.14, # [Output Only] Current usage of this metric.
},
],
&quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
&quot;usageExportLocation&quot;: { # The location in Cloud Storage and naming method of the daily usage report. Contains bucket_name and report_name prefix. # The naming prefix for daily usage reports and the Google Cloud Storage bucket where they are stored.
&quot;bucketName&quot;: &quot;A String&quot;, # The name of an existing bucket in Cloud Storage where the usage report object is stored. The Google Service Account is granted write access to this bucket. This can either be the bucket name by itself, such as example-bucket, or the bucket name with gs:// or https://storage.googleapis.com/ in front of it, such as gs://example-bucket.
&quot;reportNamePrefix&quot;: &quot;A String&quot;, # An optional prefix for the name of the usage report object stored in bucketName. If not supplied, defaults to usage. The report is stored as a CSV file named report_name_prefix_gce_YYYYMMDD.csv where YYYYMMDD is the day of the usage according to Pacific Time. If you supply a prefix, it should conform to Cloud Storage object naming conventions.
},
&quot;xpnProjectStatus&quot;: &quot;A String&quot;, # [Output Only] The role this project has in a shared VPC configuration. Currently only HOST projects are differentiated.
},
],
&quot;kind&quot;: &quot;compute#xpnHostList&quot;, # [Output Only] Type of resource. Always compute#xpnHostList for lists of shared VPC hosts.
&quot;nextPageToken&quot;: &quot;A String&quot;, # [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.
&quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
&quot;warning&quot;: { # [Output Only] Informational warning message.
&quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
&quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
# &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
{
&quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
&quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
},
],
&quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
},
}</pre>
</div>
<div class="method">
<code class="details" id="listXpnHosts_next">listXpnHosts_next(previous_request, previous_response)</code>
<pre>Retrieves the next page of results.
Args:
previous_request: The request for the previous page. (required)
previous_response: The response from the request for the previous page. (required)
Returns:
A request object that you can call &#x27;execute()&#x27; on to request the next
page. Returns None if there are no more items in the collection.
</pre>
</div>
<div class="method">
<code class="details" id="moveDisk">moveDisk(project, body=None, requestId=None)</code>
<pre>Moves a persistent disk from one zone to another.
Args:
project: string, Project ID for this request. (required)
body: object, The request body.
The object takes the form of:
{
&quot;destinationZone&quot;: &quot;A String&quot;, # The URL of the destination zone to move the disk. This can be a full or partial URL. For example, the following are all valid URLs to a zone:
# - https://www.googleapis.com/compute/v1/projects/project/zones/zone
# - projects/project/zones/zone
# - zones/zone
&quot;targetDisk&quot;: &quot;A String&quot;, # The URL of the target disk to move. This can be a full or partial URL. For example, the following are all valid URLs to a disk:
# - https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk
# - projects/project/zones/zone/disks/disk
# - zones/zone/disks/disk
}
requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Returns:
An object of the form:
{ # 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 more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
&quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
&quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
&quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
&quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
&quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
&quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
{
&quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
&quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
&quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
},
],
},
&quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
&quot;httpErrorStatusCode&quot;: 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.
&quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
&quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
&quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
&quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
&quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
&quot;progress&quot;: 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.
&quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
&quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
&quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
&quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
&quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
&quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
&quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
&quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
&quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
&quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
{
&quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
&quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
# &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
{
&quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
&quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
},
],
&quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
},
],
&quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
}</pre>
</div>
<div class="method">
<code class="details" id="moveInstance">moveInstance(project, body=None, requestId=None)</code>
<pre>Moves an instance and its attached persistent disks from one zone to another.
Args:
project: string, Project ID for this request. (required)
body: object, The request body.
The object takes the form of:
{
&quot;destinationZone&quot;: &quot;A String&quot;, # The URL of the destination zone to move the instance. This can be a full or partial URL. For example, the following are all valid URLs to a zone:
# - https://www.googleapis.com/compute/v1/projects/project/zones/zone
# - projects/project/zones/zone
# - zones/zone
&quot;targetInstance&quot;: &quot;A String&quot;, # The URL of the target instance to move. This can be a full or partial URL. For example, the following are all valid URLs to an instance:
# - https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/instance
# - projects/project/zones/zone/instances/instance
# - zones/zone/instances/instance
}
requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Returns:
An object of the form:
{ # 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 more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
&quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
&quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
&quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
&quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
&quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
&quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
{
&quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
&quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
&quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
},
],
},
&quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
&quot;httpErrorStatusCode&quot;: 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.
&quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
&quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
&quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
&quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
&quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
&quot;progress&quot;: 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.
&quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
&quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
&quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
&quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
&quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
&quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
&quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
&quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
&quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
&quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
{
&quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
&quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
# &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
{
&quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
&quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
},
],
&quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
},
],
&quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
}</pre>
</div>
<div class="method">
<code class="details" id="setCommonInstanceMetadata">setCommonInstanceMetadata(project, body=None, requestId=None)</code>
<pre>Sets metadata common to all instances within the specified project using the data included in the request.
Args:
project: string, Project ID for this request. (required)
body: object, The request body.
The object takes the form of:
{ # A metadata key/value entry.
&quot;fingerprint&quot;: &quot;A String&quot;, # Specifies a fingerprint for this request, which is essentially a hash of the metadata&#x27;s contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata, otherwise the request will fail with error 412 conditionNotMet.
#
# To see the latest fingerprint, make a get() request to retrieve the resource.
&quot;items&quot;: [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
{
&quot;key&quot;: &quot;A String&quot;, # Key for the metadata entry. Keys must conform to the following regexp: [a-zA-Z0-9-_]+, and be less than 128 bytes in length. This is reflected as part of a URL in the metadata server. Additionally, to avoid ambiguity, keys must not conflict with any other metadata keys for the project.
&quot;value&quot;: &quot;A String&quot;, # Value for the metadata entry. These are free-form strings, and only have meaning as interpreted by the image running in the instance. The only restriction placed on values is that their size must be less than or equal to 262144 bytes (256 KiB).
},
],
&quot;kind&quot;: &quot;compute#metadata&quot;, # [Output Only] Type of the resource. Always compute#metadata for metadata.
}
requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Returns:
An object of the form:
{ # 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 more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
&quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
&quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
&quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
&quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
&quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
&quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
{
&quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
&quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
&quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
},
],
},
&quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
&quot;httpErrorStatusCode&quot;: 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.
&quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
&quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
&quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
&quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
&quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
&quot;progress&quot;: 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.
&quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
&quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
&quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
&quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
&quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
&quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
&quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
&quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
&quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
&quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
{
&quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
&quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
# &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
{
&quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
&quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
},
],
&quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
},
],
&quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
}</pre>
</div>
<div class="method">
<code class="details" id="setDefaultNetworkTier">setDefaultNetworkTier(project, body=None, requestId=None)</code>
<pre>Sets the default network tier of the project. The default network tier is used when an address/forwardingRule/instance is created without specifying the network tier field.
Args:
project: string, Project ID for this request. (required)
body: object, The request body.
The object takes the form of:
{
&quot;networkTier&quot;: &quot;A String&quot;, # Default network tier to be set.
}
requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Returns:
An object of the form:
{ # 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 more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
&quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
&quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
&quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
&quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
&quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
&quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
{
&quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
&quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
&quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
},
],
},
&quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
&quot;httpErrorStatusCode&quot;: 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.
&quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
&quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
&quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
&quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
&quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
&quot;progress&quot;: 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.
&quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
&quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
&quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
&quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
&quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
&quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
&quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
&quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
&quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
&quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
{
&quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
&quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
# &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
{
&quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
&quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
},
],
&quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
},
],
&quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
}</pre>
</div>
<div class="method">
<code class="details" id="setDefaultServiceAccount">setDefaultServiceAccount(project, body=None, requestId=None)</code>
<pre>Sets the default service account of the project. The default service account is used when a VM instance is created with the service account email address set to &quot;default&quot;.
Args:
project: string, Project ID for this request. (required)
body: object, The request body.
The object takes the form of:
{
&quot;email&quot;: &quot;A String&quot;, # Email address of the service account.
}
requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Returns:
An object of the form:
{ # 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 more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
&quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
&quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
&quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
&quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
&quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
&quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
{
&quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
&quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
&quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
},
],
},
&quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
&quot;httpErrorStatusCode&quot;: 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.
&quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
&quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
&quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
&quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
&quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
&quot;progress&quot;: 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.
&quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
&quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
&quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
&quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
&quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
&quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
&quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
&quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
&quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
&quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
{
&quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
&quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
# &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
{
&quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
&quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
},
],
&quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
},
],
&quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
}</pre>
</div>
<div class="method">
<code class="details" id="setUsageExportBucket">setUsageExportBucket(project, body=None, requestId=None)</code>
<pre>Enables the usage export feature and sets the usage export bucket where reports are stored. If you provide an empty request body using this method, the usage export feature will be disabled.
Args:
project: string, Project ID for this request. (required)
body: object, The request body.
The object takes the form of:
{ # The location in Cloud Storage and naming method of the daily usage report. Contains bucket_name and report_name prefix.
&quot;bucketName&quot;: &quot;A String&quot;, # The name of an existing bucket in Cloud Storage where the usage report object is stored. The Google Service Account is granted write access to this bucket. This can either be the bucket name by itself, such as example-bucket, or the bucket name with gs:// or https://storage.googleapis.com/ in front of it, such as gs://example-bucket.
&quot;reportNamePrefix&quot;: &quot;A String&quot;, # An optional prefix for the name of the usage report object stored in bucketName. If not supplied, defaults to usage. The report is stored as a CSV file named report_name_prefix_gce_YYYYMMDD.csv where YYYYMMDD is the day of the usage according to Pacific Time. If you supply a prefix, it should conform to Cloud Storage object naming conventions.
}
requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Returns:
An object of the form:
{ # 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 more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
&quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
&quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
&quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
&quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
&quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
&quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
{
&quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
&quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
&quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
},
],
},
&quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
&quot;httpErrorStatusCode&quot;: 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.
&quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
&quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
&quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
&quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
&quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
&quot;progress&quot;: 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.
&quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
&quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
&quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
&quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
&quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
&quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
&quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
&quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
&quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
&quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
{
&quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
&quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
# &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
{
&quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
&quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
},
],
&quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
},
],
&quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
}</pre>
</div>
</body></html>