google.cloud.forseti.services.inventory.base.gcp module

GCP API client fassade.

class ApiClient[source]

Bases: object

The gcp api client interface

_abc_cache = <_weakrefset.WeakSet object>
_abc_negative_cache = <_weakrefset.WeakSet object>
_abc_negative_cache_version = 208
_abc_registry = <_weakrefset.WeakSet object>
fetch_bigquery_dataset_policy(project_id, project_number, dataset_id)[source]

Dataset policy Iterator for a dataset from gcp API call.

Parameters:
  • project_id (str) – id of the project to query.
  • project_number (str) – number of the project to query.
  • dataset_id (str) – id of the dataset to query.
fetch_bigquery_iam_policy(project_id, project_number, dataset_id)[source]

Gets IAM policy of a bigquery dataset from gcp API call.

Parameters:
  • project_id (str) – id of the project to query.
  • project_number (str) – number of the project to query.
  • dataset_id (str) – id of the dataset to query.
fetch_billing_account_iam_policy(account_id)[source]

Gets IAM policy of a Billing Account from GCP API.

Parameters:account_id (str) – id of the billing account to get policy.
fetch_billing_project_info(project_number)[source]

Project Billing Info from gcp API call.

Parameters:project_number (str) – number of the project to query.
fetch_compute_ig_instances(project_number, instance_group_name, region=None, zone=None)[source]

Get the instances for an instance group from GCP API.

One and only one of zone (for zonal instance groups) and region (for regional instance groups) must be specified.

Parameters:
  • project_number (str) – number of the project to query.
  • instance_group_name (str) – The instance group’s name.
  • region (str) – The regional instance group’s region.
  • zone (str) – The zonal instance group’s zone.
fetch_compute_project(project_number)[source]

Fetch compute project data from GCP API.

Parameters:project_number (str) – number of the project to query.
fetch_container_serviceconfig(project_id, zone=None, location=None)[source]

Fetch Kubernetes Engine per zone service config from GCP API.

Parameters:
  • project_id (str) – id of the project to query.
  • zone (str) – zone of the Kubernetes Engine.
  • location (str) – location of the Kubernetes Engine.
fetch_crm_folder(folder_id)[source]

Fetch Folder data from GCP API.

Parameters:folder_id (str) – id of the folder to query.
fetch_crm_folder_iam_policy(folder_id)[source]

Folder IAM policy in a folder from gcp API call.

Parameters:folder_id (str) – id of the folder to get policy.
fetch_crm_organization(org_id)[source]

Fetch Organization data from GCP API.

Parameters:org_id (str) – id of the organization to get.
fetch_crm_organization_iam_policy(org_id)[source]

Organization IAM policy from gcp API call.

Parameters:org_id (str) – id of the organization to get policy.
fetch_crm_project(project_number)[source]

Fetch Project data from GCP API.

Parameters:project_number (str) – number of the project to query.
fetch_crm_project_iam_policy(project_number)[source]

Project IAM policy from gcp API call.

Parameters:project_number (str) – number of the project to query.
fetch_dataproc_cluster_iam_policy(cluster)[source]

Fetch Dataproc Cluster IAM Policy from GCP API.

Parameters:cluster (str) – The Dataproc cluster to query, must be in the format projects/{PROJECT_ID}/regions/{REGION}/clusters/{CLUSTER_NAME}
fetch_gae_app(project_id)[source]

Fetch the AppEngine App.

Parameters:project_id (str) – id of the project to query.
fetch_gsuite_groups_settings(group_email)[source]

Fetch Gsuite groups settings from GCP API.

Parameters:group_email (str) – Gsuite group email.
fetch_iam_serviceaccount_iam_policy(name, unique_id)[source]

Service Account IAM policy from gcp API call.

Parameters:
  • name (str) – The service account name to query, must be in the format projects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}
  • unique_id (str) – The unique id of the service account.
fetch_kms_cryptokey_iam_policy(cryptokey)[source]

Fetch KMS Cryptokey IAM Policy from GCP API.

Parameters:cryptokey (str) – The KMS cryptokey to query, must be in the format projects/{PROJECT_ID}/locations/{LOCATION}/keyRings/{RING_NAME}/ cryptoKeys/{CRYPTOKEY_NAME}
fetch_kms_keyring_iam_policy(keyring)[source]

Fetch KMS Keyring IAM Policy from GCP API.

Parameters:keyring (str) – The KMS keyring to query, must be in the format projects/{PROJECT_ID}/locations/{LOCATION}/keyRings/{RING_NAME}
fetch_pubsub_subscription_iam_policy(name)[source]

PubSub Subscription IAM policy from gcp API call.

Parameters:name (str) – The pubsub topic to query, must be in the format projects/{PROJECT_ID}/subscriptions/{SUBSCRIPTION_NAME}
fetch_pubsub_topic_iam_policy(name)[source]

PubSub Topic IAM policy from gcp API call.

Parameters:name (str) – The pubsub topic to query, must be in the format projects/{PROJECT_ID}/topics/{TOPIC_NAME}
fetch_services_enabled_apis(project_number)[source]

Project enabled API services from gcp API call.

Parameters:project_number (str) – number of the project to query.
fetch_storage_bucket_acls(bucket_id, project_id, project_number)[source]

Bucket Access Controls from GCP API.

Parameters:
  • bucket_id (str) – id of the bucket to query.
  • project_id (str) – id of the project to query.
  • project_number (str) – number of the project to query.
fetch_storage_bucket_iam_policy(bucket_id)[source]

Bucket IAM policy Iterator from gcp API call.

Parameters:bucket_id (str) – id of the bucket to query.
fetch_storage_object_iam_policy(bucket_name, object_name)[source]

Object IAM policy Iterator for an object from gcp API call.

Parameters:
  • bucket_name (str) – name of the bucket.
  • object_name (str) – name of the object.
is_compute_api_enabled(project_number)[source]

Verifies the Compute API is enabled on a project.

Parameters:project_number (str) – number of the project to query.
iter_bigquery_datasets(project_number)[source]

Iterate Datasets from GCP API.

Parameters:project_number (str) – number of the project to query.
iter_bigquery_tables(dataset_reference)[source]

Iterate Tables from GCP API.

Parameters:dataset_reference (dict) – The project and dataset ID to get bigquery tables.
iter_bigtable_clusters(project_id, instance_id)[source]

Iterate Bigtable Clusters from GCP API.

Parameters:
  • project_id (str) – The Project id.
  • instance_id (str) – The Bigtable Instance id.
iter_bigtable_instances(project_number)[source]

Iterate Bigtable Instances from GCP API.

Parameters:project_number (str) – number of the project to query.
iter_bigtable_tables(project_id, instance_id)[source]

Iterate Bigtable Tables from GCP API.

Parameters:
  • project_id (str) – The Project id.
  • instance_id (str) – The Bigtable Instance id.
iter_billing_accounts()[source]

Iterate visible Billing Accounts in an organization from GCP API.

iter_cloudsql_instances(project_id, project_number)[source]

Iterate Cloud sql instances from GCP API.

Parameters:
  • project_id (str) – id of the project to query.
  • project_number (str) – number of the project to query.
iter_compute_address(project_number)[source]

Iterate Addresses from GCP API.

Parameters:project_number (str) – number of the project to query.
iter_compute_autoscalers(project_number)[source]

Iterate Autoscalers from GCP API.

Parameters:project_number (str) – number of the project to query.
iter_compute_backendbuckets(project_number)[source]

Iterate Backend buckets from GCP API.

Parameters:project_number (str) – number of the project to query.
iter_compute_backendservices(project_number)[source]

Iterate Backend services from GCP API.

Parameters:project_number (str) – number of the project to query.
iter_compute_disks(project_number)[source]

Iterate Compute Engine disks from GCP API.

Parameters:project_number (str) – number of the project to query.
iter_compute_firewalls(project_number)[source]

Iterate Compute Engine Firewalls from GCP API.

Parameters:project_number (str) – number of the project to query.
iter_compute_forwardingrules(project_number)[source]

Iterate Forwarding Rules from GCP API.

Parameters:project_number (str) – number of the project to query.
iter_compute_healthchecks(project_number)[source]

Iterate Health checks from GCP API.

Parameters:project_number (str) – number of the project to query.
iter_compute_httphealthchecks(project_number)[source]

Iterate HTTP Health checks from GCP API.

Parameters:project_number (str) – number of the project to query.
iter_compute_httpshealthchecks(project_number)[source]

Iterate HTTPS Health checks from GCP API.

Parameters:project_number (str) – number of the project to query.
iter_compute_ig_managers(project_number)[source]

Iterate Instance Group Manager from GCP API.

Parameters:project_number (str) – number of the project to query.
iter_compute_images(project_number)[source]

Iterate Images from GCP API.

Parameters:project_number (str) – number of the project to query.
iter_compute_instancegroups(project_number)[source]

Iterate Compute Engine groups from GCP API.

Parameters:project_number (str) – number of the project to query.
iter_compute_instances(project_number)[source]

Iterate compute engine instance from GCP API.

Parameters:project_number (str) – number of the project to query.
iter_compute_instancetemplates(project_number)[source]

Iterate Instance Templates from GCP API.

Parameters:project_number (str) – number of the project to query.
iter_compute_interconnect_attachments(project_number)[source]

Iterate Interconnect Attachments from GCP API.

Parameters:project_number (str) – number of the project to query.
iter_compute_interconnects(project_number)[source]

Iterate Interconnects from GCP API.

Parameters:project_number (str) – number of the project to query.
iter_compute_licenses(project_number)[source]

Iterate Licenses from GCP API.

Parameters:project_number (str) – number of the project to query.
iter_compute_networks(project_number)[source]

Iterate Networks from GCP API.

Parameters:project_number (str) – number of the project to query.
iter_compute_project(project_number)[source]

Iterate Project from GCP API.

Will only ever return up to 1 result. Ensures compatibility with other resource iterators.

Parameters:project_number (str) – number of the project to query.
iter_compute_routers(project_number)[source]

Iterate Compute Engine routers from GCP API.

Parameters:project_number (str) – number of the project to query.
iter_compute_securitypolicies(project_number)[source]

Iterate Security Policies from GCP API. :param project_number: number of the project to query. :type project_number: str

iter_compute_snapshots(project_number)[source]

Iterate Compute Engine snapshots from GCP API.

Parameters:project_number (str) – number of the project to query.
iter_compute_sslcertificates(project_number)[source]

Iterate SSL Certificates from GCP API.

Parameters:project_number (str) – number of the project to query.
iter_compute_subnetworks(project_number)[source]

Iterate Subnetworks from GCP API.

Parameters:project_number (str) – number of the project to query.
iter_compute_targethttpproxies(project_number)[source]

Iterate Target HTTP proxies from GCP API.

Parameters:project_number (str) – number of the project to query.
iter_compute_targethttpsproxies(project_number)[source]

Iterate Target HTTPS proxies from GCP API.

Parameters:project_number (str) – number of the project to query.
iter_compute_targetinstances(project_number)[source]

Iterate Target Instances from GCP API.

Parameters:project_number (str) – number of the project to query.
iter_compute_targetpools(project_number)[source]

Iterate Target Pools from GCP API.

Parameters:project_number (str) – number of the project to query.
iter_compute_targetsslproxies(project_number)[source]

Iterate Target SSL proxies from GCP API.

Parameters:project_number (str) – number of the project to query.
iter_compute_targettcpproxies(project_number)[source]

Iterate Target TCP proxies from GCP API.

Parameters:project_number (str) – number of the project to query.
iter_compute_targetvpngateways(project_number)[source]

Iterate Target VPN Gateways from GCP API.

Parameters:project_number (str) – number of the project to query.
iter_compute_urlmaps(project_number)[source]

Iterate URL maps from GCP API.

Parameters:project_number (str) – number of the project to query.
iter_compute_vpntunnels(project_number)[source]

Iterate VPN tunnels from GCP API.

Parameters:project_number (str) – number of the project to query.
iter_container_clusters(project_number)[source]

Iterate Kubernetes Engine Cluster from GCP API.

Parameters:project_number (str) – number of the project to query.
iter_crm_folder_org_policies(folder_id)[source]

Folder organization policies from gcp API call.

Parameters:folder_id (str) – id of the folder to get policy.
iter_crm_folders(parent_id)[source]

Iterate Folders from GCP API.

Parameters:parent_id (str) – id of the parent of the folder.
iter_crm_organization_org_policies(org_id)[source]

Organization organization policies from gcp API call.

Parameters:org_id (str) – id of the organization to get policy.
iter_crm_project_liens(project_number)[source]

Iterate Liens from GCP API.

Parameters:project_number (str) – number of the parent project of the lien.
iter_crm_project_org_policies(project_number)[source]

Project organization policies from gcp API call.

Parameters:project_number (str) – number of the parent project of the policy.
iter_crm_projects(parent_type, parent_id)[source]

Iterate Projects from GCP API.

Parameters:
  • parent_type (str) – type of the parent, “folder” or “organization”.
  • parent_id (str) – id of the parent of the folder.
iter_dataproc_clusters(project_id, region=None)[source]

Iterate Dataproc clusters from GCP API.

Parameters:
  • project_id (str) – id of the project to query.
  • region (str) – The region to query. Not required when using Cloud Asset API.
iter_dns_managedzones(project_number)[source]

Iterate CloudDNS Managed Zones from GCP API.

Parameters:project_number (str) – number of the parent project.
iter_dns_policies(project_number)[source]

Iterate CloudDNS Policies from GCP API.

Parameters:project_number (str) – number of the parent project of the policy.
iter_gae_instances(project_id, service_id, version_id)[source]

Iterate gae instances from GCP API.

Parameters:
  • project_id (str) – id of the project to query.
  • service_id (str) – id of the appengine service.
  • version_id (str) – id of the appengine version.
iter_gae_services(project_id)[source]

Iterate gae services from GCP API.

Parameters:project_id (str) – id of the project to query.
iter_gae_versions(project_id, service_id)[source]

Iterate gae versions from GCP API.

Parameters:
  • project_id (str) – id of the project to query.
  • service_id (str) – id of the appengine service.
iter_gsuite_group_members(group_key)[source]

Iterate Gsuite group members from GCP API.

Parameters:group_key (str) – key of the group to get.
iter_gsuite_groups(gsuite_id)[source]

Iterate Gsuite groups from GCP API.

Parameters:gsuite_id (str) – Gsuite id.
iter_gsuite_users(gsuite_id)[source]

Iterate Gsuite users from GCP API.

Parameters:gsuite_id (str) – Gsuite id.
iter_iam_curated_roles()[source]

Iterate Curated roles in an organization from GCP API.

iter_iam_organization_roles(org_id)[source]

Iterate Organization roles from GCP API.

Parameters:org_id (str) – id of the organization to get.
iter_iam_project_roles(project_id, project_number)[source]

Iterate Project roles in a project from GCP API.

Parameters:
  • project_id (str) – id of the project to query.
  • project_number (str) – number of the project to query.
iter_iam_serviceaccount_exported_keys(name)[source]

Iterate Service Account User Managed Keys from GCP API.

Parameters:name (str) – name of the service account.
iter_iam_serviceaccounts(project_id, project_number)[source]

Iterate Service Accounts in a project from GCP API.

Parameters:
  • project_id (str) – id of the project to query.
  • project_number (str) – number of the project to query.
iter_kms_cryptokeys(parent)[source]

Iterate KMS Cryptokeys in a keyring from GCP API.

Parameters:parent (str) – The KMS keyring to query, must be in the format projects/{PROJECT_ID}/locations/{LOCATION}/keyRings/{RING_NAME}
iter_kms_cryptokeyversions(parent)[source]

Iterate KMS Cryptokey Versions from GCP API.

Parameters:parent (str) – The KMS keyring to query, must be in the format projects/{PROJECT_ID}/locations/{LOCATION}/keyRings/{RING_NAME}/ cryptoKeys/{CRYPTOKEY_NAME}
iter_kms_keyrings(project_id, location=None)[source]

Iterate KMS Keyrings in a project from GCP API.

Parameters:
  • project_id (str) – id of the project to query.
  • location (str) – The location to query. Not required when using Cloud Asset API.
iter_kubernetes_clusterrolebindings(project_id, zone, cluster)[source]
Iterate k8s cluster role bindings in a cluster from GCP API.
data.
Parameters:
  • project_id (str) – id of the project to query.
  • zone (str) – The zone the cluster is in.
  • cluster (str) – The cluster name
iter_kubernetes_clusterroles(project_id, zone, cluster)[source]

Iterate k8s cluster roles in a cluster from GCP API.

Parameters:
  • project_id (str) – id of the project to query.
  • zone (str) – The zone the cluster is in.
  • cluster (str) – The cluster name
iter_kubernetes_namespaces(project_id, zone, cluster)[source]

Iterate k8s namespaces in a cluster from GCP API.

Parameters:
  • project_id (str) – id of the project to query.
  • zone (str) – The zone the cluster is in.
  • cluster (str) – The cluster name.
iter_kubernetes_nodes(project_id, zone, cluster)[source]

Iterate k8s nodes in a cluster from GCP API.

Parameters:
  • project_id (str) – id of the project to query.
  • zone (str) – The zone the cluster is in.
  • cluster (str) – The cluster name.
iter_kubernetes_pods(project_id, zone, cluster, namespace)[source]

Iterate k8s pods in a namespace from GCP API.

Parameters:
  • project_id (str) – id of the project to query.
  • zone (str) – The zone the cluster is in.
  • cluster (str) – The cluster name.
  • namespace (str) – The namespace name.
iter_kubernetes_rolebindings(project_id, zone, cluster, namespace)[source]

Iterate k8s role bindings in a namespace from GCP API.

Parameters:
  • project_id (str) – id of the project to query.
  • zone (str) – The zone the cluster is in.
  • cluster (str) – The cluster name.
  • namespace (str) – The namespace name.
iter_kubernetes_roles(project_id, zone, cluster, namespace)[source]

Iterate k8s roles in a namespace from GCP API.

Parameters:
  • project_id (str) – id of the project to query.
  • zone (str) – The zone the cluster is in.
  • cluster (str) – The cluster name.
  • namespace (str) – The namespace name.
iter_pubsub_subscriptions(project_id, project_number)[source]

Iterate PubSub subscriptions from GCP API.

Parameters:
  • project_id (str) – id of the project to query.
  • project_number (str) – number of the project to query.
iter_pubsub_topics(project_id, project_number)[source]

Iterate PubSub topics from GCP API.

Parameters:
  • project_id (str) – id of the project to query.
  • project_number (str) – number of the project to query.
iter_spanner_databases(parent)[source]

Iterate Spanner Databases from GCP API.

Parameters:parent (str) – parent spanner instance to query.
iter_spanner_instances(project_number)[source]

Iterate Spanner Instances from GCP API.

Parameters:project_number (str) – number of the project to query.
iter_stackdriver_billing_account_sinks(acct_id)[source]

Iterate Billing Account logging sinks from GCP API.

Parameters:acct_id (str) – id of the billing account to query.
iter_stackdriver_folder_sinks(folder_id)[source]

Iterate Folder logging sinks from GCP API.

Parameters:folder_id (str) – id of the folder to query.
iter_stackdriver_organization_sinks(org_id)[source]

Iterate Organization logging sinks from GCP API.

Parameters:org_id (str) – id of the organization to query.
iter_stackdriver_project_sinks(project_number)[source]

Iterate Project logging sinks from GCP API.

Parameters:project_number (str) – number of the project to query.
iter_storage_buckets(project_number)[source]

Iterate Buckets from GCP API.

Parameters:project_number (str) – number of the project to query.
iter_storage_objects(bucket_id)[source]

Iterate Objects from GCP API.

Parameters:bucket_id (str) – id of the bucket to get.
class ApiClientImpl(config)[source]

Bases: google.cloud.forseti.services.inventory.base.gcp.ApiClient

The gcp api client Implementation

_abc_cache = <_weakrefset.WeakSet object>
_abc_negative_cache = <_weakrefset.WeakSet object>
_abc_negative_cache_version = 208
_abc_registry = <_weakrefset.WeakSet object>
_create_ad()[source]

Create admin directory API client.

Returns:Client.
Return type:object
Raises:ResourceNotSupported – Raised if polling is disabled for this API in the GCP API client configuration.
_create_appengine()[source]

Create AppEngine API client.

Returns:Client.
Return type:object
Raises:ResourceNotSupported – Raised if polling is disabled for this API in the GCP API client configuration.
_create_bq()[source]

Create bigquery API client.

Returns:Client.
Return type:object
Raises:ResourceNotSupported – Raised if polling is disabled for this API in the GCP API client configuration.
_create_cloudbilling()[source]

Create cloud billing API client.

Returns:Client.
Return type:object
Raises:ResourceNotSupported – Raised if polling is disabled for this API in the GCP API client configuration.
_create_cloudsql()[source]

Create cloud sql API client.

Returns:Client.
Return type:object
Raises:ResourceNotSupported – Raised if polling is disabled for this API in the GCP API client configuration.
_create_compute()[source]

Create compute API client.

Returns:Client.
Return type:object
Raises:ResourceNotSupported – Raised if polling is disabled for this API in the GCP API client configuration.
_create_container()[source]

Create Kubernetes Engine API client.

Returns:Client.
Return type:object
Raises:ResourceNotSupported – Raised if polling is disabled for this API in the GCP API client configuration.
_create_crm()[source]

Create resource manager API client.

Returns:Client.
Return type:object
Raises:ResourceNotSupported – Raised if polling is disabled for this API in the GCP API client configuration.
_create_groups_settings()[source]

Create gsuite groups settings API client.

Returns:Client.
Return type:object
Raises:ResourceNotSupported – Raised if polling is disabled for this API in the GCP API client configuration.
_create_iam()[source]

Create IAM API client.

Returns:Client.
Return type:object
Raises:ResourceNotSupported – Raised if polling is disabled for this API in the GCP API client configuration.
_create_servicemanagement()[source]

Create servicemanagement API client.

Returns:Client.
Return type:object
Raises:ResourceNotSupported – Raised if polling is disabled for this API in the GCP API client configuration.
_create_serviceusage()[source]

Create serviceusage API client.

Returns:

Client.

Return type:

object

Raises:
  • ResourceNotSupported – Raised if polling is disabled for this API in
  • the GCP API client configuration.
_create_stackdriver_logging()[source]

Create stackdriver_logging API client.

Returns:Client.
Return type:object
Raises:ResourceNotSupported – Raised if polling is disabled for this API in the GCP API client configuration.
_create_storage()[source]

Create storage API client.

Returns:Client.
Return type:object
Raises:ResourceNotSupported – Raised if polling is disabled for this API in the GCP API client configuration.
fetch_bigquery_dataset_policy(**kwargs)[source]

Decorator implementation.

Parameters:
  • *args (list) – Original func arguments.
  • **kwargs (dict) – Original func arguments.
Returns:

Result produced by the wrapped func.

Return type:

object

fetch_bigquery_iam_policy(project_id, project_number, dataset_id)[source]

Gets IAM policy of a bigquery dataset from gcp API call.

Parameters:
  • project_id (str) – id of the project to query.
  • project_number (str) – number of the project to query.
  • dataset_id (str) – id of the dataset to query.
Raises:

ResourceNotSupported – Raised for all calls using this class.

fetch_billing_account_iam_policy(**kwargs)[source]

Decorator implementation.

Parameters:
  • *args (list) – Original func arguments.
  • **kwargs (dict) – Original func arguments.
Returns:

Result produced by the wrapped func.

Return type:

object

fetch_billing_project_info(**kwargs)[source]

Decorator implementation.

Parameters:
  • *args (list) – Original func arguments.
  • **kwargs (dict) – Original func arguments.
Returns:

Result produced by the wrapped func.

Return type:

object

fetch_compute_ig_instances(**kwargs)[source]

Decorator implementation.

Parameters:
  • *args (list) – Original func arguments.
  • **kwargs (dict) – Original func arguments.
Returns:

Result produced by the wrapped func.

Return type:

object

fetch_compute_project(**kwargs)[source]

Decorator implementation.

Parameters:
  • *args (list) – Original func arguments.
  • **kwargs (dict) – Original func arguments.
Returns:

Result produced by the wrapped func.

Return type:

object

fetch_container_serviceconfig(**kwargs)[source]

Decorator implementation.

Parameters:
  • *args (list) – Original func arguments.
  • **kwargs (dict) – Original func arguments.
Returns:

Result produced by the wrapped func.

Return type:

object

fetch_crm_folder(**kwargs)[source]

Decorator implementation.

Parameters:
  • *args (list) – Original func arguments.
  • **kwargs (dict) – Original func arguments.
Returns:

Result produced by the wrapped func.

Return type:

object

fetch_crm_folder_iam_policy(**kwargs)[source]

Decorator implementation.

Parameters:
  • *args (list) – Original func arguments.
  • **kwargs (dict) – Original func arguments.
Returns:

Result produced by the wrapped func.

Return type:

object

fetch_crm_organization(**kwargs)[source]

Decorator implementation.

Parameters:
  • *args (list) – Original func arguments.
  • **kwargs (dict) – Original func arguments.
Returns:

Result produced by the wrapped func.

Return type:

object

fetch_crm_organization_iam_policy(**kwargs)[source]

Decorator implementation.

Parameters:
  • *args (list) – Original func arguments.
  • **kwargs (dict) – Original func arguments.
Returns:

Result produced by the wrapped func.

Return type:

object

fetch_crm_project(**kwargs)[source]

Decorator implementation.

Parameters:
  • *args (list) – Original func arguments.
  • **kwargs (dict) – Original func arguments.
Returns:

Result produced by the wrapped func.

Return type:

object

fetch_crm_project_iam_policy(**kwargs)[source]

Decorator implementation.

Parameters:
  • *args (list) – Original func arguments.
  • **kwargs (dict) – Original func arguments.
Returns:

Result produced by the wrapped func.

Return type:

object

fetch_dataproc_cluster_iam_policy(cluster)[source]

Fetch Dataproc Cluster IAM Policy from GCP API.

Parameters:cluster (str) – The Dataproc cluster to query, must be in the format projects/{PROJECT_ID}/regions/{REGION}/clusters/{CLUSTER_NAME}
Raises:ResourceNotSupported – Raised for all calls using this class.
fetch_gae_app(**kwargs)[source]

Decorator implementation.

Parameters:
  • *args (list) – Original func arguments.
  • **kwargs (dict) – Original func arguments.
Returns:

Result produced by the wrapped func.

Return type:

object

fetch_gsuite_groups_settings(**kwargs)[source]

Decorator implementation.

Parameters:
  • *args (list) – Original func arguments.
  • **kwargs (dict) – Original func arguments.
Returns:

Result produced by the wrapped func.

Return type:

object

fetch_iam_serviceaccount_iam_policy(**kwargs)[source]

Decorator implementation.

Parameters:
  • *args (list) – Original func arguments.
  • **kwargs (dict) – Original func arguments.
Returns:

Result produced by the wrapped func.

Return type:

object

fetch_kms_cryptokey_iam_policy(cryptokey)[source]

Fetch KMS Cryptokey IAM Policy from GCP API.

Parameters:cryptokey (str) – The KMS cryptokey to query, must be in the format projects/{PROJECT_ID}/locations/{LOCATION}/keyRings/{RING_NAME}/ cryptoKeys/{CRYPTOKEY_NAME}
Raises:ResourceNotSupported – Raised for all calls using this class.
fetch_kms_keyring_iam_policy(keyring)[source]

Fetch KMS Keyring IAM Policy from GCP API.

Parameters:keyring (str) – The KMS keyring to query, must be in the format projects/{PROJECT_ID}/locations/{LOCATION}/keyRings/{RING_NAME}
Raises:ResourceNotSupported – Raised for all calls using this class.
fetch_pubsub_subscription_iam_policy(name)[source]

PubSub Subscription IAM policy from gcp API call.

Parameters:name (str) – The pubsub topic to query, must be in the format projects/{PROJECT_ID}/subscriptions/{SUBSCRIPTION_NAME}
Raises:ResourceNotSupported – Raised for all calls using this class.
fetch_pubsub_topic_iam_policy(name)[source]

PubSub Topic IAM policy from gcp API call.

Parameters:name (str) – The pubsub topic to query, must be in the format projects/{PROJECT_ID}/topics/{TOPIC_NAME}
Raises:ResourceNotSupported – Raised for all calls using this class.
fetch_services_enabled_apis(**kwargs)[source]

Decorator implementation.

Parameters:
  • *args (list) – Original func arguments.
  • **kwargs (dict) – Original func arguments.
Returns:

Result produced by the wrapped func.

Return type:

object

fetch_storage_bucket_acls(**kwargs)[source]

Decorator implementation.

Parameters:
  • *args (list) – Original func arguments.
  • **kwargs (dict) – Original func arguments.
Returns:

Result produced by the wrapped func.

Return type:

object

fetch_storage_bucket_iam_policy(**kwargs)[source]

Decorator implementation.

Parameters:
  • *args (list) – Original func arguments.
  • **kwargs (dict) – Original func arguments.
Returns:

Result produced by the wrapped func.

Return type:

object

fetch_storage_object_iam_policy(**kwargs)[source]

Decorator implementation.

Parameters:
  • *args (list) – Original func arguments.
  • **kwargs (dict) – Original func arguments.
Returns:

Result produced by the wrapped func.

Return type:

object

is_compute_api_enabled(**kwargs)[source]

Decorator implementation.

Parameters:
  • *args (list) – Original func arguments.
  • **kwargs (dict) – Original func arguments.
Returns:

Result produced by the wrapped func.

Return type:

object

iter_bigquery_datasets(**kwargs)[source]

Decorator implementation.

Parameters:
  • *args (list) – Original func arguments.
  • **kwargs (dict) – Original func arguments.
Returns:

Result produced by the wrapped func.

Return type:

object

iter_bigquery_tables(**kwargs)[source]

Decorator implementation.

Parameters:
  • *args (list) – Original func arguments.
  • **kwargs (dict) – Original func arguments.
Returns:

Result produced by the wrapped func.

Return type:

object

iter_bigtable_clusters(**kwargs)[source]

Decorator implementation.

Parameters:
  • *args (list) – Original func arguments.
  • **kwargs (dict) – Original func arguments.
Returns:

Result produced by the wrapped func.

Return type:

object

iter_bigtable_instances(**kwargs)[source]

Decorator implementation.

Parameters:
  • *args (list) – Original func arguments.
  • **kwargs (dict) – Original func arguments.
Returns:

Result produced by the wrapped func.

Return type:

object

iter_bigtable_tables(**kwargs)[source]

Decorator implementation.

Parameters:
  • *args (list) – Original func arguments.
  • **kwargs (dict) – Original func arguments.
Returns:

Result produced by the wrapped func.

Return type:

object

iter_billing_accounts(**kwargs)[source]

Decorator implementation.

Parameters:
  • *args (list) – Original func arguments.
  • **kwargs (dict) – Original func arguments.
Returns:

Result produced by the wrapped func.

Return type:

object

iter_cloudsql_instances(**kwargs)[source]

Decorator implementation.

Parameters:
  • *args (list) – Original func arguments.
  • **kwargs (dict) – Original func arguments.
Returns:

Result produced by the wrapped func.

Return type:

object

iter_compute_address(project_number)[source]

Iterate Addresses from GCP API.

Parameters:project_number (str) – number of the project to query.
Raises:ResourceNotSupported – Raised for all calls using this class.
iter_compute_autoscalers(project_number)[source]

Iterate Autoscalers from GCP API.

Parameters:project_number (str) – number of the project to query.
Raises:ResourceNotSupported – Raised for all calls using this class.
iter_compute_backendbuckets(project_number)[source]

Iterate Backend buckets from GCP API.

Parameters:project_number (str) – number of the project to query.
Raises:ResourceNotSupported – Raised for all calls using this class.
iter_compute_backendservices(**kwargs)[source]

Decorator implementation.

Parameters:
  • *args (list) – Original func arguments.
  • **kwargs (dict) – Original func arguments.
Returns:

Result produced by the wrapped func.

Return type:

object

iter_compute_disks(**kwargs)[source]

Decorator implementation.

Parameters:
  • *args (list) – Original func arguments.
  • **kwargs (dict) – Original func arguments.
Returns:

Result produced by the wrapped func.

Return type:

object

iter_compute_firewalls(**kwargs)[source]

Decorator implementation.

Parameters:
  • *args (list) – Original func arguments.
  • **kwargs (dict) – Original func arguments.
Returns:

Result produced by the wrapped func.

Return type:

object

iter_compute_forwardingrules(**kwargs)[source]

Decorator implementation.

Parameters:
  • *args (list) – Original func arguments.
  • **kwargs (dict) – Original func arguments.
Returns:

Result produced by the wrapped func.

Return type:

object

iter_compute_healthchecks(project_number)[source]

Iterate Health checks from GCP API.

Parameters:project_number (str) – number of the project to query.
Raises:ResourceNotSupported – Raised for all calls using this class.
iter_compute_httphealthchecks(project_number)[source]

Iterate HTTP Health checks from GCP API.

Parameters:project_number (str) – number of the project to query.
Raises:ResourceNotSupported – Raised for all calls using this class.
iter_compute_httpshealthchecks(project_number)[source]

Iterate HTTPS Health checks from GCP API.

Parameters:project_number (str) – number of the project to query.
Raises:ResourceNotSupported – Raised for all calls using this class.
iter_compute_ig_managers(**kwargs)[source]

Decorator implementation.

Parameters:
  • *args (list) – Original func arguments.
  • **kwargs (dict) – Original func arguments.
Returns:

Result produced by the wrapped func.

Return type:

object

iter_compute_images(**kwargs)[source]

Decorator implementation.

Parameters:
  • *args (list) – Original func arguments.
  • **kwargs (dict) – Original func arguments.
Returns:

Result produced by the wrapped func.

Return type:

object

iter_compute_instancegroups(**kwargs)[source]

Decorator implementation.

Parameters:
  • *args (list) – Original func arguments.
  • **kwargs (dict) – Original func arguments.
Returns:

Result produced by the wrapped func.

Return type:

object

iter_compute_instances(**kwargs)[source]

Decorator implementation.

Parameters:
  • *args (list) – Original func arguments.
  • **kwargs (dict) – Original func arguments.
Returns:

Result produced by the wrapped func.

Return type:

object

iter_compute_instancetemplates(**kwargs)[source]

Decorator implementation.

Parameters:
  • *args (list) – Original func arguments.
  • **kwargs (dict) – Original func arguments.
Returns:

Result produced by the wrapped func.

Return type:

object

iter_compute_interconnect_attachments(project_number)[source]

Iterate Interconnect Attachments from GCP API.

Parameters:project_number (str) – number of the project to query.
Raises:ResourceNotSupported – Raised for all calls using this class.
iter_compute_interconnects(project_number)[source]

Iterate Interconnects from GCP API.

Parameters:project_number (str) – number of the project to query.
Raises:ResourceNotSupported – Raised for all calls using this class.
iter_compute_licenses(project_number)[source]

Iterate Licenses from GCP API.

Parameters:project_number (str) – number of the project to query.
Raises:ResourceNotSupported – Raised for all calls using this class.
iter_compute_networks(**kwargs)[source]

Decorator implementation.

Parameters:
  • *args (list) – Original func arguments.
  • **kwargs (dict) – Original func arguments.
Returns:

Result produced by the wrapped func.

Return type:

object

iter_compute_project(project_number)[source]

Iterate Project from GCP API.

Will only ever return up to 1 result. Ensures compatibility with other resource iterators.

Parameters:

project_number (str) – number of the project to query.

Yields:

Tuple[dict, AssetMetadata]

Generator of compute project resources

and asset metadata that defaults to None for all GCP clients.

iter_compute_routers(project_number)[source]

Iterate Compute Engine routers from GCP API.

Parameters:project_number (str) – number of the project to query.
Raises:ResourceNotSupported – Raised for all calls using this class.
iter_compute_securitypolicies(project_number)[source]

Iterate Compute Engine Security Policies from GCP API.

Parameters:project_number (str) – number of the project to query.
Raises:ResourceNotSupported – Raised for all calls using this class.
iter_compute_snapshots(**kwargs)[source]

Decorator implementation.

Parameters:
  • *args (list) – Original func arguments.
  • **kwargs (dict) – Original func arguments.
Returns:

Result produced by the wrapped func.

Return type:

object

iter_compute_sslcertificates(project_number)[source]

Iterate SSL Certificates from GCP API.

Parameters:project_number (str) – number of the project to query.
Raises:ResourceNotSupported – Raised for all calls using this class.
iter_compute_subnetworks(**kwargs)[source]

Decorator implementation.

Parameters:
  • *args (list) – Original func arguments.
  • **kwargs (dict) – Original func arguments.
Returns:

Result produced by the wrapped func.

Return type:

object

iter_compute_targethttpproxies(project_number)[source]

Iterate Target HTTP proxies from GCP API.

Parameters:project_number (str) – number of the project to query.
Raises:ResourceNotSupported – Raised for all calls using this class.
iter_compute_targethttpsproxies(project_number)[source]

Iterate Target HTTPS proxies from GCP API.

Parameters:project_number (str) – number of the project to query.
Raises:ResourceNotSupported – Raised for all calls using this class.
iter_compute_targetinstances(project_number)[source]

Iterate Target Instances from GCP API.

Parameters:project_number (str) – number of the project to query.
Raises:ResourceNotSupported – Raised for all calls using this class.
iter_compute_targetpools(project_number)[source]

Iterate Target Pools from GCP API.

Parameters:project_number (str) – number of the project to query.
Raises:ResourceNotSupported – Raised for all calls using this class.
iter_compute_targetsslproxies(project_number)[source]

Iterate Target SSL proxies from GCP API.

Parameters:project_number (str) – number of the project to query.
Raises:ResourceNotSupported – Raised for all calls using this class.
iter_compute_targettcpproxies(project_number)[source]

Iterate Target TCP proxies from GCP API.

Parameters:project_number (str) – number of the project to query.
Raises:ResourceNotSupported – Raised for all calls using this class.
iter_compute_targetvpngateways(project_number)[source]

Iterate Target VPN Gateways from GCP API.

Parameters:project_number (str) – number of the project to query.
Raises:ResourceNotSupported – Raised for all calls using this class.
iter_compute_urlmaps(project_number)[source]

Iterate URL maps from GCP API.

Parameters:project_number (str) – number of the project to query.
Raises:ResourceNotSupported – Raised for all calls using this class.
iter_compute_vpntunnels(project_number)[source]

Iterate VPN tunnels from GCP API.

Parameters:project_number (str) – number of the project to query.
Raises:ResourceNotSupported – Raised for all calls using this class.
iter_container_clusters(**kwargs)[source]

Decorator implementation.

Parameters:
  • *args (list) – Original func arguments.
  • **kwargs (dict) – Original func arguments.
Returns:

Result produced by the wrapped func.

Return type:

object

iter_crm_folder_org_policies(**kwargs)[source]

Decorator implementation.

Parameters:
  • *args (list) – Original func arguments.
  • **kwargs (dict) – Original func arguments.
Returns:

Result produced by the wrapped func.

Return type:

object

iter_crm_folders(**kwargs)[source]

Decorator implementation.

Parameters:
  • *args (list) – Original func arguments.
  • **kwargs (dict) – Original func arguments.
Returns:

Result produced by the wrapped func.

Return type:

object

iter_crm_organization_org_policies(**kwargs)[source]

Decorator implementation.

Parameters:
  • *args (list) – Original func arguments.
  • **kwargs (dict) – Original func arguments.
Returns:

Result produced by the wrapped func.

Return type:

object

iter_crm_project_liens(**kwargs)[source]

Decorator implementation.

Parameters:
  • *args (list) – Original func arguments.
  • **kwargs (dict) – Original func arguments.
Returns:

Result produced by the wrapped func.

Return type:

object

iter_crm_project_org_policies(**kwargs)[source]

Decorator implementation.

Parameters:
  • *args (list) – Original func arguments.
  • **kwargs (dict) – Original func arguments.
Returns:

Result produced by the wrapped func.

Return type:

object

iter_crm_projects(**kwargs)[source]

Decorator implementation.

Parameters:
  • *args (list) – Original func arguments.
  • **kwargs (dict) – Original func arguments.
Returns:

Result produced by the wrapped func.

Return type:

object

iter_dataproc_clusters(project_id, region=None)[source]

Iterate Dataproc clusters from GCP API.

Parameters:
  • project_id (str) – id of the project to query.
  • region (str) – The region to query. Not required when using Cloud Asset API.
Raises:

ResourceNotSupported – Raised for all calls using this class.

iter_dns_managedzones(project_number)[source]

Iterate CloudDNS Managed Zones from GCP API.

Parameters:project_number (str) – number of the parent project.
Raises:ResourceNotSupported – Raised for all calls using this class.
iter_dns_policies(project_number)[source]

Iterate CloudDNS Policies from GCP API.

Parameters:project_number (str) – number of the parent project of the policy.
Raises:ResourceNotSupported – Raised for all calls using this class.
iter_gae_instances(**kwargs)[source]

Decorator implementation.

Parameters:
  • *args (list) – Original func arguments.
  • **kwargs (dict) – Original func arguments.
Returns:

Result produced by the wrapped func.

Return type:

object

iter_gae_services(**kwargs)[source]

Decorator implementation.

Parameters:
  • *args (list) – Original func arguments.
  • **kwargs (dict) – Original func arguments.
Returns:

Result produced by the wrapped func.

Return type:

object

iter_gae_versions(**kwargs)[source]

Decorator implementation.

Parameters:
  • *args (list) – Original func arguments.
  • **kwargs (dict) – Original func arguments.
Returns:

Result produced by the wrapped func.

Return type:

object

iter_gsuite_group_members(**kwargs)[source]

Decorator implementation.

Parameters:
  • *args (list) – Original func arguments.
  • **kwargs (dict) – Original func arguments.
Returns:

Result produced by the wrapped func.

Return type:

object

iter_gsuite_groups(**kwargs)[source]

Decorator implementation.

Parameters:
  • *args (list) – Original func arguments.
  • **kwargs (dict) – Original func arguments.
Returns:

Result produced by the wrapped func.

Return type:

object

iter_gsuite_users(**kwargs)[source]

Decorator implementation.

Parameters:
  • *args (list) – Original func arguments.
  • **kwargs (dict) – Original func arguments.
Returns:

Result produced by the wrapped func.

Return type:

object

iter_iam_curated_roles(**kwargs)[source]

Decorator implementation.

Parameters:
  • *args (list) – Original func arguments.
  • **kwargs (dict) – Original func arguments.
Returns:

Result produced by the wrapped func.

Return type:

object

iter_iam_organization_roles(**kwargs)[source]

Decorator implementation.

Parameters:
  • *args (list) – Original func arguments.
  • **kwargs (dict) – Original func arguments.
Returns:

Result produced by the wrapped func.

Return type:

object

iter_iam_project_roles(**kwargs)[source]

Decorator implementation.

Parameters:
  • *args (list) – Original func arguments.
  • **kwargs (dict) – Original func arguments.
Returns:

Result produced by the wrapped func.

Return type:

object

iter_iam_serviceaccount_exported_keys(**kwargs)[source]

Decorator implementation.

Parameters:
  • *args (list) – Original func arguments.
  • **kwargs (dict) – Original func arguments.
Returns:

Result produced by the wrapped func.

Return type:

object

iter_iam_serviceaccounts(**kwargs)[source]

Decorator implementation.

Parameters:
  • *args (list) – Original func arguments.
  • **kwargs (dict) – Original func arguments.
Returns:

Result produced by the wrapped func.

Return type:

object

iter_kms_cryptokeys(parent)[source]

Iterate KMS Cryptokeys in a keyring from GCP API.

Parameters:parent (str) – The KMS keyring to query, must be in the format projects/{PROJECT_ID}/locations/{LOCATION}/keyRings/{RING_NAME}
Raises:ResourceNotSupported – Raised for all calls using this class.
iter_kms_cryptokeyversions(parent)[source]

Iterate KMS Cryptokey Versions from GCP API.

Parameters:parent (str) – The KMS keyring to query, must be in the format projects/{PROJECT_ID}/locations/{LOCATION}/keyRings/{RING_NAME}/ cryptoKeys/{CRYPTOKEY_NAME}
Raises:ResourceNotSupported – Raised for all calls using this class.
iter_kms_keyrings(project_id, location=None)[source]

Iterate KMS Keyrings in a project from GCP API.

Parameters:
  • project_id (str) – id of the project to query.
  • location (str) – The location to query. Not required when using Cloud Asset API.
Raises:

ResourceNotSupported – Raised for all calls using this class.

iter_kubernetes_clusterrolebindings(project_id, zone, cluster)[source]
Iterate k8s cluster role bindings in a cluster from GCP API.
data.
Parameters:
  • project_id (str) – id of the project to query.
  • zone (str) – The zone the cluster is in.
  • cluster (str) – The cluster name
Raises:

ResourceNotSupported – Raised for all calls using this class.

iter_kubernetes_clusterroles(project_id, zone, cluster)[source]

Iterate k8s cluster roles in a cluster from GCP API. :param project_id: id of the project to query. :type project_id: str :param zone: The zone the cluster is in. :type zone: str :param cluster: The cluster name :type cluster: str

Raises:ResourceNotSupported – Raised for all calls using this class.
iter_kubernetes_namespaces(project_id, zone, cluster)[source]

Iterate k8s namespaces in a cluster from GCP API. :param project_id: id of the project to query. :type project_id: str :param zone: The zone the cluster is in. :type zone: str :param cluster: The cluster name. :type cluster: str

Raises:ResourceNotSupported – Raised for all calls using this class.
iter_kubernetes_nodes(project_id, zone, cluster)[source]

Iterate k8s nodes in a cluster from GCP API. :param project_id: id of the project to query. :type project_id: str :param zone: The zone the cluster is in. :type zone: str :param cluster: The cluster name. :type cluster: str

Raises:ResourceNotSupported – Raised for all calls using this class.
iter_kubernetes_pods(project_id, zone, cluster, namespace)[source]

Iterate k8s pods in a namespace from GCP API. :param project_id: id of the project to query. :type project_id: str :param zone: The zone the cluster is in. :type zone: str :param cluster: The cluster name. :type cluster: str :param namespace: The namespace name. :type namespace: str

Raises:ResourceNotSupported – Raised for all calls using this class.
iter_kubernetes_rolebindings(project_id, zone, cluster, namespace)[source]

Iterate k8s role bindings in a namespace from GCP API. :param project_id: id of the project to query. :type project_id: str :param zone: The zone the cluster is in. :type zone: str :param cluster: The cluster name. :type cluster: str :param namespace: The namespace name. :type namespace: str

Raises:ResourceNotSupported – Raised for all calls using this class.
iter_kubernetes_roles(project_id, zone, cluster, namespace)[source]

Iterate k8s roles in a namespace from GCP API. :param project_id: id of the project to query. :type project_id: str :param zone: The zone the cluster is in. :type zone: str :param cluster: The cluster name. :type cluster: str :param namespace: The namespace name. :type namespace: str

Raises:ResourceNotSupported – Raised for all calls using this class.
iter_pubsub_subscriptions(project_id, project_number)[source]

Iterate PubSub subscriptions from GCP API.

Parameters:
  • project_id (str) – id of the project to query.
  • project_number (str) – number of the project to query.
Raises:

ResourceNotSupported – Raised for all calls using this class.

iter_pubsub_topics(project_id, project_number)[source]

Iterate PubSub topics from GCP API.

Parameters:
  • project_id (str) – id of the project to query.
  • project_number (str) – number of the project to query.
Raises:

ResourceNotSupported – Raised for all calls using this class.

iter_spanner_databases(parent)[source]

Iterate Spanner Databases from GCP API.

Parameters:parent (str) – parent spanner instance to query.
Raises:ResourceNotSupported – Raised for all calls using this class.
iter_spanner_instances(project_number)[source]

Iterate Spanner Instances from GCP API.

Parameters:project_number (str) – number of the project to query.
Raises:ResourceNotSupported – Raised for all calls using this class.
iter_stackdriver_billing_account_sinks(**kwargs)[source]

Decorator implementation.

Parameters:
  • *args (list) – Original func arguments.
  • **kwargs (dict) – Original func arguments.
Returns:

Result produced by the wrapped func.

Return type:

object

iter_stackdriver_folder_sinks(**kwargs)[source]

Decorator implementation.

Parameters:
  • *args (list) – Original func arguments.
  • **kwargs (dict) – Original func arguments.
Returns:

Result produced by the wrapped func.

Return type:

object

iter_stackdriver_organization_sinks(**kwargs)[source]

Decorator implementation.

Parameters:
  • *args (list) – Original func arguments.
  • **kwargs (dict) – Original func arguments.
Returns:

Result produced by the wrapped func.

Return type:

object

iter_stackdriver_project_sinks(**kwargs)[source]

Decorator implementation.

Parameters:
  • *args (list) – Original func arguments.
  • **kwargs (dict) – Original func arguments.
Returns:

Result produced by the wrapped func.

Return type:

object

iter_storage_buckets(**kwargs)[source]

Decorator implementation.

Parameters:
  • *args (list) – Original func arguments.
  • **kwargs (dict) – Original func arguments.
Returns:

Result produced by the wrapped func.

Return type:

object

iter_storage_objects(**kwargs)[source]

Decorator implementation.

Parameters:
  • *args (list) – Original func arguments.
  • **kwargs (dict) – Original func arguments.
Returns:

Result produced by the wrapped func.

Return type:

object

class AssetMetadata(cai_name='', cai_type='')[source]

Bases: object

Asset Metadata.

__eq__(other)[source]

Equals.

Parameters:other (AssetMetadata) – other asset metadata.
Returns:if two asset metadata are the same.
Return type:bool
__repr__()[source]

Repr.

Returns:repr.
Return type:str
exception ResourceNotSupported[source]

Bases: Exception

Exception raised for resources not supported by the API client.

create_lazy(attribute, factory)[source]

Create attributes right before they are needed.

Parameters:
  • attribute (str) – Attribute name to check/create.
  • factory (function) – Factory to create object.
Returns:

Decorator.

Return type:

function

is_api_disabled(config, api_name)[source]

Check if api_name is disabled in the config.

Parameters:
  • config (dict) – GCP API client configuration.
  • api_name (str) – The name of the GCP api to check.
Returns:

True if the API is disabled in the configuration, else False.

Return type:

bool