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_beta.html">Compute Engine API</a> . <a href="compute_beta.reservations.html">reservations</a></h1> 76<h2>Instance Methods</h2> 77<p class="toc_element"> 78 <code><a href="#aggregatedList">aggregatedList(project, orderBy=None, maxResults=None, pageToken=None, filter=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="#delete">delete(project, zone, reservation, requestId=None)</a></code></p> 85<p class="firstline">Deletes the specified reservation.</p> 86<p class="toc_element"> 87 <code><a href="#get">get(project, zone, reservation)</a></code></p> 88<p class="firstline">Retrieves all information of the specified reservation.</p> 89<p class="toc_element"> 90 <code><a href="#getIamPolicy">getIamPolicy(project, zone, resource)</a></code></p> 91<p class="firstline">Gets the access control policy for a resource. May be empty if no such policy or resource exists.</p> 92<p class="toc_element"> 93 <code><a href="#insert">insert(project, zone, body, requestId=None)</a></code></p> 94<p class="firstline">Creates a new reservation.</p> 95<p class="toc_element"> 96 <code><a href="#list">list(project, zone, orderBy=None, maxResults=None, pageToken=None, filter=None)</a></code></p> 97<p class="firstline">A list all the reservations that have been configured for the specified project in specified zone.</p> 98<p class="toc_element"> 99 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p> 100<p class="firstline">Retrieves the next page of results.</p> 101<p class="toc_element"> 102 <code><a href="#resize">resize(project, zone, reservation, body, requestId=None)</a></code></p> 103<p class="firstline">Resizes the reservation (applicable to standalone reservations only)</p> 104<p class="toc_element"> 105 <code><a href="#setIamPolicy">setIamPolicy(project, zone, resource, body)</a></code></p> 106<p class="firstline">Sets the access control policy on the specified resource. Replaces any existing policy.</p> 107<p class="toc_element"> 108 <code><a href="#testIamPermissions">testIamPermissions(project, zone, resource, body)</a></code></p> 109<p class="firstline">Returns permissions that a caller has on the specified resource.</p> 110<h3>Method Details</h3> 111<div class="method"> 112 <code class="details" id="aggregatedList">aggregatedList(project, orderBy=None, maxResults=None, pageToken=None, filter=None)</code> 113 <pre>Retrieves an aggregated list of reservations. 114 115Args: 116 project: string, Project ID for this request. (required) 117 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. 118 119You 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. 120 121Currently, only sorting by name or creationTimestamp desc is supported. 122 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) 123 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. 124 filter: string, A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, >, or <. 125 126For example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance. 127 128You 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. 129 130To 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). 131 132Returns: 133 An object of the form: 134 135 { # Contains a list of reservations. 136 "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. 137 "kind": "compute#reservationAggregatedList", # Type of resource. 138 "items": { # A list of Allocation resources. 139 "a_key": { # Name of the scope containing this set of reservations. 140 "reservations": [ # A list of reservations contained in this scope. 141 { # Reservation resource NextID: 13 142 "status": "A String", # [Output Only] The status of the reservation. 143 "kind": "compute#reservation", # [Output Only] Type of the resource. Always compute#reservations for reservations. 144 "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. 145 "specificReservationRequired": True or False, # Indicates whether the reservation can be consumed by VMs with "any reservation" defined. If the field is set, then only VMs that target the reservation by name using --reservation-affinity can consume this reservation. 146 "commitment": "A String", # [OutputOnly] Full or partial url for parent commitment for reservations which are tied to a commitment. 147 "specificReservation": { # This reservation type allows to pre allocate specific instance configuration. # Reservation for instances with specific machine shapes. 148 "count": "A String", # Specifies number of resources that are allocated. 149 "instanceProperties": { # Properties of the SKU instances being reserved. # The instance properties for this specific sku reservation. 150 "minCpuPlatform": "A String", # Minimum cpu platform the reservation. 151 "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. 152 "guestAccelerators": [ # Specifies accelerator type and count. 153 { # A specification of the type and number of accelerator cards attached to the instance. 154 "acceleratorCount": 42, # The number of the guest accelerator cards exposed to this instance. 155 "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. 156 }, 157 ], 158 "localSsds": [ # Specifies amount of local ssd to reserve with each instance. The type of disk is local-ssd. 159 { 160 "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. 161 "diskSizeGb": "A String", # Specifies the size of the disk in base-2 GB. 162 }, 163 ], 164 }, 165 "inUseCount": "A String", # [OutputOnly] Indicates how many resource are in use. 166 }, 167 "zone": "A String", # Zone in which the reservation resides, must be provided if reservation is created with commitment creation. 168 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format. 169 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 170 "selfLink": "A String", # [Output Only] Server-defined fully-qualified URL for this resource. 171 "description": "A String", # An optional description of this resource. Provide this property when you create the resource. 172 }, 173 ], 174 "warning": { # Informational warning which replaces the list of reservations when the list is empty. 175 "message": "A String", # [Output Only] A human-readable description of the warning code. 176 "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. 177 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: 178 # "data": [ { "key": "scope", "value": "zones/us-east1-d" } 179 { 180 "value": "A String", # [Output Only] A warning data value corresponding to the key. 181 "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). 182 }, 183 ], 184 }, 185 }, 186 }, 187 "warning": { # [Output Only] Informational warning message. 188 "message": "A String", # [Output Only] A human-readable description of the warning code. 189 "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. 190 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: 191 # "data": [ { "key": "scope", "value": "zones/us-east1-d" } 192 { 193 "value": "A String", # [Output Only] A warning data value corresponding to the key. 194 "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). 195 }, 196 ], 197 }, 198 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server. 199 "selfLink": "A String", # [Output Only] Server-defined URL for this resource. 200 }</pre> 201</div> 202 203<div class="method"> 204 <code class="details" id="aggregatedList_next">aggregatedList_next(previous_request, previous_response)</code> 205 <pre>Retrieves the next page of results. 206 207Args: 208 previous_request: The request for the previous page. (required) 209 previous_response: The response from the request for the previous page. (required) 210 211Returns: 212 A request object that you can call 'execute()' on to request the next 213 page. Returns None if there are no more items in the collection. 214 </pre> 215</div> 216 217<div class="method"> 218 <code class="details" id="delete">delete(project, zone, reservation, requestId=None)</code> 219 <pre>Deletes the specified reservation. 220 221Args: 222 project: string, Project ID for this request. (required) 223 zone: string, Name of the zone for this request. (required) 224 reservation: string, Name of the reservation to delete. (required) 225 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. 226 227For 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. 228 229The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). 230 231Returns: 232 An object of the form: 233 234 { # Represents an Operation resource. 235 # 236 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses. 237 # 238 # Operations can be global, regional or zonal. 239 # - For global operations, use the globalOperations resource. 240 # - For regional operations, use the regionOperations resource. 241 # - For zonal operations, use the zonalOperations resource. 242 # 243 # For more information, read Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==) 244 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 245 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. 246 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 247 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 248 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. 249 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 250 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on. 251 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. 252 "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. 253 "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. 254 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 255 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE. 256 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 257 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 258 { 259 "message": "A String", # [Output Only] A human-readable description of the warning code. 260 "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. 261 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: 262 # "data": [ { "key": "scope", "value": "zones/us-east1-d" } 263 { 264 "value": "A String", # [Output Only] A warning data value corresponding to the key. 265 "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). 266 }, 267 ], 268 }, 269 ], 270 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com. 271 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 272 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources. 273 "name": "A String", # [Output Only] Name of the resource. 274 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. 275 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 276 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 277 { 278 "message": "A String", # [Output Only] An optional, human-readable error message. 279 "code": "A String", # [Output Only] The error type identifier for this error. 280 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 281 }, 282 ], 283 }, 284 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 285 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 286 "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. 287 }</pre> 288</div> 289 290<div class="method"> 291 <code class="details" id="get">get(project, zone, reservation)</code> 292 <pre>Retrieves all information of the specified reservation. 293 294Args: 295 project: string, Project ID for this request. (required) 296 zone: string, Name of the zone for this request. (required) 297 reservation: string, Name of the reservation to retrieve. (required) 298 299Returns: 300 An object of the form: 301 302 { # Reservation resource NextID: 13 303 "status": "A String", # [Output Only] The status of the reservation. 304 "kind": "compute#reservation", # [Output Only] Type of the resource. Always compute#reservations for reservations. 305 "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. 306 "specificReservationRequired": True or False, # Indicates whether the reservation can be consumed by VMs with "any reservation" defined. If the field is set, then only VMs that target the reservation by name using --reservation-affinity can consume this reservation. 307 "commitment": "A String", # [OutputOnly] Full or partial url for parent commitment for reservations which are tied to a commitment. 308 "specificReservation": { # This reservation type allows to pre allocate specific instance configuration. # Reservation for instances with specific machine shapes. 309 "count": "A String", # Specifies number of resources that are allocated. 310 "instanceProperties": { # Properties of the SKU instances being reserved. # The instance properties for this specific sku reservation. 311 "minCpuPlatform": "A String", # Minimum cpu platform the reservation. 312 "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. 313 "guestAccelerators": [ # Specifies accelerator type and count. 314 { # A specification of the type and number of accelerator cards attached to the instance. 315 "acceleratorCount": 42, # The number of the guest accelerator cards exposed to this instance. 316 "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. 317 }, 318 ], 319 "localSsds": [ # Specifies amount of local ssd to reserve with each instance. The type of disk is local-ssd. 320 { 321 "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. 322 "diskSizeGb": "A String", # Specifies the size of the disk in base-2 GB. 323 }, 324 ], 325 }, 326 "inUseCount": "A String", # [OutputOnly] Indicates how many resource are in use. 327 }, 328 "zone": "A String", # Zone in which the reservation resides, must be provided if reservation is created with commitment creation. 329 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format. 330 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 331 "selfLink": "A String", # [Output Only] Server-defined fully-qualified URL for this resource. 332 "description": "A String", # An optional description of this resource. Provide this property when you create the resource. 333 }</pre> 334</div> 335 336<div class="method"> 337 <code class="details" id="getIamPolicy">getIamPolicy(project, zone, resource)</code> 338 <pre>Gets the access control policy for a resource. May be empty if no such policy or resource exists. 339 340Args: 341 project: string, Project ID for this request. (required) 342 zone: string, The name of the zone for this request. (required) 343 resource: string, Name or id of the resource for this request. (required) 344 345Returns: 346 An object of the form: 347 348 { # Defines an Identity and Access Management (IAM) policy. It is used to specify access control policies for Cloud Platform resources. 349 # 350 # 351 # 352 # A `Policy` consists of a list of `bindings`. A `binding` binds a list of `members` to a `role`, where the members can be user accounts, Google groups, Google domains, and service accounts. A `role` is a named list of permissions defined by IAM. 353 # 354 # **JSON Example** 355 # 356 # { "bindings": [ { "role": "roles/owner", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-other-app@appspot.gserviceaccount.com" ] }, { "role": "roles/viewer", "members": ["user:sean@example.com"] } ] } 357 # 358 # **YAML Example** 359 # 360 # bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-other-app@appspot.gserviceaccount.com role: roles/owner - members: - user:sean@example.com role: roles/viewer 361 # 362 # 363 # 364 # For a description of IAM and its features, see the [IAM developer's guide](https://cloud.google.com/iam/docs). 365 "auditConfigs": [ # Specifies cloud audit logging configuration for this policy. 366 { # 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. 367 # 368 # 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. 369 # 370 # Example Policy with multiple AuditConfigs: 371 # 372 # { "audit_configs": [ { "service": "allServices" "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:foo@gmail.com" ] }, { "log_type": "DATA_WRITE", }, { "log_type": "ADMIN_READ", } ] }, { "service": "fooservice.googleapis.com" "audit_log_configs": [ { "log_type": "DATA_READ", }, { "log_type": "DATA_WRITE", "exempted_members": [ "user:bar@gmail.com" ] } ] } ] } 373 # 374 # For fooservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts foo@gmail.com from DATA_READ logging, and bar@gmail.com from DATA_WRITE logging. 375 "exemptedMembers": [ 376 "A String", 377 ], 378 "auditLogConfigs": [ # The configuration for logging of each type of permission. 379 { # Provides the configuration for logging a type of permissions. Example: 380 # 381 # { "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:foo@gmail.com" ] }, { "log_type": "DATA_WRITE", } ] } 382 # 383 # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting foo@gmail.com from DATA_READ logging. 384 "exemptedMembers": [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][]. 385 "A String", 386 ], 387 "logType": "A String", # The log type that this config enables. 388 }, 389 ], 390 "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. 391 }, 392 ], 393 "rules": [ # If more than one rule is specified, the rules are applied in the following manner: - All matching LOG rules are always applied. - If any DENY/DENY_WITH_LOG rule matches, permission is denied. Logging will be applied if one or more matching rule requires logging. - Otherwise, if any ALLOW/ALLOW_WITH_LOG rule matches, permission is granted. Logging will be applied if one or more matching rule requires logging. - Otherwise, if no rule applies, permission is denied. 394 { # A rule to be applied in a Policy. 395 "logConfigs": [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action. 396 { # Specifies what kind of log the caller must write 397 "counter": { # Increment a streamz counter with the specified metric and field names. # Counter options. 398 # 399 # Metric names should start with a '/', generally be lowercase-only, and end in "_count". Field names should not contain an initial slash. The actual exported metric names will have "/iam/policy" prepended. 400 # 401 # Field names correspond to IAM request parameters and field values are their respective values. 402 # 403 # Supported field names: - "authority", which is "[token]" if IAMContext.token is present, otherwise the value of IAMContext.authority_selector if present, and otherwise a representation of IAMContext.principal; or - "iam_principal", a representation of IAMContext.principal even if a token or authority selector is present; or - "" (empty string), resulting in a counter with no fields. 404 # 405 # Examples: counter { metric: "/debug_access_count" field: "iam_principal" } ==> increment counter /iam/policy/backend_debug_access_count {iam_principal=[value of IAMContext.principal]} 406 # 407 # At this time we do not support multiple field names (though this may be supported in the future). 408 "field": "A String", # The field value to attribute. 409 "metric": "A String", # The metric to update. 410 }, 411 "dataAccess": { # Write a Data Access (Gin) log # Data access options. 412 "logMode": "A String", # Whether Gin logging should happen in a fail-closed manner at the caller. This is relevant only in the LocalIAM implementation, for now. 413 }, 414 "cloudAudit": { # Write a Cloud Audit log # Cloud audit options. 415 "logName": "A String", # The log_name to populate in the Cloud Audit Record. 416 "authorizationLoggingOptions": { # Authorization-related information used by Cloud Audit Logging. # Information used by the Cloud Audit Logging pipeline. 417 "permissionType": "A String", # The type of the permission that was checked. 418 }, 419 }, 420 }, 421 ], 422 "notIns": [ # If one or more 'not_in' clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in none of the entries. 423 "A String", 424 ], 425 "ins": [ # If one or more 'in' clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in at least one of these entries. 426 "A String", 427 ], 428 "action": "A String", # Required 429 "permissions": [ # A permission is a string of form '..' (e.g., 'storage.buckets.list'). A value of '*' matches all permissions, and a verb part of '*' (e.g., 'storage.buckets.*') matches all verbs. 430 "A String", 431 ], 432 "conditions": [ # Additional restrictions that must be met. All conditions must pass for the rule to match. 433 { # A condition to be met. 434 "iam": "A String", # Trusted attributes supplied by the IAM system. 435 "sys": "A String", # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control. 436 "values": [ # The objects of the condition. 437 "A String", 438 ], 439 "svc": "A String", # Trusted attributes discharged by the service. 440 "op": "A String", # An operator to apply the subject with. 441 }, 442 ], 443 "description": "A String", # Human-readable description of the rule. 444 }, 445 ], 446 "version": 42, # Deprecated. 447 "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. 448 # 449 # If no `etag` is provided in the call to `setIamPolicy`, then the existing policy is overwritten blindly. 450 "bindings": [ # Associates a list of `members` to a `role`. `bindings` with no members will result in an error. 451 { # Associates `members` with a `role`. 452 "role": "A String", # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. 453 "members": [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values: 454 # 455 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. 456 # 457 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. 458 # 459 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@gmail.com` . 460 # 461 # 462 # 463 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`. 464 # 465 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. 466 # 467 # 468 # 469 # * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. 470 "A String", 471 ], 472 "condition": { # Represents an expression text. Example: # The condition that is associated with this binding. NOTE: An unsatisfied condition will not allow user access via current binding. Different bindings, including their conditions, are examined independently. 473 # 474 # title: "User account presence" description: "Determines whether the request has a user account" expression: "size(request.user) > 0" 475 "title": "A String", # An optional title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression. 476 "expression": "A String", # Textual representation of an expression in Common Expression Language syntax. 477 # 478 # The application context of the containing message determines which well-known feature set of CEL is supported. 479 "description": "A String", # An optional description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI. 480 "location": "A String", # An optional string indicating the location of the expression for error reporting, e.g. a file name and a position in the file. 481 }, 482 }, 483 ], 484 "iamOwned": True or False, 485 }</pre> 486</div> 487 488<div class="method"> 489 <code class="details" id="insert">insert(project, zone, body, requestId=None)</code> 490 <pre>Creates a new reservation. 491 492Args: 493 project: string, Project ID for this request. (required) 494 zone: string, Name of the zone for this request. (required) 495 body: object, The request body. (required) 496 The object takes the form of: 497 498{ # Reservation resource NextID: 13 499 "status": "A String", # [Output Only] The status of the reservation. 500 "kind": "compute#reservation", # [Output Only] Type of the resource. Always compute#reservations for reservations. 501 "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. 502 "specificReservationRequired": True or False, # Indicates whether the reservation can be consumed by VMs with "any reservation" defined. If the field is set, then only VMs that target the reservation by name using --reservation-affinity can consume this reservation. 503 "commitment": "A String", # [OutputOnly] Full or partial url for parent commitment for reservations which are tied to a commitment. 504 "specificReservation": { # This reservation type allows to pre allocate specific instance configuration. # Reservation for instances with specific machine shapes. 505 "count": "A String", # Specifies number of resources that are allocated. 506 "instanceProperties": { # Properties of the SKU instances being reserved. # The instance properties for this specific sku reservation. 507 "minCpuPlatform": "A String", # Minimum cpu platform the reservation. 508 "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. 509 "guestAccelerators": [ # Specifies accelerator type and count. 510 { # A specification of the type and number of accelerator cards attached to the instance. 511 "acceleratorCount": 42, # The number of the guest accelerator cards exposed to this instance. 512 "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. 513 }, 514 ], 515 "localSsds": [ # Specifies amount of local ssd to reserve with each instance. The type of disk is local-ssd. 516 { 517 "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. 518 "diskSizeGb": "A String", # Specifies the size of the disk in base-2 GB. 519 }, 520 ], 521 }, 522 "inUseCount": "A String", # [OutputOnly] Indicates how many resource are in use. 523 }, 524 "zone": "A String", # Zone in which the reservation resides, must be provided if reservation is created with commitment creation. 525 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format. 526 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 527 "selfLink": "A String", # [Output Only] Server-defined fully-qualified URL for this resource. 528 "description": "A String", # An optional description of this resource. Provide this property when you create the resource. 529} 530 531 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. 532 533For 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. 534 535The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). 536 537Returns: 538 An object of the form: 539 540 { # Represents an Operation resource. 541 # 542 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses. 543 # 544 # Operations can be global, regional or zonal. 545 # - For global operations, use the globalOperations resource. 546 # - For regional operations, use the regionOperations resource. 547 # - For zonal operations, use the zonalOperations resource. 548 # 549 # For more information, read Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==) 550 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 551 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. 552 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 553 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 554 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. 555 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 556 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on. 557 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. 558 "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. 559 "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. 560 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 561 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE. 562 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 563 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 564 { 565 "message": "A String", # [Output Only] A human-readable description of the warning code. 566 "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. 567 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: 568 # "data": [ { "key": "scope", "value": "zones/us-east1-d" } 569 { 570 "value": "A String", # [Output Only] A warning data value corresponding to the key. 571 "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). 572 }, 573 ], 574 }, 575 ], 576 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com. 577 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 578 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources. 579 "name": "A String", # [Output Only] Name of the resource. 580 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. 581 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 582 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 583 { 584 "message": "A String", # [Output Only] An optional, human-readable error message. 585 "code": "A String", # [Output Only] The error type identifier for this error. 586 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 587 }, 588 ], 589 }, 590 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 591 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 592 "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. 593 }</pre> 594</div> 595 596<div class="method"> 597 <code class="details" id="list">list(project, zone, orderBy=None, maxResults=None, pageToken=None, filter=None)</code> 598 <pre>A list all the reservations that have been configured for the specified project in specified zone. 599 600Args: 601 project: string, Project ID for this request. (required) 602 zone: string, Name of the zone for this request. (required) 603 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. 604 605You 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. 606 607Currently, only sorting by name or creationTimestamp desc is supported. 608 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) 609 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. 610 filter: string, A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, >, or <. 611 612For example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance. 613 614You 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. 615 616To 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). 617 618Returns: 619 An object of the form: 620 621 { 622 "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. 623 "kind": "compute#reservationList", # [Output Only] Type of resource.Always compute#reservationsList for listsof reservations 624 "items": [ # [Output Only] A list of Allocation resources. 625 { # Reservation resource NextID: 13 626 "status": "A String", # [Output Only] The status of the reservation. 627 "kind": "compute#reservation", # [Output Only] Type of the resource. Always compute#reservations for reservations. 628 "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. 629 "specificReservationRequired": True or False, # Indicates whether the reservation can be consumed by VMs with "any reservation" defined. If the field is set, then only VMs that target the reservation by name using --reservation-affinity can consume this reservation. 630 "commitment": "A String", # [OutputOnly] Full or partial url for parent commitment for reservations which are tied to a commitment. 631 "specificReservation": { # This reservation type allows to pre allocate specific instance configuration. # Reservation for instances with specific machine shapes. 632 "count": "A String", # Specifies number of resources that are allocated. 633 "instanceProperties": { # Properties of the SKU instances being reserved. # The instance properties for this specific sku reservation. 634 "minCpuPlatform": "A String", # Minimum cpu platform the reservation. 635 "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. 636 "guestAccelerators": [ # Specifies accelerator type and count. 637 { # A specification of the type and number of accelerator cards attached to the instance. 638 "acceleratorCount": 42, # The number of the guest accelerator cards exposed to this instance. 639 "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. 640 }, 641 ], 642 "localSsds": [ # Specifies amount of local ssd to reserve with each instance. The type of disk is local-ssd. 643 { 644 "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. 645 "diskSizeGb": "A String", # Specifies the size of the disk in base-2 GB. 646 }, 647 ], 648 }, 649 "inUseCount": "A String", # [OutputOnly] Indicates how many resource are in use. 650 }, 651 "zone": "A String", # Zone in which the reservation resides, must be provided if reservation is created with commitment creation. 652 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format. 653 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 654 "selfLink": "A String", # [Output Only] Server-defined fully-qualified URL for this resource. 655 "description": "A String", # An optional description of this resource. Provide this property when you create the resource. 656 }, 657 ], 658 "warning": { # [Output Only] Informational warning message. 659 "message": "A String", # [Output Only] A human-readable description of the warning code. 660 "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. 661 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: 662 # "data": [ { "key": "scope", "value": "zones/us-east1-d" } 663 { 664 "value": "A String", # [Output Only] A warning data value corresponding to the key. 665 "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). 666 }, 667 ], 668 }, 669 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 670 "selfLink": "A String", # [Output Only] Server-defined URL for this resource. 671 }</pre> 672</div> 673 674<div class="method"> 675 <code class="details" id="list_next">list_next(previous_request, previous_response)</code> 676 <pre>Retrieves the next page of results. 677 678Args: 679 previous_request: The request for the previous page. (required) 680 previous_response: The response from the request for the previous page. (required) 681 682Returns: 683 A request object that you can call 'execute()' on to request the next 684 page. Returns None if there are no more items in the collection. 685 </pre> 686</div> 687 688<div class="method"> 689 <code class="details" id="resize">resize(project, zone, reservation, body, requestId=None)</code> 690 <pre>Resizes the reservation (applicable to standalone reservations only) 691 692Args: 693 project: string, Project ID for this request. (required) 694 zone: string, Name of the zone for this request. (required) 695 reservation: string, Name of the reservation to update. (required) 696 body: object, The request body. (required) 697 The object takes the form of: 698 699{ 700 "specificSkuCount": "A String", # Number of allocated resources can be resized with minimum = 1 and maximum = 1000. 701 } 702 703 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. 704 705For 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. 706 707The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). 708 709Returns: 710 An object of the form: 711 712 { # Represents an Operation resource. 713 # 714 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses. 715 # 716 # Operations can be global, regional or zonal. 717 # - For global operations, use the globalOperations resource. 718 # - For regional operations, use the regionOperations resource. 719 # - For zonal operations, use the zonalOperations resource. 720 # 721 # For more information, read Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==) 722 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 723 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. 724 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 725 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 726 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. 727 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 728 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on. 729 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. 730 "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. 731 "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. 732 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 733 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE. 734 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 735 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 736 { 737 "message": "A String", # [Output Only] A human-readable description of the warning code. 738 "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. 739 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: 740 # "data": [ { "key": "scope", "value": "zones/us-east1-d" } 741 { 742 "value": "A String", # [Output Only] A warning data value corresponding to the key. 743 "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). 744 }, 745 ], 746 }, 747 ], 748 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com. 749 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 750 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources. 751 "name": "A String", # [Output Only] Name of the resource. 752 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. 753 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 754 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 755 { 756 "message": "A String", # [Output Only] An optional, human-readable error message. 757 "code": "A String", # [Output Only] The error type identifier for this error. 758 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 759 }, 760 ], 761 }, 762 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 763 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 764 "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. 765 }</pre> 766</div> 767 768<div class="method"> 769 <code class="details" id="setIamPolicy">setIamPolicy(project, zone, resource, body)</code> 770 <pre>Sets the access control policy on the specified resource. Replaces any existing policy. 771 772Args: 773 project: string, Project ID for this request. (required) 774 zone: string, The name of the zone for this request. (required) 775 resource: string, Name or id of the resource for this request. (required) 776 body: object, The request body. (required) 777 The object takes the form of: 778 779{ 780 "policy": { # Defines an Identity and Access Management (IAM) policy. It is used to specify access control policies for Cloud Platform resources. # REQUIRED: The complete policy to be applied to the 'resource'. The size of the policy is limited to a few 10s of KB. An empty policy is in general a valid policy but certain services (like Projects) might reject them. 781 # 782 # 783 # 784 # A `Policy` consists of a list of `bindings`. A `binding` binds a list of `members` to a `role`, where the members can be user accounts, Google groups, Google domains, and service accounts. A `role` is a named list of permissions defined by IAM. 785 # 786 # **JSON Example** 787 # 788 # { "bindings": [ { "role": "roles/owner", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-other-app@appspot.gserviceaccount.com" ] }, { "role": "roles/viewer", "members": ["user:sean@example.com"] } ] } 789 # 790 # **YAML Example** 791 # 792 # bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-other-app@appspot.gserviceaccount.com role: roles/owner - members: - user:sean@example.com role: roles/viewer 793 # 794 # 795 # 796 # For a description of IAM and its features, see the [IAM developer's guide](https://cloud.google.com/iam/docs). 797 "auditConfigs": [ # Specifies cloud audit logging configuration for this policy. 798 { # 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. 799 # 800 # 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. 801 # 802 # Example Policy with multiple AuditConfigs: 803 # 804 # { "audit_configs": [ { "service": "allServices" "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:foo@gmail.com" ] }, { "log_type": "DATA_WRITE", }, { "log_type": "ADMIN_READ", } ] }, { "service": "fooservice.googleapis.com" "audit_log_configs": [ { "log_type": "DATA_READ", }, { "log_type": "DATA_WRITE", "exempted_members": [ "user:bar@gmail.com" ] } ] } ] } 805 # 806 # For fooservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts foo@gmail.com from DATA_READ logging, and bar@gmail.com from DATA_WRITE logging. 807 "exemptedMembers": [ 808 "A String", 809 ], 810 "auditLogConfigs": [ # The configuration for logging of each type of permission. 811 { # Provides the configuration for logging a type of permissions. Example: 812 # 813 # { "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:foo@gmail.com" ] }, { "log_type": "DATA_WRITE", } ] } 814 # 815 # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting foo@gmail.com from DATA_READ logging. 816 "exemptedMembers": [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][]. 817 "A String", 818 ], 819 "logType": "A String", # The log type that this config enables. 820 }, 821 ], 822 "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. 823 }, 824 ], 825 "rules": [ # If more than one rule is specified, the rules are applied in the following manner: - All matching LOG rules are always applied. - If any DENY/DENY_WITH_LOG rule matches, permission is denied. Logging will be applied if one or more matching rule requires logging. - Otherwise, if any ALLOW/ALLOW_WITH_LOG rule matches, permission is granted. Logging will be applied if one or more matching rule requires logging. - Otherwise, if no rule applies, permission is denied. 826 { # A rule to be applied in a Policy. 827 "logConfigs": [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action. 828 { # Specifies what kind of log the caller must write 829 "counter": { # Increment a streamz counter with the specified metric and field names. # Counter options. 830 # 831 # Metric names should start with a '/', generally be lowercase-only, and end in "_count". Field names should not contain an initial slash. The actual exported metric names will have "/iam/policy" prepended. 832 # 833 # Field names correspond to IAM request parameters and field values are their respective values. 834 # 835 # Supported field names: - "authority", which is "[token]" if IAMContext.token is present, otherwise the value of IAMContext.authority_selector if present, and otherwise a representation of IAMContext.principal; or - "iam_principal", a representation of IAMContext.principal even if a token or authority selector is present; or - "" (empty string), resulting in a counter with no fields. 836 # 837 # Examples: counter { metric: "/debug_access_count" field: "iam_principal" } ==> increment counter /iam/policy/backend_debug_access_count {iam_principal=[value of IAMContext.principal]} 838 # 839 # At this time we do not support multiple field names (though this may be supported in the future). 840 "field": "A String", # The field value to attribute. 841 "metric": "A String", # The metric to update. 842 }, 843 "dataAccess": { # Write a Data Access (Gin) log # Data access options. 844 "logMode": "A String", # Whether Gin logging should happen in a fail-closed manner at the caller. This is relevant only in the LocalIAM implementation, for now. 845 }, 846 "cloudAudit": { # Write a Cloud Audit log # Cloud audit options. 847 "logName": "A String", # The log_name to populate in the Cloud Audit Record. 848 "authorizationLoggingOptions": { # Authorization-related information used by Cloud Audit Logging. # Information used by the Cloud Audit Logging pipeline. 849 "permissionType": "A String", # The type of the permission that was checked. 850 }, 851 }, 852 }, 853 ], 854 "notIns": [ # If one or more 'not_in' clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in none of the entries. 855 "A String", 856 ], 857 "ins": [ # If one or more 'in' clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in at least one of these entries. 858 "A String", 859 ], 860 "action": "A String", # Required 861 "permissions": [ # A permission is a string of form '..' (e.g., 'storage.buckets.list'). A value of '*' matches all permissions, and a verb part of '*' (e.g., 'storage.buckets.*') matches all verbs. 862 "A String", 863 ], 864 "conditions": [ # Additional restrictions that must be met. All conditions must pass for the rule to match. 865 { # A condition to be met. 866 "iam": "A String", # Trusted attributes supplied by the IAM system. 867 "sys": "A String", # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control. 868 "values": [ # The objects of the condition. 869 "A String", 870 ], 871 "svc": "A String", # Trusted attributes discharged by the service. 872 "op": "A String", # An operator to apply the subject with. 873 }, 874 ], 875 "description": "A String", # Human-readable description of the rule. 876 }, 877 ], 878 "version": 42, # Deprecated. 879 "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. 880 # 881 # If no `etag` is provided in the call to `setIamPolicy`, then the existing policy is overwritten blindly. 882 "bindings": [ # Associates a list of `members` to a `role`. `bindings` with no members will result in an error. 883 { # Associates `members` with a `role`. 884 "role": "A String", # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. 885 "members": [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values: 886 # 887 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. 888 # 889 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. 890 # 891 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@gmail.com` . 892 # 893 # 894 # 895 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`. 896 # 897 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. 898 # 899 # 900 # 901 # * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. 902 "A String", 903 ], 904 "condition": { # Represents an expression text. Example: # The condition that is associated with this binding. NOTE: An unsatisfied condition will not allow user access via current binding. Different bindings, including their conditions, are examined independently. 905 # 906 # title: "User account presence" description: "Determines whether the request has a user account" expression: "size(request.user) > 0" 907 "title": "A String", # An optional title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression. 908 "expression": "A String", # Textual representation of an expression in Common Expression Language syntax. 909 # 910 # The application context of the containing message determines which well-known feature set of CEL is supported. 911 "description": "A String", # An optional description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI. 912 "location": "A String", # An optional string indicating the location of the expression for error reporting, e.g. a file name and a position in the file. 913 }, 914 }, 915 ], 916 "iamOwned": True or False, 917 }, 918 "bindings": [ # Flatten Policy to create a backwacd compatible wire-format. Deprecated. Use 'policy' to specify bindings. 919 { # Associates `members` with a `role`. 920 "role": "A String", # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. 921 "members": [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values: 922 # 923 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. 924 # 925 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. 926 # 927 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@gmail.com` . 928 # 929 # 930 # 931 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`. 932 # 933 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. 934 # 935 # 936 # 937 # * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. 938 "A String", 939 ], 940 "condition": { # Represents an expression text. Example: # The condition that is associated with this binding. NOTE: An unsatisfied condition will not allow user access via current binding. Different bindings, including their conditions, are examined independently. 941 # 942 # title: "User account presence" description: "Determines whether the request has a user account" expression: "size(request.user) > 0" 943 "title": "A String", # An optional title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression. 944 "expression": "A String", # Textual representation of an expression in Common Expression Language syntax. 945 # 946 # The application context of the containing message determines which well-known feature set of CEL is supported. 947 "description": "A String", # An optional description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI. 948 "location": "A String", # An optional string indicating the location of the expression for error reporting, e.g. a file name and a position in the file. 949 }, 950 }, 951 ], 952 "etag": "A String", # Flatten Policy to create a backward compatible wire-format. Deprecated. Use 'policy' to specify the etag. 953 } 954 955 956Returns: 957 An object of the form: 958 959 { # Defines an Identity and Access Management (IAM) policy. It is used to specify access control policies for Cloud Platform resources. 960 # 961 # 962 # 963 # A `Policy` consists of a list of `bindings`. A `binding` binds a list of `members` to a `role`, where the members can be user accounts, Google groups, Google domains, and service accounts. A `role` is a named list of permissions defined by IAM. 964 # 965 # **JSON Example** 966 # 967 # { "bindings": [ { "role": "roles/owner", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-other-app@appspot.gserviceaccount.com" ] }, { "role": "roles/viewer", "members": ["user:sean@example.com"] } ] } 968 # 969 # **YAML Example** 970 # 971 # bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-other-app@appspot.gserviceaccount.com role: roles/owner - members: - user:sean@example.com role: roles/viewer 972 # 973 # 974 # 975 # For a description of IAM and its features, see the [IAM developer's guide](https://cloud.google.com/iam/docs). 976 "auditConfigs": [ # Specifies cloud audit logging configuration for this policy. 977 { # 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. 978 # 979 # 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. 980 # 981 # Example Policy with multiple AuditConfigs: 982 # 983 # { "audit_configs": [ { "service": "allServices" "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:foo@gmail.com" ] }, { "log_type": "DATA_WRITE", }, { "log_type": "ADMIN_READ", } ] }, { "service": "fooservice.googleapis.com" "audit_log_configs": [ { "log_type": "DATA_READ", }, { "log_type": "DATA_WRITE", "exempted_members": [ "user:bar@gmail.com" ] } ] } ] } 984 # 985 # For fooservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts foo@gmail.com from DATA_READ logging, and bar@gmail.com from DATA_WRITE logging. 986 "exemptedMembers": [ 987 "A String", 988 ], 989 "auditLogConfigs": [ # The configuration for logging of each type of permission. 990 { # Provides the configuration for logging a type of permissions. Example: 991 # 992 # { "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:foo@gmail.com" ] }, { "log_type": "DATA_WRITE", } ] } 993 # 994 # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting foo@gmail.com from DATA_READ logging. 995 "exemptedMembers": [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][]. 996 "A String", 997 ], 998 "logType": "A String", # The log type that this config enables. 999 }, 1000 ], 1001 "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. 1002 }, 1003 ], 1004 "rules": [ # If more than one rule is specified, the rules are applied in the following manner: - All matching LOG rules are always applied. - If any DENY/DENY_WITH_LOG rule matches, permission is denied. Logging will be applied if one or more matching rule requires logging. - Otherwise, if any ALLOW/ALLOW_WITH_LOG rule matches, permission is granted. Logging will be applied if one or more matching rule requires logging. - Otherwise, if no rule applies, permission is denied. 1005 { # A rule to be applied in a Policy. 1006 "logConfigs": [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action. 1007 { # Specifies what kind of log the caller must write 1008 "counter": { # Increment a streamz counter with the specified metric and field names. # Counter options. 1009 # 1010 # Metric names should start with a '/', generally be lowercase-only, and end in "_count". Field names should not contain an initial slash. The actual exported metric names will have "/iam/policy" prepended. 1011 # 1012 # Field names correspond to IAM request parameters and field values are their respective values. 1013 # 1014 # Supported field names: - "authority", which is "[token]" if IAMContext.token is present, otherwise the value of IAMContext.authority_selector if present, and otherwise a representation of IAMContext.principal; or - "iam_principal", a representation of IAMContext.principal even if a token or authority selector is present; or - "" (empty string), resulting in a counter with no fields. 1015 # 1016 # Examples: counter { metric: "/debug_access_count" field: "iam_principal" } ==> increment counter /iam/policy/backend_debug_access_count {iam_principal=[value of IAMContext.principal]} 1017 # 1018 # At this time we do not support multiple field names (though this may be supported in the future). 1019 "field": "A String", # The field value to attribute. 1020 "metric": "A String", # The metric to update. 1021 }, 1022 "dataAccess": { # Write a Data Access (Gin) log # Data access options. 1023 "logMode": "A String", # Whether Gin logging should happen in a fail-closed manner at the caller. This is relevant only in the LocalIAM implementation, for now. 1024 }, 1025 "cloudAudit": { # Write a Cloud Audit log # Cloud audit options. 1026 "logName": "A String", # The log_name to populate in the Cloud Audit Record. 1027 "authorizationLoggingOptions": { # Authorization-related information used by Cloud Audit Logging. # Information used by the Cloud Audit Logging pipeline. 1028 "permissionType": "A String", # The type of the permission that was checked. 1029 }, 1030 }, 1031 }, 1032 ], 1033 "notIns": [ # If one or more 'not_in' clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in none of the entries. 1034 "A String", 1035 ], 1036 "ins": [ # If one or more 'in' clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in at least one of these entries. 1037 "A String", 1038 ], 1039 "action": "A String", # Required 1040 "permissions": [ # A permission is a string of form '..' (e.g., 'storage.buckets.list'). A value of '*' matches all permissions, and a verb part of '*' (e.g., 'storage.buckets.*') matches all verbs. 1041 "A String", 1042 ], 1043 "conditions": [ # Additional restrictions that must be met. All conditions must pass for the rule to match. 1044 { # A condition to be met. 1045 "iam": "A String", # Trusted attributes supplied by the IAM system. 1046 "sys": "A String", # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control. 1047 "values": [ # The objects of the condition. 1048 "A String", 1049 ], 1050 "svc": "A String", # Trusted attributes discharged by the service. 1051 "op": "A String", # An operator to apply the subject with. 1052 }, 1053 ], 1054 "description": "A String", # Human-readable description of the rule. 1055 }, 1056 ], 1057 "version": 42, # Deprecated. 1058 "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. 1059 # 1060 # If no `etag` is provided in the call to `setIamPolicy`, then the existing policy is overwritten blindly. 1061 "bindings": [ # Associates a list of `members` to a `role`. `bindings` with no members will result in an error. 1062 { # Associates `members` with a `role`. 1063 "role": "A String", # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. 1064 "members": [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values: 1065 # 1066 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. 1067 # 1068 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. 1069 # 1070 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@gmail.com` . 1071 # 1072 # 1073 # 1074 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`. 1075 # 1076 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. 1077 # 1078 # 1079 # 1080 # * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. 1081 "A String", 1082 ], 1083 "condition": { # Represents an expression text. Example: # The condition that is associated with this binding. NOTE: An unsatisfied condition will not allow user access via current binding. Different bindings, including their conditions, are examined independently. 1084 # 1085 # title: "User account presence" description: "Determines whether the request has a user account" expression: "size(request.user) > 0" 1086 "title": "A String", # An optional title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression. 1087 "expression": "A String", # Textual representation of an expression in Common Expression Language syntax. 1088 # 1089 # The application context of the containing message determines which well-known feature set of CEL is supported. 1090 "description": "A String", # An optional description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI. 1091 "location": "A String", # An optional string indicating the location of the expression for error reporting, e.g. a file name and a position in the file. 1092 }, 1093 }, 1094 ], 1095 "iamOwned": True or False, 1096 }</pre> 1097</div> 1098 1099<div class="method"> 1100 <code class="details" id="testIamPermissions">testIamPermissions(project, zone, resource, body)</code> 1101 <pre>Returns permissions that a caller has on the specified resource. 1102 1103Args: 1104 project: string, Project ID for this request. (required) 1105 zone: string, The name of the zone for this request. (required) 1106 resource: string, Name or id of the resource for this request. (required) 1107 body: object, The request body. (required) 1108 The object takes the form of: 1109 1110{ 1111 "permissions": [ # The set of permissions to check for the 'resource'. Permissions with wildcards (such as '*' or 'storage.*') are not allowed. 1112 "A String", 1113 ], 1114 } 1115 1116 1117Returns: 1118 An object of the form: 1119 1120 { 1121 "permissions": [ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed. 1122 "A String", 1123 ], 1124 }</pre> 1125</div> 1126 1127</body></html>