google-apis-cloudasset_v1p5beta1 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.yardopts +13 -0
- data/CHANGELOG.md +7 -0
- data/LICENSE.md +202 -0
- data/OVERVIEW.md +96 -0
- data/lib/google-apis-cloudasset_v1p5beta1.rb +15 -0
- data/lib/google/apis/cloudasset_v1p5beta1.rb +36 -0
- data/lib/google/apis/cloudasset_v1p5beta1/classes.rb +1626 -0
- data/lib/google/apis/cloudasset_v1p5beta1/gem_version.rb +28 -0
- data/lib/google/apis/cloudasset_v1p5beta1/representations.rb +538 -0
- data/lib/google/apis/cloudasset_v1p5beta1/service.rb +128 -0
- metadata +76 -0
@@ -0,0 +1,128 @@
|
|
1
|
+
# Copyright 2020 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
|
+
require 'google/apis/core/base_service'
|
16
|
+
require 'google/apis/core/json_representation'
|
17
|
+
require 'google/apis/core/hashable'
|
18
|
+
require 'google/apis/errors'
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Apis
|
22
|
+
module CloudassetV1p5beta1
|
23
|
+
# Cloud Asset API
|
24
|
+
#
|
25
|
+
# The cloud asset API manages the history and inventory of cloud resources.
|
26
|
+
#
|
27
|
+
# @example
|
28
|
+
# require 'google/apis/cloudasset_v1p5beta1'
|
29
|
+
#
|
30
|
+
# Cloudasset = Google::Apis::CloudassetV1p5beta1 # Alias the module
|
31
|
+
# service = Cloudasset::CloudAssetService.new
|
32
|
+
#
|
33
|
+
# @see https://cloud.google.com/asset-inventory/docs/quickstart
|
34
|
+
class CloudAssetService < Google::Apis::Core::BaseService
|
35
|
+
# @return [String]
|
36
|
+
# API key. Your API key identifies your project and provides you with API access,
|
37
|
+
# quota, and reports. Required unless you provide an OAuth 2.0 token.
|
38
|
+
attr_accessor :key
|
39
|
+
|
40
|
+
# @return [String]
|
41
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
42
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
43
|
+
attr_accessor :quota_user
|
44
|
+
|
45
|
+
def initialize
|
46
|
+
super('https://cloudasset.googleapis.com/', '',
|
47
|
+
client_name: 'google-apis-cloudasset_v1p5beta1',
|
48
|
+
client_version: Google::Apis::CloudassetV1p5beta1::GEM_VERSION)
|
49
|
+
@batch_path = 'batch'
|
50
|
+
end
|
51
|
+
|
52
|
+
# Lists assets with time and resource types and returns paged results in
|
53
|
+
# response.
|
54
|
+
# @param [String] parent
|
55
|
+
# Required. Name of the organization or project the assets belong to. Format: "
|
56
|
+
# organizations/[organization-number]" (such as "organizations/123"), "projects/[
|
57
|
+
# project-number]" (such as "projects/my-project-id"), or "projects/[project-id]"
|
58
|
+
# (such as "projects/12345").
|
59
|
+
# @param [Array<String>, String] asset_types
|
60
|
+
# A list of asset types to take a snapshot for. For example: "compute.googleapis.
|
61
|
+
# com/Disk". Regular expression is also supported. For example: * "compute.
|
62
|
+
# googleapis.com.*" snapshots resources whose asset type starts with "compute.
|
63
|
+
# googleapis.com". * ".*Instance" snapshots resources whose asset type ends with
|
64
|
+
# "Instance". * ".*Instance.*" snapshots resources whose asset type contains "
|
65
|
+
# Instance". See [RE2](https://github.com/google/re2/wiki/Syntax) for all
|
66
|
+
# supported regular expression syntax. If the regular expression does not match
|
67
|
+
# any supported asset type, an INVALID_ARGUMENT error will be returned. If
|
68
|
+
# specified, only matching assets will be returned, otherwise, it will snapshot
|
69
|
+
# all asset types. See [Introduction to Cloud Asset Inventory](https://cloud.
|
70
|
+
# google.com/asset-inventory/docs/overview) for all supported asset types.
|
71
|
+
# @param [String] content_type
|
72
|
+
# Asset content type. If not specified, no content but the asset name will be
|
73
|
+
# returned.
|
74
|
+
# @param [Fixnum] page_size
|
75
|
+
# The maximum number of assets to be returned in a single response. Default is
|
76
|
+
# 100, minimum is 1, and maximum is 1000.
|
77
|
+
# @param [String] page_token
|
78
|
+
# The `next_page_token` returned from the previous `ListAssetsResponse`, or
|
79
|
+
# unspecified for the first `ListAssetsRequest`. It is a continuation of a prior
|
80
|
+
# `ListAssets` call, and the API should return the next page of assets.
|
81
|
+
# @param [String] read_time
|
82
|
+
# Timestamp to take an asset snapshot. This can only be set to a timestamp
|
83
|
+
# between the current time and the current time minus 35 days (inclusive). If
|
84
|
+
# not specified, the current time will be used. Due to delays in resource data
|
85
|
+
# collection and indexing, there is a volatile window during which running the
|
86
|
+
# same query may get different results.
|
87
|
+
# @param [String] fields
|
88
|
+
# Selector specifying which fields to include in a partial response.
|
89
|
+
# @param [String] quota_user
|
90
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
91
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
92
|
+
# @param [Google::Apis::RequestOptions] options
|
93
|
+
# Request-specific options
|
94
|
+
#
|
95
|
+
# @yield [result, err] Result & error if block supplied
|
96
|
+
# @yieldparam result [Google::Apis::CloudassetV1p5beta1::ListAssetsResponse] parsed result object
|
97
|
+
# @yieldparam err [StandardError] error object if request failed
|
98
|
+
#
|
99
|
+
# @return [Google::Apis::CloudassetV1p5beta1::ListAssetsResponse]
|
100
|
+
#
|
101
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
102
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
103
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
104
|
+
def list_assets(parent, asset_types: nil, content_type: nil, page_size: nil, page_token: nil, read_time: nil, fields: nil, quota_user: nil, options: nil, &block)
|
105
|
+
command = make_simple_command(:get, 'v1p5beta1/{+parent}/assets', options)
|
106
|
+
command.response_representation = Google::Apis::CloudassetV1p5beta1::ListAssetsResponse::Representation
|
107
|
+
command.response_class = Google::Apis::CloudassetV1p5beta1::ListAssetsResponse
|
108
|
+
command.params['parent'] = parent unless parent.nil?
|
109
|
+
command.query['assetTypes'] = asset_types unless asset_types.nil?
|
110
|
+
command.query['contentType'] = content_type unless content_type.nil?
|
111
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
112
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
113
|
+
command.query['readTime'] = read_time unless read_time.nil?
|
114
|
+
command.query['fields'] = fields unless fields.nil?
|
115
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
116
|
+
execute_or_queue_command(command, &block)
|
117
|
+
end
|
118
|
+
|
119
|
+
protected
|
120
|
+
|
121
|
+
def apply_command_defaults(command)
|
122
|
+
command.query['key'] = key unless key.nil?
|
123
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
124
|
+
end
|
125
|
+
end
|
126
|
+
end
|
127
|
+
end
|
128
|
+
end
|
metadata
ADDED
@@ -0,0 +1,76 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: google-apis-cloudasset_v1p5beta1
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Google LLC
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2021-01-08 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: google-apis-core
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0.1'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0.1'
|
27
|
+
description: This is the simple REST client for Cloud Asset API V1p5beta1. Simple
|
28
|
+
REST clients are Ruby client libraries that provide access to Google services via
|
29
|
+
their HTTP REST API endpoints. These libraries are generated and updated automatically
|
30
|
+
based on the discovery documents published by the service, and they handle most
|
31
|
+
concerns such as authentication, pagination, retry, timeouts, and logging. You can
|
32
|
+
use this client to access the Cloud Asset API, but note that some services may provide
|
33
|
+
a separate modern client that is easier to use.
|
34
|
+
email: googleapis-packages@google.com
|
35
|
+
executables: []
|
36
|
+
extensions: []
|
37
|
+
extra_rdoc_files: []
|
38
|
+
files:
|
39
|
+
- ".yardopts"
|
40
|
+
- CHANGELOG.md
|
41
|
+
- LICENSE.md
|
42
|
+
- OVERVIEW.md
|
43
|
+
- lib/google-apis-cloudasset_v1p5beta1.rb
|
44
|
+
- lib/google/apis/cloudasset_v1p5beta1.rb
|
45
|
+
- lib/google/apis/cloudasset_v1p5beta1/classes.rb
|
46
|
+
- lib/google/apis/cloudasset_v1p5beta1/gem_version.rb
|
47
|
+
- lib/google/apis/cloudasset_v1p5beta1/representations.rb
|
48
|
+
- lib/google/apis/cloudasset_v1p5beta1/service.rb
|
49
|
+
homepage: https://github.com/google/google-api-ruby-client
|
50
|
+
licenses:
|
51
|
+
- Apache-2.0
|
52
|
+
metadata:
|
53
|
+
bug_tracker_uri: https://github.com/googleapis/google-api-ruby-client/issues
|
54
|
+
changelog_uri: https://github.com/googleapis/google-api-ruby-client/tree/master/generated/google-apis-cloudasset_v1p5beta1/CHANGELOG.md
|
55
|
+
documentation_uri: https://googleapis.dev/ruby/google-apis-cloudasset_v1p5beta1/v0.1.0
|
56
|
+
source_code_uri: https://github.com/googleapis/google-api-ruby-client/tree/master/generated/google-apis-cloudasset_v1p5beta1
|
57
|
+
post_install_message:
|
58
|
+
rdoc_options: []
|
59
|
+
require_paths:
|
60
|
+
- lib
|
61
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
62
|
+
requirements:
|
63
|
+
- - ">="
|
64
|
+
- !ruby/object:Gem::Version
|
65
|
+
version: '2.4'
|
66
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
67
|
+
requirements:
|
68
|
+
- - ">="
|
69
|
+
- !ruby/object:Gem::Version
|
70
|
+
version: '0'
|
71
|
+
requirements: []
|
72
|
+
rubygems_version: 3.1.4
|
73
|
+
signing_key:
|
74
|
+
specification_version: 4
|
75
|
+
summary: Simple REST client for Cloud Asset API V1p5beta1
|
76
|
+
test_files: []
|