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