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.networks.html">networks</a></h1> 76<h2>Instance Methods</h2> 77<p class="toc_element"> 78 <code><a href="#addPeering">addPeering(project, network, body=None, requestId=None, x__xgafv=None)</a></code></p> 79<p class="firstline">Adds a peering to the specified network.</p> 80<p class="toc_element"> 81 <code><a href="#close">close()</a></code></p> 82<p class="firstline">Close httplib2 connections.</p> 83<p class="toc_element"> 84 <code><a href="#delete">delete(project, network, requestId=None, x__xgafv=None)</a></code></p> 85<p class="firstline">Deletes the specified network.</p> 86<p class="toc_element"> 87 <code><a href="#get">get(project, network, x__xgafv=None)</a></code></p> 88<p class="firstline">Returns the specified network. Gets a list of available networks by making a list() request.</p> 89<p class="toc_element"> 90 <code><a href="#getEffectiveFirewalls">getEffectiveFirewalls(project, network, x__xgafv=None)</a></code></p> 91<p class="firstline">Returns the effective firewalls on a given network.</p> 92<p class="toc_element"> 93 <code><a href="#insert">insert(project, body=None, requestId=None, x__xgafv=None)</a></code></p> 94<p class="firstline">Creates a network in the specified project using the data included in the request.</p> 95<p class="toc_element"> 96 <code><a href="#list">list(project, filter=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None, x__xgafv=None)</a></code></p> 97<p class="firstline">Retrieves the list of networks available to the specified project.</p> 98<p class="toc_element"> 99 <code><a href="#listPeeringRoutes">listPeeringRoutes(project, network, direction=None, filter=None, maxResults=None, orderBy=None, pageToken=None, peeringName=None, region=None, returnPartialSuccess=None, x__xgafv=None)</a></code></p> 100<p class="firstline">Lists the peering routes exchanged over peering connection.</p> 101<p class="toc_element"> 102 <code><a href="#listPeeringRoutes_next">listPeeringRoutes_next(previous_request, previous_response)</a></code></p> 103<p class="firstline">Retrieves the next page of results.</p> 104<p class="toc_element"> 105 <code><a href="#list_next">list_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="#patch">patch(project, network, body=None, requestId=None, x__xgafv=None)</a></code></p> 109<p class="firstline">Patches the specified network with the data included in the request. Only the following fields can be modified: routingConfig.routingMode.</p> 110<p class="toc_element"> 111 <code><a href="#removePeering">removePeering(project, network, body=None, requestId=None, x__xgafv=None)</a></code></p> 112<p class="firstline">Removes a peering from the specified network.</p> 113<p class="toc_element"> 114 <code><a href="#switchToCustomMode">switchToCustomMode(project, network, requestId=None, x__xgafv=None)</a></code></p> 115<p class="firstline">Switches the network mode from auto subnet mode to custom subnet mode.</p> 116<p class="toc_element"> 117 <code><a href="#testIamPermissions">testIamPermissions(project, resource, body=None, x__xgafv=None)</a></code></p> 118<p class="firstline">Returns permissions that a caller has on the specified resource.</p> 119<p class="toc_element"> 120 <code><a href="#updatePeering">updatePeering(project, network, body=None, requestId=None, x__xgafv=None)</a></code></p> 121<p class="firstline">Updates the specified network peering with the data included in the request. You can only modify the NetworkPeering.export_custom_routes field and the NetworkPeering.import_custom_routes field.</p> 122<h3>Method Details</h3> 123<div class="method"> 124 <code class="details" id="addPeering">addPeering(project, network, body=None, requestId=None, x__xgafv=None)</code> 125 <pre>Adds a peering to the specified network. 126 127Args: 128 project: string, Project ID for this request. (required) 129 network: string, Name of the network resource to add peering to. (required) 130 body: object, The request body. 131 The object takes the form of: 132 133{ 134 "autoCreateRoutes": True or False, # This field will be deprecated soon. Use exchange_subnet_routes in network_peering instead. Indicates whether full mesh connectivity is created and managed automatically between peered networks. Currently this field should always be true since Google Compute Engine will automatically create and manage subnetwork routes between two networks when peering state is ACTIVE. 135 "name": "A String", # Name of the peering, which should conform to RFC1035. 136 "networkPeering": { # A network peering attached to a network resource. The message includes the peering name, peer network, peering state, and a flag indicating whether Google Compute Engine should automatically create routes for the peering. # Network peering parameters. In order to specify route policies for peering using import and export custom routes, you must specify all peering related parameters (name, peer network, exchange_subnet_routes) in the network_peering field. The corresponding fields in NetworksAddPeeringRequest will be deprecated soon. 137 "autoCreateRoutes": True or False, # This field will be deprecated soon. Use the exchange_subnet_routes field instead. Indicates whether full mesh connectivity is created and managed automatically between peered networks. Currently this field should always be true since Google Compute Engine will automatically create and manage subnetwork routes between two networks when peering state is ACTIVE. 138 "exchangeSubnetRoutes": True or False, # Indicates whether full mesh connectivity is created and managed automatically between peered networks. Currently this field should always be true since Google Compute Engine will automatically create and manage subnetwork routes between two networks when peering state is ACTIVE. 139 "exportCustomRoutes": True or False, # Whether to export the custom routes to peer network. The default value is false. 140 "exportSubnetRoutesWithPublicIp": True or False, # Whether subnet routes with public IP range are exported. The default value is true, all subnet routes are exported. IPv4 special-use ranges are always exported to peers and are not controlled by this field. 141 "importCustomRoutes": True or False, # Whether to import the custom routes from peer network. The default value is false. 142 "importSubnetRoutesWithPublicIp": True or False, # Whether subnet routes with public IP range are imported. The default value is false. IPv4 special-use ranges are always imported from peers and are not controlled by this field. 143 "name": "A String", # Name of this peering. Provided by the client when the peering is created. The name must comply with RFC1035. Specifically, the name must be 1-63 characters long and match regular expression `[a-z]([-a-z0-9]*[a-z0-9])?`. The first character must be a lowercase letter, and all the following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. 144 "network": "A String", # The URL of the peer network. It can be either full URL or partial URL. The peer network may belong to a different project. If the partial URL does not contain project, it is assumed that the peer network is in the same project as the current network. 145 "peerMtu": 42, # Maximum Transmission Unit in bytes. 146 "state": "A String", # [Output Only] State for the peering, either `ACTIVE` or `INACTIVE`. The peering is `ACTIVE` when there's a matching configuration in the peer network. 147 "stateDetails": "A String", # [Output Only] Details about the current state of the peering. 148 }, 149 "peerNetwork": "A String", # URL of the peer network. It can be either full URL or partial URL. The peer network may belong to a different project. If the partial URL does not contain project, it is assumed that the peer network is in the same project as the current network. 150} 151 152 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). 153 x__xgafv: string, V1 error format. 154 Allowed values 155 1 - v1 error format 156 2 - v2 error format 157 158Returns: 159 An object of the form: 160 161 { # Represents an Operation resource. Google Compute Engine has three Operation resources: * [Global](/compute/docs/reference/rest/beta/globalOperations) * [Regional](/compute/docs/reference/rest/beta/regionOperations) * [Zonal](/compute/docs/reference/rest/beta/zoneOperations) You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses. Operations can be global, regional or zonal. - For global operations, use the `globalOperations` resource. - For regional operations, use the `regionOperations` resource. - For zonal operations, use the `zonalOperations` resource. For more information, read Global, Regional, and Zonal Resources. 162 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. 163 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 164 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 165 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 166 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 167 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 168 { 169 "code": "A String", # [Output Only] The error type identifier for this error. 170 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 171 "message": "A String", # [Output Only] An optional, human-readable error message. 172 }, 173 ], 174 }, 175 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. 176 "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. 177 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server. 178 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 179 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources. 180 "name": "A String", # [Output Only] Name of the operation. 181 "operationGroupId": "A String", # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. 182 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. 183 "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. 184 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. 185 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 186 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 187 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. 188 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 189 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 190 "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. 191 "user": "A String", # [Output Only] User who requested the operation, for example: `[email protected]`. 192 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 193 { 194 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. 195 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" } 196 { 197 "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). 198 "value": "A String", # [Output Only] A warning data value corresponding to the key. 199 }, 200 ], 201 "message": "A String", # [Output Only] A human-readable description of the warning code. 202 }, 203 ], 204 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. 205}</pre> 206</div> 207 208<div class="method"> 209 <code class="details" id="close">close()</code> 210 <pre>Close httplib2 connections.</pre> 211</div> 212 213<div class="method"> 214 <code class="details" id="delete">delete(project, network, requestId=None, x__xgafv=None)</code> 215 <pre>Deletes the specified network. 216 217Args: 218 project: string, Project ID for this request. (required) 219 network: string, Name of the network to delete. (required) 220 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). 221 x__xgafv: string, V1 error format. 222 Allowed values 223 1 - v1 error format 224 2 - v2 error format 225 226Returns: 227 An object of the form: 228 229 { # Represents an Operation resource. Google Compute Engine has three Operation resources: * [Global](/compute/docs/reference/rest/beta/globalOperations) * [Regional](/compute/docs/reference/rest/beta/regionOperations) * [Zonal](/compute/docs/reference/rest/beta/zoneOperations) You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses. Operations can be global, regional or zonal. - For global operations, use the `globalOperations` resource. - For regional operations, use the `regionOperations` resource. - For zonal operations, use the `zonalOperations` resource. For more information, read Global, Regional, and Zonal Resources. 230 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. 231 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 232 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 233 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 234 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 235 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 236 { 237 "code": "A String", # [Output Only] The error type identifier for this error. 238 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 239 "message": "A String", # [Output Only] An optional, human-readable error message. 240 }, 241 ], 242 }, 243 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. 244 "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. 245 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server. 246 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 247 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources. 248 "name": "A String", # [Output Only] Name of the operation. 249 "operationGroupId": "A String", # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. 250 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. 251 "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. 252 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. 253 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 254 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 255 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. 256 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 257 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 258 "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. 259 "user": "A String", # [Output Only] User who requested the operation, for example: `[email protected]`. 260 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 261 { 262 "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. 263 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" } 264 { 265 "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding). 266 "value": "A String", # [Output Only] A warning data value corresponding to the key. 267 }, 268 ], 269 "message": "A String", # [Output Only] A human-readable description of the warning code. 270 }, 271 ], 272 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. 273}</pre> 274</div> 275 276<div class="method"> 277 <code class="details" id="get">get(project, network, x__xgafv=None)</code> 278 <pre>Returns the specified network. Gets a list of available networks by making a list() request. 279 280Args: 281 project: string, Project ID for this request. (required) 282 network: string, Name of the network to return. (required) 283 x__xgafv: string, V1 error format. 284 Allowed values 285 1 - v1 error format 286 2 - v2 error format 287 288Returns: 289 An object of the form: 290 291 { # Represents a VPC Network resource. Networks connect resources to each other and to the internet. For more information, read Virtual Private Cloud (VPC) Network. 292 "IPv4Range": "A String", # Deprecated in favor of subnet mode networks. The range of internal addresses that are legal on this network. This range is a CIDR specification, for example: 192.168.0.0/16. Provided by the client when the network is created. 293 "autoCreateSubnetworks": True or False, # Must be set to create a VPC network. If not set, a legacy network is created. When set to true, the VPC network is created in auto mode. When set to false, the VPC network is created in custom mode. An auto mode VPC network starts with one subnet per region. Each subnet has a predetermined range as described in Auto mode VPC network IP ranges. For custom mode VPC networks, you can add subnets using the subnetworks insert method. 294 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format. 295 "description": "A String", # An optional description of this resource. Provide this field when you create the resource. 296 "gatewayIPv4": "A String", # [Output Only] The gateway address for default routing out of the network, selected by GCP. 297 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 298 "kind": "compute#network", # [Output Only] Type of the resource. Always compute#network for networks. 299 "mtu": 42, # Maximum Transmission Unit in bytes. The minimum value for this field is 1460 and the maximum value is 1500 bytes. If unspecified, defaults to 1460. 300 "name": "A String", # Name of the resource. Provided by the client when the resource is created. 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])?`. The first character must be a lowercase letter, and all following characters (except for the last character) must be a dash, lowercase letter, or digit. The last character must be a lowercase letter or digit. 301 "peerings": [ # [Output Only] A list of network peerings for the resource. 302 { # A network peering attached to a network resource. The message includes the peering name, peer network, peering state, and a flag indicating whether Google Compute Engine should automatically create routes for the peering. 303 "autoCreateRoutes": True or False, # This field will be deprecated soon. Use the exchange_subnet_routes field instead. Indicates whether full mesh connectivity is created and managed automatically between peered networks. Currently this field should always be true since Google Compute Engine will automatically create and manage subnetwork routes between two networks when peering state is ACTIVE. 304 "exchangeSubnetRoutes": True or False, # Indicates whether full mesh connectivity is created and managed automatically between peered networks. Currently this field should always be true since Google Compute Engine will automatically create and manage subnetwork routes between two networks when peering state is ACTIVE. 305 "exportCustomRoutes": True or False, # Whether to export the custom routes to peer network. The default value is false. 306 "exportSubnetRoutesWithPublicIp": True or False, # Whether subnet routes with public IP range are exported. The default value is true, all subnet routes are exported. IPv4 special-use ranges are always exported to peers and are not controlled by this field. 307 "importCustomRoutes": True or False, # Whether to import the custom routes from peer network. The default value is false. 308 "importSubnetRoutesWithPublicIp": True or False, # Whether subnet routes with public IP range are imported. The default value is false. IPv4 special-use ranges are always imported from peers and are not controlled by this field. 309 "name": "A String", # Name of this peering. Provided by the client when the peering is created. The name must comply with RFC1035. Specifically, the name must be 1-63 characters long and match regular expression `[a-z]([-a-z0-9]*[a-z0-9])?`. The first character must be a lowercase letter, and all the following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. 310 "network": "A String", # The URL of the peer network. It can be either full URL or partial URL. The peer network may belong to a different project. If the partial URL does not contain project, it is assumed that the peer network is in the same project as the current network. 311 "peerMtu": 42, # Maximum Transmission Unit in bytes. 312 "state": "A String", # [Output Only] State for the peering, either `ACTIVE` or `INACTIVE`. The peering is `ACTIVE` when there's a matching configuration in the peer network. 313 "stateDetails": "A String", # [Output Only] Details about the current state of the peering. 314 }, 315 ], 316 "routingConfig": { # A routing configuration attached to a network resource. The message includes the list of routers associated with the network, and a flag indicating the type of routing behavior to enforce network-wide. # The network-level routing configuration for this network. Used by Cloud Router to determine what type of network-wide routing behavior to enforce. 317 "routingMode": "A String", # The network-wide routing mode to use. If set to REGIONAL, this network's Cloud Routers will only advertise routes with subnets of this network in the same region as the router. If set to GLOBAL, this network's Cloud Routers will advertise routes with all subnets of this network, across regions. 318 }, 319 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 320 "subnetworks": [ # [Output Only] Server-defined fully-qualified URLs for all subnetworks in this VPC network. 321 "A String", 322 ], 323}</pre> 324</div> 325 326<div class="method"> 327 <code class="details" id="getEffectiveFirewalls">getEffectiveFirewalls(project, network, x__xgafv=None)</code> 328 <pre>Returns the effective firewalls on a given network. 329 330Args: 331 project: string, Project ID for this request. (required) 332 network: string, Name of the network for this request. (required) 333 x__xgafv: string, V1 error format. 334 Allowed values 335 1 - v1 error format 336 2 - v2 error format 337 338Returns: 339 An object of the form: 340 341 { 342 "firewallPolicys": [ # Effective firewalls from firewall policy. 343 { 344 "displayName": "A String", # [Output Only] Deprecated, please use short name instead. The display name of the firewall policy. 345 "name": "A String", # [Output Only] The name of the firewall policy. 346 "rules": [ # The rules that apply to the network. 347 { # Represents a rule that describes one or more match conditions along with the action to be taken when traffic matches this condition (allow or deny). 348 "action": "A String", # The Action to perform when the client connection triggers the rule. Can currently be either "allow" or "deny()" where valid values for status are 403, 404, and 502. 349 "description": "A String", # An optional description for this resource. 350 "direction": "A String", # The direction in which this rule applies. 351 "disabled": True or False, # Denotes whether the firewall policy rule is disabled. When set to true, the firewall policy rule is not enforced and traffic behaves as if it did not exist. If this is unspecified, the firewall policy rule will be enabled. 352 "enableLogging": True or False, # Denotes whether to enable logging for a particular rule. If logging is enabled, logs will be exported to the configured export destination in Stackdriver. Logs may be exported to BigQuery or Pub/Sub. Note: you cannot enable logging on "goto_next" rules. 353 "kind": "compute#firewallPolicyRule", # [Output only] Type of the resource. Always compute#firewallPolicyRule for firewall policy rules 354 "match": { # Represents a match condition that incoming traffic is evaluated against. Exactly one field must be specified. # A match condition that incoming traffic is evaluated against. If it evaluates to true, the corresponding 'action' is enforced. 355 "destIpRanges": [ # CIDR IP address range. Maximum number of destination CIDR IP ranges allowed is 5000. 356 "A String", 357 ], 358 "layer4Configs": [ # Pairs of IP protocols and ports that the rule should match. 359 { 360 "ipProtocol": "A String", # The IP protocol to which this rule applies. The protocol type is required when creating a firewall rule. This value can either be one of the following well known protocol strings (tcp, udp, icmp, esp, ah, ipip, sctp), or the IP protocol number. 361 "ports": [ # An optional list of ports to which this rule applies. This field is only applicable for UDP or TCP protocol. Each entry must be either an integer or a range. If not specified, this rule applies to connections through any port. Example inputs include: ["22"], ["80","443"], and ["12345-12349"]. 362 "A String", 363 ], 364 }, 365 ], 366 "srcIpRanges": [ # CIDR IP address range. Maximum number of source CIDR IP ranges allowed is 5000. 367 "A String", 368 ], 369 }, 370 "priority": 42, # An integer indicating the priority of a rule in the list. The priority must be a positive value between 0 and 2147483647. Rules are evaluated from highest to lowest priority where 0 is the highest priority and 2147483647 is the lowest prority. 371 "ruleTupleCount": 42, # [Output Only] Calculation of the complexity of a single firewall policy rule. 372 "targetResources": [ # A list of network resource URLs to which this rule applies. This field allows you to control which network's VMs get this rule. If this field is left blank, all VMs within the organization will receive the rule. 373 "A String", 374 ], 375 "targetServiceAccounts": [ # A list of service accounts indicating the sets of instances that are applied with this rule. 376 "A String", 377 ], 378 }, 379 ], 380 "shortName": "A String", # [Output Only] The short name of the firewall policy. 381 "type": "A String", # [Output Only] The type of the firewall policy. 382 }, 383 ], 384 "firewalls": [ # Effective firewalls on the network. 385 { # Represents a Firewall Rule resource. Firewall rules allow or deny ingress traffic to, and egress traffic from your instances. For more information, read Firewall rules. 386 "allowed": [ # The list of ALLOW rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a permitted connection. 387 { 388 "IPProtocol": "A String", # The IP protocol to which this rule applies. The protocol type is required when creating a firewall rule. This value can either be one of the following well known protocol strings (tcp, udp, icmp, esp, ah, ipip, sctp) or the IP protocol number. 389 "ports": [ # An optional list of ports to which this rule applies. This field is only applicable for the UDP or TCP protocol. Each entry must be either an integer or a range. If not specified, this rule applies to connections through any port. Example inputs include: ["22"], ["80","443"], and ["12345-12349"]. 390 "A String", 391 ], 392 }, 393 ], 394 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format. 395 "denied": [ # The list of DENY rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a denied connection. 396 { 397 "IPProtocol": "A String", # The IP protocol to which this rule applies. The protocol type is required when creating a firewall rule. This value can either be one of the following well known protocol strings (tcp, udp, icmp, esp, ah, ipip, sctp) or the IP protocol number. 398 "ports": [ # An optional list of ports to which this rule applies. This field is only applicable for the UDP or TCP protocol. Each entry must be either an integer or a range. If not specified, this rule applies to connections through any port. Example inputs include: ["22"], ["80","443"], and ["12345-12349"]. 399 "A String", 400 ], 401 }, 402 ], 403 "description": "A String", # An optional description of this resource. Provide this field when you create the resource. 404 "destinationRanges": [ # If destination ranges are specified, the firewall rule applies only to traffic that has destination IP address in these ranges. These ranges must be expressed in CIDR format. Both IPv4 and IPv6 are supported. 405 "A String", 406 ], 407 "direction": "A String", # Direction of traffic to which this firewall applies, either `INGRESS` or `EGRESS`. The default is `INGRESS`. For `INGRESS` traffic, you cannot specify the destinationRanges field, and for `EGRESS` traffic, you cannot specify the sourceRanges or sourceTags fields. 408 "disabled": True or False, # Denotes whether the firewall rule is disabled. When set to true, the firewall rule is not enforced and the network behaves as if it did not exist. If this is unspecified, the firewall rule will be enabled. 409 "enableLogging": True or False, # Deprecated in favor of enable in LogConfig. This field denotes whether to enable logging for a particular firewall rule. If logging is enabled, logs will be exported t Cloud Logging. 410 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 411 "kind": "compute#firewall", # [Output Only] Type of the resource. Always compute#firewall for firewall rules. 412 "logConfig": { # The available logging options for a firewall rule. # This field denotes the logging options for a particular firewall rule. If logging is enabled, logs will be exported to Cloud Logging. 413 "enable": True or False, # This field denotes whether to enable logging for a particular firewall rule. 414 "metadata": "A String", # This field can only be specified for a particular firewall rule if logging is enabled for that rule. This field denotes whether to include or exclude metadata for firewall logs. 415 }, 416 "name": "A String", # Name of the resource; provided by the client when the resource is created. 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])?`. The first character must be a lowercase letter, and all following characters (except for the last character) must be a dash, lowercase letter, or digit. The last character must be a lowercase letter or digit. 417 "network": "A String", # URL of the network resource for this firewall rule. If not specified when creating a firewall rule, the default network is used: global/networks/default If you choose to specify this field, you can specify the network as a full or partial URL. For example, the following are all valid URLs: - https://www.googleapis.com/compute/v1/projects/myproject/global/networks/my-network - projects/myproject/global/networks/my-network - global/networks/default 418 "priority": 42, # Priority for this rule. This is an integer between `0` and `65535`, both inclusive. The default value is `1000`. Relative priorities determine which rule takes effect if multiple rules apply. Lower values indicate higher priority. For example, a rule with priority `0` has higher precedence than a rule with priority `1`. DENY rules take precedence over ALLOW rules if they have equal priority. Note that VPC networks have implied rules with a priority of `65535`. To avoid conflicts with the implied rules, use a priority number less than `65535`. 419 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 420 "sourceRanges": [ # If source ranges are specified, the firewall rule applies only to traffic that has a source IP address in these ranges. These ranges must be expressed in CIDR format. One or both of sourceRanges and sourceTags may be set. If both fields are set, the rule applies to traffic that has a source IP address within sourceRanges OR a source IP from a resource with a matching tag listed in the sourceTags field. The connection does not need to match both fields for the rule to apply. Both IPv4 and IPv6 are supported. 421 "A String", 422 ], 423 "sourceServiceAccounts": [ # If source service accounts are specified, the firewall rules apply only to traffic originating from an instance with a service account in this list. Source service accounts cannot be used to control traffic to an instance's external IP address because service accounts are associated with an instance, not an IP address. sourceRanges can be set at the same time as sourceServiceAccounts. If both are set, the firewall applies to traffic that has a source IP address within the sourceRanges OR a source IP that belongs to an instance with service account listed in sourceServiceAccount. The connection does not need to match both fields for the firewall to apply. sourceServiceAccounts cannot be used at the same time as sourceTags or targetTags. 424 "A String", 425 ], 426 "sourceTags": [ # If source tags are specified, the firewall rule applies only to traffic with source IPs that match the primary network interfaces of VM instances that have the tag and are in the same VPC network. Source tags cannot be used to control traffic to an instance's external IP address, it only applies to traffic between instances in the same virtual network. Because tags are associated with instances, not IP addresses. One or both of sourceRanges and sourceTags may be set. If both fields are set, the firewall applies to traffic that has a source IP address within sourceRanges OR a source IP from a resource with a matching tag listed in the sourceTags field. The connection does not need to match both fields for the firewall to apply. 427 "A String", 428 ], 429 "targetServiceAccounts": [ # A list of service accounts indicating sets of instances located in the network that may make network connections as specified in allowed[]. targetServiceAccounts cannot be used at the same time as targetTags or sourceTags. If neither targetServiceAccounts nor targetTags are specified, the firewall rule applies to all instances on the specified network. 430 "A String", 431 ], 432 "targetTags": [ # A list of tags that controls which instances the firewall rule applies to. If targetTags are specified, then the firewall rule applies only to instances in the VPC network that have one of those tags. If no targetTags are specified, the firewall rule applies to all instances on the specified network. 433 "A String", 434 ], 435 }, 436 ], 437 "organizationFirewalls": [ # Effective firewalls from organization policies. 438 { # A pruned SecurityPolicy containing ID and any applicable firewall rules. 439 "id": "A String", # [Output Only] The unique identifier for the security policy. This identifier is defined by the server. 440 "rules": [ # The rules that apply to the network. 441 { # Represents a rule that describes one or more match conditions along with the action to be taken when traffic matches this condition (allow or deny). 442 "action": "A String", # The Action to perform when the rule is matched. The following are the valid actions: - allow: allow access to target. - deny(): deny access to target, returns the HTTP response code specified (valid values are 403, 404, and 502). - rate_based_ban: limit client traffic to the configured threshold and ban the client if the traffic exceeds the threshold. Configure parameters for this action in RateLimitOptions. Requires rate_limit_options to be set. - redirect: redirect to a different target. This can either be an internal reCAPTCHA redirect, or an external URL-based redirect via a 302 response. Parameters for this action can be configured via redirectOptions. - throttle: limit client traffic to the configured threshold. Configure parameters for this action in rateLimitOptions. Requires rate_limit_options to be set for this. 443 "description": "A String", # An optional description of this resource. Provide this property when you create the resource. 444 "direction": "A String", # The direction in which this rule applies. This field may only be specified when versioned_expr is set to FIREWALL. 445 "enableLogging": True or False, # Denotes whether to enable logging for a particular rule. If logging is enabled, logs will be exported to the configured export destination in Stackdriver. Logs may be exported to BigQuery or Pub/Sub. Note: you cannot enable logging on "goto_next" rules. This field may only be specified when the versioned_expr is set to FIREWALL. 446 "headerAction": { # Optional, additional actions that are performed on headers. 447 "requestHeadersToAdds": [ # The list of request headers to add or overwrite if they're already present. 448 { 449 "headerName": "A String", # The name of the header to set. 450 "headerValue": "A String", # The value to set the named header to. 451 }, 452 ], 453 }, 454 "kind": "compute#securityPolicyRule", # [Output only] Type of the resource. Always compute#securityPolicyRule for security policy rules 455 "match": { # Represents a match condition that incoming traffic is evaluated against. Exactly one field must be specified. # A match condition that incoming traffic is evaluated against. If it evaluates to true, the corresponding 'action' is enforced. 456 "config": { # The configuration options available when specifying versioned_expr. This field must be specified if versioned_expr is specified and cannot be specified if versioned_expr is not specified. 457 "destIpRanges": [ # CIDR IP address range. This field may only be specified when versioned_expr is set to FIREWALL. 458 "A String", 459 ], 460 "layer4Configs": [ # Pairs of IP protocols and ports that the rule should match. This field may only be specified when versioned_expr is set to FIREWALL. 461 { 462 "ipProtocol": "A String", # The IP protocol to which this rule applies. The protocol type is required when creating a firewall rule. This value can either be one of the following well known protocol strings (tcp, udp, icmp, esp, ah, ipip, sctp), or the IP protocol number. 463 "ports": [ # An optional list of ports to which this rule applies. This field is only applicable for UDP or TCP protocol. Each entry must be either an integer or a range. If not specified, this rule applies to connections through any port. Example inputs include: ["22"], ["80","443"], and ["12345-12349"]. This field may only be specified when versioned_expr is set to FIREWALL. 464 "A String", 465 ], 466 }, 467 ], 468 "srcIpRanges": [ # CIDR IP address range. Maximum number of src_ip_ranges allowed is 10. 469 "A String", 470 ], 471 }, 472 "expr": { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: "Summary size limit" description: "Determines if a summary is less than 100 chars" expression: "document.summary.size() < 100" Example (Equality): title: "Requestor is owner" description: "Determines if requestor is the document owner" expression: "document.owner == request.auth.claims.email" Example (Logic): title: "Public documents" description: "Determine whether the document should be publicly visible" expression: "document.type != 'private' && document.type != 'internal'" Example (Data Manipulation): title: "Notification string" description: "Create a notification string with a timestamp." expression: "'New message received at ' + string(document.create_time)" The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information. # User defined CEVAL expression. A CEVAL expression is used to specify match criteria such as origin.ip, source.region_code and contents in the request header. 473 "description": "A String", # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI. 474 "expression": "A String", # Textual representation of an expression in Common Expression Language syntax. 475 "location": "A String", # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file. 476 "title": "A String", # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression. 477 }, 478 "versionedExpr": "A String", # Preconfigured versioned expression. If this field is specified, config must also be specified. Available preconfigured expressions along with their requirements are: SRC_IPS_V1 - must specify the corresponding src_ip_range field in config. 479 }, 480 "preview": True or False, # If set to true, the specified action is not enforced. 481 "priority": 42, # An integer indicating the priority of a rule in the list. The priority must be a positive value between 0 and 2147483647. Rules are evaluated from highest to lowest priority where 0 is the highest priority and 2147483647 is the lowest priority. 482 "rateLimitOptions": { # Must be specified if the action is "rate_based_ban" or "throttle". Cannot be specified for any other actions. 483 "banDurationSec": 42, # Can only be specified if the action for the rule is "rate_based_ban". If specified, determines the time (in seconds) the traffic will continue to be banned by the rate limit after the rate falls below the threshold. 484 "banThreshold": { # Can only be specified if the action for the rule is "rate_based_ban". If specified, the key will be banned for the configured 'ban_duration_sec' when the number of requests that exceed the 'rate_limit_threshold' also exceed this 'ban_threshold'. 485 "count": 42, # Number of HTTP(S) requests for calculating the threshold. 486 "intervalSec": 42, # Interval over which the threshold is computed. 487 }, 488 "conformAction": "A String", # Action to take for requests that are under the configured rate limit threshold. Valid option is "allow" only. 489 "enforceOnKey": "A String", # Determines the key to enforce the rate_limit_threshold on. Possible values are: - ALL: A single rate limit threshold is applied to all the requests matching this rule. This is the default value if this field 'enforce_on_key' is not configured. - IP: The source IP address of the request is the key. Each IP has this limit enforced separately. - HTTP_HEADER: The value of the HTTP header whose name is configured under "enforce_on_key_name". The key value is truncated to the first 128 bytes of the header value. If no such header is present in the request, the key type defaults to ALL. - XFF_IP: The first IP address (i.e. the originating client IP address) specified in the list of IPs under X-Forwarded-For HTTP header. If no such header is present or the value is not a valid IP, the key type defaults to ALL. - HTTP_COOKIE: The value of the HTTP cookie whose name is configured under "enforce_on_key_name". The key value is truncated to the first 128 bytes of the cookie value. If no such cookie is present in the request, the key type defaults to ALL. 490 "enforceOnKeyName": "A String", # Rate limit key name applicable only for the following key types: HTTP_HEADER -- Name of the HTTP header whose value is taken as the key value. HTTP_COOKIE -- Name of the HTTP cookie whose value is taken as the key value. 491 "exceedAction": "A String", # Action to take for requests that are above the configured rate limit threshold, to either deny with a specified HTTP response code, or redirect to a different endpoint. Valid options are "deny()" where valid values for status are 403, 404, 429, and 502, and "redirect" where the redirect parameters come from exceed_redirect_options below. 492 "exceedRedirectOptions": { # Parameters defining the redirect action that is used as the exceed action. Cannot be specified if the exceed action is not redirect. 493 "target": "A String", # Target for the redirect action. This is required if the type is EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA. 494 "type": "A String", # Type of the redirect action. 495 }, 496 "rateLimitThreshold": { # Threshold at which to begin ratelimiting. 497 "count": 42, # Number of HTTP(S) requests for calculating the threshold. 498 "intervalSec": 42, # Interval over which the threshold is computed. 499 }, 500 }, 501 "redirectOptions": { # Parameters defining the redirect action. Cannot be specified for any other actions. 502 "target": "A String", # Target for the redirect action. This is required if the type is EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA. 503 "type": "A String", # Type of the redirect action. 504 }, 505 "ruleNumber": "A String", # Identifier for the rule. This is only unique within the given security policy. This can only be set during rule creation, if rule number is not specified it will be generated by the server. 506 "ruleTupleCount": 42, # [Output Only] Calculation of the complexity of a single firewall security policy rule. 507 "targetResources": [ # A list of network resource URLs to which this rule applies. This field allows you to control which network's VMs get this rule. If this field is left blank, all VMs within the organization will receive the rule. This field may only be specified when versioned_expr is set to FIREWALL. 508 "A String", 509 ], 510 "targetServiceAccounts": [ # A list of service accounts indicating the sets of instances that are applied with this rule. 511 "A String", 512 ], 513 }, 514 ], 515 }, 516 ], 517}</pre> 518</div> 519 520<div class="method"> 521 <code class="details" id="insert">insert(project, body=None, requestId=None, x__xgafv=None)</code> 522 <pre>Creates a network in the specified project using the data included in the request. 523 524Args: 525 project: string, Project ID for this request. (required) 526 body: object, The request body. 527 The object takes the form of: 528 529{ # Represents a VPC Network resource. Networks connect resources to each other and to the internet. For more information, read Virtual Private Cloud (VPC) Network. 530 "IPv4Range": "A String", # Deprecated in favor of subnet mode networks. The range of internal addresses that are legal on this network. This range is a CIDR specification, for example: 192.168.0.0/16. Provided by the client when the network is created. 531 "autoCreateSubnetworks": True or False, # Must be set to create a VPC network. If not set, a legacy network is created. When set to true, the VPC network is created in auto mode. When set to false, the VPC network is created in custom mode. An auto mode VPC network starts with one subnet per region. Each subnet has a predetermined range as described in Auto mode VPC network IP ranges. For custom mode VPC networks, you can add subnets using the subnetworks insert method. 532 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format. 533 "description": "A String", # An optional description of this resource. Provide this field when you create the resource. 534 "gatewayIPv4": "A String", # [Output Only] The gateway address for default routing out of the network, selected by GCP. 535 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 536 "kind": "compute#network", # [Output Only] Type of the resource. Always compute#network for networks. 537 "mtu": 42, # Maximum Transmission Unit in bytes. The minimum value for this field is 1460 and the maximum value is 1500 bytes. If unspecified, defaults to 1460. 538 "name": "A String", # Name of the resource. Provided by the client when the resource is created. 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])?`. The first character must be a lowercase letter, and all following characters (except for the last character) must be a dash, lowercase letter, or digit. The last character must be a lowercase letter or digit. 539 "peerings": [ # [Output Only] A list of network peerings for the resource. 540 { # A network peering attached to a network resource. The message includes the peering name, peer network, peering state, and a flag indicating whether Google Compute Engine should automatically create routes for the peering. 541 "autoCreateRoutes": True or False, # This field will be deprecated soon. Use the exchange_subnet_routes field instead. Indicates whether full mesh connectivity is created and managed automatically between peered networks. Currently this field should always be true since Google Compute Engine will automatically create and manage subnetwork routes between two networks when peering state is ACTIVE. 542 "exchangeSubnetRoutes": True or False, # Indicates whether full mesh connectivity is created and managed automatically between peered networks. Currently this field should always be true since Google Compute Engine will automatically create and manage subnetwork routes between two networks when peering state is ACTIVE. 543 "exportCustomRoutes": True or False, # Whether to export the custom routes to peer network. The default value is false. 544 "exportSubnetRoutesWithPublicIp": True or False, # Whether subnet routes with public IP range are exported. The default value is true, all subnet routes are exported. IPv4 special-use ranges are always exported to peers and are not controlled by this field. 545 "importCustomRoutes": True or False, # Whether to import the custom routes from peer network. The default value is false. 546 "importSubnetRoutesWithPublicIp": True or False, # Whether subnet routes with public IP range are imported. The default value is false. IPv4 special-use ranges are always imported from peers and are not controlled by this field. 547 "name": "A String", # Name of this peering. Provided by the client when the peering is created. The name must comply with RFC1035. Specifically, the name must be 1-63 characters long and match regular expression `[a-z]([-a-z0-9]*[a-z0-9])?`. The first character must be a lowercase letter, and all the following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. 548 "network": "A String", # The URL of the peer network. It can be either full URL or partial URL. The peer network may belong to a different project. If the partial URL does not contain project, it is assumed that the peer network is in the same project as the current network. 549 "peerMtu": 42, # Maximum Transmission Unit in bytes. 550 "state": "A String", # [Output Only] State for the peering, either `ACTIVE` or `INACTIVE`. The peering is `ACTIVE` when there's a matching configuration in the peer network. 551 "stateDetails": "A String", # [Output Only] Details about the current state of the peering. 552 }, 553 ], 554 "routingConfig": { # A routing configuration attached to a network resource. The message includes the list of routers associated with the network, and a flag indicating the type of routing behavior to enforce network-wide. # The network-level routing configuration for this network. Used by Cloud Router to determine what type of network-wide routing behavior to enforce. 555 "routingMode": "A String", # The network-wide routing mode to use. If set to REGIONAL, this network's Cloud Routers will only advertise routes with subnets of this network in the same region as the router. If set to GLOBAL, this network's Cloud Routers will advertise routes with all subnets of this network, across regions. 556 }, 557 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 558 "subnetworks": [ # [Output Only] Server-defined fully-qualified URLs for all subnetworks in this VPC network. 559 "A String", 560 ], 561} 562 563 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). 564 x__xgafv: string, V1 error format. 565 Allowed values 566 1 - v1 error format 567 2 - v2 error format 568 569Returns: 570 An object of the form: 571 572 { # Represents an Operation resource. Google Compute Engine has three Operation resources: * [Global](/compute/docs/reference/rest/beta/globalOperations) * [Regional](/compute/docs/reference/rest/beta/regionOperations) * [Zonal](/compute/docs/reference/rest/beta/zoneOperations) You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses. Operations can be global, regional or zonal. - For global operations, use the `globalOperations` resource. - For regional operations, use the `regionOperations` resource. - For zonal operations, use the `zonalOperations` resource. For more information, read Global, Regional, and Zonal Resources. 573 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. 574 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 575 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 576 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 577 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 578 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 579 { 580 "code": "A String", # [Output Only] The error type identifier for this error. 581 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 582 "message": "A String", # [Output Only] An optional, human-readable error message. 583 }, 584 ], 585 }, 586 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. 587 "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. 588 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server. 589 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 590 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources. 591 "name": "A String", # [Output Only] Name of the operation. 592 "operationGroupId": "A String", # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. 593 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. 594 "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. 595 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. 596 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 597 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 598 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. 599 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 600 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 601 "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. 602 "user": "A String", # [Output Only] User who requested the operation, for example: `[email protected]`. 603 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 604 { 605 "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. 606 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" } 607 { 608 "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). 609 "value": "A String", # [Output Only] A warning data value corresponding to the key. 610 }, 611 ], 612 "message": "A String", # [Output Only] A human-readable description of the warning code. 613 }, 614 ], 615 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. 616}</pre> 617</div> 618 619<div class="method"> 620 <code class="details" id="list">list(project, filter=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None, x__xgafv=None)</code> 621 <pre>Retrieves the list of networks available to the specified project. 622 623Args: 624 project: string, Project ID for this request. (required) 625 filter: string, A filter expression that filters resources listed in the response. The expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` 626 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`) 627 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. 628 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. 629 returnPartialSuccess: boolean, Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. 630 x__xgafv: string, V1 error format. 631 Allowed values 632 1 - v1 error format 633 2 - v2 error format 634 635Returns: 636 An object of the form: 637 638 { # Contains a list of networks. 639 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server. 640 "items": [ # A list of Network resources. 641 { # Represents a VPC Network resource. Networks connect resources to each other and to the internet. For more information, read Virtual Private Cloud (VPC) Network. 642 "IPv4Range": "A String", # Deprecated in favor of subnet mode networks. The range of internal addresses that are legal on this network. This range is a CIDR specification, for example: 192.168.0.0/16. Provided by the client when the network is created. 643 "autoCreateSubnetworks": True or False, # Must be set to create a VPC network. If not set, a legacy network is created. When set to true, the VPC network is created in auto mode. When set to false, the VPC network is created in custom mode. An auto mode VPC network starts with one subnet per region. Each subnet has a predetermined range as described in Auto mode VPC network IP ranges. For custom mode VPC networks, you can add subnets using the subnetworks insert method. 644 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format. 645 "description": "A String", # An optional description of this resource. Provide this field when you create the resource. 646 "gatewayIPv4": "A String", # [Output Only] The gateway address for default routing out of the network, selected by GCP. 647 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 648 "kind": "compute#network", # [Output Only] Type of the resource. Always compute#network for networks. 649 "mtu": 42, # Maximum Transmission Unit in bytes. The minimum value for this field is 1460 and the maximum value is 1500 bytes. If unspecified, defaults to 1460. 650 "name": "A String", # Name of the resource. Provided by the client when the resource is created. 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])?`. The first character must be a lowercase letter, and all following characters (except for the last character) must be a dash, lowercase letter, or digit. The last character must be a lowercase letter or digit. 651 "peerings": [ # [Output Only] A list of network peerings for the resource. 652 { # A network peering attached to a network resource. The message includes the peering name, peer network, peering state, and a flag indicating whether Google Compute Engine should automatically create routes for the peering. 653 "autoCreateRoutes": True or False, # This field will be deprecated soon. Use the exchange_subnet_routes field instead. Indicates whether full mesh connectivity is created and managed automatically between peered networks. Currently this field should always be true since Google Compute Engine will automatically create and manage subnetwork routes between two networks when peering state is ACTIVE. 654 "exchangeSubnetRoutes": True or False, # Indicates whether full mesh connectivity is created and managed automatically between peered networks. Currently this field should always be true since Google Compute Engine will automatically create and manage subnetwork routes between two networks when peering state is ACTIVE. 655 "exportCustomRoutes": True or False, # Whether to export the custom routes to peer network. The default value is false. 656 "exportSubnetRoutesWithPublicIp": True or False, # Whether subnet routes with public IP range are exported. The default value is true, all subnet routes are exported. IPv4 special-use ranges are always exported to peers and are not controlled by this field. 657 "importCustomRoutes": True or False, # Whether to import the custom routes from peer network. The default value is false. 658 "importSubnetRoutesWithPublicIp": True or False, # Whether subnet routes with public IP range are imported. The default value is false. IPv4 special-use ranges are always imported from peers and are not controlled by this field. 659 "name": "A String", # Name of this peering. Provided by the client when the peering is created. The name must comply with RFC1035. Specifically, the name must be 1-63 characters long and match regular expression `[a-z]([-a-z0-9]*[a-z0-9])?`. The first character must be a lowercase letter, and all the following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. 660 "network": "A String", # The URL of the peer network. It can be either full URL or partial URL. The peer network may belong to a different project. If the partial URL does not contain project, it is assumed that the peer network is in the same project as the current network. 661 "peerMtu": 42, # Maximum Transmission Unit in bytes. 662 "state": "A String", # [Output Only] State for the peering, either `ACTIVE` or `INACTIVE`. The peering is `ACTIVE` when there's a matching configuration in the peer network. 663 "stateDetails": "A String", # [Output Only] Details about the current state of the peering. 664 }, 665 ], 666 "routingConfig": { # A routing configuration attached to a network resource. The message includes the list of routers associated with the network, and a flag indicating the type of routing behavior to enforce network-wide. # The network-level routing configuration for this network. Used by Cloud Router to determine what type of network-wide routing behavior to enforce. 667 "routingMode": "A String", # The network-wide routing mode to use. If set to REGIONAL, this network's Cloud Routers will only advertise routes with subnets of this network in the same region as the router. If set to GLOBAL, this network's Cloud Routers will advertise routes with all subnets of this network, across regions. 668 }, 669 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 670 "subnetworks": [ # [Output Only] Server-defined fully-qualified URLs for all subnetworks in this VPC network. 671 "A String", 672 ], 673 }, 674 ], 675 "kind": "compute#networkList", # [Output Only] Type of resource. Always compute#networkList for lists of networks. 676 "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. 677 "selfLink": "A String", # [Output Only] Server-defined URL for this resource. 678 "warning": { # [Output Only] Informational warning message. 679 "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. 680 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" } 681 { 682 "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). 683 "value": "A String", # [Output Only] A warning data value corresponding to the key. 684 }, 685 ], 686 "message": "A String", # [Output Only] A human-readable description of the warning code. 687 }, 688}</pre> 689</div> 690 691<div class="method"> 692 <code class="details" id="listPeeringRoutes">listPeeringRoutes(project, network, direction=None, filter=None, maxResults=None, orderBy=None, pageToken=None, peeringName=None, region=None, returnPartialSuccess=None, x__xgafv=None)</code> 693 <pre>Lists the peering routes exchanged over peering connection. 694 695Args: 696 project: string, Project ID for this request. (required) 697 network: string, Name of the network for this request. (required) 698 direction: string, The direction of the exchanged routes. 699 Allowed values 700 INCOMING - For routes exported from peer network. 701 OUTGOING - For routes exported from local network. 702 filter: string, A filter expression that filters resources listed in the response. The expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` 703 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`) 704 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. 705 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. 706 peeringName: string, The response will show routes exchanged over the given peering connection. 707 region: string, The region of the request. The response will include all subnet routes, static routes and dynamic routes in the region. 708 returnPartialSuccess: boolean, Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. 709 x__xgafv: string, V1 error format. 710 Allowed values 711 1 - v1 error format 712 2 - v2 error format 713 714Returns: 715 An object of the form: 716 717 { 718 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server. 719 "items": [ # A list of ExchangedPeeringRoute resources. 720 { 721 "destRange": "A String", # The destination range of the route. 722 "imported": True or False, # True if the peering route has been imported from a peer. The actual import happens if the field networkPeering.importCustomRoutes is true for this network, and networkPeering.exportCustomRoutes is true for the peer network, and the import does not result in a route conflict. 723 "nextHopRegion": "A String", # The region of peering route next hop, only applies to dynamic routes. 724 "priority": 42, # The priority of the peering route. 725 "type": "A String", # The type of the peering route. 726 }, 727 ], 728 "kind": "compute#exchangedPeeringRoutesList", # [Output Only] Type of resource. Always compute#exchangedPeeringRoutesList for exchanged peering routes lists. 729 "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. 730 "selfLink": "A String", # [Output Only] Server-defined URL for this resource. 731 "warning": { # [Output Only] Informational warning message. 732 "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. 733 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" } 734 { 735 "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). 736 "value": "A String", # [Output Only] A warning data value corresponding to the key. 737 }, 738 ], 739 "message": "A String", # [Output Only] A human-readable description of the warning code. 740 }, 741}</pre> 742</div> 743 744<div class="method"> 745 <code class="details" id="listPeeringRoutes_next">listPeeringRoutes_next(previous_request, previous_response)</code> 746 <pre>Retrieves the next page of results. 747 748Args: 749 previous_request: The request for the previous page. (required) 750 previous_response: The response from the request for the previous page. (required) 751 752Returns: 753 A request object that you can call 'execute()' on to request the next 754 page. Returns None if there are no more items in the collection. 755 </pre> 756</div> 757 758<div class="method"> 759 <code class="details" id="list_next">list_next(previous_request, previous_response)</code> 760 <pre>Retrieves the next page of results. 761 762Args: 763 previous_request: The request for the previous page. (required) 764 previous_response: The response from the request for the previous page. (required) 765 766Returns: 767 A request object that you can call 'execute()' on to request the next 768 page. Returns None if there are no more items in the collection. 769 </pre> 770</div> 771 772<div class="method"> 773 <code class="details" id="patch">patch(project, network, body=None, requestId=None, x__xgafv=None)</code> 774 <pre>Patches the specified network with the data included in the request. Only the following fields can be modified: routingConfig.routingMode. 775 776Args: 777 project: string, Project ID for this request. (required) 778 network: string, Name of the network to update. (required) 779 body: object, The request body. 780 The object takes the form of: 781 782{ # Represents a VPC Network resource. Networks connect resources to each other and to the internet. For more information, read Virtual Private Cloud (VPC) Network. 783 "IPv4Range": "A String", # Deprecated in favor of subnet mode networks. The range of internal addresses that are legal on this network. This range is a CIDR specification, for example: 192.168.0.0/16. Provided by the client when the network is created. 784 "autoCreateSubnetworks": True or False, # Must be set to create a VPC network. If not set, a legacy network is created. When set to true, the VPC network is created in auto mode. When set to false, the VPC network is created in custom mode. An auto mode VPC network starts with one subnet per region. Each subnet has a predetermined range as described in Auto mode VPC network IP ranges. For custom mode VPC networks, you can add subnets using the subnetworks insert method. 785 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format. 786 "description": "A String", # An optional description of this resource. Provide this field when you create the resource. 787 "gatewayIPv4": "A String", # [Output Only] The gateway address for default routing out of the network, selected by GCP. 788 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 789 "kind": "compute#network", # [Output Only] Type of the resource. Always compute#network for networks. 790 "mtu": 42, # Maximum Transmission Unit in bytes. The minimum value for this field is 1460 and the maximum value is 1500 bytes. If unspecified, defaults to 1460. 791 "name": "A String", # Name of the resource. Provided by the client when the resource is created. 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])?`. The first character must be a lowercase letter, and all following characters (except for the last character) must be a dash, lowercase letter, or digit. The last character must be a lowercase letter or digit. 792 "peerings": [ # [Output Only] A list of network peerings for the resource. 793 { # A network peering attached to a network resource. The message includes the peering name, peer network, peering state, and a flag indicating whether Google Compute Engine should automatically create routes for the peering. 794 "autoCreateRoutes": True or False, # This field will be deprecated soon. Use the exchange_subnet_routes field instead. Indicates whether full mesh connectivity is created and managed automatically between peered networks. Currently this field should always be true since Google Compute Engine will automatically create and manage subnetwork routes between two networks when peering state is ACTIVE. 795 "exchangeSubnetRoutes": True or False, # Indicates whether full mesh connectivity is created and managed automatically between peered networks. Currently this field should always be true since Google Compute Engine will automatically create and manage subnetwork routes between two networks when peering state is ACTIVE. 796 "exportCustomRoutes": True or False, # Whether to export the custom routes to peer network. The default value is false. 797 "exportSubnetRoutesWithPublicIp": True or False, # Whether subnet routes with public IP range are exported. The default value is true, all subnet routes are exported. IPv4 special-use ranges are always exported to peers and are not controlled by this field. 798 "importCustomRoutes": True or False, # Whether to import the custom routes from peer network. The default value is false. 799 "importSubnetRoutesWithPublicIp": True or False, # Whether subnet routes with public IP range are imported. The default value is false. IPv4 special-use ranges are always imported from peers and are not controlled by this field. 800 "name": "A String", # Name of this peering. Provided by the client when the peering is created. The name must comply with RFC1035. Specifically, the name must be 1-63 characters long and match regular expression `[a-z]([-a-z0-9]*[a-z0-9])?`. The first character must be a lowercase letter, and all the following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. 801 "network": "A String", # The URL of the peer network. It can be either full URL or partial URL. The peer network may belong to a different project. If the partial URL does not contain project, it is assumed that the peer network is in the same project as the current network. 802 "peerMtu": 42, # Maximum Transmission Unit in bytes. 803 "state": "A String", # [Output Only] State for the peering, either `ACTIVE` or `INACTIVE`. The peering is `ACTIVE` when there's a matching configuration in the peer network. 804 "stateDetails": "A String", # [Output Only] Details about the current state of the peering. 805 }, 806 ], 807 "routingConfig": { # A routing configuration attached to a network resource. The message includes the list of routers associated with the network, and a flag indicating the type of routing behavior to enforce network-wide. # The network-level routing configuration for this network. Used by Cloud Router to determine what type of network-wide routing behavior to enforce. 808 "routingMode": "A String", # The network-wide routing mode to use. If set to REGIONAL, this network's Cloud Routers will only advertise routes with subnets of this network in the same region as the router. If set to GLOBAL, this network's Cloud Routers will advertise routes with all subnets of this network, across regions. 809 }, 810 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 811 "subnetworks": [ # [Output Only] Server-defined fully-qualified URLs for all subnetworks in this VPC network. 812 "A String", 813 ], 814} 815 816 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). 817 x__xgafv: string, V1 error format. 818 Allowed values 819 1 - v1 error format 820 2 - v2 error format 821 822Returns: 823 An object of the form: 824 825 { # Represents an Operation resource. Google Compute Engine has three Operation resources: * [Global](/compute/docs/reference/rest/beta/globalOperations) * [Regional](/compute/docs/reference/rest/beta/regionOperations) * [Zonal](/compute/docs/reference/rest/beta/zoneOperations) You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses. Operations can be global, regional or zonal. - For global operations, use the `globalOperations` resource. - For regional operations, use the `regionOperations` resource. - For zonal operations, use the `zonalOperations` resource. For more information, read Global, Regional, and Zonal Resources. 826 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. 827 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 828 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 829 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 830 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 831 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 832 { 833 "code": "A String", # [Output Only] The error type identifier for this error. 834 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 835 "message": "A String", # [Output Only] An optional, human-readable error message. 836 }, 837 ], 838 }, 839 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. 840 "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. 841 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server. 842 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 843 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources. 844 "name": "A String", # [Output Only] Name of the operation. 845 "operationGroupId": "A String", # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. 846 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. 847 "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. 848 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. 849 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 850 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 851 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. 852 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 853 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 854 "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. 855 "user": "A String", # [Output Only] User who requested the operation, for example: `[email protected]`. 856 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 857 { 858 "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. 859 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" } 860 { 861 "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). 862 "value": "A String", # [Output Only] A warning data value corresponding to the key. 863 }, 864 ], 865 "message": "A String", # [Output Only] A human-readable description of the warning code. 866 }, 867 ], 868 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. 869}</pre> 870</div> 871 872<div class="method"> 873 <code class="details" id="removePeering">removePeering(project, network, body=None, requestId=None, x__xgafv=None)</code> 874 <pre>Removes a peering from the specified network. 875 876Args: 877 project: string, Project ID for this request. (required) 878 network: string, Name of the network resource to remove peering from. (required) 879 body: object, The request body. 880 The object takes the form of: 881 882{ 883 "name": "A String", # Name of the peering, which should conform to RFC1035. 884} 885 886 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). 887 x__xgafv: string, V1 error format. 888 Allowed values 889 1 - v1 error format 890 2 - v2 error format 891 892Returns: 893 An object of the form: 894 895 { # Represents an Operation resource. Google Compute Engine has three Operation resources: * [Global](/compute/docs/reference/rest/beta/globalOperations) * [Regional](/compute/docs/reference/rest/beta/regionOperations) * [Zonal](/compute/docs/reference/rest/beta/zoneOperations) You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses. Operations can be global, regional or zonal. - For global operations, use the `globalOperations` resource. - For regional operations, use the `regionOperations` resource. - For zonal operations, use the `zonalOperations` resource. For more information, read Global, Regional, and Zonal Resources. 896 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. 897 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 898 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 899 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 900 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 901 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 902 { 903 "code": "A String", # [Output Only] The error type identifier for this error. 904 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 905 "message": "A String", # [Output Only] An optional, human-readable error message. 906 }, 907 ], 908 }, 909 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. 910 "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. 911 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server. 912 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 913 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources. 914 "name": "A String", # [Output Only] Name of the operation. 915 "operationGroupId": "A String", # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. 916 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. 917 "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. 918 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. 919 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 920 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 921 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. 922 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 923 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 924 "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. 925 "user": "A String", # [Output Only] User who requested the operation, for example: `[email protected]`. 926 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 927 { 928 "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. 929 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" } 930 { 931 "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). 932 "value": "A String", # [Output Only] A warning data value corresponding to the key. 933 }, 934 ], 935 "message": "A String", # [Output Only] A human-readable description of the warning code. 936 }, 937 ], 938 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. 939}</pre> 940</div> 941 942<div class="method"> 943 <code class="details" id="switchToCustomMode">switchToCustomMode(project, network, requestId=None, x__xgafv=None)</code> 944 <pre>Switches the network mode from auto subnet mode to custom subnet mode. 945 946Args: 947 project: string, Project ID for this request. (required) 948 network: string, Name of the network to be updated. (required) 949 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). 950 x__xgafv: string, V1 error format. 951 Allowed values 952 1 - v1 error format 953 2 - v2 error format 954 955Returns: 956 An object of the form: 957 958 { # Represents an Operation resource. Google Compute Engine has three Operation resources: * [Global](/compute/docs/reference/rest/beta/globalOperations) * [Regional](/compute/docs/reference/rest/beta/regionOperations) * [Zonal](/compute/docs/reference/rest/beta/zoneOperations) You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses. Operations can be global, regional or zonal. - For global operations, use the `globalOperations` resource. - For regional operations, use the `regionOperations` resource. - For zonal operations, use the `zonalOperations` resource. For more information, read Global, Regional, and Zonal Resources. 959 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. 960 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 961 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 962 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 963 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 964 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 965 { 966 "code": "A String", # [Output Only] The error type identifier for this error. 967 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 968 "message": "A String", # [Output Only] An optional, human-readable error message. 969 }, 970 ], 971 }, 972 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. 973 "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. 974 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server. 975 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 976 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources. 977 "name": "A String", # [Output Only] Name of the operation. 978 "operationGroupId": "A String", # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. 979 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. 980 "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. 981 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. 982 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 983 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 984 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. 985 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 986 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 987 "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. 988 "user": "A String", # [Output Only] User who requested the operation, for example: `[email protected]`. 989 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 990 { 991 "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. 992 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" } 993 { 994 "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). 995 "value": "A String", # [Output Only] A warning data value corresponding to the key. 996 }, 997 ], 998 "message": "A String", # [Output Only] A human-readable description of the warning code. 999 }, 1000 ], 1001 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. 1002}</pre> 1003</div> 1004 1005<div class="method"> 1006 <code class="details" id="testIamPermissions">testIamPermissions(project, resource, body=None, x__xgafv=None)</code> 1007 <pre>Returns permissions that a caller has on the specified resource. 1008 1009Args: 1010 project: string, Project ID for this request. (required) 1011 resource: string, Name or id of the resource for this request. (required) 1012 body: object, The request body. 1013 The object takes the form of: 1014 1015{ 1016 "permissions": [ # The set of permissions to check for the 'resource'. Permissions with wildcards (such as '*' or 'storage.*') are not allowed. 1017 "A String", 1018 ], 1019} 1020 1021 x__xgafv: string, V1 error format. 1022 Allowed values 1023 1 - v1 error format 1024 2 - v2 error format 1025 1026Returns: 1027 An object of the form: 1028 1029 { 1030 "permissions": [ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed. 1031 "A String", 1032 ], 1033}</pre> 1034</div> 1035 1036<div class="method"> 1037 <code class="details" id="updatePeering">updatePeering(project, network, body=None, requestId=None, x__xgafv=None)</code> 1038 <pre>Updates the specified network peering with the data included in the request. You can only modify the NetworkPeering.export_custom_routes field and the NetworkPeering.import_custom_routes field. 1039 1040Args: 1041 project: string, Project ID for this request. (required) 1042 network: string, Name of the network resource which the updated peering is belonging to. (required) 1043 body: object, The request body. 1044 The object takes the form of: 1045 1046{ 1047 "networkPeering": { # A network peering attached to a network resource. The message includes the peering name, peer network, peering state, and a flag indicating whether Google Compute Engine should automatically create routes for the peering. 1048 "autoCreateRoutes": True or False, # This field will be deprecated soon. Use the exchange_subnet_routes field instead. Indicates whether full mesh connectivity is created and managed automatically between peered networks. Currently this field should always be true since Google Compute Engine will automatically create and manage subnetwork routes between two networks when peering state is ACTIVE. 1049 "exchangeSubnetRoutes": True or False, # Indicates whether full mesh connectivity is created and managed automatically between peered networks. Currently this field should always be true since Google Compute Engine will automatically create and manage subnetwork routes between two networks when peering state is ACTIVE. 1050 "exportCustomRoutes": True or False, # Whether to export the custom routes to peer network. The default value is false. 1051 "exportSubnetRoutesWithPublicIp": True or False, # Whether subnet routes with public IP range are exported. The default value is true, all subnet routes are exported. IPv4 special-use ranges are always exported to peers and are not controlled by this field. 1052 "importCustomRoutes": True or False, # Whether to import the custom routes from peer network. The default value is false. 1053 "importSubnetRoutesWithPublicIp": True or False, # Whether subnet routes with public IP range are imported. The default value is false. IPv4 special-use ranges are always imported from peers and are not controlled by this field. 1054 "name": "A String", # Name of this peering. Provided by the client when the peering is created. The name must comply with RFC1035. Specifically, the name must be 1-63 characters long and match regular expression `[a-z]([-a-z0-9]*[a-z0-9])?`. The first character must be a lowercase letter, and all the following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. 1055 "network": "A String", # The URL of the peer network. It can be either full URL or partial URL. The peer network may belong to a different project. If the partial URL does not contain project, it is assumed that the peer network is in the same project as the current network. 1056 "peerMtu": 42, # Maximum Transmission Unit in bytes. 1057 "state": "A String", # [Output Only] State for the peering, either `ACTIVE` or `INACTIVE`. The peering is `ACTIVE` when there's a matching configuration in the peer network. 1058 "stateDetails": "A String", # [Output Only] Details about the current state of the peering. 1059 }, 1060} 1061 1062 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). 1063 x__xgafv: string, V1 error format. 1064 Allowed values 1065 1 - v1 error format 1066 2 - v2 error format 1067 1068Returns: 1069 An object of the form: 1070 1071 { # Represents an Operation resource. Google Compute Engine has three Operation resources: * [Global](/compute/docs/reference/rest/beta/globalOperations) * [Regional](/compute/docs/reference/rest/beta/regionOperations) * [Zonal](/compute/docs/reference/rest/beta/zoneOperations) You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses. Operations can be global, regional or zonal. - For global operations, use the `globalOperations` resource. - For regional operations, use the `regionOperations` resource. - For zonal operations, use the `zonalOperations` resource. For more information, read Global, Regional, and Zonal Resources. 1072 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. 1073 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 1074 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 1075 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 1076 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 1077 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 1078 { 1079 "code": "A String", # [Output Only] The error type identifier for this error. 1080 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 1081 "message": "A String", # [Output Only] An optional, human-readable error message. 1082 }, 1083 ], 1084 }, 1085 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. 1086 "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. 1087 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server. 1088 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 1089 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources. 1090 "name": "A String", # [Output Only] Name of the operation. 1091 "operationGroupId": "A String", # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. 1092 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. 1093 "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. 1094 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. 1095 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 1096 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 1097 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. 1098 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 1099 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 1100 "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. 1101 "user": "A String", # [Output Only] User who requested the operation, for example: `[email protected]`. 1102 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 1103 { 1104 "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. 1105 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" } 1106 { 1107 "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). 1108 "value": "A String", # [Output Only] A warning data value corresponding to the key. 1109 }, 1110 ], 1111 "message": "A String", # [Output Only] A human-readable description of the warning code. 1112 }, 1113 ], 1114 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. 1115}</pre> 1116</div> 1117 1118</body></html>