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