diff --git a/google/cloud/asset/asset_v1beta1.yaml b/google/cloud/asset/asset_v1beta1.yaml index 73f0ba39..d1edc78b 100644 --- a/google/cloud/asset/asset_v1beta1.yaml +++ b/google/cloud/asset/asset_v1beta1.yaml @@ -11,115 +11,13 @@ documentation: overview: |- # Cloud Asset API - The Cloud Asset API keeps a 5-week history of Google Cloud Platform (GCP) - asset metadata, and allows GCP users to download a dump of all asset - metadata for the resource types listed below within an organization or a - project at a given timestamp. + The Cloud Asset API keeps a history of Google Cloud Platform (GCP) asset + metadata, and allows GCP users to download a dump of all asset metadata for + the resource types listed below within an organization or a project at a + given timestamp. - ## API reference pages - - REST API documentation - - RPC API documentation - - ## Currently supported resource types - - The Cloud Asset API currently supports the following GCP resource types and - the [Identity and Access Management (IAM) - Policy](https://cloud.google.com/iam/reference/rest/v1/Policy) on them: - - [Cloud Resource - Manager](https://cloudresourcemanager.googleapis.com/$discovery/rest) - - * `google.cloud.resourcemanager.Organization` - - * `google.cloud.resourcemanager.Folder` - - * `google.cloud.resourcemanager.Project` - - [Compute - Engine](https://www.googleapis.com/discovery/v1/apis/compute/v1/rest) - - * `google.compute.Autoscaler` - - * `google.compute.BackendBucket` - - * `google.compute.BackendService` - - * `google.compute.Disk` - - * `google.compute.Firewall` - - * `google.compute.HealthCheck` - - * `google.compute.HttpHealthCheck` - - * `google.compute.HttpsHealthCheck` - - * `google.compute.Image` - - * `google.compute.Instance` - - * `google.compute.InstanceGroup` - - * `google.compute.InstanceTemplate` - - * `google.compute.License` - - * `google.compute.Network` - - * `google.compute.Snapshot` - - * `google.compute.SslCertificate` - - * `google.compute.Subnetwork` - - * `google.compute.TargetHttpProxy` - - * `google.compute.TargetHttpsProxy` - - * `google.compute.TargetInstance` - - * `google.compute.TargetPool` - - * `google.compute.TargetTcpProxy` - - * `google.compute.TargetSslProxy` - - * `google.compute.TargetVpnGateway` - - * `google.compute.UrlMap` - - [App Engine](https://www.googleapis.com/discovery/v1/apis/appengine/v1/rest) - - * `google.appengine.Application` - - * `google.appengine.Service` - - * `google.appengine.Version` - - [Cloud - Billing](https://www.googleapis.com/discovery/v1/apis/cloudbilling/v1/rest) - - * `google.cloud.billing.BillingAccount` - - [Cloud - Storage](https://www.googleapis.com/discovery/v1/apis/storage/v1/rest) - - * `google.cloud.storage.Bucket` - - [Cloud DNS](https://www.googleapis.com/discovery/v1/apis/dns/v1alpha2/rest) - - * `google.cloud.dns.ManagedZone` - - * `google.cloud.dns.Policy` - - [Cloud - Spanner](https://www.googleapis.com/discovery/v1/apis/spanner/v1/rest) - - * `google.spanner.Instance` - - * `google.spanner.Database` + Read more documents here: + https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview backend: rules: @@ -143,8 +41,12 @@ http: - get: '/v1beta1/{name=projects/*/operations/*/*}' + - get: '/v1beta1/{name=folders/*/operations/*/*}' + - get: '/v1beta1/{name=organizations/*/operations/*/*}' + - get: '/v1/{name=*/*/operations/*/*}' + authentication: rules: diff --git a/google/cloud/asset/v1beta1/asset_service.proto b/google/cloud/asset/v1beta1/asset_service.proto index aaaa0ba2..16e0789e 100644 --- a/google/cloud/asset/v1beta1/asset_service.proto +++ b/google/cloud/asset/v1beta1/asset_service.proto @@ -40,6 +40,10 @@ service AssetService { option (google.api.http) = { post: "/v1beta1/{parent=projects/*}:exportAssets" body: "*" + additional_bindings { + post: "/v1beta1/{parent=folders/*}:exportAssets" + body: "*" + } additional_bindings { post: "/v1beta1/{parent=organizations/*}:exportAssets" body: "*" @@ -64,20 +68,24 @@ service AssetService { // Export asset request. message ExportAssetsRequest { - // Required. The relative name of the root asset. This can only be an organization - // number (such as "organizations/123"), a project ID (such as - // "projects/my-project-id"), or a project number (such as "projects/12345"). + // Required. The relative name of the root asset. This can only be an + // organization number (such as "organizations/123"), a project ID (such as + // "projects/my-project-id"), a project number (such as "projects/12345"), or + // a folder number (such as "folders/123"). string parent = 1; - // Timestamp to take an asset snapshot. This can only be set to a timestamp in - // the past or of the current time. If not specified, the current time will be - // used. Due to delays in resource data collection and indexing, there is a - // volatile window during which running the same query may get different - // results. + // Timestamp to take an asset snapshot. This can only be set to a timestamp + // between 2018-10-02 UTC (inclusive) and the current time. If not specified, + // the current time will be used. Due to delays in resource data collection + // and indexing, there is a volatile window during which running the same + // query may get different results. google.protobuf.Timestamp read_time = 2; // A list of asset types of which to take a snapshot for. For example: - // "google.compute.disk". If specified, only matching assets will be returned. + // "google.compute.Disk". If specified, only matching assets will be returned. + // See [Introduction to Cloud Asset + // Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview) + // for all supported asset types. repeated string asset_types = 3; // Asset content type. If not specified, no content but the asset name will be @@ -120,9 +128,12 @@ message BatchGetAssetsHistoryRequest { // Required. The content type. ContentType content_type = 3; - // Required. The time window for the asset history. The start time is - // required. The returned results contain all temporal assets whose time - // window overlap with read_time_window. + // Optional. The time window for the asset history. Both start_time and + // end_time are optional and if set, it must be after 2018-10-02 UTC. If + // end_time is not set, it is default to current timestamp. If start_time is + // not set, the snapshot of the assets at end_time will be returned. The + // returned results contain all temporal assets whose time window overlap with + // read_time_window. TimeWindow read_time_window = 4; } @@ -143,10 +154,15 @@ message OutputConfig { // A Cloud Storage location. message GcsDestination { - // The path of the Cloud Storage objects. It's the same path that is used by - // gsutil. For example: "gs://bucket_name/object_path". See [Viewing and Editing Object Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata) - // for more information. - string uri = 1; + // Required. + oneof object_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](https://cloud.google.com/storage/docs/viewing-editing-metadata) + // for more information. + string uri = 1; + } } // Asset content type. diff --git a/google/cloud/asset/v1beta1/assets.proto b/google/cloud/asset/v1beta1/assets.proto index 5d339a20..cde70cdd 100644 --- a/google/cloud/asset/v1beta1/assets.proto +++ b/google/cloud/asset/v1beta1/assets.proto @@ -44,12 +44,12 @@ message TemporalAsset { Asset asset = 3; } -// A time window of [start_time, end_time). +// A time window of (start_time, end_time]. message TimeWindow { - // Start time of the time window (inclusive). + // Start time of the time window (exclusive). google.protobuf.Timestamp start_time = 1; - // End time of the time window (exclusive). + // End time of the time window (inclusive). // Current timestamp if not specified. google.protobuf.Timestamp end_time = 2; } @@ -62,7 +62,7 @@ message Asset { // for more information. string name = 1; - // Type of the asset. Example: "google.compute.disk". + // Type of the asset. Example: "google.compute.Disk". string asset_type = 2; // Representation of the resource. diff --git a/google/cloud/asset/v1beta1/cloudasset_gapic.yaml b/google/cloud/asset/v1beta1/cloudasset_gapic.yaml index d1df7b13..83890597 100644 --- a/google/cloud/asset/v1beta1/cloudasset_gapic.yaml +++ b/google/cloud/asset/v1beta1/cloudasset_gapic.yaml @@ -46,8 +46,8 @@ interfaces: retry_codes_def: - name: idempotent retry_codes: - - UNAVAILABLE - DEADLINE_EXCEEDED + - UNAVAILABLE - name: non_idempotent retry_codes: [] # Definition for retry/backoff parameters. @@ -75,6 +75,7 @@ interfaces: # # required_fields - Fields that are always required for a request to be # valid. + # # resource_name_treatment - An enum that specifies how to treat the resource # name formats defined in the field_name_patterns and # response_field_name_patterns fields.