A Compute Instance.
See: https://cloud.google.com/compute/docs/reference/latest/instances
Instance
(instance_id, parent=None, **kwargs)[source]¶Bases: google.cloud.forseti.common.gcp_type.resource.Resource
Represents Instance resource.
RESOURCE_NAME_FMT
= 'instances/%s'¶_abc_cache
= <_weakrefset.WeakSet object>¶_abc_negative_cache
= <_weakrefset.WeakSet object>¶_abc_negative_cache_version
= 199¶_abc_registry
= <_weakrefset.WeakSet object>¶_create_json_str
()[source]¶Creates a json string based on the object attributes.
Returns: | json str. |
---|---|
Return type: | str |
create_network_interfaces
()[source]¶Return a list of network_interface objects.
Returns: | list of InstanceNetworkInterface objects |
---|---|
Return type: | List |
from_json
(parent, json_string)[source]¶Creates an Instance from an instance JSON string.
Parameters: |
|
---|---|
Returns: | A new Instance object. |
Return type: |
json
¶Returns the json string representation of the resource.
Returns: | json str. |
---|---|
Return type: | str |
InstanceNetworkInterface
(**kwargs)[source]¶Bases: object
InstanceNetworkInterface Resource.
__eq__
(other)[source]¶Eq
Parameters: | other (InstanceNetworkInterface) – other InstanceNetworkInterface |
---|---|
Returns: | True if is equal |
Return type: | bool |
__ne__
(other)[source]¶Ne
Parameters: | other (InstanceNetworkInterface) – other InstanceNetworkInterface |
---|---|
Returns: | True if not equal |
Return type: | bool |
Key
(object_kind, object_path)[source]¶Bases: google.cloud.forseti.common.gcp_type.key.Key
An identifier for a specific instance.
from_args
(project_id, zone, name)[source]¶Construct a Key from specific values.
Parameters: |
|
---|---|
Returns: | the key |
Return type: |
from_url
(url)[source]¶Construct a Key from a URL.
Parameters: | url (str) – Object reference URL |
---|---|
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 |
zone
¶Object property – zone
Returns: | zone |
---|---|
Return type: | str |