1<html><body> 2<style> 3 4body, h1, h2, h3, div, span, p, pre, a { 5 margin: 0; 6 padding: 0; 7 border: 0; 8 font-weight: inherit; 9 font-style: inherit; 10 font-size: 100%; 11 font-family: inherit; 12 vertical-align: baseline; 13} 14 15body { 16 font-size: 13px; 17 padding: 1em; 18} 19 20h1 { 21 font-size: 26px; 22 margin-bottom: 1em; 23} 24 25h2 { 26 font-size: 24px; 27 margin-bottom: 1em; 28} 29 30h3 { 31 font-size: 20px; 32 margin-bottom: 1em; 33 margin-top: 1em; 34} 35 36pre, code { 37 line-height: 1.5; 38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace; 39} 40 41pre { 42 margin-top: 0.5em; 43} 44 45h1, h2, h3, p { 46 font-family: Arial, sans serif; 47} 48 49h1, h2, h3 { 50 border-bottom: solid #CCC 1px; 51} 52 53.toc_element { 54 margin-top: 0.5em; 55} 56 57.firstline { 58 margin-left: 2 em; 59} 60 61.method { 62 margin-top: 1em; 63 border: solid 1px #CCC; 64 padding: 1em; 65 background: #EEE; 66} 67 68.details { 69 font-weight: bold; 70 font-size: 14px; 71} 72 73</style> 74 75<h1><a href="compute_v1.html">Compute Engine API</a> . <a href="compute_v1.reservations.html">reservations</a></h1> 76<h2>Instance Methods</h2> 77<p class="toc_element"> 78 <code><a href="#aggregatedList">aggregatedList(project, filter=None, includeAllScopes=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None, x__xgafv=None)</a></code></p> 79<p class="firstline">Retrieves an aggregated list of reservations.</p> 80<p class="toc_element"> 81 <code><a href="#aggregatedList_next">aggregatedList_next(previous_request, previous_response)</a></code></p> 82<p class="firstline">Retrieves the next page of results.</p> 83<p class="toc_element"> 84 <code><a href="#close">close()</a></code></p> 85<p class="firstline">Close httplib2 connections.</p> 86<p class="toc_element"> 87 <code><a href="#delete">delete(project, zone, reservation, requestId=None, x__xgafv=None)</a></code></p> 88<p class="firstline">Deletes the specified reservation.</p> 89<p class="toc_element"> 90 <code><a href="#get">get(project, zone, reservation, x__xgafv=None)</a></code></p> 91<p class="firstline">Retrieves information about the specified reservation.</p> 92<p class="toc_element"> 93 <code><a href="#getIamPolicy">getIamPolicy(project, zone, resource, optionsRequestedPolicyVersion=None, x__xgafv=None)</a></code></p> 94<p class="firstline">Gets the access control policy for a resource. May be empty if no such policy or resource exists.</p> 95<p class="toc_element"> 96 <code><a href="#insert">insert(project, zone, body=None, requestId=None, x__xgafv=None)</a></code></p> 97<p class="firstline">Creates a new reservation. For more information, read Reserving zonal resources.</p> 98<p class="toc_element"> 99 <code><a href="#list">list(project, zone, filter=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None, x__xgafv=None)</a></code></p> 100<p class="firstline">A list of all the reservations that have been configured for the specified project in specified zone.</p> 101<p class="toc_element"> 102 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p> 103<p class="firstline">Retrieves the next page of results.</p> 104<p class="toc_element"> 105 <code><a href="#resize">resize(project, zone, reservation, body=None, requestId=None, x__xgafv=None)</a></code></p> 106<p class="firstline">Resizes the reservation (applicable to standalone reservations only). For more information, read Modifying reservations.</p> 107<p class="toc_element"> 108 <code><a href="#setIamPolicy">setIamPolicy(project, zone, resource, body=None, x__xgafv=None)</a></code></p> 109<p class="firstline">Sets the access control policy on the specified resource. Replaces any existing policy.</p> 110<p class="toc_element"> 111 <code><a href="#testIamPermissions">testIamPermissions(project, zone, resource, body=None, x__xgafv=None)</a></code></p> 112<p class="firstline">Returns permissions that a caller has on the specified resource.</p> 113<p class="toc_element"> 114 <code><a href="#update">update(project, zone, reservation, body=None, paths=None, requestId=None, updateMask=None, x__xgafv=None)</a></code></p> 115<p class="firstline">Update share settings of the reservation.</p> 116<h3>Method Details</h3> 117<div class="method"> 118 <code class="details" id="aggregatedList">aggregatedList(project, filter=None, includeAllScopes=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None, x__xgafv=None)</code> 119 <pre>Retrieves an aggregated list of reservations. 120 121Args: 122 project: string, Project ID for this request. (required) 123 filter: string, A filter expression that filters resources listed in the response. The expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` 124 includeAllScopes: boolean, Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included. 125 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`) 126 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. 127 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. 128 returnPartialSuccess: boolean, Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. 129 x__xgafv: string, V1 error format. 130 Allowed values 131 1 - v1 error format 132 2 - v2 error format 133 134Returns: 135 An object of the form: 136 137 { # Contains a list of reservations. 138 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server. 139 "items": { # A list of Allocation resources. 140 "a_key": { # Name of the scope containing this set of reservations. 141 "reservations": [ # A list of reservations contained in this scope. 142 { # Represents a reservation resource. A reservation ensures that capacity is held in a specific zone even if the reserved VMs are not running. For more information, read Reserving zonal resources. 143 "commitment": "A String", # [Output Only] Full or partial URL to a parent commitment. This field displays for reservations that are tied to a commitment. 144 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format. 145 "description": "A String", # An optional description of this resource. Provide this property when you create the resource. 146 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 147 "kind": "compute#reservation", # [Output Only] Type of the resource. Always compute#reservations for reservations. 148 "name": "A String", # The name of the resource, provided by the client when initially creating the resource. The resource name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. 149 "satisfiesPzs": True or False, # [Output Only] Reserved for future use. 150 "selfLink": "A String", # [Output Only] Server-defined fully-qualified URL for this resource. 151 "shareSettings": { # The share setting for reservations and sole tenancy node groups. # Share-settings for shared-reservation 152 "projectMap": { # A map of project id and project config. This is only valid when share_type's value is SPECIFIC_PROJECTS. 153 "a_key": { # Config for each project in the share settings. 154 "projectId": "A String", # The project ID, should be same as the key of this project config in the parent map. 155 }, 156 }, 157 "shareType": "A String", # Type of sharing for this shared-reservation 158 }, 159 "specificReservation": { # This reservation type allows to pre allocate specific instance configuration. Next ID: 5 # Reservation for instances with specific machine shapes. 160 "count": "A String", # Specifies the number of resources that are allocated. 161 "inUseCount": "A String", # [Output Only] Indicates how many instances are in use. 162 "instanceProperties": { # Properties of the SKU instances being reserved. Next ID: 9 # The instance properties for the reservation. 163 "guestAccelerators": [ # Specifies accelerator type and count. 164 { # A specification of the type and number of accelerator cards attached to the instance. 165 "acceleratorCount": 42, # The number of the guest accelerator cards exposed to this instance. 166 "acceleratorType": "A String", # Full or partial URL of the accelerator type resource to attach to this instance. For example: projects/my-project/zones/us-central1-c/acceleratorTypes/nvidia-tesla-p100 If you are creating an instance template, specify only the accelerator name. See GPUs on Compute Engine for a full list of accelerator types. 167 }, 168 ], 169 "localSsds": [ # Specifies amount of local ssd to reserve with each instance. The type of disk is local-ssd. 170 { 171 "diskSizeGb": "A String", # Specifies the size of the disk in base-2 GB. 172 "interface": "A String", # Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. The default is SCSI. For performance characteristics of SCSI over NVMe, see Local SSD performance. 173 }, 174 ], 175 "locationHint": "A String", # An opaque location hint used to place the allocation close to other resources. This field is for use by internal tools that use the public API. 176 "machineType": "A String", # Specifies type of machine (name only) which has fixed number of vCPUs and fixed amount of memory. This also includes specifying custom machine type following custom-NUMBER_OF_CPUS-AMOUNT_OF_MEMORY pattern. 177 "minCpuPlatform": "A String", # Minimum cpu platform the reservation. 178 }, 179 }, 180 "specificReservationRequired": True or False, # Indicates whether the reservation can be consumed by VMs with affinity for "any" reservation. If the field is set, then only VMs that target the reservation by name can consume from this reservation. 181 "status": "A String", # [Output Only] The status of the reservation. 182 "zone": "A String", # Zone in which the reservation resides. A zone must be provided if the reservation is created within a commitment. 183 }, 184 ], 185 "warning": { # Informational warning which replaces the list of reservations when the list is empty. 186 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. 187 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" } 188 { 189 "key": "A String", # [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). 190 "value": "A String", # [Output Only] A warning data value corresponding to the key. 191 }, 192 ], 193 "message": "A String", # [Output Only] A human-readable description of the warning code. 194 }, 195 }, 196 }, 197 "kind": "compute#reservationAggregatedList", # Type of resource. 198 "nextPageToken": "A String", # [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. 199 "selfLink": "A String", # [Output Only] Server-defined URL for this resource. 200 "unreachables": [ # [Output Only] Unreachable resources. 201 "A String", 202 ], 203 "warning": { # [Output Only] Informational warning message. 204 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. 205 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" } 206 { 207 "key": "A String", # [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). 208 "value": "A String", # [Output Only] A warning data value corresponding to the key. 209 }, 210 ], 211 "message": "A String", # [Output Only] A human-readable description of the warning code. 212 }, 213}</pre> 214</div> 215 216<div class="method"> 217 <code class="details" id="aggregatedList_next">aggregatedList_next(previous_request, previous_response)</code> 218 <pre>Retrieves the next page of results. 219 220Args: 221 previous_request: The request for the previous page. (required) 222 previous_response: The response from the request for the previous page. (required) 223 224Returns: 225 A request object that you can call 'execute()' on to request the next 226 page. Returns None if there are no more items in the collection. 227 </pre> 228</div> 229 230<div class="method"> 231 <code class="details" id="close">close()</code> 232 <pre>Close httplib2 connections.</pre> 233</div> 234 235<div class="method"> 236 <code class="details" id="delete">delete(project, zone, reservation, requestId=None, x__xgafv=None)</code> 237 <pre>Deletes the specified reservation. 238 239Args: 240 project: string, Project ID for this request. (required) 241 zone: string, Name of the zone for this request. (required) 242 reservation: string, Name of the reservation to delete. (required) 243 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). 244 x__xgafv: string, V1 error format. 245 Allowed values 246 1 - v1 error format 247 2 - v2 error format 248 249Returns: 250 An object of the form: 251 252 { # Represents an Operation resource. Google Compute Engine has three Operation resources: * [Global](/compute/docs/reference/rest/v1/globalOperations) * [Regional](/compute/docs/reference/rest/v1/regionOperations) * [Zonal](/compute/docs/reference/rest/v1/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. 253 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. 254 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 255 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 256 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 257 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 258 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 259 { 260 "code": "A String", # [Output Only] The error type identifier for this error. 261 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 262 "message": "A String", # [Output Only] An optional, human-readable error message. 263 }, 264 ], 265 }, 266 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. 267 "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a `404` means the resource was not found. 268 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server. 269 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 270 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources. 271 "name": "A String", # [Output Only] Name of the operation. 272 "operationGroupId": "A String", # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. 273 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. 274 "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses. 275 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. 276 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 277 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 278 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. 279 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 280 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 281 "targetLink": "A String", # [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. 282 "user": "A String", # [Output Only] User who requested the operation, for example: `[email protected]`. 283 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 284 { 285 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. 286 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" } 287 { 288 "key": "A String", # [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). 289 "value": "A String", # [Output Only] A warning data value corresponding to the key. 290 }, 291 ], 292 "message": "A String", # [Output Only] A human-readable description of the warning code. 293 }, 294 ], 295 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. 296}</pre> 297</div> 298 299<div class="method"> 300 <code class="details" id="get">get(project, zone, reservation, x__xgafv=None)</code> 301 <pre>Retrieves information about the specified reservation. 302 303Args: 304 project: string, Project ID for this request. (required) 305 zone: string, Name of the zone for this request. (required) 306 reservation: string, Name of the reservation to retrieve. (required) 307 x__xgafv: string, V1 error format. 308 Allowed values 309 1 - v1 error format 310 2 - v2 error format 311 312Returns: 313 An object of the form: 314 315 { # Represents a reservation resource. A reservation ensures that capacity is held in a specific zone even if the reserved VMs are not running. For more information, read Reserving zonal resources. 316 "commitment": "A String", # [Output Only] Full or partial URL to a parent commitment. This field displays for reservations that are tied to a commitment. 317 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format. 318 "description": "A String", # An optional description of this resource. Provide this property when you create the resource. 319 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 320 "kind": "compute#reservation", # [Output Only] Type of the resource. Always compute#reservations for reservations. 321 "name": "A String", # The name of the resource, provided by the client when initially creating the resource. The resource name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. 322 "satisfiesPzs": True or False, # [Output Only] Reserved for future use. 323 "selfLink": "A String", # [Output Only] Server-defined fully-qualified URL for this resource. 324 "shareSettings": { # The share setting for reservations and sole tenancy node groups. # Share-settings for shared-reservation 325 "projectMap": { # A map of project id and project config. This is only valid when share_type's value is SPECIFIC_PROJECTS. 326 "a_key": { # Config for each project in the share settings. 327 "projectId": "A String", # The project ID, should be same as the key of this project config in the parent map. 328 }, 329 }, 330 "shareType": "A String", # Type of sharing for this shared-reservation 331 }, 332 "specificReservation": { # This reservation type allows to pre allocate specific instance configuration. Next ID: 5 # Reservation for instances with specific machine shapes. 333 "count": "A String", # Specifies the number of resources that are allocated. 334 "inUseCount": "A String", # [Output Only] Indicates how many instances are in use. 335 "instanceProperties": { # Properties of the SKU instances being reserved. Next ID: 9 # The instance properties for the reservation. 336 "guestAccelerators": [ # Specifies accelerator type and count. 337 { # A specification of the type and number of accelerator cards attached to the instance. 338 "acceleratorCount": 42, # The number of the guest accelerator cards exposed to this instance. 339 "acceleratorType": "A String", # Full or partial URL of the accelerator type resource to attach to this instance. For example: projects/my-project/zones/us-central1-c/acceleratorTypes/nvidia-tesla-p100 If you are creating an instance template, specify only the accelerator name. See GPUs on Compute Engine for a full list of accelerator types. 340 }, 341 ], 342 "localSsds": [ # Specifies amount of local ssd to reserve with each instance. The type of disk is local-ssd. 343 { 344 "diskSizeGb": "A String", # Specifies the size of the disk in base-2 GB. 345 "interface": "A String", # Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. The default is SCSI. For performance characteristics of SCSI over NVMe, see Local SSD performance. 346 }, 347 ], 348 "locationHint": "A String", # An opaque location hint used to place the allocation close to other resources. This field is for use by internal tools that use the public API. 349 "machineType": "A String", # Specifies type of machine (name only) which has fixed number of vCPUs and fixed amount of memory. This also includes specifying custom machine type following custom-NUMBER_OF_CPUS-AMOUNT_OF_MEMORY pattern. 350 "minCpuPlatform": "A String", # Minimum cpu platform the reservation. 351 }, 352 }, 353 "specificReservationRequired": True or False, # Indicates whether the reservation can be consumed by VMs with affinity for "any" reservation. If the field is set, then only VMs that target the reservation by name can consume from this reservation. 354 "status": "A String", # [Output Only] The status of the reservation. 355 "zone": "A String", # Zone in which the reservation resides. A zone must be provided if the reservation is created within a commitment. 356}</pre> 357</div> 358 359<div class="method"> 360 <code class="details" id="getIamPolicy">getIamPolicy(project, zone, resource, optionsRequestedPolicyVersion=None, x__xgafv=None)</code> 361 <pre>Gets the access control policy for a resource. May be empty if no such policy or resource exists. 362 363Args: 364 project: string, Project ID for this request. (required) 365 zone: string, The name of the zone for this request. (required) 366 resource: string, Name or id of the resource for this request. (required) 367 optionsRequestedPolicyVersion: integer, Requested IAM Policy version. 368 x__xgafv: string, V1 error format. 369 Allowed values 370 1 - v1 error format 371 2 - v2 error format 372 373Returns: 374 An object of the form: 375 376 { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:[email protected]", "group:[email protected]", "domain:google.com", "serviceAccount:[email protected]" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:[email protected]" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 } **YAML example:** bindings: - members: - user:[email protected] - group:[email protected] - domain:google.com - serviceAccount:[email protected] role: roles/resourcemanager.organizationAdmin - members: - user:[email protected] role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/). 377 "auditConfigs": [ # Specifies cloud audit logging configuration for this policy. 378 { # Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or more AuditLogConfigs. If there are AuditConfigs for both `allServices` and a specific service, the union of the two AuditConfigs is used for that service: the log_types specified in each AuditConfig are enabled, and the exempted_members in each AuditLogConfig are exempted. Example Policy with multiple AuditConfigs: { "audit_configs": [ { "service": "allServices", "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:[email protected]" ] }, { "log_type": "DATA_WRITE" }, { "log_type": "ADMIN_READ" } ] }, { "service": "sampleservice.googleapis.com", "audit_log_configs": [ { "log_type": "DATA_READ" }, { "log_type": "DATA_WRITE", "exempted_members": [ "user:[email protected]" ] } ] } ] } For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts [email protected] from DATA_READ logging, and [email protected] from DATA_WRITE logging. 379 "auditLogConfigs": [ # The configuration for logging of each type of permission. 380 { # Provides the configuration for logging a type of permissions. Example: { "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:[email protected]" ] }, { "log_type": "DATA_WRITE" } ] } This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting [email protected] from DATA_READ logging. 381 "exemptedMembers": [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of Binding.members. 382 "A String", 383 ], 384 "ignoreChildExemptions": True or False, # This is deprecated and has no effect. Do not use. 385 "logType": "A String", # The log type that this config enables. 386 }, 387 ], 388 "exemptedMembers": [ # This is deprecated and has no effect. Do not use. 389 "A String", 390 ], 391 "service": "A String", # Specifies a service that will be enabled for audit logging. For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special value that covers all services. 392 }, 393 ], 394 "bindings": [ # Associates a list of `members`, or principals, with a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one principal. The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 of these principals can be Google groups. Each occurrence of a principal counts towards these limits. For example, if the `bindings` grant 50 different roles to `user:[email protected]`, and not to any other principal, then you can add another 1,450 principals to the `bindings` in the `Policy`. 395 { # Associates `members`, or principals, with a `role`. 396 "bindingId": "A String", # This is deprecated and has no effect. Do not use. 397 "condition": { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: "Summary size limit" description: "Determines if a summary is less than 100 chars" expression: "document.summary.size() < 100" Example (Equality): title: "Requestor is owner" description: "Determines if requestor is the document owner" expression: "document.owner == request.auth.claims.email" Example (Logic): title: "Public documents" description: "Determine whether the document should be publicly visible" expression: "document.type != 'private' && document.type != 'internal'" Example (Data Manipulation): title: "Notification string" description: "Create a notification string with a timestamp." expression: "'New message received at ' + string(document.create_time)" The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information. # The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). 398 "description": "A String", # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI. 399 "expression": "A String", # Textual representation of an expression in Common Expression Language syntax. 400 "location": "A String", # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file. 401 "title": "A String", # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression. 402 }, 403 "members": [ # Specifies the principals requesting access for a Cloud Platform resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. * `user:{emailid}`: An email address that represents a specific Google account. For example, `[email protected]` . * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `[email protected]`. * `group:{emailid}`: An email address that represents a Google group. For example, `[email protected]`. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `[email protected]?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding. * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `[email protected]?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `[email protected]?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. 404 "A String", 405 ], 406 "role": "A String", # Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. 407 }, 408 ], 409 "etag": "A String", # `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost. 410 "rules": [ # This is deprecated and has no effect. Do not use. 411 { # This is deprecated and has no effect. Do not use. 412 "action": "A String", # This is deprecated and has no effect. Do not use. 413 "conditions": [ # This is deprecated and has no effect. Do not use. 414 { # This is deprecated and has no effect. Do not use. 415 "iam": "A String", # This is deprecated and has no effect. Do not use. 416 "op": "A String", # This is deprecated and has no effect. Do not use. 417 "svc": "A String", # This is deprecated and has no effect. Do not use. 418 "sys": "A String", # This is deprecated and has no effect. Do not use. 419 "values": [ # This is deprecated and has no effect. Do not use. 420 "A String", 421 ], 422 }, 423 ], 424 "description": "A String", # This is deprecated and has no effect. Do not use. 425 "ins": [ # This is deprecated and has no effect. Do not use. 426 "A String", 427 ], 428 "logConfigs": [ # This is deprecated and has no effect. Do not use. 429 { # This is deprecated and has no effect. Do not use. 430 "cloudAudit": { # This is deprecated and has no effect. Do not use. # This is deprecated and has no effect. Do not use. 431 "authorizationLoggingOptions": { # This is deprecated and has no effect. Do not use. # This is deprecated and has no effect. Do not use. 432 "permissionType": "A String", # This is deprecated and has no effect. Do not use. 433 }, 434 "logName": "A String", # This is deprecated and has no effect. Do not use. 435 }, 436 "counter": { # This is deprecated and has no effect. Do not use. # This is deprecated and has no effect. Do not use. 437 "customFields": [ # This is deprecated and has no effect. Do not use. 438 { # This is deprecated and has no effect. Do not use. 439 "name": "A String", # This is deprecated and has no effect. Do not use. 440 "value": "A String", # This is deprecated and has no effect. Do not use. 441 }, 442 ], 443 "field": "A String", # This is deprecated and has no effect. Do not use. 444 "metric": "A String", # This is deprecated and has no effect. Do not use. 445 }, 446 "dataAccess": { # This is deprecated and has no effect. Do not use. # This is deprecated and has no effect. Do not use. 447 "logMode": "A String", # This is deprecated and has no effect. Do not use. 448 }, 449 }, 450 ], 451 "notIns": [ # This is deprecated and has no effect. Do not use. 452 "A String", 453 ], 454 "permissions": [ # This is deprecated and has no effect. Do not use. 455 "A String", 456 ], 457 }, 458 ], 459 "version": 42, # Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations: * Getting a policy that includes a conditional role binding * Adding a conditional role binding to a policy * Changing a conditional role binding in a policy * Removing any role binding, with or without a condition, from a policy that includes conditions **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost. If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). 460}</pre> 461</div> 462 463<div class="method"> 464 <code class="details" id="insert">insert(project, zone, body=None, requestId=None, x__xgafv=None)</code> 465 <pre>Creates a new reservation. For more information, read Reserving zonal resources. 466 467Args: 468 project: string, Project ID for this request. (required) 469 zone: string, Name of the zone for this request. (required) 470 body: object, The request body. 471 The object takes the form of: 472 473{ # Represents a reservation resource. A reservation ensures that capacity is held in a specific zone even if the reserved VMs are not running. For more information, read Reserving zonal resources. 474 "commitment": "A String", # [Output Only] Full or partial URL to a parent commitment. This field displays for reservations that are tied to a commitment. 475 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format. 476 "description": "A String", # An optional description of this resource. Provide this property when you create the resource. 477 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 478 "kind": "compute#reservation", # [Output Only] Type of the resource. Always compute#reservations for reservations. 479 "name": "A String", # The name of the resource, provided by the client when initially creating the resource. The resource name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. 480 "satisfiesPzs": True or False, # [Output Only] Reserved for future use. 481 "selfLink": "A String", # [Output Only] Server-defined fully-qualified URL for this resource. 482 "shareSettings": { # The share setting for reservations and sole tenancy node groups. # Share-settings for shared-reservation 483 "projectMap": { # A map of project id and project config. This is only valid when share_type's value is SPECIFIC_PROJECTS. 484 "a_key": { # Config for each project in the share settings. 485 "projectId": "A String", # The project ID, should be same as the key of this project config in the parent map. 486 }, 487 }, 488 "shareType": "A String", # Type of sharing for this shared-reservation 489 }, 490 "specificReservation": { # This reservation type allows to pre allocate specific instance configuration. Next ID: 5 # Reservation for instances with specific machine shapes. 491 "count": "A String", # Specifies the number of resources that are allocated. 492 "inUseCount": "A String", # [Output Only] Indicates how many instances are in use. 493 "instanceProperties": { # Properties of the SKU instances being reserved. Next ID: 9 # The instance properties for the reservation. 494 "guestAccelerators": [ # Specifies accelerator type and count. 495 { # A specification of the type and number of accelerator cards attached to the instance. 496 "acceleratorCount": 42, # The number of the guest accelerator cards exposed to this instance. 497 "acceleratorType": "A String", # Full or partial URL of the accelerator type resource to attach to this instance. For example: projects/my-project/zones/us-central1-c/acceleratorTypes/nvidia-tesla-p100 If you are creating an instance template, specify only the accelerator name. See GPUs on Compute Engine for a full list of accelerator types. 498 }, 499 ], 500 "localSsds": [ # Specifies amount of local ssd to reserve with each instance. The type of disk is local-ssd. 501 { 502 "diskSizeGb": "A String", # Specifies the size of the disk in base-2 GB. 503 "interface": "A String", # Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. The default is SCSI. For performance characteristics of SCSI over NVMe, see Local SSD performance. 504 }, 505 ], 506 "locationHint": "A String", # An opaque location hint used to place the allocation close to other resources. This field is for use by internal tools that use the public API. 507 "machineType": "A String", # Specifies type of machine (name only) which has fixed number of vCPUs and fixed amount of memory. This also includes specifying custom machine type following custom-NUMBER_OF_CPUS-AMOUNT_OF_MEMORY pattern. 508 "minCpuPlatform": "A String", # Minimum cpu platform the reservation. 509 }, 510 }, 511 "specificReservationRequired": True or False, # Indicates whether the reservation can be consumed by VMs with affinity for "any" reservation. If the field is set, then only VMs that target the reservation by name can consume from this reservation. 512 "status": "A String", # [Output Only] The status of the reservation. 513 "zone": "A String", # Zone in which the reservation resides. A zone must be provided if the reservation is created within a commitment. 514} 515 516 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). 517 x__xgafv: string, V1 error format. 518 Allowed values 519 1 - v1 error format 520 2 - v2 error format 521 522Returns: 523 An object of the form: 524 525 { # Represents an Operation resource. Google Compute Engine has three Operation resources: * [Global](/compute/docs/reference/rest/v1/globalOperations) * [Regional](/compute/docs/reference/rest/v1/regionOperations) * [Zonal](/compute/docs/reference/rest/v1/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. 526 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. 527 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 528 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 529 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 530 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 531 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 532 { 533 "code": "A String", # [Output Only] The error type identifier for this error. 534 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 535 "message": "A String", # [Output Only] An optional, human-readable error message. 536 }, 537 ], 538 }, 539 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. 540 "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a `404` means the resource was not found. 541 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server. 542 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 543 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources. 544 "name": "A String", # [Output Only] Name of the operation. 545 "operationGroupId": "A String", # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. 546 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. 547 "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses. 548 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. 549 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 550 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 551 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. 552 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 553 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 554 "targetLink": "A String", # [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. 555 "user": "A String", # [Output Only] User who requested the operation, for example: `[email protected]`. 556 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 557 { 558 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. 559 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" } 560 { 561 "key": "A String", # [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). 562 "value": "A String", # [Output Only] A warning data value corresponding to the key. 563 }, 564 ], 565 "message": "A String", # [Output Only] A human-readable description of the warning code. 566 }, 567 ], 568 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. 569}</pre> 570</div> 571 572<div class="method"> 573 <code class="details" id="list">list(project, zone, filter=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None, x__xgafv=None)</code> 574 <pre>A list of all the reservations that have been configured for the specified project in specified zone. 575 576Args: 577 project: string, Project ID for this request. (required) 578 zone: string, Name of the zone for this request. (required) 579 filter: string, A filter expression that filters resources listed in the response. The expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` 580 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`) 581 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. 582 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. 583 returnPartialSuccess: boolean, Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. 584 x__xgafv: string, V1 error format. 585 Allowed values 586 1 - v1 error format 587 2 - v2 error format 588 589Returns: 590 An object of the form: 591 592 { 593 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 594 "items": [ # [Output Only] A list of Allocation resources. 595 { # Represents a reservation resource. A reservation ensures that capacity is held in a specific zone even if the reserved VMs are not running. For more information, read Reserving zonal resources. 596 "commitment": "A String", # [Output Only] Full or partial URL to a parent commitment. This field displays for reservations that are tied to a commitment. 597 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format. 598 "description": "A String", # An optional description of this resource. Provide this property when you create the resource. 599 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 600 "kind": "compute#reservation", # [Output Only] Type of the resource. Always compute#reservations for reservations. 601 "name": "A String", # The name of the resource, provided by the client when initially creating the resource. The resource name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. 602 "satisfiesPzs": True or False, # [Output Only] Reserved for future use. 603 "selfLink": "A String", # [Output Only] Server-defined fully-qualified URL for this resource. 604 "shareSettings": { # The share setting for reservations and sole tenancy node groups. # Share-settings for shared-reservation 605 "projectMap": { # A map of project id and project config. This is only valid when share_type's value is SPECIFIC_PROJECTS. 606 "a_key": { # Config for each project in the share settings. 607 "projectId": "A String", # The project ID, should be same as the key of this project config in the parent map. 608 }, 609 }, 610 "shareType": "A String", # Type of sharing for this shared-reservation 611 }, 612 "specificReservation": { # This reservation type allows to pre allocate specific instance configuration. Next ID: 5 # Reservation for instances with specific machine shapes. 613 "count": "A String", # Specifies the number of resources that are allocated. 614 "inUseCount": "A String", # [Output Only] Indicates how many instances are in use. 615 "instanceProperties": { # Properties of the SKU instances being reserved. Next ID: 9 # The instance properties for the reservation. 616 "guestAccelerators": [ # Specifies accelerator type and count. 617 { # A specification of the type and number of accelerator cards attached to the instance. 618 "acceleratorCount": 42, # The number of the guest accelerator cards exposed to this instance. 619 "acceleratorType": "A String", # Full or partial URL of the accelerator type resource to attach to this instance. For example: projects/my-project/zones/us-central1-c/acceleratorTypes/nvidia-tesla-p100 If you are creating an instance template, specify only the accelerator name. See GPUs on Compute Engine for a full list of accelerator types. 620 }, 621 ], 622 "localSsds": [ # Specifies amount of local ssd to reserve with each instance. The type of disk is local-ssd. 623 { 624 "diskSizeGb": "A String", # Specifies the size of the disk in base-2 GB. 625 "interface": "A String", # Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. The default is SCSI. For performance characteristics of SCSI over NVMe, see Local SSD performance. 626 }, 627 ], 628 "locationHint": "A String", # An opaque location hint used to place the allocation close to other resources. This field is for use by internal tools that use the public API. 629 "machineType": "A String", # Specifies type of machine (name only) which has fixed number of vCPUs and fixed amount of memory. This also includes specifying custom machine type following custom-NUMBER_OF_CPUS-AMOUNT_OF_MEMORY pattern. 630 "minCpuPlatform": "A String", # Minimum cpu platform the reservation. 631 }, 632 }, 633 "specificReservationRequired": True or False, # Indicates whether the reservation can be consumed by VMs with affinity for "any" reservation. If the field is set, then only VMs that target the reservation by name can consume from this reservation. 634 "status": "A String", # [Output Only] The status of the reservation. 635 "zone": "A String", # Zone in which the reservation resides. A zone must be provided if the reservation is created within a commitment. 636 }, 637 ], 638 "kind": "compute#reservationList", # [Output Only] Type of resource.Always compute#reservationsList for listsof reservations 639 "nextPageToken": "A String", # [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. 640 "selfLink": "A String", # [Output Only] Server-defined URL for this resource. 641 "warning": { # [Output Only] Informational warning message. 642 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. 643 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" } 644 { 645 "key": "A String", # [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). 646 "value": "A String", # [Output Only] A warning data value corresponding to the key. 647 }, 648 ], 649 "message": "A String", # [Output Only] A human-readable description of the warning code. 650 }, 651}</pre> 652</div> 653 654<div class="method"> 655 <code class="details" id="list_next">list_next(previous_request, previous_response)</code> 656 <pre>Retrieves the next page of results. 657 658Args: 659 previous_request: The request for the previous page. (required) 660 previous_response: The response from the request for the previous page. (required) 661 662Returns: 663 A request object that you can call 'execute()' on to request the next 664 page. Returns None if there are no more items in the collection. 665 </pre> 666</div> 667 668<div class="method"> 669 <code class="details" id="resize">resize(project, zone, reservation, body=None, requestId=None, x__xgafv=None)</code> 670 <pre>Resizes the reservation (applicable to standalone reservations only). For more information, read Modifying reservations. 671 672Args: 673 project: string, Project ID for this request. (required) 674 zone: string, Name of the zone for this request. (required) 675 reservation: string, Name of the reservation to update. (required) 676 body: object, The request body. 677 The object takes the form of: 678 679{ 680 "specificSkuCount": "A String", # Number of allocated resources can be resized with minimum = 1 and maximum = 1000. 681} 682 683 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). 684 x__xgafv: string, V1 error format. 685 Allowed values 686 1 - v1 error format 687 2 - v2 error format 688 689Returns: 690 An object of the form: 691 692 { # Represents an Operation resource. Google Compute Engine has three Operation resources: * [Global](/compute/docs/reference/rest/v1/globalOperations) * [Regional](/compute/docs/reference/rest/v1/regionOperations) * [Zonal](/compute/docs/reference/rest/v1/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. 693 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. 694 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 695 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 696 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 697 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 698 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 699 { 700 "code": "A String", # [Output Only] The error type identifier for this error. 701 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 702 "message": "A String", # [Output Only] An optional, human-readable error message. 703 }, 704 ], 705 }, 706 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. 707 "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a `404` means the resource was not found. 708 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server. 709 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 710 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources. 711 "name": "A String", # [Output Only] Name of the operation. 712 "operationGroupId": "A String", # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. 713 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. 714 "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses. 715 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. 716 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 717 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 718 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. 719 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 720 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 721 "targetLink": "A String", # [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. 722 "user": "A String", # [Output Only] User who requested the operation, for example: `[email protected]`. 723 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 724 { 725 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. 726 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" } 727 { 728 "key": "A String", # [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). 729 "value": "A String", # [Output Only] A warning data value corresponding to the key. 730 }, 731 ], 732 "message": "A String", # [Output Only] A human-readable description of the warning code. 733 }, 734 ], 735 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. 736}</pre> 737</div> 738 739<div class="method"> 740 <code class="details" id="setIamPolicy">setIamPolicy(project, zone, resource, body=None, x__xgafv=None)</code> 741 <pre>Sets the access control policy on the specified resource. Replaces any existing policy. 742 743Args: 744 project: string, Project ID for this request. (required) 745 zone: string, The name of the zone for this request. (required) 746 resource: string, Name or id of the resource for this request. (required) 747 body: object, The request body. 748 The object takes the form of: 749 750{ 751 "bindings": [ # Flatten Policy to create a backwacd compatible wire-format. Deprecated. Use 'policy' to specify bindings. 752 { # Associates `members`, or principals, with a `role`. 753 "bindingId": "A String", # This is deprecated and has no effect. Do not use. 754 "condition": { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: "Summary size limit" description: "Determines if a summary is less than 100 chars" expression: "document.summary.size() < 100" Example (Equality): title: "Requestor is owner" description: "Determines if requestor is the document owner" expression: "document.owner == request.auth.claims.email" Example (Logic): title: "Public documents" description: "Determine whether the document should be publicly visible" expression: "document.type != 'private' && document.type != 'internal'" Example (Data Manipulation): title: "Notification string" description: "Create a notification string with a timestamp." expression: "'New message received at ' + string(document.create_time)" The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information. # The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). 755 "description": "A String", # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI. 756 "expression": "A String", # Textual representation of an expression in Common Expression Language syntax. 757 "location": "A String", # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file. 758 "title": "A String", # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression. 759 }, 760 "members": [ # Specifies the principals requesting access for a Cloud Platform resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. * `user:{emailid}`: An email address that represents a specific Google account. For example, `[email protected]` . * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `[email protected]`. * `group:{emailid}`: An email address that represents a Google group. For example, `[email protected]`. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `[email protected]?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding. * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `[email protected]?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `[email protected]?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. 761 "A String", 762 ], 763 "role": "A String", # Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. 764 }, 765 ], 766 "etag": "A String", # Flatten Policy to create a backward compatible wire-format. Deprecated. Use 'policy' to specify the etag. 767 "policy": { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:[email protected]", "group:[email protected]", "domain:google.com", "serviceAccount:[email protected]" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:[email protected]" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 } **YAML example:** bindings: - members: - user:[email protected] - group:[email protected] - domain:google.com - serviceAccount:[email protected] role: roles/resourcemanager.organizationAdmin - members: - user:[email protected] role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/). # REQUIRED: The complete policy to be applied to the 'resource'. The size of the policy is limited to a few 10s of KB. An empty policy is in general a valid policy but certain services (like Projects) might reject them. 768 "auditConfigs": [ # Specifies cloud audit logging configuration for this policy. 769 { # Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or more AuditLogConfigs. If there are AuditConfigs for both `allServices` and a specific service, the union of the two AuditConfigs is used for that service: the log_types specified in each AuditConfig are enabled, and the exempted_members in each AuditLogConfig are exempted. Example Policy with multiple AuditConfigs: { "audit_configs": [ { "service": "allServices", "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:[email protected]" ] }, { "log_type": "DATA_WRITE" }, { "log_type": "ADMIN_READ" } ] }, { "service": "sampleservice.googleapis.com", "audit_log_configs": [ { "log_type": "DATA_READ" }, { "log_type": "DATA_WRITE", "exempted_members": [ "user:[email protected]" ] } ] } ] } For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts [email protected] from DATA_READ logging, and [email protected] from DATA_WRITE logging. 770 "auditLogConfigs": [ # The configuration for logging of each type of permission. 771 { # Provides the configuration for logging a type of permissions. Example: { "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:[email protected]" ] }, { "log_type": "DATA_WRITE" } ] } This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting [email protected] from DATA_READ logging. 772 "exemptedMembers": [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of Binding.members. 773 "A String", 774 ], 775 "ignoreChildExemptions": True or False, # This is deprecated and has no effect. Do not use. 776 "logType": "A String", # The log type that this config enables. 777 }, 778 ], 779 "exemptedMembers": [ # This is deprecated and has no effect. Do not use. 780 "A String", 781 ], 782 "service": "A String", # Specifies a service that will be enabled for audit logging. For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special value that covers all services. 783 }, 784 ], 785 "bindings": [ # Associates a list of `members`, or principals, with a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one principal. The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 of these principals can be Google groups. Each occurrence of a principal counts towards these limits. For example, if the `bindings` grant 50 different roles to `user:[email protected]`, and not to any other principal, then you can add another 1,450 principals to the `bindings` in the `Policy`. 786 { # Associates `members`, or principals, with a `role`. 787 "bindingId": "A String", # This is deprecated and has no effect. Do not use. 788 "condition": { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: "Summary size limit" description: "Determines if a summary is less than 100 chars" expression: "document.summary.size() < 100" Example (Equality): title: "Requestor is owner" description: "Determines if requestor is the document owner" expression: "document.owner == request.auth.claims.email" Example (Logic): title: "Public documents" description: "Determine whether the document should be publicly visible" expression: "document.type != 'private' && document.type != 'internal'" Example (Data Manipulation): title: "Notification string" description: "Create a notification string with a timestamp." expression: "'New message received at ' + string(document.create_time)" The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information. # The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). 789 "description": "A String", # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI. 790 "expression": "A String", # Textual representation of an expression in Common Expression Language syntax. 791 "location": "A String", # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file. 792 "title": "A String", # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression. 793 }, 794 "members": [ # Specifies the principals requesting access for a Cloud Platform resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. * `user:{emailid}`: An email address that represents a specific Google account. For example, `[email protected]` . * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `[email protected]`. * `group:{emailid}`: An email address that represents a Google group. For example, `[email protected]`. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `[email protected]?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding. * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `[email protected]?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `[email protected]?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. 795 "A String", 796 ], 797 "role": "A String", # Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. 798 }, 799 ], 800 "etag": "A String", # `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost. 801 "rules": [ # This is deprecated and has no effect. Do not use. 802 { # This is deprecated and has no effect. Do not use. 803 "action": "A String", # This is deprecated and has no effect. Do not use. 804 "conditions": [ # This is deprecated and has no effect. Do not use. 805 { # This is deprecated and has no effect. Do not use. 806 "iam": "A String", # This is deprecated and has no effect. Do not use. 807 "op": "A String", # This is deprecated and has no effect. Do not use. 808 "svc": "A String", # This is deprecated and has no effect. Do not use. 809 "sys": "A String", # This is deprecated and has no effect. Do not use. 810 "values": [ # This is deprecated and has no effect. Do not use. 811 "A String", 812 ], 813 }, 814 ], 815 "description": "A String", # This is deprecated and has no effect. Do not use. 816 "ins": [ # This is deprecated and has no effect. Do not use. 817 "A String", 818 ], 819 "logConfigs": [ # This is deprecated and has no effect. Do not use. 820 { # This is deprecated and has no effect. Do not use. 821 "cloudAudit": { # This is deprecated and has no effect. Do not use. # This is deprecated and has no effect. Do not use. 822 "authorizationLoggingOptions": { # This is deprecated and has no effect. Do not use. # This is deprecated and has no effect. Do not use. 823 "permissionType": "A String", # This is deprecated and has no effect. Do not use. 824 }, 825 "logName": "A String", # This is deprecated and has no effect. Do not use. 826 }, 827 "counter": { # This is deprecated and has no effect. Do not use. # This is deprecated and has no effect. Do not use. 828 "customFields": [ # This is deprecated and has no effect. Do not use. 829 { # This is deprecated and has no effect. Do not use. 830 "name": "A String", # This is deprecated and has no effect. Do not use. 831 "value": "A String", # This is deprecated and has no effect. Do not use. 832 }, 833 ], 834 "field": "A String", # This is deprecated and has no effect. Do not use. 835 "metric": "A String", # This is deprecated and has no effect. Do not use. 836 }, 837 "dataAccess": { # This is deprecated and has no effect. Do not use. # This is deprecated and has no effect. Do not use. 838 "logMode": "A String", # This is deprecated and has no effect. Do not use. 839 }, 840 }, 841 ], 842 "notIns": [ # This is deprecated and has no effect. Do not use. 843 "A String", 844 ], 845 "permissions": [ # This is deprecated and has no effect. Do not use. 846 "A String", 847 ], 848 }, 849 ], 850 "version": 42, # Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations: * Getting a policy that includes a conditional role binding * Adding a conditional role binding to a policy * Changing a conditional role binding in a policy * Removing any role binding, with or without a condition, from a policy that includes conditions **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost. If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). 851 }, 852} 853 854 x__xgafv: string, V1 error format. 855 Allowed values 856 1 - v1 error format 857 2 - v2 error format 858 859Returns: 860 An object of the form: 861 862 { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:[email protected]", "group:[email protected]", "domain:google.com", "serviceAccount:[email protected]" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:[email protected]" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 } **YAML example:** bindings: - members: - user:[email protected] - group:[email protected] - domain:google.com - serviceAccount:[email protected] role: roles/resourcemanager.organizationAdmin - members: - user:[email protected] role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/). 863 "auditConfigs": [ # Specifies cloud audit logging configuration for this policy. 864 { # Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or more AuditLogConfigs. If there are AuditConfigs for both `allServices` and a specific service, the union of the two AuditConfigs is used for that service: the log_types specified in each AuditConfig are enabled, and the exempted_members in each AuditLogConfig are exempted. Example Policy with multiple AuditConfigs: { "audit_configs": [ { "service": "allServices", "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:[email protected]" ] }, { "log_type": "DATA_WRITE" }, { "log_type": "ADMIN_READ" } ] }, { "service": "sampleservice.googleapis.com", "audit_log_configs": [ { "log_type": "DATA_READ" }, { "log_type": "DATA_WRITE", "exempted_members": [ "user:[email protected]" ] } ] } ] } For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts [email protected] from DATA_READ logging, and [email protected] from DATA_WRITE logging. 865 "auditLogConfigs": [ # The configuration for logging of each type of permission. 866 { # Provides the configuration for logging a type of permissions. Example: { "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:[email protected]" ] }, { "log_type": "DATA_WRITE" } ] } This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting [email protected] from DATA_READ logging. 867 "exemptedMembers": [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of Binding.members. 868 "A String", 869 ], 870 "ignoreChildExemptions": True or False, # This is deprecated and has no effect. Do not use. 871 "logType": "A String", # The log type that this config enables. 872 }, 873 ], 874 "exemptedMembers": [ # This is deprecated and has no effect. Do not use. 875 "A String", 876 ], 877 "service": "A String", # Specifies a service that will be enabled for audit logging. For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special value that covers all services. 878 }, 879 ], 880 "bindings": [ # Associates a list of `members`, or principals, with a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one principal. The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 of these principals can be Google groups. Each occurrence of a principal counts towards these limits. For example, if the `bindings` grant 50 different roles to `user:[email protected]`, and not to any other principal, then you can add another 1,450 principals to the `bindings` in the `Policy`. 881 { # Associates `members`, or principals, with a `role`. 882 "bindingId": "A String", # This is deprecated and has no effect. Do not use. 883 "condition": { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: "Summary size limit" description: "Determines if a summary is less than 100 chars" expression: "document.summary.size() < 100" Example (Equality): title: "Requestor is owner" description: "Determines if requestor is the document owner" expression: "document.owner == request.auth.claims.email" Example (Logic): title: "Public documents" description: "Determine whether the document should be publicly visible" expression: "document.type != 'private' && document.type != 'internal'" Example (Data Manipulation): title: "Notification string" description: "Create a notification string with a timestamp." expression: "'New message received at ' + string(document.create_time)" The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information. # The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). 884 "description": "A String", # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI. 885 "expression": "A String", # Textual representation of an expression in Common Expression Language syntax. 886 "location": "A String", # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file. 887 "title": "A String", # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression. 888 }, 889 "members": [ # Specifies the principals requesting access for a Cloud Platform resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. * `user:{emailid}`: An email address that represents a specific Google account. For example, `[email protected]` . * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `[email protected]`. * `group:{emailid}`: An email address that represents a Google group. For example, `[email protected]`. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `[email protected]?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding. * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `[email protected]?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `[email protected]?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. 890 "A String", 891 ], 892 "role": "A String", # Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. 893 }, 894 ], 895 "etag": "A String", # `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost. 896 "rules": [ # This is deprecated and has no effect. Do not use. 897 { # This is deprecated and has no effect. Do not use. 898 "action": "A String", # This is deprecated and has no effect. Do not use. 899 "conditions": [ # This is deprecated and has no effect. Do not use. 900 { # This is deprecated and has no effect. Do not use. 901 "iam": "A String", # This is deprecated and has no effect. Do not use. 902 "op": "A String", # This is deprecated and has no effect. Do not use. 903 "svc": "A String", # This is deprecated and has no effect. Do not use. 904 "sys": "A String", # This is deprecated and has no effect. Do not use. 905 "values": [ # This is deprecated and has no effect. Do not use. 906 "A String", 907 ], 908 }, 909 ], 910 "description": "A String", # This is deprecated and has no effect. Do not use. 911 "ins": [ # This is deprecated and has no effect. Do not use. 912 "A String", 913 ], 914 "logConfigs": [ # This is deprecated and has no effect. Do not use. 915 { # This is deprecated and has no effect. Do not use. 916 "cloudAudit": { # This is deprecated and has no effect. Do not use. # This is deprecated and has no effect. Do not use. 917 "authorizationLoggingOptions": { # This is deprecated and has no effect. Do not use. # This is deprecated and has no effect. Do not use. 918 "permissionType": "A String", # This is deprecated and has no effect. Do not use. 919 }, 920 "logName": "A String", # This is deprecated and has no effect. Do not use. 921 }, 922 "counter": { # This is deprecated and has no effect. Do not use. # This is deprecated and has no effect. Do not use. 923 "customFields": [ # This is deprecated and has no effect. Do not use. 924 { # This is deprecated and has no effect. Do not use. 925 "name": "A String", # This is deprecated and has no effect. Do not use. 926 "value": "A String", # This is deprecated and has no effect. Do not use. 927 }, 928 ], 929 "field": "A String", # This is deprecated and has no effect. Do not use. 930 "metric": "A String", # This is deprecated and has no effect. Do not use. 931 }, 932 "dataAccess": { # This is deprecated and has no effect. Do not use. # This is deprecated and has no effect. Do not use. 933 "logMode": "A String", # This is deprecated and has no effect. Do not use. 934 }, 935 }, 936 ], 937 "notIns": [ # This is deprecated and has no effect. Do not use. 938 "A String", 939 ], 940 "permissions": [ # This is deprecated and has no effect. Do not use. 941 "A String", 942 ], 943 }, 944 ], 945 "version": 42, # Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations: * Getting a policy that includes a conditional role binding * Adding a conditional role binding to a policy * Changing a conditional role binding in a policy * Removing any role binding, with or without a condition, from a policy that includes conditions **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost. If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). 946}</pre> 947</div> 948 949<div class="method"> 950 <code class="details" id="testIamPermissions">testIamPermissions(project, zone, resource, body=None, x__xgafv=None)</code> 951 <pre>Returns permissions that a caller has on the specified resource. 952 953Args: 954 project: string, Project ID for this request. (required) 955 zone: string, The name of the zone for this request. (required) 956 resource: string, Name or id of the resource for this request. (required) 957 body: object, The request body. 958 The object takes the form of: 959 960{ 961 "permissions": [ # The set of permissions to check for the 'resource'. Permissions with wildcards (such as '*' or 'storage.*') are not allowed. 962 "A String", 963 ], 964} 965 966 x__xgafv: string, V1 error format. 967 Allowed values 968 1 - v1 error format 969 2 - v2 error format 970 971Returns: 972 An object of the form: 973 974 { 975 "permissions": [ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed. 976 "A String", 977 ], 978}</pre> 979</div> 980 981<div class="method"> 982 <code class="details" id="update">update(project, zone, reservation, body=None, paths=None, requestId=None, updateMask=None, x__xgafv=None)</code> 983 <pre>Update share settings of the reservation. 984 985Args: 986 project: string, Project ID for this request. (required) 987 zone: string, Name of the zone for this request. (required) 988 reservation: string, Name of the reservation to update. (required) 989 body: object, The request body. 990 The object takes the form of: 991 992{ # Represents a reservation resource. A reservation ensures that capacity is held in a specific zone even if the reserved VMs are not running. For more information, read Reserving zonal resources. 993 "commitment": "A String", # [Output Only] Full or partial URL to a parent commitment. This field displays for reservations that are tied to a commitment. 994 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format. 995 "description": "A String", # An optional description of this resource. Provide this property when you create the resource. 996 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 997 "kind": "compute#reservation", # [Output Only] Type of the resource. Always compute#reservations for reservations. 998 "name": "A String", # The name of the resource, provided by the client when initially creating the resource. The resource name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. 999 "satisfiesPzs": True or False, # [Output Only] Reserved for future use. 1000 "selfLink": "A String", # [Output Only] Server-defined fully-qualified URL for this resource. 1001 "shareSettings": { # The share setting for reservations and sole tenancy node groups. # Share-settings for shared-reservation 1002 "projectMap": { # A map of project id and project config. This is only valid when share_type's value is SPECIFIC_PROJECTS. 1003 "a_key": { # Config for each project in the share settings. 1004 "projectId": "A String", # The project ID, should be same as the key of this project config in the parent map. 1005 }, 1006 }, 1007 "shareType": "A String", # Type of sharing for this shared-reservation 1008 }, 1009 "specificReservation": { # This reservation type allows to pre allocate specific instance configuration. Next ID: 5 # Reservation for instances with specific machine shapes. 1010 "count": "A String", # Specifies the number of resources that are allocated. 1011 "inUseCount": "A String", # [Output Only] Indicates how many instances are in use. 1012 "instanceProperties": { # Properties of the SKU instances being reserved. Next ID: 9 # The instance properties for the reservation. 1013 "guestAccelerators": [ # Specifies accelerator type and count. 1014 { # A specification of the type and number of accelerator cards attached to the instance. 1015 "acceleratorCount": 42, # The number of the guest accelerator cards exposed to this instance. 1016 "acceleratorType": "A String", # Full or partial URL of the accelerator type resource to attach to this instance. For example: projects/my-project/zones/us-central1-c/acceleratorTypes/nvidia-tesla-p100 If you are creating an instance template, specify only the accelerator name. See GPUs on Compute Engine for a full list of accelerator types. 1017 }, 1018 ], 1019 "localSsds": [ # Specifies amount of local ssd to reserve with each instance. The type of disk is local-ssd. 1020 { 1021 "diskSizeGb": "A String", # Specifies the size of the disk in base-2 GB. 1022 "interface": "A String", # Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. The default is SCSI. For performance characteristics of SCSI over NVMe, see Local SSD performance. 1023 }, 1024 ], 1025 "locationHint": "A String", # An opaque location hint used to place the allocation close to other resources. This field is for use by internal tools that use the public API. 1026 "machineType": "A String", # Specifies type of machine (name only) which has fixed number of vCPUs and fixed amount of memory. This also includes specifying custom machine type following custom-NUMBER_OF_CPUS-AMOUNT_OF_MEMORY pattern. 1027 "minCpuPlatform": "A String", # Minimum cpu platform the reservation. 1028 }, 1029 }, 1030 "specificReservationRequired": True or False, # Indicates whether the reservation can be consumed by VMs with affinity for "any" reservation. If the field is set, then only VMs that target the reservation by name can consume from this reservation. 1031 "status": "A String", # [Output Only] The status of the reservation. 1032 "zone": "A String", # Zone in which the reservation resides. A zone must be provided if the reservation is created within a commitment. 1033} 1034 1035 paths: string, A parameter (repeated) 1036 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). 1037 updateMask: string, Update_mask indicates fields to be updated as part of this request. 1038 x__xgafv: string, V1 error format. 1039 Allowed values 1040 1 - v1 error format 1041 2 - v2 error format 1042 1043Returns: 1044 An object of the form: 1045 1046 { # Represents an Operation resource. Google Compute Engine has three Operation resources: * [Global](/compute/docs/reference/rest/v1/globalOperations) * [Regional](/compute/docs/reference/rest/v1/regionOperations) * [Zonal](/compute/docs/reference/rest/v1/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. 1047 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. 1048 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 1049 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 1050 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 1051 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 1052 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 1053 { 1054 "code": "A String", # [Output Only] The error type identifier for this error. 1055 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 1056 "message": "A String", # [Output Only] An optional, human-readable error message. 1057 }, 1058 ], 1059 }, 1060 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. 1061 "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a `404` means the resource was not found. 1062 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server. 1063 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 1064 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources. 1065 "name": "A String", # [Output Only] Name of the operation. 1066 "operationGroupId": "A String", # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. 1067 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. 1068 "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses. 1069 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. 1070 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 1071 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 1072 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. 1073 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 1074 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 1075 "targetLink": "A String", # [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. 1076 "user": "A String", # [Output Only] User who requested the operation, for example: `[email protected]`. 1077 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 1078 { 1079 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. 1080 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" } 1081 { 1082 "key": "A String", # [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). 1083 "value": "A String", # [Output Only] A warning data value corresponding to the key. 1084 }, 1085 ], 1086 "message": "A String", # [Output Only] A human-readable description of the warning code. 1087 }, 1088 ], 1089 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. 1090}</pre> 1091</div> 1092 1093</body></html>