As of January 1, 2020 this library no longer supports Python 2 on the latest released version. Library versions released prior to that date will continue to be available. For more information please visit Python 2 support on Google Cloud.

Types for Google Cloud Asset v1p1beta1 API

class google.cloud.asset_v1p1beta1.types.StandardResourceMetadata(mapping=None, **kwargs)[source]

The standard metadata of a cloud resource.

name

The full resource name. For example: //compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1. See Resource Names for more information.

Type

str

asset_type

The type of this resource. For example: “compute.googleapis.com/Disk”.

Type

str

project

The project that this resource belongs to, in the form of projects/{project_number}.

Type

str

display_name

The display name of this resource.

Type

str

description

One or more paragraphs of text description of this resource. Maximum length could be up to 1M bytes.

Type

str

additional_attributes

Additional searchable attributes of this resource. Informational only. The exact set of attributes is subject to change. For example: project id, DNS name etc.

Type

Sequence[str]

location

Location can be “global”, regional like “us- ast1”, or zonal like “us-west1-b”.

Type

str

labels

Labels associated with this resource. See Labelling and grouping GCP resources for more information.

Type

Sequence[LabelsEntry]

network_tags

Network tags associated with this resource. Like labels, network tags are a type of annotations used to group GCP resources. See Labelling GCP resources for more information.

Type

Sequence[str]

class LabelsEntry(mapping=None, **kwargs)
class google.cloud.asset_v1p1beta1.types.IamPolicySearchResult(mapping=None, **kwargs)[source]

The result for a IAM Policy search.

resource

The full resource name of the resource associated with this IAM policy.

Type

str

project

The project that the associated GCP resource belongs to, in the form of projects/{project_number}. If an IAM policy is set on a resource (like VM instance, Cloud Storage bucket), the project field will indicate the project that contains the resource. If an IAM policy is set on a folder or orgnization, the project field will be empty.

Type

str

policy

The IAM policy directly set on the given resource. Note that the original IAM policy can contain multiple bindings. This only contains the bindings that match the given query. For queries that don’t contain a constrain on policies (e.g. an empty query), this contains all the bindings.

Type

Policy

explanation

Explanation about the IAM policy search result. It contains additional information to explain why the search result matches the query.

Type

Explanation

class Explanation(mapping=None, **kwargs)[source]

Explanation about the IAM policy search result.

matched_permissions

The map from roles to their included permission matching the permission query (e.g. containing policy.role.permissions:). A sample role string: “roles/compute.instanceAdmin”. The roles can also be found in the returned policy bindings. Note that the map is populated only if requesting with a permission query.

Type

Sequence[MatchedPermissionsEntry]

class MatchedPermissionsEntry(mapping=None, **kwargs)
class google.cloud.asset_v1p1beta1.types.Permissions(mapping=None, **kwargs)[source]

IAM permissions

permissions

A list of permissions. A sample permission string: “compute.disk.get”.

Type

Sequence[str]

class google.cloud.asset_v1p1beta1.types.SearchAllResourcesRequest(mapping=None, **kwargs)[source]

Search all resources request.

scope

Required. The relative name of an asset. The search is limited to the resources within the scope. The allowed value must be:

  • Organization number (such as “organizations/123”)

  • Folder number(such as “folders/1234”)

  • Project number (such as “projects/12345”)

  • Project id (such as “projects/abc”)

Type

str

query

Optional. The query statement.

Type

str

asset_types

Optional. A list of asset types that this request searches for. If empty, it will search all the supported asset types.

Type

Sequence[str]

page_size

Optional. The page size for search result pagination. Page size is capped at 500 even if a larger value is given. If set to zero, server will pick an appropriate default. Returned results may be fewer than requested. When this happens, there could be more results as long as next_page_token is returned.

Type

int

page_token

Optional. If present, then retrieve the next batch of results from the preceding call to this method. page_token must be the value of next_page_token from the previous response. The values of all other method parameters, must be identical to those in the previous call.

Type

str

order_by

Optional. A comma separated list of fields specifying the sorting order of the results. The default order is ascending. Add ” desc” after the field name to indicate descending order. Redundant space characters are ignored. For example, ” foo , bar desc “.

Type

str

class google.cloud.asset_v1p1beta1.types.SearchAllResourcesResponse(mapping=None, **kwargs)[source]

Search all resources response.

results

A list of resource that match the search query.

Type

Sequence[StandardResourceMetadata]

next_page_token

If there are more results than those appearing in this response, then next_page_token is included. To get the next set of results, call this method again using the value of next_page_token as page_token.

Type

str

class google.cloud.asset_v1p1beta1.types.SearchAllIamPoliciesRequest(mapping=None, **kwargs)[source]

Search all IAM policies request.

scope

Required. The relative name of an asset. The search is limited to the resources within the scope. The allowed value must be:

  • Organization number (such as “organizations/123”)

  • Folder number(such as “folders/1234”)

  • Project number (such as “projects/12345”)

  • Project id (such as “projects/abc”)

Type

str

query

Optional. The query statement. Examples:

  • “policy:myuser@mydomain.com”

  • “policy:(myuser@mydomain.com viewer)”.

Type

str

page_size

Optional. The page size for search result pagination. Page size is capped at 500 even if a larger value is given. If set to zero, server will pick an appropriate default. Returned results may be fewer than requested. When this happens, there could be more results as long as next_page_token is returned.

Type

int

page_token

Optional. If present, retrieve the next batch of results from the preceding call to this method. page_token must be the value of next_page_token from the previous response. The values of all other method parameters must be identical to those in the previous call.

Type

str

class google.cloud.asset_v1p1beta1.types.SearchAllIamPoliciesResponse(mapping=None, **kwargs)[source]

Search all IAM policies response.

results

A list of IamPolicy that match the search query. Related information such as the associated resource is returned along with the policy.

Type

Sequence[IamPolicySearchResult]

next_page_token

Set if there are more results than those appearing in this response; to get the next set of results, call this method again, using this value as the page_token.

Type

str