google.cloud.forseti.common.gcp_type.project module

A Project Resource.

See: https://cloud.google.com/resource-manager/reference/rest/v1/projects

class Project(project_id, full_name=None, data=None, project_number=None, name=None, display_name=None, parent=None, lifecycle_state='LIFECYCLE_STATE_UNSPECIFIED')[source]

Bases: google.cloud.forseti.common.gcp_type.resource.Resource

Project resource.

RESOURCE_NAME_FMT = 'projects/%s'
_abc_cache = <_weakrefset.WeakSet object>
_abc_negative_cache = <_weakrefset.WeakSet object>
_abc_negative_cache_version = 199
_abc_registry = <_weakrefset.WeakSet object>
classmethod from_json(parent, json_string)[source]

Creates a project from a project JSON string.

Parameters:
  • parent (Resource) – resource this instance belongs to. Should be an organization.
  • json_string (str) – JSON string of a instance GCP API response.
Returns:

A new Project object.

Return type:

Project

get_project_number()[source]
Returns the project number.
full_name (str)
Returns:The project number.
Return type:int
class ProjectLifecycleState[source]

Bases: google.cloud.forseti.common.gcp_type.resource.LifecycleState

Project lifecycle state.

DELETE_REQUESTED = 'DELETE_REQUESTED'