1<html><body> 2<style> 3 4body, h1, h2, h3, div, span, p, pre, a { 5 margin: 0; 6 padding: 0; 7 border: 0; 8 font-weight: inherit; 9 font-style: inherit; 10 font-size: 100%; 11 font-family: inherit; 12 vertical-align: baseline; 13} 14 15body { 16 font-size: 13px; 17 padding: 1em; 18} 19 20h1 { 21 font-size: 26px; 22 margin-bottom: 1em; 23} 24 25h2 { 26 font-size: 24px; 27 margin-bottom: 1em; 28} 29 30h3 { 31 font-size: 20px; 32 margin-bottom: 1em; 33 margin-top: 1em; 34} 35 36pre, code { 37 line-height: 1.5; 38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace; 39} 40 41pre { 42 margin-top: 0.5em; 43} 44 45h1, h2, h3, p { 46 font-family: Arial, sans serif; 47} 48 49h1, h2, h3 { 50 border-bottom: solid #CCC 1px; 51} 52 53.toc_element { 54 margin-top: 0.5em; 55} 56 57.firstline { 58 margin-left: 2 em; 59} 60 61.method { 62 margin-top: 1em; 63 border: solid 1px #CCC; 64 padding: 1em; 65 background: #EEE; 66} 67 68.details { 69 font-weight: bold; 70 font-size: 14px; 71} 72 73</style> 74 75<h1><a href="compute_v1.html">Compute Engine API</a> . <a href="compute_v1.subnetworks.html">subnetworks</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 subnetworks.</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, subnetwork, requestId=None)</a></code></p> 85<p class="firstline">Deletes the specified subnetwork.</p> 86<p class="toc_element"> 87 <code><a href="#expandIpCidrRange">expandIpCidrRange(project, region, subnetwork, body, requestId=None)</a></code></p> 88<p class="firstline">Expands the IP CIDR range of the subnetwork to a specified value.</p> 89<p class="toc_element"> 90 <code><a href="#get">get(project, region, subnetwork)</a></code></p> 91<p class="firstline">Returns the specified subnetwork. Gets a list of available subnetworks list() request.</p> 92<p class="toc_element"> 93 <code><a href="#getIamPolicy">getIamPolicy(project, region, resource)</a></code></p> 94<p class="firstline">Gets the access control policy for a resource. May be empty if no such policy or resource exists.</p> 95<p class="toc_element"> 96 <code><a href="#insert">insert(project, region, body, requestId=None)</a></code></p> 97<p class="firstline">Creates a subnetwork in the specified project using the data included in the request.</p> 98<p class="toc_element"> 99 <code><a href="#list">list(project, region, orderBy=None, maxResults=None, pageToken=None, filter=None)</a></code></p> 100<p class="firstline">Retrieves a list of subnetworks available to the specified project.</p> 101<p class="toc_element"> 102 <code><a href="#listUsable">listUsable(project, orderBy=None, maxResults=None, pageToken=None, filter=None)</a></code></p> 103<p class="firstline">Retrieves an aggregated list of usable subnetworks.</p> 104<p class="toc_element"> 105 <code><a href="#listUsable_next">listUsable_next(previous_request, previous_response)</a></code></p> 106<p class="firstline">Retrieves the next page of results.</p> 107<p class="toc_element"> 108 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p> 109<p class="firstline">Retrieves the next page of results.</p> 110<p class="toc_element"> 111 <code><a href="#patch">patch(project, region, subnetwork, body, requestId=None)</a></code></p> 112<p class="firstline">Patches the specified subnetwork with the data included in the request. Only certain fields can up updated with a patch request as indicated in the field descriptions. You must specify the current fingeprint of the subnetwork resource being patched.</p> 113<p class="toc_element"> 114 <code><a href="#setIamPolicy">setIamPolicy(project, region, resource, body)</a></code></p> 115<p class="firstline">Sets the access control policy on the specified resource. Replaces any existing policy.</p> 116<p class="toc_element"> 117 <code><a href="#setPrivateIpGoogleAccess">setPrivateIpGoogleAccess(project, region, subnetwork, body, requestId=None)</a></code></p> 118<p class="firstline">Set whether VMs in this subnet can access Google services without assigning external IP addresses through Private Google Access.</p> 119<p class="toc_element"> 120 <code><a href="#testIamPermissions">testIamPermissions(project, region, resource, body)</a></code></p> 121<p class="firstline">Returns permissions that a caller has on the specified resource.</p> 122<h3>Method Details</h3> 123<div class="method"> 124 <code class="details" id="aggregatedList">aggregatedList(project, orderBy=None, maxResults=None, pageToken=None, filter=None)</code> 125 <pre>Retrieves an aggregated list of subnetworks. 126 127Args: 128 project: string, Project ID for this request. (required) 129 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. 130 131You 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. 132 133Currently, only sorting by name or creationTimestamp desc is supported. 134 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) 135 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. 136 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 <. 137 138For example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance. 139 140You 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. 141 142To 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). 143 144Returns: 145 An object of the form: 146 147 { 148 "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. 149 "kind": "compute#subnetworkAggregatedList", # [Output Only] Type of resource. Always compute#subnetworkAggregatedList for aggregated lists of subnetworks. 150 "items": { # A list of SubnetworksScopedList resources. 151 "a_key": { # Name of the scope containing this set of Subnetworks. 152 "subnetworks": [ # A list of subnetworks contained in this scope. 153 { # Represents a Subnetwork resource. 154 # 155 # A subnetwork (also known as a subnet) is a logical partition of a Virtual Private Cloud network with one primary IP range and zero or more secondary IP ranges. For more information, read Virtual Private Cloud (VPC) Network. (== resource_for beta.subnetworks ==) (== resource_for v1.subnetworks ==) 156 "kind": "compute#subnetwork", # [Output Only] Type of the resource. Always compute#subnetwork for Subnetwork resources. 157 "description": "A String", # An optional description of this resource. Provide this property when you create the resource. This field can be set only at resource creation time. 158 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format. 159 "region": "A String", # URL of the region where the Subnetwork resides. This field can be set only at resource creation time. 160 "secondaryIpRanges": [ # An array of configurations for secondary IP ranges for VM instances contained in this subnetwork. The primary IP of such VM must belong to the primary ipCidrRange of the subnetwork. The alias IPs may belong to either primary or secondary ranges. This field can be updated with a patch request. 161 { # Represents a secondary IP range of a subnetwork. 162 "ipCidrRange": "A String", # The range of IP addresses belonging to this subnetwork secondary range. Provide this property when you create the subnetwork. Ranges must be unique and non-overlapping with all primary and secondary IP ranges within a network. Only IPv4 is supported. 163 "rangeName": "A String", # The name associated with this subnetwork secondary range, used when adding an alias IP range to a VM instance. The name must be 1-63 characters long, and comply with RFC1035. The name must be unique within the subnetwork. 164 }, 165 ], 166 "network": "A String", # The URL of the network to which this subnetwork belongs, provided by the client when initially creating the subnetwork. Only networks that are in the distributed mode can have subnetworks. This field can be set only at resource creation time. 167 "enableFlowLogs": True or False, # Whether to enable flow logging for this subnetwork. If this field is not explicitly set, it will not appear in get listings. If not set the default behavior is to disable flow logging. 168 "fingerprint": "A String", # Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. This field will be ignored when inserting a Subnetwork. An up-to-date fingerprint must be provided in order to update the Subnetwork, otherwise the request will fail with error 412 conditionNotMet. 169 # 170 # To see the latest fingerprint, make a get() request to retrieve a Subnetwork. 171 "privateIpGoogleAccess": True or False, # Whether the VMs in this subnet can access Google services without assigned external IP addresses. This field can be both set at resource creation time and updated using setPrivateIpGoogleAccess. 172 "ipCidrRange": "A String", # The range of internal addresses that are owned by this subnetwork. Provide this property when you create the subnetwork. For example, 10.0.0.0/8 or 192.168.0.0/16. Ranges must be unique and non-overlapping within a network. Only IPv4 is supported. This field can be set only at resource creation time. 173 "gatewayAddress": "A String", # [Output Only] The gateway address for default routes to reach destination addresses outside this subnetwork. 174 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 175 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 176 "name": "A String", # The name of the resource, provided by the client when initially creating the resource. The 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. 177 }, 178 ], 179 "warning": { # An informational warning that appears when the list of addresses is empty. 180 "message": "A String", # [Output Only] A human-readable description of the warning code. 181 "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. 182 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: 183 # "data": [ { "key": "scope", "value": "zones/us-east1-d" } 184 { 185 "value": "A String", # [Output Only] A warning data value corresponding to the key. 186 "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). 187 }, 188 ], 189 }, 190 }, 191 }, 192 "warning": { # [Output Only] Informational warning message. 193 "message": "A String", # [Output Only] A human-readable description of the warning code. 194 "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. 195 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: 196 # "data": [ { "key": "scope", "value": "zones/us-east1-d" } 197 { 198 "value": "A String", # [Output Only] A warning data value corresponding to the key. 199 "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). 200 }, 201 ], 202 }, 203 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server. 204 "selfLink": "A String", # [Output Only] Server-defined URL for this resource. 205 }</pre> 206</div> 207 208<div class="method"> 209 <code class="details" id="aggregatedList_next">aggregatedList_next(previous_request, previous_response)</code> 210 <pre>Retrieves the next page of results. 211 212Args: 213 previous_request: The request for the previous page. (required) 214 previous_response: The response from the request for the previous page. (required) 215 216Returns: 217 A request object that you can call 'execute()' on to request the next 218 page. Returns None if there are no more items in the collection. 219 </pre> 220</div> 221 222<div class="method"> 223 <code class="details" id="delete">delete(project, region, subnetwork, requestId=None)</code> 224 <pre>Deletes the specified subnetwork. 225 226Args: 227 project: string, Project ID for this request. (required) 228 region: string, Name of the region scoping this request. (required) 229 subnetwork: string, Name of the Subnetwork resource to delete. (required) 230 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. 231 232For 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. 233 234The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). 235 236Returns: 237 An object of the form: 238 239 { # Represents an Operation resource. 240 # 241 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses. 242 # 243 # Operations can be global, regional or zonal. 244 # - For global operations, use the globalOperations resource. 245 # - For regional operations, use the regionOperations resource. 246 # - For zonal operations, use the zonalOperations resource. 247 # 248 # 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 ==) 249 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 250 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. 251 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 252 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 253 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. 254 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 255 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on. 256 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. 257 "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. 258 "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. 259 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 260 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE. 261 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 262 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 263 { 264 "message": "A String", # [Output Only] A human-readable description of the warning code. 265 "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. 266 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: 267 # "data": [ { "key": "scope", "value": "zones/us-east1-d" } 268 { 269 "value": "A String", # [Output Only] A warning data value corresponding to the key. 270 "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). 271 }, 272 ], 273 }, 274 ], 275 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com. 276 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 277 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources. 278 "name": "A String", # [Output Only] Name of the resource. 279 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. 280 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 281 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 282 { 283 "message": "A String", # [Output Only] An optional, human-readable error message. 284 "code": "A String", # [Output Only] The error type identifier for this error. 285 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 286 }, 287 ], 288 }, 289 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 290 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 291 "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. 292 }</pre> 293</div> 294 295<div class="method"> 296 <code class="details" id="expandIpCidrRange">expandIpCidrRange(project, region, subnetwork, body, requestId=None)</code> 297 <pre>Expands the IP CIDR range of the subnetwork to a specified value. 298 299Args: 300 project: string, Project ID for this request. (required) 301 region: string, Name of the region scoping this request. (required) 302 subnetwork: string, Name of the Subnetwork resource to update. (required) 303 body: object, The request body. (required) 304 The object takes the form of: 305 306{ 307 "ipCidrRange": "A String", # The IP (in CIDR format or netmask) of internal addresses that are legal on this Subnetwork. This range should be disjoint from other subnetworks within this network. This range can only be larger than (i.e. a superset of) the range previously defined before the update. 308 } 309 310 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. 311 312For 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. 313 314The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). 315 316Returns: 317 An object of the form: 318 319 { # Represents an Operation resource. 320 # 321 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses. 322 # 323 # Operations can be global, regional or zonal. 324 # - For global operations, use the globalOperations resource. 325 # - For regional operations, use the regionOperations resource. 326 # - For zonal operations, use the zonalOperations resource. 327 # 328 # 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 ==) 329 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 330 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. 331 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 332 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 333 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. 334 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 335 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on. 336 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. 337 "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. 338 "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. 339 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 340 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE. 341 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 342 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 343 { 344 "message": "A String", # [Output Only] A human-readable description of the warning code. 345 "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. 346 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: 347 # "data": [ { "key": "scope", "value": "zones/us-east1-d" } 348 { 349 "value": "A String", # [Output Only] A warning data value corresponding to the key. 350 "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). 351 }, 352 ], 353 }, 354 ], 355 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com. 356 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 357 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources. 358 "name": "A String", # [Output Only] Name of the resource. 359 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. 360 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 361 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 362 { 363 "message": "A String", # [Output Only] An optional, human-readable error message. 364 "code": "A String", # [Output Only] The error type identifier for this error. 365 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 366 }, 367 ], 368 }, 369 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 370 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 371 "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. 372 }</pre> 373</div> 374 375<div class="method"> 376 <code class="details" id="get">get(project, region, subnetwork)</code> 377 <pre>Returns the specified subnetwork. Gets a list of available subnetworks list() request. 378 379Args: 380 project: string, Project ID for this request. (required) 381 region: string, Name of the region scoping this request. (required) 382 subnetwork: string, Name of the Subnetwork resource to return. (required) 383 384Returns: 385 An object of the form: 386 387 { # Represents a Subnetwork resource. 388 # 389 # A subnetwork (also known as a subnet) is a logical partition of a Virtual Private Cloud network with one primary IP range and zero or more secondary IP ranges. For more information, read Virtual Private Cloud (VPC) Network. (== resource_for beta.subnetworks ==) (== resource_for v1.subnetworks ==) 390 "kind": "compute#subnetwork", # [Output Only] Type of the resource. Always compute#subnetwork for Subnetwork resources. 391 "description": "A String", # An optional description of this resource. Provide this property when you create the resource. This field can be set only at resource creation time. 392 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format. 393 "region": "A String", # URL of the region where the Subnetwork resides. This field can be set only at resource creation time. 394 "secondaryIpRanges": [ # An array of configurations for secondary IP ranges for VM instances contained in this subnetwork. The primary IP of such VM must belong to the primary ipCidrRange of the subnetwork. The alias IPs may belong to either primary or secondary ranges. This field can be updated with a patch request. 395 { # Represents a secondary IP range of a subnetwork. 396 "ipCidrRange": "A String", # The range of IP addresses belonging to this subnetwork secondary range. Provide this property when you create the subnetwork. Ranges must be unique and non-overlapping with all primary and secondary IP ranges within a network. Only IPv4 is supported. 397 "rangeName": "A String", # The name associated with this subnetwork secondary range, used when adding an alias IP range to a VM instance. The name must be 1-63 characters long, and comply with RFC1035. The name must be unique within the subnetwork. 398 }, 399 ], 400 "network": "A String", # The URL of the network to which this subnetwork belongs, provided by the client when initially creating the subnetwork. Only networks that are in the distributed mode can have subnetworks. This field can be set only at resource creation time. 401 "enableFlowLogs": True or False, # Whether to enable flow logging for this subnetwork. If this field is not explicitly set, it will not appear in get listings. If not set the default behavior is to disable flow logging. 402 "fingerprint": "A String", # Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. This field will be ignored when inserting a Subnetwork. An up-to-date fingerprint must be provided in order to update the Subnetwork, otherwise the request will fail with error 412 conditionNotMet. 403 # 404 # To see the latest fingerprint, make a get() request to retrieve a Subnetwork. 405 "privateIpGoogleAccess": True or False, # Whether the VMs in this subnet can access Google services without assigned external IP addresses. This field can be both set at resource creation time and updated using setPrivateIpGoogleAccess. 406 "ipCidrRange": "A String", # The range of internal addresses that are owned by this subnetwork. Provide this property when you create the subnetwork. For example, 10.0.0.0/8 or 192.168.0.0/16. Ranges must be unique and non-overlapping within a network. Only IPv4 is supported. This field can be set only at resource creation time. 407 "gatewayAddress": "A String", # [Output Only] The gateway address for default routes to reach destination addresses outside this subnetwork. 408 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 409 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 410 "name": "A String", # The name of the resource, provided by the client when initially creating the resource. The 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. 411 }</pre> 412</div> 413 414<div class="method"> 415 <code class="details" id="getIamPolicy">getIamPolicy(project, region, resource)</code> 416 <pre>Gets the access control policy for a resource. May be empty if no such policy or resource exists. 417 418Args: 419 project: string, Project ID for this request. (required) 420 region: string, The name of the region for this request. (required) 421 resource: string, Name or id of the resource for this request. (required) 422 423Returns: 424 An object of the form: 425 426 { # Defines an Identity and Access Management (IAM) policy. It is used to specify access control policies for Cloud Platform resources. 427 # 428 # 429 # 430 # 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. 431 # 432 # **JSON Example** 433 # 434 # { "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"] } ] } 435 # 436 # **YAML Example** 437 # 438 # 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 439 # 440 # 441 # 442 # For a description of IAM and its features, see the [IAM developer's guide](https://cloud.google.com/iam/docs). 443 "auditConfigs": [ # Specifies cloud audit logging configuration for this policy. 444 { # 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. 445 # 446 # 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. 447 # 448 # Example Policy with multiple AuditConfigs: 449 # 450 # { "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" ] } ] } ] } 451 # 452 # 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. 453 "exemptedMembers": [ 454 "A String", 455 ], 456 "auditLogConfigs": [ # The configuration for logging of each type of permission. 457 { # Provides the configuration for logging a type of permissions. Example: 458 # 459 # { "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:foo@gmail.com" ] }, { "log_type": "DATA_WRITE", } ] } 460 # 461 # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting foo@gmail.com from DATA_READ logging. 462 "exemptedMembers": [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][]. 463 "A String", 464 ], 465 "logType": "A String", # The log type that this config enables. 466 }, 467 ], 468 "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. 469 }, 470 ], 471 "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. 472 { # A rule to be applied in a Policy. 473 "logConfigs": [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action. 474 { # Specifies what kind of log the caller must write 475 "counter": { # Increment a streamz counter with the specified metric and field names. # Counter options. 476 # 477 # 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. 478 # 479 # Field names correspond to IAM request parameters and field values are their respective values. 480 # 481 # 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. 482 # 483 # Examples: counter { metric: "/debug_access_count" field: "iam_principal" } ==> increment counter /iam/policy/backend_debug_access_count {iam_principal=[value of IAMContext.principal]} 484 # 485 # At this time we do not support multiple field names (though this may be supported in the future). 486 "field": "A String", # The field value to attribute. 487 "metric": "A String", # The metric to update. 488 }, 489 "dataAccess": { # Write a Data Access (Gin) log # Data access options. 490 "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. 491 }, 492 "cloudAudit": { # Write a Cloud Audit log # Cloud audit options. 493 "logName": "A String", # The log_name to populate in the Cloud Audit Record. 494 "authorizationLoggingOptions": { # Authorization-related information used by Cloud Audit Logging. # Information used by the Cloud Audit Logging pipeline. 495 "permissionType": "A String", # The type of the permission that was checked. 496 }, 497 }, 498 }, 499 ], 500 "notIns": [ # If one or more 'not_in' clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in none of the entries. 501 "A String", 502 ], 503 "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. 504 "A String", 505 ], 506 "action": "A String", # Required 507 "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. 508 "A String", 509 ], 510 "conditions": [ # Additional restrictions that must be met. All conditions must pass for the rule to match. 511 { # A condition to be met. 512 "iam": "A String", # Trusted attributes supplied by the IAM system. 513 "sys": "A String", # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control. 514 "values": [ # The objects of the condition. 515 "A String", 516 ], 517 "svc": "A String", # Trusted attributes discharged by the service. 518 "op": "A String", # An operator to apply the subject with. 519 }, 520 ], 521 "description": "A String", # Human-readable description of the rule. 522 }, 523 ], 524 "version": 42, # Deprecated. 525 "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. 526 # 527 # If no `etag` is provided in the call to `setIamPolicy`, then the existing policy is overwritten blindly. 528 "bindings": [ # Associates a list of `members` to a `role`. `bindings` with no members will result in an error. 529 { # Associates `members` with a `role`. 530 "role": "A String", # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. 531 "members": [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values: 532 # 533 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. 534 # 535 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. 536 # 537 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@gmail.com` . 538 # 539 # 540 # 541 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`. 542 # 543 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. 544 # 545 # 546 # 547 # * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. 548 "A String", 549 ], 550 "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. 551 # 552 # title: "User account presence" description: "Determines whether the request has a user account" expression: "size(request.user) > 0" 553 "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. 554 "expression": "A String", # Textual representation of an expression in Common Expression Language syntax. 555 # 556 # The application context of the containing message determines which well-known feature set of CEL is supported. 557 "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. 558 "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. 559 }, 560 }, 561 ], 562 "iamOwned": True or False, 563 }</pre> 564</div> 565 566<div class="method"> 567 <code class="details" id="insert">insert(project, region, body, requestId=None)</code> 568 <pre>Creates a subnetwork in the specified project using the data included in the request. 569 570Args: 571 project: string, Project ID for this request. (required) 572 region: string, Name of the region scoping this request. (required) 573 body: object, The request body. (required) 574 The object takes the form of: 575 576{ # Represents a Subnetwork resource. 577 # 578 # A subnetwork (also known as a subnet) is a logical partition of a Virtual Private Cloud network with one primary IP range and zero or more secondary IP ranges. For more information, read Virtual Private Cloud (VPC) Network. (== resource_for beta.subnetworks ==) (== resource_for v1.subnetworks ==) 579 "kind": "compute#subnetwork", # [Output Only] Type of the resource. Always compute#subnetwork for Subnetwork resources. 580 "description": "A String", # An optional description of this resource. Provide this property when you create the resource. This field can be set only at resource creation time. 581 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format. 582 "region": "A String", # URL of the region where the Subnetwork resides. This field can be set only at resource creation time. 583 "secondaryIpRanges": [ # An array of configurations for secondary IP ranges for VM instances contained in this subnetwork. The primary IP of such VM must belong to the primary ipCidrRange of the subnetwork. The alias IPs may belong to either primary or secondary ranges. This field can be updated with a patch request. 584 { # Represents a secondary IP range of a subnetwork. 585 "ipCidrRange": "A String", # The range of IP addresses belonging to this subnetwork secondary range. Provide this property when you create the subnetwork. Ranges must be unique and non-overlapping with all primary and secondary IP ranges within a network. Only IPv4 is supported. 586 "rangeName": "A String", # The name associated with this subnetwork secondary range, used when adding an alias IP range to a VM instance. The name must be 1-63 characters long, and comply with RFC1035. The name must be unique within the subnetwork. 587 }, 588 ], 589 "network": "A String", # The URL of the network to which this subnetwork belongs, provided by the client when initially creating the subnetwork. Only networks that are in the distributed mode can have subnetworks. This field can be set only at resource creation time. 590 "enableFlowLogs": True or False, # Whether to enable flow logging for this subnetwork. If this field is not explicitly set, it will not appear in get listings. If not set the default behavior is to disable flow logging. 591 "fingerprint": "A String", # Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. This field will be ignored when inserting a Subnetwork. An up-to-date fingerprint must be provided in order to update the Subnetwork, otherwise the request will fail with error 412 conditionNotMet. 592 # 593 # To see the latest fingerprint, make a get() request to retrieve a Subnetwork. 594 "privateIpGoogleAccess": True or False, # Whether the VMs in this subnet can access Google services without assigned external IP addresses. This field can be both set at resource creation time and updated using setPrivateIpGoogleAccess. 595 "ipCidrRange": "A String", # The range of internal addresses that are owned by this subnetwork. Provide this property when you create the subnetwork. For example, 10.0.0.0/8 or 192.168.0.0/16. Ranges must be unique and non-overlapping within a network. Only IPv4 is supported. This field can be set only at resource creation time. 596 "gatewayAddress": "A String", # [Output Only] The gateway address for default routes to reach destination addresses outside this subnetwork. 597 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 598 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 599 "name": "A String", # The name of the resource, provided by the client when initially creating the resource. The 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. 600 } 601 602 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. 603 604For 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. 605 606The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). 607 608Returns: 609 An object of the form: 610 611 { # Represents an Operation resource. 612 # 613 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses. 614 # 615 # Operations can be global, regional or zonal. 616 # - For global operations, use the globalOperations resource. 617 # - For regional operations, use the regionOperations resource. 618 # - For zonal operations, use the zonalOperations resource. 619 # 620 # 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 ==) 621 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 622 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. 623 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 624 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 625 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. 626 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 627 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on. 628 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. 629 "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. 630 "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. 631 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 632 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE. 633 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 634 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 635 { 636 "message": "A String", # [Output Only] A human-readable description of the warning code. 637 "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. 638 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: 639 # "data": [ { "key": "scope", "value": "zones/us-east1-d" } 640 { 641 "value": "A String", # [Output Only] A warning data value corresponding to the key. 642 "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). 643 }, 644 ], 645 }, 646 ], 647 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com. 648 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 649 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources. 650 "name": "A String", # [Output Only] Name of the resource. 651 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. 652 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 653 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 654 { 655 "message": "A String", # [Output Only] An optional, human-readable error message. 656 "code": "A String", # [Output Only] The error type identifier for this error. 657 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 658 }, 659 ], 660 }, 661 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 662 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 663 "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. 664 }</pre> 665</div> 666 667<div class="method"> 668 <code class="details" id="list">list(project, region, orderBy=None, maxResults=None, pageToken=None, filter=None)</code> 669 <pre>Retrieves a list of subnetworks available to the specified project. 670 671Args: 672 project: string, Project ID for this request. (required) 673 region: string, Name of the region scoping this request. (required) 674 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. 675 676You 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. 677 678Currently, only sorting by name or creationTimestamp desc is supported. 679 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) 680 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. 681 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 <. 682 683For example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance. 684 685You 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. 686 687To 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). 688 689Returns: 690 An object of the form: 691 692 { # Contains a list of Subnetwork resources. 693 "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. 694 "kind": "compute#subnetworkList", # [Output Only] Type of resource. Always compute#subnetworkList for lists of subnetworks. 695 "items": [ # A list of Subnetwork resources. 696 { # Represents a Subnetwork resource. 697 # 698 # A subnetwork (also known as a subnet) is a logical partition of a Virtual Private Cloud network with one primary IP range and zero or more secondary IP ranges. For more information, read Virtual Private Cloud (VPC) Network. (== resource_for beta.subnetworks ==) (== resource_for v1.subnetworks ==) 699 "kind": "compute#subnetwork", # [Output Only] Type of the resource. Always compute#subnetwork for Subnetwork resources. 700 "description": "A String", # An optional description of this resource. Provide this property when you create the resource. This field can be set only at resource creation time. 701 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format. 702 "region": "A String", # URL of the region where the Subnetwork resides. This field can be set only at resource creation time. 703 "secondaryIpRanges": [ # An array of configurations for secondary IP ranges for VM instances contained in this subnetwork. The primary IP of such VM must belong to the primary ipCidrRange of the subnetwork. The alias IPs may belong to either primary or secondary ranges. This field can be updated with a patch request. 704 { # Represents a secondary IP range of a subnetwork. 705 "ipCidrRange": "A String", # The range of IP addresses belonging to this subnetwork secondary range. Provide this property when you create the subnetwork. Ranges must be unique and non-overlapping with all primary and secondary IP ranges within a network. Only IPv4 is supported. 706 "rangeName": "A String", # The name associated with this subnetwork secondary range, used when adding an alias IP range to a VM instance. The name must be 1-63 characters long, and comply with RFC1035. The name must be unique within the subnetwork. 707 }, 708 ], 709 "network": "A String", # The URL of the network to which this subnetwork belongs, provided by the client when initially creating the subnetwork. Only networks that are in the distributed mode can have subnetworks. This field can be set only at resource creation time. 710 "enableFlowLogs": True or False, # Whether to enable flow logging for this subnetwork. If this field is not explicitly set, it will not appear in get listings. If not set the default behavior is to disable flow logging. 711 "fingerprint": "A String", # Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. This field will be ignored when inserting a Subnetwork. An up-to-date fingerprint must be provided in order to update the Subnetwork, otherwise the request will fail with error 412 conditionNotMet. 712 # 713 # To see the latest fingerprint, make a get() request to retrieve a Subnetwork. 714 "privateIpGoogleAccess": True or False, # Whether the VMs in this subnet can access Google services without assigned external IP addresses. This field can be both set at resource creation time and updated using setPrivateIpGoogleAccess. 715 "ipCidrRange": "A String", # The range of internal addresses that are owned by this subnetwork. Provide this property when you create the subnetwork. For example, 10.0.0.0/8 or 192.168.0.0/16. Ranges must be unique and non-overlapping within a network. Only IPv4 is supported. This field can be set only at resource creation time. 716 "gatewayAddress": "A String", # [Output Only] The gateway address for default routes to reach destination addresses outside this subnetwork. 717 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 718 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 719 "name": "A String", # The name of the resource, provided by the client when initially creating the resource. The 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. 720 }, 721 ], 722 "warning": { # [Output Only] Informational warning message. 723 "message": "A String", # [Output Only] A human-readable description of the warning code. 724 "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. 725 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: 726 # "data": [ { "key": "scope", "value": "zones/us-east1-d" } 727 { 728 "value": "A String", # [Output Only] A warning data value corresponding to the key. 729 "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). 730 }, 731 ], 732 }, 733 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server. 734 "selfLink": "A String", # [Output Only] Server-defined URL for this resource. 735 }</pre> 736</div> 737 738<div class="method"> 739 <code class="details" id="listUsable">listUsable(project, orderBy=None, maxResults=None, pageToken=None, filter=None)</code> 740 <pre>Retrieves an aggregated list of usable subnetworks. 741 742Args: 743 project: string, Project ID for this request. (required) 744 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. 745 746You 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. 747 748Currently, only sorting by name or creationTimestamp desc is supported. 749 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) 750 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. 751 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 <. 752 753For example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance. 754 755You 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. 756 757To 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). 758 759Returns: 760 An object of the form: 761 762 { 763 "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. 764 "kind": "compute#usableSubnetworksAggregatedList", # [Output Only] Type of resource. Always compute#usableSubnetworksAggregatedList for aggregated lists of usable subnetworks. 765 "items": [ # [Output] A list of usable subnetwork URLs. 766 { # Subnetwork which the current user has compute.subnetworks.use permission on. 767 "secondaryIpRanges": [ # Secondary IP ranges. 768 { # Secondary IP range of a usable subnetwork. 769 "ipCidrRange": "A String", # The range of IP addresses belonging to this subnetwork secondary range. 770 "rangeName": "A String", # The name associated with this subnetwork secondary range, used when adding an alias IP range to a VM instance. The name must be 1-63 characters long, and comply with RFC1035. The name must be unique within the subnetwork. 771 }, 772 ], 773 "ipCidrRange": "A String", # The range of internal addresses that are owned by this subnetwork. 774 "network": "A String", # Network URL. 775 "subnetwork": "A String", # Subnetwork URL. 776 }, 777 ], 778 "warning": { # [Output Only] Informational warning message. 779 "message": "A String", # [Output Only] A human-readable description of the warning code. 780 "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. 781 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: 782 # "data": [ { "key": "scope", "value": "zones/us-east1-d" } 783 { 784 "value": "A String", # [Output Only] A warning data value corresponding to the key. 785 "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). 786 }, 787 ], 788 }, 789 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 790 "selfLink": "A String", # [Output Only] Server-defined URL for this resource. 791 }</pre> 792</div> 793 794<div class="method"> 795 <code class="details" id="listUsable_next">listUsable_next(previous_request, previous_response)</code> 796 <pre>Retrieves the next page of results. 797 798Args: 799 previous_request: The request for the previous page. (required) 800 previous_response: The response from the request for the previous page. (required) 801 802Returns: 803 A request object that you can call 'execute()' on to request the next 804 page. Returns None if there are no more items in the collection. 805 </pre> 806</div> 807 808<div class="method"> 809 <code class="details" id="list_next">list_next(previous_request, previous_response)</code> 810 <pre>Retrieves the next page of results. 811 812Args: 813 previous_request: The request for the previous page. (required) 814 previous_response: The response from the request for the previous page. (required) 815 816Returns: 817 A request object that you can call 'execute()' on to request the next 818 page. Returns None if there are no more items in the collection. 819 </pre> 820</div> 821 822<div class="method"> 823 <code class="details" id="patch">patch(project, region, subnetwork, body, requestId=None)</code> 824 <pre>Patches the specified subnetwork with the data included in the request. Only certain fields can up updated with a patch request as indicated in the field descriptions. You must specify the current fingeprint of the subnetwork resource being patched. 825 826Args: 827 project: string, Project ID for this request. (required) 828 region: string, Name of the region scoping this request. (required) 829 subnetwork: string, Name of the Subnetwork resource to patch. (required) 830 body: object, The request body. (required) 831 The object takes the form of: 832 833{ # Represents a Subnetwork resource. 834 # 835 # A subnetwork (also known as a subnet) is a logical partition of a Virtual Private Cloud network with one primary IP range and zero or more secondary IP ranges. For more information, read Virtual Private Cloud (VPC) Network. (== resource_for beta.subnetworks ==) (== resource_for v1.subnetworks ==) 836 "kind": "compute#subnetwork", # [Output Only] Type of the resource. Always compute#subnetwork for Subnetwork resources. 837 "description": "A String", # An optional description of this resource. Provide this property when you create the resource. This field can be set only at resource creation time. 838 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format. 839 "region": "A String", # URL of the region where the Subnetwork resides. This field can be set only at resource creation time. 840 "secondaryIpRanges": [ # An array of configurations for secondary IP ranges for VM instances contained in this subnetwork. The primary IP of such VM must belong to the primary ipCidrRange of the subnetwork. The alias IPs may belong to either primary or secondary ranges. This field can be updated with a patch request. 841 { # Represents a secondary IP range of a subnetwork. 842 "ipCidrRange": "A String", # The range of IP addresses belonging to this subnetwork secondary range. Provide this property when you create the subnetwork. Ranges must be unique and non-overlapping with all primary and secondary IP ranges within a network. Only IPv4 is supported. 843 "rangeName": "A String", # The name associated with this subnetwork secondary range, used when adding an alias IP range to a VM instance. The name must be 1-63 characters long, and comply with RFC1035. The name must be unique within the subnetwork. 844 }, 845 ], 846 "network": "A String", # The URL of the network to which this subnetwork belongs, provided by the client when initially creating the subnetwork. Only networks that are in the distributed mode can have subnetworks. This field can be set only at resource creation time. 847 "enableFlowLogs": True or False, # Whether to enable flow logging for this subnetwork. If this field is not explicitly set, it will not appear in get listings. If not set the default behavior is to disable flow logging. 848 "fingerprint": "A String", # Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. This field will be ignored when inserting a Subnetwork. An up-to-date fingerprint must be provided in order to update the Subnetwork, otherwise the request will fail with error 412 conditionNotMet. 849 # 850 # To see the latest fingerprint, make a get() request to retrieve a Subnetwork. 851 "privateIpGoogleAccess": True or False, # Whether the VMs in this subnet can access Google services without assigned external IP addresses. This field can be both set at resource creation time and updated using setPrivateIpGoogleAccess. 852 "ipCidrRange": "A String", # The range of internal addresses that are owned by this subnetwork. Provide this property when you create the subnetwork. For example, 10.0.0.0/8 or 192.168.0.0/16. Ranges must be unique and non-overlapping within a network. Only IPv4 is supported. This field can be set only at resource creation time. 853 "gatewayAddress": "A String", # [Output Only] The gateway address for default routes to reach destination addresses outside this subnetwork. 854 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 855 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 856 "name": "A String", # The name of the resource, provided by the client when initially creating the resource. The 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. 857 } 858 859 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. 860 861For 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. 862 863The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). 864 865Returns: 866 An object of the form: 867 868 { # Represents an Operation resource. 869 # 870 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses. 871 # 872 # Operations can be global, regional or zonal. 873 # - For global operations, use the globalOperations resource. 874 # - For regional operations, use the regionOperations resource. 875 # - For zonal operations, use the zonalOperations resource. 876 # 877 # 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 ==) 878 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 879 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. 880 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 881 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 882 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. 883 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 884 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on. 885 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. 886 "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. 887 "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. 888 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 889 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE. 890 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 891 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 892 { 893 "message": "A String", # [Output Only] A human-readable description of the warning code. 894 "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. 895 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: 896 # "data": [ { "key": "scope", "value": "zones/us-east1-d" } 897 { 898 "value": "A String", # [Output Only] A warning data value corresponding to the key. 899 "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). 900 }, 901 ], 902 }, 903 ], 904 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com. 905 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 906 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources. 907 "name": "A String", # [Output Only] Name of the resource. 908 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. 909 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 910 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 911 { 912 "message": "A String", # [Output Only] An optional, human-readable error message. 913 "code": "A String", # [Output Only] The error type identifier for this error. 914 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 915 }, 916 ], 917 }, 918 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 919 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 920 "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. 921 }</pre> 922</div> 923 924<div class="method"> 925 <code class="details" id="setIamPolicy">setIamPolicy(project, region, resource, body)</code> 926 <pre>Sets the access control policy on the specified resource. Replaces any existing policy. 927 928Args: 929 project: string, Project ID for this request. (required) 930 region: string, The name of the region for this request. (required) 931 resource: string, Name or id of the resource for this request. (required) 932 body: object, The request body. (required) 933 The object takes the form of: 934 935{ 936 "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. 937 # 938 # 939 # 940 # 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. 941 # 942 # **JSON Example** 943 # 944 # { "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"] } ] } 945 # 946 # **YAML Example** 947 # 948 # 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 949 # 950 # 951 # 952 # For a description of IAM and its features, see the [IAM developer's guide](https://cloud.google.com/iam/docs). 953 "auditConfigs": [ # Specifies cloud audit logging configuration for this policy. 954 { # 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. 955 # 956 # 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. 957 # 958 # Example Policy with multiple AuditConfigs: 959 # 960 # { "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" ] } ] } ] } 961 # 962 # 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. 963 "exemptedMembers": [ 964 "A String", 965 ], 966 "auditLogConfigs": [ # The configuration for logging of each type of permission. 967 { # Provides the configuration for logging a type of permissions. Example: 968 # 969 # { "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:foo@gmail.com" ] }, { "log_type": "DATA_WRITE", } ] } 970 # 971 # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting foo@gmail.com from DATA_READ logging. 972 "exemptedMembers": [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][]. 973 "A String", 974 ], 975 "logType": "A String", # The log type that this config enables. 976 }, 977 ], 978 "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. 979 }, 980 ], 981 "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. 982 { # A rule to be applied in a Policy. 983 "logConfigs": [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action. 984 { # Specifies what kind of log the caller must write 985 "counter": { # Increment a streamz counter with the specified metric and field names. # Counter options. 986 # 987 # 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. 988 # 989 # Field names correspond to IAM request parameters and field values are their respective values. 990 # 991 # 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. 992 # 993 # Examples: counter { metric: "/debug_access_count" field: "iam_principal" } ==> increment counter /iam/policy/backend_debug_access_count {iam_principal=[value of IAMContext.principal]} 994 # 995 # At this time we do not support multiple field names (though this may be supported in the future). 996 "field": "A String", # The field value to attribute. 997 "metric": "A String", # The metric to update. 998 }, 999 "dataAccess": { # Write a Data Access (Gin) log # Data access options. 1000 "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. 1001 }, 1002 "cloudAudit": { # Write a Cloud Audit log # Cloud audit options. 1003 "logName": "A String", # The log_name to populate in the Cloud Audit Record. 1004 "authorizationLoggingOptions": { # Authorization-related information used by Cloud Audit Logging. # Information used by the Cloud Audit Logging pipeline. 1005 "permissionType": "A String", # The type of the permission that was checked. 1006 }, 1007 }, 1008 }, 1009 ], 1010 "notIns": [ # If one or more 'not_in' clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in none of the entries. 1011 "A String", 1012 ], 1013 "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. 1014 "A String", 1015 ], 1016 "action": "A String", # Required 1017 "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. 1018 "A String", 1019 ], 1020 "conditions": [ # Additional restrictions that must be met. All conditions must pass for the rule to match. 1021 { # A condition to be met. 1022 "iam": "A String", # Trusted attributes supplied by the IAM system. 1023 "sys": "A String", # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control. 1024 "values": [ # The objects of the condition. 1025 "A String", 1026 ], 1027 "svc": "A String", # Trusted attributes discharged by the service. 1028 "op": "A String", # An operator to apply the subject with. 1029 }, 1030 ], 1031 "description": "A String", # Human-readable description of the rule. 1032 }, 1033 ], 1034 "version": 42, # Deprecated. 1035 "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. 1036 # 1037 # If no `etag` is provided in the call to `setIamPolicy`, then the existing policy is overwritten blindly. 1038 "bindings": [ # Associates a list of `members` to a `role`. `bindings` with no members will result in an error. 1039 { # Associates `members` with a `role`. 1040 "role": "A String", # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. 1041 "members": [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values: 1042 # 1043 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. 1044 # 1045 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. 1046 # 1047 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@gmail.com` . 1048 # 1049 # 1050 # 1051 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`. 1052 # 1053 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. 1054 # 1055 # 1056 # 1057 # * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. 1058 "A String", 1059 ], 1060 "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. 1061 # 1062 # title: "User account presence" description: "Determines whether the request has a user account" expression: "size(request.user) > 0" 1063 "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. 1064 "expression": "A String", # Textual representation of an expression in Common Expression Language syntax. 1065 # 1066 # The application context of the containing message determines which well-known feature set of CEL is supported. 1067 "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. 1068 "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. 1069 }, 1070 }, 1071 ], 1072 "iamOwned": True or False, 1073 }, 1074 "bindings": [ # Flatten Policy to create a backwacd compatible wire-format. Deprecated. Use 'policy' to specify bindings. 1075 { # Associates `members` with a `role`. 1076 "role": "A String", # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. 1077 "members": [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values: 1078 # 1079 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. 1080 # 1081 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. 1082 # 1083 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@gmail.com` . 1084 # 1085 # 1086 # 1087 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`. 1088 # 1089 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. 1090 # 1091 # 1092 # 1093 # * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. 1094 "A String", 1095 ], 1096 "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. 1097 # 1098 # title: "User account presence" description: "Determines whether the request has a user account" expression: "size(request.user) > 0" 1099 "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. 1100 "expression": "A String", # Textual representation of an expression in Common Expression Language syntax. 1101 # 1102 # The application context of the containing message determines which well-known feature set of CEL is supported. 1103 "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. 1104 "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. 1105 }, 1106 }, 1107 ], 1108 "etag": "A String", # Flatten Policy to create a backward compatible wire-format. Deprecated. Use 'policy' to specify the etag. 1109 } 1110 1111 1112Returns: 1113 An object of the form: 1114 1115 { # Defines an Identity and Access Management (IAM) policy. It is used to specify access control policies for Cloud Platform resources. 1116 # 1117 # 1118 # 1119 # 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. 1120 # 1121 # **JSON Example** 1122 # 1123 # { "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"] } ] } 1124 # 1125 # **YAML Example** 1126 # 1127 # 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 1128 # 1129 # 1130 # 1131 # For a description of IAM and its features, see the [IAM developer's guide](https://cloud.google.com/iam/docs). 1132 "auditConfigs": [ # Specifies cloud audit logging configuration for this policy. 1133 { # 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. 1134 # 1135 # 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. 1136 # 1137 # Example Policy with multiple AuditConfigs: 1138 # 1139 # { "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" ] } ] } ] } 1140 # 1141 # 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. 1142 "exemptedMembers": [ 1143 "A String", 1144 ], 1145 "auditLogConfigs": [ # The configuration for logging of each type of permission. 1146 { # Provides the configuration for logging a type of permissions. Example: 1147 # 1148 # { "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:foo@gmail.com" ] }, { "log_type": "DATA_WRITE", } ] } 1149 # 1150 # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting foo@gmail.com from DATA_READ logging. 1151 "exemptedMembers": [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][]. 1152 "A String", 1153 ], 1154 "logType": "A String", # The log type that this config enables. 1155 }, 1156 ], 1157 "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. 1158 }, 1159 ], 1160 "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. 1161 { # A rule to be applied in a Policy. 1162 "logConfigs": [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action. 1163 { # Specifies what kind of log the caller must write 1164 "counter": { # Increment a streamz counter with the specified metric and field names. # Counter options. 1165 # 1166 # 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. 1167 # 1168 # Field names correspond to IAM request parameters and field values are their respective values. 1169 # 1170 # 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. 1171 # 1172 # Examples: counter { metric: "/debug_access_count" field: "iam_principal" } ==> increment counter /iam/policy/backend_debug_access_count {iam_principal=[value of IAMContext.principal]} 1173 # 1174 # At this time we do not support multiple field names (though this may be supported in the future). 1175 "field": "A String", # The field value to attribute. 1176 "metric": "A String", # The metric to update. 1177 }, 1178 "dataAccess": { # Write a Data Access (Gin) log # Data access options. 1179 "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. 1180 }, 1181 "cloudAudit": { # Write a Cloud Audit log # Cloud audit options. 1182 "logName": "A String", # The log_name to populate in the Cloud Audit Record. 1183 "authorizationLoggingOptions": { # Authorization-related information used by Cloud Audit Logging. # Information used by the Cloud Audit Logging pipeline. 1184 "permissionType": "A String", # The type of the permission that was checked. 1185 }, 1186 }, 1187 }, 1188 ], 1189 "notIns": [ # If one or more 'not_in' clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in none of the entries. 1190 "A String", 1191 ], 1192 "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. 1193 "A String", 1194 ], 1195 "action": "A String", # Required 1196 "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. 1197 "A String", 1198 ], 1199 "conditions": [ # Additional restrictions that must be met. All conditions must pass for the rule to match. 1200 { # A condition to be met. 1201 "iam": "A String", # Trusted attributes supplied by the IAM system. 1202 "sys": "A String", # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control. 1203 "values": [ # The objects of the condition. 1204 "A String", 1205 ], 1206 "svc": "A String", # Trusted attributes discharged by the service. 1207 "op": "A String", # An operator to apply the subject with. 1208 }, 1209 ], 1210 "description": "A String", # Human-readable description of the rule. 1211 }, 1212 ], 1213 "version": 42, # Deprecated. 1214 "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. 1215 # 1216 # If no `etag` is provided in the call to `setIamPolicy`, then the existing policy is overwritten blindly. 1217 "bindings": [ # Associates a list of `members` to a `role`. `bindings` with no members will result in an error. 1218 { # Associates `members` with a `role`. 1219 "role": "A String", # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. 1220 "members": [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values: 1221 # 1222 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. 1223 # 1224 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. 1225 # 1226 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@gmail.com` . 1227 # 1228 # 1229 # 1230 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`. 1231 # 1232 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. 1233 # 1234 # 1235 # 1236 # * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. 1237 "A String", 1238 ], 1239 "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. 1240 # 1241 # title: "User account presence" description: "Determines whether the request has a user account" expression: "size(request.user) > 0" 1242 "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. 1243 "expression": "A String", # Textual representation of an expression in Common Expression Language syntax. 1244 # 1245 # The application context of the containing message determines which well-known feature set of CEL is supported. 1246 "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. 1247 "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. 1248 }, 1249 }, 1250 ], 1251 "iamOwned": True or False, 1252 }</pre> 1253</div> 1254 1255<div class="method"> 1256 <code class="details" id="setPrivateIpGoogleAccess">setPrivateIpGoogleAccess(project, region, subnetwork, body, requestId=None)</code> 1257 <pre>Set whether VMs in this subnet can access Google services without assigning external IP addresses through Private Google Access. 1258 1259Args: 1260 project: string, Project ID for this request. (required) 1261 region: string, Name of the region scoping this request. (required) 1262 subnetwork: string, Name of the Subnetwork resource. (required) 1263 body: object, The request body. (required) 1264 The object takes the form of: 1265 1266{ 1267 "privateIpGoogleAccess": True or False, 1268 } 1269 1270 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. 1271 1272For 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. 1273 1274The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). 1275 1276Returns: 1277 An object of the form: 1278 1279 { # Represents an Operation resource. 1280 # 1281 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses. 1282 # 1283 # Operations can be global, regional or zonal. 1284 # - For global operations, use the globalOperations resource. 1285 # - For regional operations, use the regionOperations resource. 1286 # - For zonal operations, use the zonalOperations resource. 1287 # 1288 # 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 ==) 1289 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 1290 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. 1291 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 1292 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 1293 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. 1294 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 1295 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on. 1296 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. 1297 "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. 1298 "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. 1299 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 1300 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE. 1301 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 1302 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 1303 { 1304 "message": "A String", # [Output Only] A human-readable description of the warning code. 1305 "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. 1306 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: 1307 # "data": [ { "key": "scope", "value": "zones/us-east1-d" } 1308 { 1309 "value": "A String", # [Output Only] A warning data value corresponding to the key. 1310 "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). 1311 }, 1312 ], 1313 }, 1314 ], 1315 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com. 1316 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 1317 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources. 1318 "name": "A String", # [Output Only] Name of the resource. 1319 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. 1320 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 1321 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 1322 { 1323 "message": "A String", # [Output Only] An optional, human-readable error message. 1324 "code": "A String", # [Output Only] The error type identifier for this error. 1325 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 1326 }, 1327 ], 1328 }, 1329 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 1330 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 1331 "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. 1332 }</pre> 1333</div> 1334 1335<div class="method"> 1336 <code class="details" id="testIamPermissions">testIamPermissions(project, region, resource, body)</code> 1337 <pre>Returns permissions that a caller has on the specified resource. 1338 1339Args: 1340 project: string, Project ID for this request. (required) 1341 region: string, The name of the region for this request. (required) 1342 resource: string, Name or id of the resource for this request. (required) 1343 body: object, The request body. (required) 1344 The object takes the form of: 1345 1346{ 1347 "permissions": [ # The set of permissions to check for the 'resource'. Permissions with wildcards (such as '*' or 'storage.*') are not allowed. 1348 "A String", 1349 ], 1350 } 1351 1352 1353Returns: 1354 An object of the form: 1355 1356 { 1357 "permissions": [ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed. 1358 "A String", 1359 ], 1360 }</pre> 1361</div> 1362 1363</body></html>