google.cloud.forseti.common.gcp_type.network module

A Compute Network.

See: https://cloud.google.com/compute/docs/reference/beta/networks

class Key(object_kind, object_path)[source]

Bases: google.cloud.forseti.common.gcp_type.key.Key

An identifier for a specific network.

static from_args(project_id, name)[source]

Construct a Key from specific values.

Parameters:
  • project_id (str) – project_id
  • name (str) – name
Returns:

the key

Return type:

Key

static from_url(url, project_id=None)[source]

Construct a Key from a URL.

Accepts relative network ‘URLs’ as seen in firewall rule resources. xref: https://cloud.google.com/compute/docs/reference/latest/firewalls
Parameters:
  • url (str) – Object reference URL
  • project_id (str) – Default project ID if, in the case of a relative URL, none is present
Returns:

the key

Return type:

Key

Raises:

ValueError – Required parameters are missing.

name

Object property – name

Returns:name
Return type:str
project_id

Object property – project_id

Returns:project_id
Return type:str