subnetwork#

Exec module for managing Subnetworks.

async idem_gcp.exec.gcp.compute.subnetwork.list_(hub, ctx, project: str = None, region: str = None, filter_: (<class 'str'>, 'alias=filter') = None, order_by: str = None)[source]#

Retrieves a list of subnetworks available to the specified project.

Parameters:
  • project (str, Optional) – Project ID for this request.

  • region (str, Optional) – Name of the region scoping this request.

  • filter (str, Optional) – A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160.

  • order_by (str, Optional) – Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.

Examples

random-name:
  exec.run:
  - path: gcp.compute.subnetwork.list
  - kwargs:
      project: project-name
      region: region-name
async idem_gcp.exec.gcp.compute.subnetwork.get(hub, ctx, project: str = None, region: str = None, name: str = None, resource_id: str = None)[source]#

Returns the specified subnetwork. Gets a list of available subnetworks list() request.

Parameters:
  • project (str, Optional) – Project ID for this request. Defaults to None.

  • region (str, Optional) – Name of the region scoping this request. Defaults to None.

  • name (str, Optional) – Name of the Subnetwork resource to return. Defaults to None.

  • resource_id (str, Optional) – An identifier of the resource in the provider. Defaults to None.

Examples

random-name:
  exec.run:
  - path: gcp.compute.subnetwork.get
  - kwargs:
      project: project-name
      region: region-name
      name: subnetwork-name
async idem_gcp.exec.gcp.compute.subnetwork.update_ip_cidr_range(hub, ctx, new_ip_cidr_range: List[Dict[str, Any]], project: str = None, region: str = None, subnetwork: str = None, resource_id: str = None, request_id: str = None)[source]#

Expands the IP CIDR range of the subnetwork to a specified value.

Parameters:
  • new_ip_cidr_range (List) – The IP (in CIDR format or netmask) of internal addresses that are legal on this Subnetwork. This range should be disjoint from other subnetworks within this network. This range can only be larger than (i.e. a superset of) the range previously defined before the update.

  • project (str, Optional) – Project ID for this request.

  • region (str, Optional) – Name of the region scoping this request.

  • subnetwork (str, Optional) – Name of the Subnetwork resource to update.

  • resource_id (str, Optional) – An identifier of the resource in the provider.

  • request_id (str, Optional) – 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).