Skip to content

Commit a4b52a2

Browse files
Google APIsCopybara-Service
authored andcommitted
Synchronize new proto/yaml changes.
PiperOrigin-RevId: 209040362
1 parent d777a7f commit a4b52a2

File tree

5 files changed

+607
-0
lines changed

5 files changed

+607
-0
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
common:
2+
api_name: cloudasset
3+
api_version: v1beta1
4+
organization_name: google-cloud
5+
proto_deps:
6+
- name: google-common-protos
7+
src_proto_paths:
8+
- v1beta1
9+
service_yaml: asset_v1beta1.yaml
10+
gapic_yaml: v1beta1/cloudasset_gapic.yaml
11+
artifacts:
12+
- name: gapic_config
13+
type: GAPIC_CONFIG
14+
- name: java_gapic
15+
type: GAPIC
16+
language: JAVA
17+
- name: python_gapic
18+
type: GAPIC
19+
language: PYTHON
20+
- name: nodejs_gapic
21+
type: GAPIC
22+
language: NODEJS
23+
- name: php_gapic
24+
type: GAPIC
25+
language: PHP
26+
- name: go_gapic
27+
type: GAPIC
28+
language: GO
29+
- name: ruby_gapic
30+
type: GAPIC
31+
language: RUBY
32+
- name: csharp_gapic
33+
type: GAPIC
34+
language: CSHARP
Lines changed: 147 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,147 @@
1+
type: google.api.Service
2+
config_version: 3
3+
name: cloudasset.googleapis.com
4+
title: Cloud Asset API
5+
6+
apis:
7+
- name: google.cloud.asset.v1beta1.AssetService
8+
9+
documentation:
10+
summary: The cloud asset API manages the history and inventory of cloud resources.
11+
overview: |-
12+
# Cloud Asset API
13+
14+
The Cloud Asset API keeps a 5-week history of Google Cloud Platform (GCP)
15+
asset metadata, and allows GCP users to download a dump of all asset
16+
metadata for the resource types listed below within an organization or a
17+
project at a given timestamp.
18+
19+
## API reference pages
20+
21+
<a href="rest/index.html">REST API documentation</a>
22+
23+
<a href="rpc/index.html">RPC API documentation</a>
24+
25+
## Currently supported resource types
26+
27+
The Cloud Asset API currently supports the following resource types and the
28+
[Identity and Access Management (IAM)
29+
Policy](https://cloud.google.com/iam/reference/rest/v1/Policy) in GCP:
30+
31+
[Cloud Resource
32+
Manager](https://cloudresourcemanager.googleapis.com/$discovery/rest)
33+
34+
* `google.cloud.resourcemanager.Organization`
35+
36+
* `google.cloud.resourcemanager.Folder`
37+
38+
* `google.cloud.resourcemanager.Project`
39+
40+
[Compute
41+
Engine](https://www.googleapis.com/discovery/v1/apis/compute/v1/rest)
42+
43+
* `google.compute.Autoscaler`
44+
45+
* `google.compute.BackendBucket`
46+
47+
* `google.compute.BackendService`
48+
49+
* `google.compute.Disk`
50+
51+
* `google.compute.Firewall`
52+
53+
* `google.compute.HealthCheck`
54+
55+
* `google.compute.HttpHealthCheck`
56+
57+
* `google.compute.HttpsHealthCheck`
58+
59+
* `google.compute.Image`
60+
61+
* `google.compute.Instance`
62+
63+
* `google.compute.InstanceGroup`
64+
65+
* `google.compute.InstanceTemplate`
66+
67+
* `google.compute.License`
68+
69+
* `google.compute.Network`
70+
71+
* `google.compute.Snapshot`
72+
73+
* `google.compute.SslCertificate`
74+
75+
* `google.compute.Subnetwork`
76+
77+
* `google.compute.TargetHttpProxy`
78+
79+
* `google.compute.TargetHttpsProxy`
80+
81+
* `google.compute.TargetInstance`
82+
83+
* `google.compute.TargetPool`
84+
85+
* `google.compute.TargetTcpProxy`
86+
87+
* `google.compute.TargetSslProxy`
88+
89+
* `google.compute.TargetVpnGateway`
90+
91+
* `google.compute.UrlMap`
92+
93+
[App Engine](https://www.googleapis.com/discovery/v1/apis/appengine/v1/rest)
94+
95+
* `google.appengine.Application`
96+
97+
* `google.appengine.Service`
98+
99+
* `google.appengine.Version`
100+
101+
[Cloud
102+
Billing](https://www.googleapis.com/discovery/v1/apis/cloudbilling/v1/rest)
103+
104+
* `google.cloudbilling.BillingAccount`
105+
106+
[Cloud
107+
Storage](https://www.googleapis.com/discovery/v1/apis/storage/v1/rest)
108+
109+
* `google.storage.Bucket`
110+
111+
[Cloud DNS](https://www.googleapis.com/discovery/v1/apis/dns/v1alpha2/rest)
112+
113+
* `google.dns.ManagedZone`
114+
115+
* `google.dns.Policy`
116+
117+
backend:
118+
rules:
119+
- selector: google.longrunning.Operations.GetOperation
120+
deadline: 60.0
121+
- selector: google.cloud.asset.v1beta1.AssetService.ExportAssets
122+
deadline: 600.0
123+
- selector: google.cloud.asset.v1beta1.AssetService.BatchGetAssetsHistory
124+
deadline: 600.0
125+
126+
http:
127+
rules:
128+
- selector: google.longrunning.Operations.GetOperation
129+
get: '/v1alpha1/{name=projects/*/operations/*/*}'
130+
additional_bindings:
131+
- get: '/v1alpha1/{name=organizations/*/operations/*/*}'
132+
133+
- get: '/v1alpha2/{name=projects/*/operations/*/*}'
134+
135+
- get: '/v1alpha2/{name=organizations/*/operations/*/*}'
136+
137+
- get: '/v1beta1/{name=projects/*/operations/*/*}'
138+
139+
- get: '/v1beta1/{name=organizations/*/operations/*/*}'
140+
141+
142+
authentication:
143+
rules:
144+
- selector: '*'
145+
oauth:
146+
canonical_scopes: |-
147+
https://www.googleapis.com/auth/cloud-platform
Lines changed: 160 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,160 @@
1+
// Copyright 2018 Google LLC
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
syntax = "proto3";
16+
17+
package google.cloud.asset.v1beta1;
18+
19+
import "google/api/annotations.proto";
20+
import "google/cloud/asset/v1beta1/assets.proto";
21+
import "google/longrunning/operations.proto";
22+
import "google/protobuf/timestamp.proto";
23+
24+
option csharp_namespace = "Google.Cloud.Asset.V1Beta1";
25+
option go_package = "google.golang.org/genproto/googleapis/cloud/asset/v1beta1;asset";
26+
option java_multiple_files = true;
27+
option java_outer_classname = "AssetServiceProto";
28+
option java_package = "com.google.cloud.asset.v1beta1";
29+
option php_namespace = "Google\\Cloud\\Asset\\V1beta1";
30+
31+
32+
// Asset service definition.
33+
service AssetService {
34+
// Exports assets with time and resource types to a given Google Cloud Storage
35+
// location. The output format is newline delimited JSON.
36+
// This API implements the [google.longrunning.Operation][google.longrunning.Operation] API allowing users
37+
// to keep track of the export.
38+
rpc ExportAssets(ExportAssetsRequest) returns (google.longrunning.Operation) {
39+
option (google.api.http) = {
40+
post: "/v1beta1/{parent=projects/*}:exportAssets"
41+
body: "*"
42+
additional_bindings {
43+
post: "/v1beta1/{parent=organizations/*}:exportAssets"
44+
body: "*"
45+
}
46+
};
47+
}
48+
49+
// Batch gets assets update history that overlaps a time window.
50+
// For RESOURCE content, this API outputs history with asset in both
51+
// non-delete or deleted status.
52+
// For IAM_POLICY content, this API only outputs history when asset and its
53+
// attached IAM POLICY both exist. So there may be gaps in the output history.
54+
rpc BatchGetAssetsHistory(BatchGetAssetsHistoryRequest) returns (BatchGetAssetsHistoryResponse) {
55+
option (google.api.http) = {
56+
get: "/v1beta1/{parent=projects/*}:batchGetAssetsHistory"
57+
additional_bindings {
58+
get: "/v1beta1/{parent=organizations/*}:batchGetAssetHistory"
59+
}
60+
};
61+
}
62+
}
63+
64+
// Export asset request.
65+
message ExportAssetsRequest {
66+
// Required. The relative name of the root asset. It can only be an
67+
// organization number (e.g. "organizations/123") or a project number
68+
// (e.g. "projects/12345").
69+
string parent = 1;
70+
71+
// Timestamp to take an asset snapshot. This can only be current or past
72+
// time. If not specified, the current time will be used. Due to delays in
73+
// resource data collection and indexing, there is a volatile window during
74+
// which running the same query may get different results.
75+
google.protobuf.Timestamp read_time = 2;
76+
77+
// A list of asset types to take a snapshot for. Example:
78+
// "google.compute.disk". If specified, only matching assets will be returned.
79+
repeated string asset_types = 3;
80+
81+
// A list of asset content types. If specified, only matching content will be
82+
// returned. Otherwise, no content but the asset name will be returned.
83+
repeated ContentType content_types = 4;
84+
85+
// Required. Output configuration indicating where the results will be output
86+
// to. All results will be in newline delimited JSON format.
87+
OutputConfig output_config = 5;
88+
}
89+
90+
// The export asset response. This message is returned by the
91+
// [google.longrunning.Operations.GetOperation][google.longrunning.Operations.GetOperation] method in the returned
92+
// [google.longrunning.Operation.response][google.longrunning.Operation.response] field.
93+
message ExportAssetsResponse {
94+
// Required. Time the snapshot was taken.
95+
google.protobuf.Timestamp read_time = 1;
96+
97+
// Required. Output configuration indicating where the results were output to.
98+
// All results are in JSON format.
99+
OutputConfig output_config = 2;
100+
}
101+
102+
// Batch get assets history request.
103+
message BatchGetAssetsHistoryRequest {
104+
// Required. The relative name of the root asset. It can only be an
105+
// organization ID (e.g. "organizations/123") or a project ID
106+
// (e.g. "projects/12345").
107+
string parent = 1;
108+
109+
// A list of the full names of the assets. See:
110+
// https://cloud.google.com/apis/design/resource_names#full_resource_name
111+
// Example:
112+
// "//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1".
113+
//
114+
// The request becomes a no-op if the asset name list is empty.
115+
repeated string asset_names = 2;
116+
117+
// Required. The content type.
118+
ContentType content_type = 3;
119+
120+
// Required. The time window for the asset history. The returned results
121+
// contain all temporal assets whose time window overlap with
122+
// read_time_window.
123+
TimeWindow read_time_window = 4;
124+
}
125+
126+
// Batch get assets history response.
127+
message BatchGetAssetsHistoryResponse {
128+
// A list of assets with valid time windows.
129+
repeated TemporalAsset assets = 1;
130+
}
131+
132+
// Output configuration for export assets destination.
133+
message OutputConfig {
134+
// Asset export destination.
135+
oneof destination {
136+
// Destination on Google Cloud Storage (GCS).
137+
GcsDestination gcs_destination = 1;
138+
}
139+
}
140+
141+
// A Google Cloud Storage (GCS) location.
142+
message GcsDestination {
143+
// The path of the GCS objects. It's the same path that is used by gsutil, for
144+
// example: "gs://bucket_name/object_path". See:
145+
// https://cloud.google.com/storage/docs/viewing-editing-metadata for more
146+
// information.
147+
string uri = 1;
148+
}
149+
150+
// Asset content type.
151+
enum ContentType {
152+
// Unspecified content type.
153+
CONTENT_TYPE_UNSPECIFIED = 0;
154+
155+
// Resource metadata.
156+
RESOURCE = 1;
157+
158+
// The actual IAM policy set on a resource.
159+
IAM_POLICY = 2;
160+
}

0 commit comments

Comments
 (0)