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

Cloud asset. This includes all Google Cloud Platform resources, Cloud IAM policies, and other non-GCP assets.

name

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

Type

str

asset_type

Type of the asset. Example: “compute.googleapis.com/Disk”.

Type

str

resource

Representation of the resource.

Type

google.cloud.asset_v1p2beta1.types.Resource

iam_policy

Representation of the actual Cloud IAM policy set on a cloud resource. For each resource, there must be at most one Cloud IAM policy set on it.

Type

google.iam.v1.policy_pb2.Policy

ancestors

Asset’s ancestry path in Cloud Resource Manager (CRM) hierarchy, represented as a list of relative resource names. Ancestry path starts with the closest CRM ancestor and ends at root. If the asset is a CRM project/folder/organization, this starts from the asset itself.

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

Type

Sequence[str]

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

Bases: proto.enums.Enum

Asset content type.

CONTENT_TYPE_UNSPECIFIED = 0
IAM_POLICY = 2
RESOURCE = 1
class google.cloud.asset_v1p2beta1.types.CreateFeedRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Create asset feed request. .. attribute:: 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.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 and 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

Sequence[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 and 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

Sequence[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. .. attribute:: pubsub_destination

Destination on Cloud Pubsub.

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. .. attribute:: 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.

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. .. attribute:: 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. .. attribute:: 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

Sequence[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. .. attribute:: gcs_destination

Destination on Cloud Storage.

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 Cloud Pubsub destination. .. attribute:: topic

The name of the Cloud 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

Representation of a cloud resource. .. attribute:: version

The API version. Example: “v1”.

type

str

discovery_document_uri

The URL of the discovery document containing the resource’s JSON schema. For example: "https://www.googleapis.com/discovery/v1/apis/compute/v1/rest". It will be left unspecified for resources without a discovery-based API, such as Cloud Bigtable.

Type

str

discovery_name

The JSON schema name listed in the discovery document. Example: “Project”. It will be left unspecified for resources (such as Cloud Bigtable) without a discovery-based API.

Type

str

resource_url

The REST URL for accessing the resource. An HTTP GET operation using this URL returns the resource itself. Example: https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123. It will be left 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 GCP assets, it is the parent resource defined in the Cloud IAM policy hierarchy. For example: "//cloudresourcemanager.googleapis.com/projects/my_project_123".

For third-party assets, it is up to the users to define.

Type

str

data

The content of the resource, in which some sensitive fields are scrubbed away 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

Temporal asset. In addition to the asset, the temporal asset includes the status of the asset and valid from and to time of it.

window

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

Type

google.cloud.asset_v1p2beta1.types.TimeWindow

deleted

If the asset is deleted or not.

Type

bool

asset

Asset.

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 of (start_time, end_time]. .. attribute:: start_time

Start time of the time window (exclusive).

type

google.protobuf.timestamp_pb2.Timestamp

end_time

End time of the time window (inclusive). Current timestamp if not specified.

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. .. attribute:: 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