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

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

TimeWindow

deleted

If the asset is deleted or not.

Type

bool

asset

Asset.

Type

Asset

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

A time window of (start_time, end_time].

start_time

Start time of the time window (exclusive).

Type

Timestamp

end_time

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

Type

Timestamp

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

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

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

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

Representation of a 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. 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

Struct

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

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

Feed

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

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

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, **kwargs)[source]
feeds

A list of feeds.

Type

Sequence[Feed]

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

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

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

FieldMask

class google.cloud.asset_v1p2beta1.types.DeleteFeedRequest(mapping=None, **kwargs)[source]
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.OutputConfig(mapping=None, **kwargs)[source]

Output configuration for export assets destination.

gcs_destination

Destination on Cloud Storage.

Type

GcsDestination

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

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.

Type

str

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

A Cloud Pubsub destination.

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

Output configuration for asset feed destination.

pubsub_destination

Destination on Cloud Pubsub.

Type

PubsubDestination

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

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

ContentType

feed_output_config

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

Type

FeedOutputConfig