1 <html><body> 2 <style> 3 4 body, 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 15 body { 16 font-size: 13px; 17 padding: 1em; 18 } 19 20 h1 { 21 font-size: 26px; 22 margin-bottom: 1em; 23 } 24 25 h2 { 26 font-size: 24px; 27 margin-bottom: 1em; 28 } 29 30 h3 { 31 font-size: 20px; 32 margin-bottom: 1em; 33 margin-top: 1em; 34 } 35 36 pre, code { 37 line-height: 1.5; 38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace; 39 } 40 41 pre { 42 margin-top: 0.5em; 43 } 44 45 h1, h2, h3, p { 46 font-family: Arial, sans serif; 47 } 48 49 h1, 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)</a></code></p> 79 <p class="firstline">Adds a peering to the specified network.</p> 80 <p class="toc_element"> 81 <code><a href="#delete">delete(project, network)</a></code></p> 82 <p class="firstline">Deletes the specified network.</p> 83 <p class="toc_element"> 84 <code><a href="#get">get(project, network)</a></code></p> 85 <p class="firstline">Returns the specified network. Get a list of available networks by making a list() request.</p> 86 <p class="toc_element"> 87 <code><a href="#insert">insert(project, body)</a></code></p> 88 <p class="firstline">Creates a network in the specified project using the data included in the request.</p> 89 <p class="toc_element"> 90 <code><a href="#list">list(project, orderBy=None, maxResults=None, pageToken=None, filter=None)</a></code></p> 91 <p class="firstline">Retrieves the list of networks available to the specified project.</p> 92 <p class="toc_element"> 93 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p> 94 <p class="firstline">Retrieves the next page of results.</p> 95 <p class="toc_element"> 96 <code><a href="#removePeering">removePeering(project, network, body)</a></code></p> 97 <p class="firstline">Removes a peering from the specified network.</p> 98 <p class="toc_element"> 99 <code><a href="#switchToCustomMode">switchToCustomMode(project, network)</a></code></p> 100 <p class="firstline">Switches the network mode from auto subnet mode to custom subnet mode.</p> 101 <p class="toc_element"> 102 <code><a href="#testIamPermissions">testIamPermissions(project, resource, body)</a></code></p> 103 <p class="firstline">Returns permissions that a caller has on the specified resource.</p> 104 <h3>Method Details</h3> 105 <div class="method"> 106 <code class="details" id="addPeering">addPeering(project, network, body)</code> 107 <pre>Adds a peering to the specified network. 108 109 Args: 110 project: string, Project ID for this request. (required) 111 network: string, Name of the network resource to add peering to. (required) 112 body: object, The request body. (required) 113 The object takes the form of: 114 115 { 116 "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. 117 "name": "A String", # Name of the peering, which should conform to RFC1035. 118 "autoCreateRoutes": True or False, # Whether Google Compute Engine manages the routes automatically. 119 } 120 121 122 Returns: 123 An object of the form: 124 125 { # An Operation resource, used to manage asynchronous API requests. 126 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 127 "clientOperationId": "A String", # [Output Only] Reserved for future use. 128 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 129 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 130 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations. 131 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 132 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on. 133 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. 134 "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. 135 "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. 136 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 137 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE. 138 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 139 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 140 { 141 "message": "A String", # [Output Only] A human-readable description of the warning code. 142 "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. 143 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: 144 # "data": [ { "key": "scope", "value": "zones/us-east1-d" } 145 { 146 "value": "A String", # [Output Only] A warning data value corresponding to the key. 147 "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). 148 }, 149 ], 150 }, 151 ], 152 "user": "A String", # [Output Only] User who requested the operation, for example: user (a] example.com. 153 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 154 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources. 155 "name": "A String", # [Output Only] Name of the resource. 156 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations. 157 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 158 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 159 { 160 "message": "A String", # [Output Only] An optional, human-readable error message. 161 "code": "A String", # [Output Only] The error type identifier for this error. 162 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 163 }, 164 ], 165 }, 166 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 167 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 168 "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. 169 }</pre> 170 </div> 171 172 <div class="method"> 173 <code class="details" id="delete">delete(project, network)</code> 174 <pre>Deletes the specified network. 175 176 Args: 177 project: string, Project ID for this request. (required) 178 network: string, Name of the network to delete. (required) 179 180 Returns: 181 An object of the form: 182 183 { # An Operation resource, used to manage asynchronous API requests. 184 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 185 "clientOperationId": "A String", # [Output Only] Reserved for future use. 186 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 187 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 188 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations. 189 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 190 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on. 191 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. 192 "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. 193 "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. 194 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 195 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE. 196 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 197 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 198 { 199 "message": "A String", # [Output Only] A human-readable description of the warning code. 200 "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. 201 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: 202 # "data": [ { "key": "scope", "value": "zones/us-east1-d" } 203 { 204 "value": "A String", # [Output Only] A warning data value corresponding to the key. 205 "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). 206 }, 207 ], 208 }, 209 ], 210 "user": "A String", # [Output Only] User who requested the operation, for example: user (a] example.com. 211 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 212 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources. 213 "name": "A String", # [Output Only] Name of the resource. 214 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations. 215 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 216 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 217 { 218 "message": "A String", # [Output Only] An optional, human-readable error message. 219 "code": "A String", # [Output Only] The error type identifier for this error. 220 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 221 }, 222 ], 223 }, 224 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 225 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 226 "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. 227 }</pre> 228 </div> 229 230 <div class="method"> 231 <code class="details" id="get">get(project, network)</code> 232 <pre>Returns the specified network. Get a list of available networks by making a list() request. 233 234 Args: 235 project: string, Project ID for this request. (required) 236 network: string, Name of the network to return. (required) 237 238 Returns: 239 An object of the form: 240 241 { # Represents a Network resource. Read Networks and Firewalls for more information. 242 "kind": "compute#network", # [Output Only] Type of the resource. Always compute#network for networks. 243 "description": "A String", # An optional description of this resource. Provide this property when you create the resource. 244 "subnetworks": [ # [Output Only] Server-defined fully-qualified URLs for all subnetworks in this network. 245 "A String", 246 ], 247 "autoCreateSubnetworks": True or False, # When set to true, the network is created in "auto subnet mode". When set to false, the network is in "custom subnet mode". 248 # 249 # In "auto subnet mode", a newly created network is assigned the default CIDR of 10.128.0.0/9 and it automatically creates one subnetwork per region. 250 "IPv4Range": "A String", # 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. 251 "gatewayIPv4": "A String", # A gateway address for default routing to other networks. This value is read only and is selected by the Google Compute Engine, typically as the first usable address in the IPv4Range. 252 "peerings": [ # [Output Only] List of network peerings for the resource. 253 { # 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. 254 "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. 255 "state": "A String", # [Output Only] State for the peering. 256 "stateDetails": "A String", # [Output Only] Details about the current state of the peering. 257 "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])? which means 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. 258 "autoCreateRoutes": True or False, # Whether full mesh connectivity is created and managed automatically. When it is set to true, Google Compute Engine will automatically create and manage the routes between two networks when the state is ACTIVE. Otherwise, user needs to create routes manually to route packets to peer network. 259 }, 260 ], 261 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format. 262 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 263 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 264 "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])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. 265 }</pre> 266 </div> 267 268 <div class="method"> 269 <code class="details" id="insert">insert(project, body)</code> 270 <pre>Creates a network in the specified project using the data included in the request. 271 272 Args: 273 project: string, Project ID for this request. (required) 274 body: object, The request body. (required) 275 The object takes the form of: 276 277 { # Represents a Network resource. Read Networks and Firewalls for more information. 278 "kind": "compute#network", # [Output Only] Type of the resource. Always compute#network for networks. 279 "description": "A String", # An optional description of this resource. Provide this property when you create the resource. 280 "subnetworks": [ # [Output Only] Server-defined fully-qualified URLs for all subnetworks in this network. 281 "A String", 282 ], 283 "autoCreateSubnetworks": True or False, # When set to true, the network is created in "auto subnet mode". When set to false, the network is in "custom subnet mode". 284 # 285 # In "auto subnet mode", a newly created network is assigned the default CIDR of 10.128.0.0/9 and it automatically creates one subnetwork per region. 286 "IPv4Range": "A String", # 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. 287 "gatewayIPv4": "A String", # A gateway address for default routing to other networks. This value is read only and is selected by the Google Compute Engine, typically as the first usable address in the IPv4Range. 288 "peerings": [ # [Output Only] List of network peerings for the resource. 289 { # 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. 290 "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. 291 "state": "A String", # [Output Only] State for the peering. 292 "stateDetails": "A String", # [Output Only] Details about the current state of the peering. 293 "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])? which means 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. 294 "autoCreateRoutes": True or False, # Whether full mesh connectivity is created and managed automatically. When it is set to true, Google Compute Engine will automatically create and manage the routes between two networks when the state is ACTIVE. Otherwise, user needs to create routes manually to route packets to peer network. 295 }, 296 ], 297 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format. 298 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 299 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 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])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. 301 } 302 303 304 Returns: 305 An object of the form: 306 307 { # An Operation resource, used to manage asynchronous API requests. 308 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 309 "clientOperationId": "A String", # [Output Only] Reserved for future use. 310 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 311 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 312 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations. 313 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 314 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on. 315 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. 316 "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. 317 "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. 318 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 319 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE. 320 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 321 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 322 { 323 "message": "A String", # [Output Only] A human-readable description of the warning code. 324 "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. 325 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: 326 # "data": [ { "key": "scope", "value": "zones/us-east1-d" } 327 { 328 "value": "A String", # [Output Only] A warning data value corresponding to the key. 329 "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). 330 }, 331 ], 332 }, 333 ], 334 "user": "A String", # [Output Only] User who requested the operation, for example: user (a] example.com. 335 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 336 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources. 337 "name": "A String", # [Output Only] Name of the resource. 338 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations. 339 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 340 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 341 { 342 "message": "A String", # [Output Only] An optional, human-readable error message. 343 "code": "A String", # [Output Only] The error type identifier for this error. 344 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 345 }, 346 ], 347 }, 348 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 349 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 350 "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. 351 }</pre> 352 </div> 353 354 <div class="method"> 355 <code class="details" id="list">list(project, orderBy=None, maxResults=None, pageToken=None, filter=None)</code> 356 <pre>Retrieves the list of networks available to the specified project. 357 358 Args: 359 project: string, Project ID for this request. (required) 360 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. 361 362 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. 363 364 Currently, only sorting by name or creationTimestamp desc is supported. 365 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) 366 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. 367 filter: string, Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string. 368 369 The field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field. 370 371 For example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance. 372 373 You can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values. 374 375 To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters. 376 377 Returns: 378 An object of the form: 379 380 { # Contains a list of networks. 381 "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. 382 "items": [ # [Output Only] A list of Network resources. 383 { # Represents a Network resource. Read Networks and Firewalls for more information. 384 "kind": "compute#network", # [Output Only] Type of the resource. Always compute#network for networks. 385 "description": "A String", # An optional description of this resource. Provide this property when you create the resource. 386 "subnetworks": [ # [Output Only] Server-defined fully-qualified URLs for all subnetworks in this network. 387 "A String", 388 ], 389 "autoCreateSubnetworks": True or False, # When set to true, the network is created in "auto subnet mode". When set to false, the network is in "custom subnet mode". 390 # 391 # In "auto subnet mode", a newly created network is assigned the default CIDR of 10.128.0.0/9 and it automatically creates one subnetwork per region. 392 "IPv4Range": "A String", # 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. 393 "gatewayIPv4": "A String", # A gateway address for default routing to other networks. This value is read only and is selected by the Google Compute Engine, typically as the first usable address in the IPv4Range. 394 "peerings": [ # [Output Only] List of network peerings for the resource. 395 { # 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. 396 "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. 397 "state": "A String", # [Output Only] State for the peering. 398 "stateDetails": "A String", # [Output Only] Details about the current state of the peering. 399 "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])? which means 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. 400 "autoCreateRoutes": True or False, # Whether full mesh connectivity is created and managed automatically. When it is set to true, Google Compute Engine will automatically create and manage the routes between two networks when the state is ACTIVE. Otherwise, user needs to create routes manually to route packets to peer network. 401 }, 402 ], 403 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format. 404 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 405 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 406 "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])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. 407 }, 408 ], 409 "kind": "compute#networkList", # [Output Only] Type of resource. Always compute#networkList for lists of networks. 410 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 411 "selfLink": "A String", # [Output Only] Server-defined URL for this resource. 412 }</pre> 413 </div> 414 415 <div class="method"> 416 <code class="details" id="list_next">list_next(previous_request, previous_response)</code> 417 <pre>Retrieves the next page of results. 418 419 Args: 420 previous_request: The request for the previous page. (required) 421 previous_response: The response from the request for the previous page. (required) 422 423 Returns: 424 A request object that you can call 'execute()' on to request the next 425 page. Returns None if there are no more items in the collection. 426 </pre> 427 </div> 428 429 <div class="method"> 430 <code class="details" id="removePeering">removePeering(project, network, body)</code> 431 <pre>Removes a peering from the specified network. 432 433 Args: 434 project: string, Project ID for this request. (required) 435 network: string, Name of the network resource to remove peering from. (required) 436 body: object, The request body. (required) 437 The object takes the form of: 438 439 { 440 "name": "A String", # Name of the peering, which should conform to RFC1035. 441 } 442 443 444 Returns: 445 An object of the form: 446 447 { # An Operation resource, used to manage asynchronous API requests. 448 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 449 "clientOperationId": "A String", # [Output Only] Reserved for future use. 450 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 451 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 452 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations. 453 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 454 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on. 455 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. 456 "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. 457 "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. 458 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 459 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE. 460 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 461 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 462 { 463 "message": "A String", # [Output Only] A human-readable description of the warning code. 464 "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. 465 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: 466 # "data": [ { "key": "scope", "value": "zones/us-east1-d" } 467 { 468 "value": "A String", # [Output Only] A warning data value corresponding to the key. 469 "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). 470 }, 471 ], 472 }, 473 ], 474 "user": "A String", # [Output Only] User who requested the operation, for example: user (a] example.com. 475 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 476 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources. 477 "name": "A String", # [Output Only] Name of the resource. 478 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations. 479 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 480 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 481 { 482 "message": "A String", # [Output Only] An optional, human-readable error message. 483 "code": "A String", # [Output Only] The error type identifier for this error. 484 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 485 }, 486 ], 487 }, 488 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 489 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 490 "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. 491 }</pre> 492 </div> 493 494 <div class="method"> 495 <code class="details" id="switchToCustomMode">switchToCustomMode(project, network)</code> 496 <pre>Switches the network mode from auto subnet mode to custom subnet mode. 497 498 Args: 499 project: string, Project ID for this request. (required) 500 network: string, Name of the network to be updated. (required) 501 502 Returns: 503 An object of the form: 504 505 { # An Operation resource, used to manage asynchronous API requests. 506 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 507 "clientOperationId": "A String", # [Output Only] Reserved for future use. 508 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 509 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 510 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations. 511 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 512 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on. 513 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. 514 "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. 515 "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. 516 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 517 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE. 518 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 519 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 520 { 521 "message": "A String", # [Output Only] A human-readable description of the warning code. 522 "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. 523 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: 524 # "data": [ { "key": "scope", "value": "zones/us-east1-d" } 525 { 526 "value": "A String", # [Output Only] A warning data value corresponding to the key. 527 "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). 528 }, 529 ], 530 }, 531 ], 532 "user": "A String", # [Output Only] User who requested the operation, for example: user (a] example.com. 533 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 534 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources. 535 "name": "A String", # [Output Only] Name of the resource. 536 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations. 537 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 538 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 539 { 540 "message": "A String", # [Output Only] An optional, human-readable error message. 541 "code": "A String", # [Output Only] The error type identifier for this error. 542 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 543 }, 544 ], 545 }, 546 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 547 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 548 "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. 549 }</pre> 550 </div> 551 552 <div class="method"> 553 <code class="details" id="testIamPermissions">testIamPermissions(project, resource, body)</code> 554 <pre>Returns permissions that a caller has on the specified resource. 555 556 Args: 557 project: string, Project ID for this request. (required) 558 resource: string, Name of the resource for this request. (required) 559 body: object, The request body. (required) 560 The object takes the form of: 561 562 { 563 "permissions": [ # The set of permissions to check for the 'resource'. Permissions with wildcards (such as '*' or 'storage.*') are not allowed. 564 "A String", 565 ], 566 } 567 568 569 Returns: 570 An object of the form: 571 572 { 573 "permissions": [ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed. 574 "A String", 575 ], 576 }</pre> 577 </div> 578 579 </body></html>