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.IamPolicySearchResult(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

The result for an IAM policy search.

resource

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

Type

str

project

The project that the associated Google Cloud resource belongs to, in the form of projects/{project_number}. If an IAM policy is set on a resource – such as a Compute Engine instance or a 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 attached to the specified 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 constraint on policies (e.g. an empty query), this contains all the bindings.

Type

google.iam.v1.policy_pb2.Policy

explanation

Explanation about the IAM policy search result. It contains additional information that explains why the search result matches the query.

Type

google.cloud.asset_v1p1beta1.types.IamPolicySearchResult.Explanation

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

Bases: proto.message.Message

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:). Example 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

MutableMapping[str, google.cloud.asset_v1p1beta1.types.Permissions]

class MatchedPermissionsEntry(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Bases: proto.message.Message

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

Bases: proto.message.Message

IAM permissions.

permissions

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

Type

MutableSequence[str]

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

Bases: proto.message.Message

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, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Search all IAM policies response.

results

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

Type

MutableSequence[google.cloud.asset_v1p1beta1.types.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

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

Bases: proto.message.Message

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

MutableSequence[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, location DESC , name.

Type

str

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

Bases: proto.message.Message

Search all resources response.

results

A list of resource that match the search query.

Type

MutableSequence[google.cloud.asset_v1p1beta1.types.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.StandardResourceMetadata(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

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

MutableSequence[str]

location

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

Type

str

labels

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

Type

MutableMapping[str, str]

network_tags

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

Type

MutableSequence[str]

class LabelsEntry(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Bases: proto.message.Message