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 v1p2beta1 API

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

Bases: proto.message.Message

An asset in Google Cloud. An asset can be any resource in the Google Cloud resource hierarchy, a resource outside the Google Cloud resource hierarchy (such as Google Kubernetes Engine clusters and objects), or a policy (e.g. IAM policy). See Supported asset types for more information.

This message has oneof fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.

name

The full name of the asset. 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 the asset. Example: compute.googleapis.com/Disk

See Supported asset types for more information.

Type

str

resource

A representation of the resource.

Type

google.cloud.asset_v1p2beta1.types.Resource

iam_policy

A representation of the IAM policy set on a Google Cloud resource. There can be a maximum of one IAM policy set on any given resource. In addition, IAM policies inherit their granted access scope from any policies set on parent resources in the resource hierarchy. Therefore, the effectively policy is the union of both the policy set on this resource and each policy set on all of the resource’s ancestry resource levels in the hierarchy. See this topic for more information.

Type

google.iam.v1.policy_pb2.Policy

ancestors

The ancestry path of an asset in Google Cloud resource hierarchy, represented as a list of relative resource names. An ancestry path starts with the closest ancestor in the hierarchy and ends at root. If the asset is a project, folder, or organization, the ancestry path starts from the asset itself.

Example: ["projects/123456789", "folders/5432", "organizations/1234"]

Type

MutableSequence[str]

access_policy

Please also refer to the access policy user guide.

This field is a member of oneof access_context_policy.

Type

google.identity.accesscontextmanager.v1.access_policy_pb2.AccessPolicy

access_level

Please also refer to the access level user guide.

This field is a member of oneof access_context_policy.

Type

google.identity.accesscontextmanager.v1.access_level_pb2.AccessLevel

service_perimeter

Please also refer to the service perimeter user guide.

This field is a member of oneof access_context_policy.

Type

google.identity.accesscontextmanager.v1.service_perimeter_pb2.ServicePerimeter

org_policy

A representation of an organization policy. There can be more than one organization policy with different constraints set on a given resource.

Type

MutableSequence[google.cloud.orgpolicy.v1.orgpolicy_pb2.Policy]

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

Bases: proto.message.Message

Batch get assets history response.

assets

A list of assets with valid time windows.

Type

MutableSequence[google.cloud.asset_v1p2beta1.types.TemporalAsset]

class google.cloud.asset_v1p2beta1.types.ContentType(value)[source]

Bases: proto.enums.Enum

Asset content type.

Values:
CONTENT_TYPE_UNSPECIFIED (0):

Unspecified content type.

RESOURCE (1):

Resource metadata.

IAM_POLICY (2):

The actual IAM policy set on a resource.

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

Bases: proto.message.Message

Create asset feed request.

parent

Required. The name of the project/folder/organization where this feed should be created in. It can only be an organization number (such as “organizations/123”), a folder number (such as “folders/123”), a project ID (such as “projects/my-project-id”), or a project number (such as “projects/12345”).

Type

str

feed_id

Required. This is the client-assigned asset feed identifier and it needs to be unique under a specific parent project/folder/organization.

Type

str

feed

Required. The feed details. The field name must be empty and it will be generated in the format of: projects/project_number/feeds/feed_id folders/folder_number/feeds/feed_id organizations/organization_number/feeds/feed_id

Type

google.cloud.asset_v1p2beta1.types.Feed

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

Bases: proto.message.Message

name

Required. The name of the feed and it must be in the format of: projects/project_number/feeds/feed_id folders/folder_number/feeds/feed_id organizations/organization_number/feeds/feed_id

Type

str

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

Bases: proto.message.Message

The export asset response. This message is returned by the [google.longrunning.Operations.GetOperation][google.longrunning.Operations.GetOperation] method in the returned [google.longrunning.Operation.response][google.longrunning.Operation.response] field.

read_time

Time the snapshot was taken.

Type

google.protobuf.timestamp_pb2.Timestamp

output_config

Output configuration indicating where the results were output to.

Type

google.cloud.asset_v1p2beta1.types.OutputConfig

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

Bases: proto.message.Message

An asset feed used to export asset updates to a destinations. An asset feed filter controls what updates are exported. The asset feed must be created within a project, organization, or folder. Supported destinations are:

Cloud Pub/Sub topics.

name

Required. The format will be projects/{project_number}/feeds/{client-assigned_feed_identifier} or folders/{folder_number}/feeds/{client-assigned_feed_identifier} or organizations/{organization_number}/feeds/{client-assigned_feed_identifier}

The client-assigned feed identifier must be unique within the parent project/folder/organization.

Type

str

asset_names

A list of the full names of the assets to receive updates. You must specify either or both of asset_names and asset_types. Only asset updates matching specified asset_names or asset_types are exported to the feed. For example: //compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1. See Resource Names for more info.

Type

MutableSequence[str]

asset_types

A list of types of the assets to receive updates. You must specify either or both of asset_names and asset_types. Only asset updates matching specified asset_names or asset_types are exported to the feed. For example: “compute.googleapis.com/Disk” See Introduction to Cloud Asset Inventory for all supported asset types.

Type

MutableSequence[str]

content_type

Asset content type. If not specified, no content but the asset name and type will be returned.

Type

google.cloud.asset_v1p2beta1.types.ContentType

feed_output_config

Required. Feed output configuration defining where the asset updates are published to.

Type

google.cloud.asset_v1p2beta1.types.FeedOutputConfig

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

Bases: proto.message.Message

Output configuration for asset feed destination.

pubsub_destination

Destination on Pub/Sub.

This field is a member of oneof destination.

Type

google.cloud.asset_v1p2beta1.types.PubsubDestination

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

Bases: proto.message.Message

A Cloud Storage location.

uri

The URI of the Cloud Storage object. It’s the same URI that is used by gsutil. For example: “gs://bucket_name/object_name”. See Viewing and Editing Object Metadata for more information.

This field is a member of oneof object_uri.

Type

str

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

Bases: proto.message.Message

Get asset feed request.

name

Required. The name of the Feed and it must be in the format of: projects/project_number/feeds/feed_id folders/folder_number/feeds/feed_id organizations/organization_number/feeds/feed_id

Type

str

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

Bases: proto.message.Message

List asset feeds request.

parent

Required. The parent project/folder/organization whose feeds are to be listed. It can only be using project/folder/organization number (such as “folders/12345”)”, or a project ID (such as “projects/my-project-id”).

Type

str

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

Bases: proto.message.Message

feeds

A list of feeds.

Type

MutableSequence[google.cloud.asset_v1p2beta1.types.Feed]

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

Bases: proto.message.Message

Output configuration for export assets destination.

gcs_destination

Destination on Cloud Storage.

This field is a member of oneof destination.

Type

google.cloud.asset_v1p2beta1.types.GcsDestination

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

Bases: proto.message.Message

A Pub/Sub destination.

topic

The name of the Pub/Sub topic to publish to. For example: projects/PROJECT_ID/topics/TOPIC_ID.

Type

str

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

Bases: proto.message.Message

A representation of a Google Cloud resource.

version

The API version. Example: v1

Type

str

discovery_document_uri

The URL of the discovery document containing the resource’s JSON schema. Example: https://www.googleapis.com/discovery/v1/apis/compute/v1/rest

This value is unspecified for resources that do not have an API based on a discovery document, such as Cloud Bigtable.

Type

str

discovery_name

The JSON schema name listed in the discovery document. Example: Project

This value is unspecified for resources that do not have an API based on a discovery document, such as Cloud Bigtable.

Type

str

resource_url

The REST URL for accessing the resource. An HTTP GET request using this URL returns the resource itself. Example: https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123

This value is unspecified for resources without a REST API.

Type

str

parent

The full name of the immediate parent of this resource. See Resource Names for more information.

For Google Cloud assets, this value is the parent resource defined in the IAM policy hierarchy. Example: //cloudresourcemanager.googleapis.com/projects/my_project_123

For third-party assets, this field may be set differently.

Type

str

data

The content of the resource, in which some sensitive fields are removed and may not be present.

Type

google.protobuf.struct_pb2.Struct

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

Bases: proto.message.Message

An asset in Google Cloud and its temporal metadata, including the time window when it was observed and its status during that window.

window

The time window when the asset data and state was observed.

Type

google.cloud.asset_v1p2beta1.types.TimeWindow

deleted

Whether the asset has been deleted or not.

Type

bool

asset

An asset in Google Cloud.

Type

google.cloud.asset_v1p2beta1.types.Asset

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

Bases: proto.message.Message

A time window specified by its start_time and end_time.

start_time

Start time of the time window (exclusive).

Type

google.protobuf.timestamp_pb2.Timestamp

end_time

End time of the time window (inclusive). If not specified, the current timestamp is used instead.

Type

google.protobuf.timestamp_pb2.Timestamp

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

Bases: proto.message.Message

Update asset feed request.

feed

Required. The new values of feed details. It must match an existing feed and the field name must be in the format of: projects/project_number/feeds/feed_id or folders/folder_number/feeds/feed_id or organizations/organization_number/feeds/feed_id.

Type

google.cloud.asset_v1p2beta1.types.Feed

update_mask

Required. Only updates the feed fields indicated by this mask. The field mask must not be empty, and it must not contain fields that are immutable or only set by the server.

Type

google.protobuf.field_mask_pb2.FieldMask