google-cloud-secret_manager-v1 0.2.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/AUTHENTICATION.md +6 -6
- data/README.md +48 -1
- data/lib/google-cloud-secret_manager-v1.rb +21 -1
- data/lib/google/cloud/secret_manager/v1.rb +16 -0
- data/lib/google/cloud/secret_manager/v1/secret_manager_service.rb +36 -1
- data/lib/google/cloud/secret_manager/v1/secret_manager_service/client.rb +461 -393
- data/lib/google/cloud/secret_manager/v1/secret_manager_service/credentials.rb +1 -1
- data/lib/google/cloud/secret_manager/v1/secret_manager_service/paths.rb +6 -6
- data/lib/google/cloud/secret_manager/v1/version.rb +1 -1
- data/lib/google/cloud/secretmanager/v1/service_services_pb.rb +1 -2
- data/proto_docs/google/api/resource.rb +12 -12
- data/proto_docs/google/cloud/secretmanager/v1/resources.rb +55 -55
- data/proto_docs/google/cloud/secretmanager/v1/service.rb +102 -98
- data/proto_docs/google/iam/v1/iam_policy.rb +21 -20
- data/proto_docs/google/iam/v1/options.rb +40 -0
- data/proto_docs/google/iam/v1/policy.rb +126 -34
- data/proto_docs/google/protobuf/empty.rb +2 -2
- data/proto_docs/google/protobuf/field_mask.rb +22 -30
- data/proto_docs/google/protobuf/timestamp.rb +24 -20
- data/proto_docs/google/type/expr.rb +52 -0
- metadata +44 -9
- data/lib/google/cloud/common_resources_pb.rb +0 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c56e848f11b4a29f377ddaf2abfa57696a2e81a0cd28e37b2e31ac69541e54bd
|
4
|
+
data.tar.gz: e36e4a3e29fa7ae09e9fc3b2fd80269f3f696529ea600d1de432c240d03ee645
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f2f2e3677d8423f6d4abf63b5b9d073a815ec6aa29d6e0ca97b8b58e266e99ecfc94906b8fb53ccc2763335221041260a861c6c0d17e3adbccbd9dcd4e8f1aa7
|
7
|
+
data.tar.gz: 39ba848ca08e7e059d8419b414080a066f406b24f5d5162e272c6a7ff944e157460939ff29a808ad57c758789622b03db5bfc9a55ef53b934736e9cbd217813c
|
data/AUTHENTICATION.md
CHANGED
@@ -27,7 +27,7 @@ export SECRET_MANAGER_CREDENTIALS=path/to/keyfile.json
|
|
27
27
|
```ruby
|
28
28
|
require "google/cloud/secret_manager/v1"
|
29
29
|
|
30
|
-
client = Google::Cloud::SecretManager::V1::SecretManagerService::Client.new
|
30
|
+
client = ::Google::Cloud::SecretManager::V1::SecretManagerService::Client.new
|
31
31
|
```
|
32
32
|
|
33
33
|
## Credential Lookup
|
@@ -64,7 +64,7 @@ containers where writing files is difficult or not encouraged.
|
|
64
64
|
|
65
65
|
The environment variables that google-cloud-secret_manager-v1
|
66
66
|
checks for credentials are configured on the service Credentials class (such as
|
67
|
-
{Google::Cloud::SecretManager::V1::SecretManagerService::Credentials}):
|
67
|
+
{::Google::Cloud::SecretManager::V1::SecretManagerService::Credentials}):
|
68
68
|
|
69
69
|
1. `SECRET_MANAGER_CREDENTIALS` - Path to JSON file, or JSON contents
|
70
70
|
2. `SECRET_MANAGER_KEYFILE` - Path to JSON file, or JSON contents
|
@@ -77,7 +77,7 @@ require "google/cloud/secret_manager/v1"
|
|
77
77
|
|
78
78
|
ENV["SECRET_MANAGER_CREDENTIALS"] = "path/to/keyfile.json"
|
79
79
|
|
80
|
-
client = Google::Cloud::SecretManager::V1::SecretManagerService::Client.new
|
80
|
+
client = ::Google::Cloud::SecretManager::V1::SecretManagerService::Client.new
|
81
81
|
```
|
82
82
|
|
83
83
|
### Configuration
|
@@ -88,7 +88,7 @@ environment variables. Either on an individual client initialization:
|
|
88
88
|
```ruby
|
89
89
|
require "google/cloud/secret_manager/v1"
|
90
90
|
|
91
|
-
client = Google::Cloud::SecretManager::V1::SecretManagerService::Client.new do |config|
|
91
|
+
client = ::Google::Cloud::SecretManager::V1::SecretManagerService::Client.new do |config|
|
92
92
|
config.credentials = "path/to/keyfile.json"
|
93
93
|
end
|
94
94
|
```
|
@@ -98,11 +98,11 @@ Or configured globally for all clients:
|
|
98
98
|
```ruby
|
99
99
|
require "google/cloud/secret_manager/v1"
|
100
100
|
|
101
|
-
Google::Cloud::SecretManager::V1::SecretManagerService::Client.configure do |config|
|
101
|
+
::Google::Cloud::SecretManager::V1::SecretManagerService::Client.configure do |config|
|
102
102
|
config.credentials = "path/to/keyfile.json"
|
103
103
|
end
|
104
104
|
|
105
|
-
client = Google::Cloud::SecretManager::V1::SecretManagerService::Client.new
|
105
|
+
client = ::Google::Cloud::SecretManager::V1::SecretManagerService::Client.new
|
106
106
|
```
|
107
107
|
|
108
108
|
### Cloud SDK
|
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Secret Manager V1
|
1
|
+
# Ruby Client for the Secret Manager V1 API
|
2
2
|
|
3
3
|
API Client library for the Secret Manager V1 API
|
4
4
|
|
@@ -12,6 +12,53 @@ https://github.com/googleapis/google-cloud-ruby
|
|
12
12
|
$ gem install google-cloud-secret_manager-v1
|
13
13
|
```
|
14
14
|
|
15
|
+
## Before You Begin
|
16
|
+
|
17
|
+
In order to use this library, you first need to go through the following steps:
|
18
|
+
|
19
|
+
1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project)
|
20
|
+
1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project)
|
21
|
+
1. {file:AUTHENTICATION.md Set up authentication.}
|
22
|
+
|
23
|
+
## Quick Start
|
24
|
+
|
25
|
+
```ruby
|
26
|
+
require "google/cloud/secret_manager/v1"
|
27
|
+
|
28
|
+
client = ::Google::Cloud::SecretManager::V1::SecretManagerService::Client.new
|
29
|
+
request = my_create_request
|
30
|
+
response = client.list_secrets request
|
31
|
+
```
|
32
|
+
|
33
|
+
View the [Client Library Documentation](https://googleapis.dev/ruby/google-cloud-secret_manager-v1/latest)
|
34
|
+
for class and method documentation.
|
35
|
+
|
36
|
+
## Enabling Logging
|
37
|
+
|
38
|
+
To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
|
39
|
+
The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/stdlib/libdoc/logger/rdoc/Logger.html) as shown below,
|
40
|
+
or a [`Google::Cloud::Logging::Logger`](https://googleapis.dev/ruby/google-cloud-logging/latest)
|
41
|
+
that will write logs to [Cloud Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb)
|
42
|
+
and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
|
43
|
+
|
44
|
+
Configuring a Ruby stdlib logger:
|
45
|
+
|
46
|
+
```ruby
|
47
|
+
require "logger"
|
48
|
+
|
49
|
+
module MyLogger
|
50
|
+
LOGGER = Logger.new $stderr, level: Logger::WARN
|
51
|
+
def logger
|
52
|
+
LOGGER
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
# Define a gRPC module-level logger method before grpc/logconfig.rb loads.
|
57
|
+
module GRPC
|
58
|
+
extend MyLogger
|
59
|
+
end
|
60
|
+
```
|
61
|
+
|
15
62
|
## Supported Ruby Versions
|
16
63
|
|
17
64
|
This library is supported on Ruby 2.4+.
|
@@ -1 +1,21 @@
|
|
1
|
-
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2020 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
# This gem does not autoload during Bundler.require. To load this gem,
|
20
|
+
# issue explicit require statements for the packages desired, e.g.:
|
21
|
+
# require "google/cloud/secret_manager/v1"
|
@@ -17,3 +17,19 @@
|
|
17
17
|
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
18
|
|
19
19
|
require "google/cloud/secret_manager/v1/secret_manager_service"
|
20
|
+
require "google/cloud/secret_manager/v1/version"
|
21
|
+
|
22
|
+
module Google
|
23
|
+
module Cloud
|
24
|
+
module SecretManager
|
25
|
+
##
|
26
|
+
# To load this package, including all its services, and instantiate a client:
|
27
|
+
#
|
28
|
+
# require "google/cloud/secret_manager/v1"
|
29
|
+
# client = ::Google::Cloud::SecretManager::V1::SecretManagerService::Client.new
|
30
|
+
#
|
31
|
+
module V1
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
@@ -16,5 +16,40 @@
|
|
16
16
|
|
17
17
|
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
18
|
|
19
|
-
require "
|
19
|
+
require "gapic/common"
|
20
|
+
require "gapic/config"
|
21
|
+
require "gapic/config/method"
|
22
|
+
|
23
|
+
require "google/cloud/secret_manager/v1/version"
|
24
|
+
|
20
25
|
require "google/cloud/secret_manager/v1/secret_manager_service/credentials"
|
26
|
+
require "google/cloud/secret_manager/v1/secret_manager_service/paths"
|
27
|
+
require "google/cloud/secret_manager/v1/secret_manager_service/client"
|
28
|
+
|
29
|
+
module Google
|
30
|
+
module Cloud
|
31
|
+
module SecretManager
|
32
|
+
module V1
|
33
|
+
##
|
34
|
+
# Secret Manager Service
|
35
|
+
#
|
36
|
+
# Manages secrets and operations using those secrets. Implements a REST
|
37
|
+
# model with the following objects:
|
38
|
+
#
|
39
|
+
# * {::Google::Cloud::SecretManager::V1::Secret Secret}
|
40
|
+
# * {::Google::Cloud::SecretManager::V1::SecretVersion SecretVersion}
|
41
|
+
#
|
42
|
+
# To load this service and instantiate a client:
|
43
|
+
#
|
44
|
+
# require "google/cloud/secret_manager/v1/secret_manager_service"
|
45
|
+
# client = ::Google::Cloud::SecretManager::V1::SecretManagerService::Client.new
|
46
|
+
#
|
47
|
+
module SecretManagerService
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
helper_path = ::File.join __dir__, "secret_manager_service", "helpers.rb"
|
55
|
+
require "google/cloud/secret_manager/v1/secret_manager_service/helpers" if ::File.file? helper_path
|
@@ -16,15 +16,8 @@
|
|
16
16
|
|
17
17
|
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
18
|
|
19
|
-
require "gapic/common"
|
20
|
-
require "gapic/config"
|
21
|
-
require "gapic/config/method"
|
22
|
-
|
23
19
|
require "google/cloud/errors"
|
24
|
-
require "google/cloud/secret_manager/v1/version"
|
25
20
|
require "google/cloud/secretmanager/v1/service_pb"
|
26
|
-
require "google/cloud/secret_manager/v1/secret_manager_service/credentials"
|
27
|
-
require "google/cloud/secret_manager/v1/secret_manager_service/paths"
|
28
21
|
|
29
22
|
module Google
|
30
23
|
module Cloud
|
@@ -39,8 +32,8 @@ module Google
|
|
39
32
|
# Manages secrets and operations using those secrets. Implements a REST
|
40
33
|
# model with the following objects:
|
41
34
|
#
|
42
|
-
# * {Google::Cloud::SecretManager::V1::Secret Secret}
|
43
|
-
# * {Google::Cloud::SecretManager::V1::SecretVersion SecretVersion}
|
35
|
+
# * {::Google::Cloud::SecretManager::V1::Secret Secret}
|
36
|
+
# * {::Google::Cloud::SecretManager::V1::SecretVersion SecretVersion}
|
44
37
|
#
|
45
38
|
class Client
|
46
39
|
include Paths
|
@@ -51,15 +44,15 @@ module Google
|
|
51
44
|
##
|
52
45
|
# Configure the SecretManagerService Client class.
|
53
46
|
#
|
54
|
-
# See {Google::Cloud::SecretManager::V1::SecretManagerService::Client::Configuration}
|
47
|
+
# See {::Google::Cloud::SecretManager::V1::SecretManagerService::Client::Configuration}
|
55
48
|
# for a description of the configuration fields.
|
56
49
|
#
|
57
50
|
# ## Example
|
58
51
|
#
|
59
52
|
# To modify the configuration for all SecretManagerService clients:
|
60
53
|
#
|
61
|
-
# Google::Cloud::SecretManager::V1::SecretManagerService::Client.configure do |config|
|
62
|
-
# config.timeout =
|
54
|
+
# ::Google::Cloud::SecretManager::V1::SecretManagerService::Client.configure do |config|
|
55
|
+
# config.timeout = 10.0
|
63
56
|
# end
|
64
57
|
#
|
65
58
|
# @yield [config] Configure the Client client.
|
@@ -127,7 +120,7 @@ module Google
|
|
127
120
|
# but structural changes (adding new fields, etc.) are not allowed. Structural changes
|
128
121
|
# should be made on {Client.configure}.
|
129
122
|
#
|
130
|
-
# See {Google::Cloud::SecretManager::V1::SecretManagerService::Client::Configuration}
|
123
|
+
# See {::Google::Cloud::SecretManager::V1::SecretManagerService::Client::Configuration}
|
131
124
|
# for a description of the configuration fields.
|
132
125
|
#
|
133
126
|
# @yield [config] Configure the Client client.
|
@@ -148,13 +141,13 @@ module Google
|
|
148
141
|
# To create a new SecretManagerService client with the default
|
149
142
|
# configuration:
|
150
143
|
#
|
151
|
-
# client = Google::Cloud::SecretManager::V1::SecretManagerService::Client.new
|
144
|
+
# client = ::Google::Cloud::SecretManager::V1::SecretManagerService::Client.new
|
152
145
|
#
|
153
146
|
# To create a new SecretManagerService client with a custom
|
154
147
|
# configuration:
|
155
148
|
#
|
156
|
-
# client = Google::Cloud::SecretManager::V1::SecretManagerService::Client.new do |config|
|
157
|
-
# config.timeout =
|
149
|
+
# client = ::Google::Cloud::SecretManager::V1::SecretManagerService::Client.new do |config|
|
150
|
+
# config.timeout = 10.0
|
158
151
|
# end
|
159
152
|
#
|
160
153
|
# @yield [config] Configure the SecretManagerService client.
|
@@ -179,10 +172,11 @@ module Google
|
|
179
172
|
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
180
173
|
credentials = Credentials.new credentials, scope: @config.scope
|
181
174
|
end
|
182
|
-
@quota_project_id =
|
175
|
+
@quota_project_id = @config.quota_project
|
176
|
+
@quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
|
183
177
|
|
184
|
-
@secret_manager_service_stub = Gapic::ServiceStub.new(
|
185
|
-
Google::Cloud::SecretManager::V1::SecretManagerService::Stub,
|
178
|
+
@secret_manager_service_stub = ::Gapic::ServiceStub.new(
|
179
|
+
::Google::Cloud::SecretManager::V1::SecretManagerService::Stub,
|
186
180
|
credentials: credentials,
|
187
181
|
endpoint: @config.endpoint,
|
188
182
|
channel_args: @config.channel_args,
|
@@ -193,48 +187,55 @@ module Google
|
|
193
187
|
# Service calls
|
194
188
|
|
195
189
|
##
|
196
|
-
# Lists {Google::Cloud::SecretManager::V1::Secret Secrets}.
|
190
|
+
# Lists {::Google::Cloud::SecretManager::V1::Secret Secrets}.
|
197
191
|
#
|
198
192
|
# @overload list_secrets(request, options = nil)
|
199
|
-
#
|
200
|
-
#
|
201
|
-
#
|
193
|
+
# Pass arguments to `list_secrets` via a request object, either of type
|
194
|
+
# {::Google::Cloud::SecretManager::V1::ListSecretsRequest} or an equivalent Hash.
|
195
|
+
#
|
196
|
+
# @param request [::Google::Cloud::SecretManager::V1::ListSecretsRequest, ::Hash]
|
197
|
+
# A request object representing the call parameters. Required. To specify no
|
198
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
199
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
202
200
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
203
201
|
#
|
204
202
|
# @overload list_secrets(parent: nil, page_size: nil, page_token: nil)
|
205
|
-
#
|
203
|
+
# Pass arguments to `list_secrets` via keyword arguments. Note that at
|
204
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
205
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
206
|
+
#
|
207
|
+
# @param parent [::String]
|
206
208
|
# Required. The resource name of the project associated with the
|
207
|
-
# {Google::Cloud::SecretManager::V1::Secret Secrets}, in the format `projects/*`.
|
208
|
-
# @param page_size [Integer]
|
209
|
+
# {::Google::Cloud::SecretManager::V1::Secret Secrets}, in the format `projects/*`.
|
210
|
+
# @param page_size [::Integer]
|
209
211
|
# Optional. The maximum number of results to be returned in a single page. If
|
210
212
|
# set to 0, the server decides the number of results to return. If the
|
211
213
|
# number is greater than 25000, it is capped at 25000.
|
212
|
-
# @param page_token [String]
|
214
|
+
# @param page_token [::String]
|
213
215
|
# Optional. Pagination token, returned earlier via
|
214
|
-
# {Google::Cloud::SecretManager::V1::ListSecretsResponse#next_page_token ListSecretsResponse.next_page_token}.
|
215
|
-
#
|
216
|
+
# {::Google::Cloud::SecretManager::V1::ListSecretsResponse#next_page_token ListSecretsResponse.next_page_token}.
|
216
217
|
#
|
217
218
|
# @yield [response, operation] Access the result along with the RPC operation
|
218
|
-
# @yieldparam response [Gapic::PagedEnumerable
|
219
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
219
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecretManager::V1::Secret>]
|
220
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
220
221
|
#
|
221
|
-
# @return [Gapic::PagedEnumerable
|
222
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::SecretManager::V1::Secret>]
|
222
223
|
#
|
223
|
-
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
224
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
224
225
|
#
|
225
226
|
def list_secrets request, options = nil
|
226
|
-
raise ArgumentError, "request must be provided" if request.nil?
|
227
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
227
228
|
|
228
|
-
request = Gapic::Protobuf.coerce request, to: Google::Cloud::SecretManager::V1::ListSecretsRequest
|
229
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecretManager::V1::ListSecretsRequest
|
229
230
|
|
230
231
|
# Converts hash and nil to an options object
|
231
|
-
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
232
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
232
233
|
|
233
234
|
# Customize the options with defaults
|
234
235
|
metadata = @config.rpcs.list_secrets.metadata.to_h
|
235
236
|
|
236
237
|
# Set x-goog-api-client and x-goog-user-project headers
|
237
|
-
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
238
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
238
239
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
239
240
|
gapic_version: ::Google::Cloud::SecretManager::V1::VERSION
|
240
241
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
@@ -252,54 +253,65 @@ module Google
|
|
252
253
|
retry_policy: @config.retry_policy
|
253
254
|
|
254
255
|
@secret_manager_service_stub.call_rpc :list_secrets, request, options: options do |response, operation|
|
255
|
-
response = Gapic::PagedEnumerable.new @secret_manager_service_stub, :list_secrets, request, response, operation, options
|
256
|
+
response = ::Gapic::PagedEnumerable.new @secret_manager_service_stub, :list_secrets, request, response, operation, options
|
256
257
|
yield response, operation if block_given?
|
257
258
|
return response
|
258
259
|
end
|
259
|
-
rescue GRPC::BadStatus => e
|
260
|
-
raise Google::Cloud::Error.from_error(e)
|
260
|
+
rescue ::GRPC::BadStatus => e
|
261
|
+
raise ::Google::Cloud::Error.from_error(e)
|
261
262
|
end
|
262
263
|
|
263
264
|
##
|
264
|
-
# Creates a new {Google::Cloud::SecretManager::V1::Secret Secret} containing no {Google::Cloud::SecretManager::V1::SecretVersion SecretVersions}.
|
265
|
+
# Creates a new {::Google::Cloud::SecretManager::V1::Secret Secret} containing no {::Google::Cloud::SecretManager::V1::SecretVersion SecretVersions}.
|
265
266
|
#
|
266
267
|
# @overload create_secret(request, options = nil)
|
267
|
-
#
|
268
|
-
#
|
269
|
-
#
|
268
|
+
# Pass arguments to `create_secret` via a request object, either of type
|
269
|
+
# {::Google::Cloud::SecretManager::V1::CreateSecretRequest} or an equivalent Hash.
|
270
|
+
#
|
271
|
+
# @param request [::Google::Cloud::SecretManager::V1::CreateSecretRequest, ::Hash]
|
272
|
+
# A request object representing the call parameters. Required. To specify no
|
273
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
274
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
270
275
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
271
276
|
#
|
272
277
|
# @overload create_secret(parent: nil, secret_id: nil, secret: nil)
|
273
|
-
#
|
278
|
+
# Pass arguments to `create_secret` via keyword arguments. Note that at
|
279
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
280
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
281
|
+
#
|
282
|
+
# @param parent [::String]
|
274
283
|
# Required. The resource name of the project to associate with the
|
275
|
-
# {Google::Cloud::SecretManager::V1::Secret Secret}, in the format `projects/*`.
|
276
|
-
# @param secret_id [String]
|
284
|
+
# {::Google::Cloud::SecretManager::V1::Secret Secret}, in the format `projects/*`.
|
285
|
+
# @param secret_id [::String]
|
277
286
|
# Required. This must be unique within the project.
|
278
|
-
# @param secret [Google::Cloud::SecretManager::V1::Secret | Hash]
|
279
|
-
# Required. A {Google::Cloud::SecretManager::V1::Secret Secret} with initial field values.
|
280
287
|
#
|
288
|
+
# A secret ID is a string with a maximum length of 255 characters and can
|
289
|
+
# contain uppercase and lowercase letters, numerals, and the hyphen (`-`) and
|
290
|
+
# underscore (`_`) characters.
|
291
|
+
# @param secret [::Google::Cloud::SecretManager::V1::Secret, ::Hash]
|
292
|
+
# Required. A {::Google::Cloud::SecretManager::V1::Secret Secret} with initial field values.
|
281
293
|
#
|
282
294
|
# @yield [response, operation] Access the result along with the RPC operation
|
283
|
-
# @yieldparam response [Google::Cloud::SecretManager::V1::Secret]
|
284
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
295
|
+
# @yieldparam response [::Google::Cloud::SecretManager::V1::Secret]
|
296
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
285
297
|
#
|
286
|
-
# @return [Google::Cloud::SecretManager::V1::Secret]
|
298
|
+
# @return [::Google::Cloud::SecretManager::V1::Secret]
|
287
299
|
#
|
288
|
-
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
300
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
289
301
|
#
|
290
302
|
def create_secret request, options = nil
|
291
|
-
raise ArgumentError, "request must be provided" if request.nil?
|
303
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
292
304
|
|
293
|
-
request = Gapic::Protobuf.coerce request, to: Google::Cloud::SecretManager::V1::CreateSecretRequest
|
305
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecretManager::V1::CreateSecretRequest
|
294
306
|
|
295
307
|
# Converts hash and nil to an options object
|
296
|
-
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
308
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
297
309
|
|
298
310
|
# Customize the options with defaults
|
299
311
|
metadata = @config.rpcs.create_secret.metadata.to_h
|
300
312
|
|
301
313
|
# Set x-goog-api-client and x-goog-user-project headers
|
302
|
-
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
314
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
303
315
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
304
316
|
gapic_version: ::Google::Cloud::SecretManager::V1::VERSION
|
305
317
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
@@ -320,50 +332,56 @@ module Google
|
|
320
332
|
yield response, operation if block_given?
|
321
333
|
return response
|
322
334
|
end
|
323
|
-
rescue GRPC::BadStatus => e
|
324
|
-
raise Google::Cloud::Error.from_error(e)
|
335
|
+
rescue ::GRPC::BadStatus => e
|
336
|
+
raise ::Google::Cloud::Error.from_error(e)
|
325
337
|
end
|
326
338
|
|
327
339
|
##
|
328
|
-
# Creates a new {Google::Cloud::SecretManager::V1::SecretVersion SecretVersion} containing secret data and attaches
|
329
|
-
# it to an existing {Google::Cloud::SecretManager::V1::Secret Secret}.
|
340
|
+
# Creates a new {::Google::Cloud::SecretManager::V1::SecretVersion SecretVersion} containing secret data and attaches
|
341
|
+
# it to an existing {::Google::Cloud::SecretManager::V1::Secret Secret}.
|
330
342
|
#
|
331
343
|
# @overload add_secret_version(request, options = nil)
|
332
|
-
#
|
333
|
-
#
|
334
|
-
#
|
335
|
-
# @param
|
344
|
+
# Pass arguments to `add_secret_version` via a request object, either of type
|
345
|
+
# {::Google::Cloud::SecretManager::V1::AddSecretVersionRequest} or an equivalent Hash.
|
346
|
+
#
|
347
|
+
# @param request [::Google::Cloud::SecretManager::V1::AddSecretVersionRequest, ::Hash]
|
348
|
+
# A request object representing the call parameters. Required. To specify no
|
349
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
350
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
336
351
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
337
352
|
#
|
338
353
|
# @overload add_secret_version(parent: nil, payload: nil)
|
339
|
-
#
|
340
|
-
#
|
341
|
-
#
|
342
|
-
# @param payload [Google::Cloud::SecretManager::V1::SecretPayload | Hash]
|
343
|
-
# Required. The secret payload of the {Google::Cloud::SecretManager::V1::SecretVersion SecretVersion}.
|
354
|
+
# Pass arguments to `add_secret_version` via keyword arguments. Note that at
|
355
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
356
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
344
357
|
#
|
358
|
+
# @param parent [::String]
|
359
|
+
# Required. The resource name of the {::Google::Cloud::SecretManager::V1::Secret Secret} to associate with the
|
360
|
+
# {::Google::Cloud::SecretManager::V1::SecretVersion SecretVersion} in the format `projects/*/secrets/*`.
|
361
|
+
# @param payload [::Google::Cloud::SecretManager::V1::SecretPayload, ::Hash]
|
362
|
+
# Required. The secret payload of the {::Google::Cloud::SecretManager::V1::SecretVersion SecretVersion}.
|
345
363
|
#
|
346
364
|
# @yield [response, operation] Access the result along with the RPC operation
|
347
|
-
# @yieldparam response [Google::Cloud::SecretManager::V1::SecretVersion]
|
348
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
365
|
+
# @yieldparam response [::Google::Cloud::SecretManager::V1::SecretVersion]
|
366
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
349
367
|
#
|
350
|
-
# @return [Google::Cloud::SecretManager::V1::SecretVersion]
|
368
|
+
# @return [::Google::Cloud::SecretManager::V1::SecretVersion]
|
351
369
|
#
|
352
|
-
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
370
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
353
371
|
#
|
354
372
|
def add_secret_version request, options = nil
|
355
|
-
raise ArgumentError, "request must be provided" if request.nil?
|
373
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
356
374
|
|
357
|
-
request = Gapic::Protobuf.coerce request, to: Google::Cloud::SecretManager::V1::AddSecretVersionRequest
|
375
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecretManager::V1::AddSecretVersionRequest
|
358
376
|
|
359
377
|
# Converts hash and nil to an options object
|
360
|
-
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
378
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
361
379
|
|
362
380
|
# Customize the options with defaults
|
363
381
|
metadata = @config.rpcs.add_secret_version.metadata.to_h
|
364
382
|
|
365
383
|
# Set x-goog-api-client and x-goog-user-project headers
|
366
|
-
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
384
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
367
385
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
368
386
|
gapic_version: ::Google::Cloud::SecretManager::V1::VERSION
|
369
387
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
@@ -384,45 +402,52 @@ module Google
|
|
384
402
|
yield response, operation if block_given?
|
385
403
|
return response
|
386
404
|
end
|
387
|
-
rescue GRPC::BadStatus => e
|
388
|
-
raise Google::Cloud::Error.from_error(e)
|
405
|
+
rescue ::GRPC::BadStatus => e
|
406
|
+
raise ::Google::Cloud::Error.from_error(e)
|
389
407
|
end
|
390
408
|
|
391
409
|
##
|
392
|
-
# Gets metadata for a given {Google::Cloud::SecretManager::V1::Secret Secret}.
|
410
|
+
# Gets metadata for a given {::Google::Cloud::SecretManager::V1::Secret Secret}.
|
393
411
|
#
|
394
412
|
# @overload get_secret(request, options = nil)
|
395
|
-
#
|
396
|
-
#
|
397
|
-
#
|
413
|
+
# Pass arguments to `get_secret` via a request object, either of type
|
414
|
+
# {::Google::Cloud::SecretManager::V1::GetSecretRequest} or an equivalent Hash.
|
415
|
+
#
|
416
|
+
# @param request [::Google::Cloud::SecretManager::V1::GetSecretRequest, ::Hash]
|
417
|
+
# A request object representing the call parameters. Required. To specify no
|
418
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
419
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
398
420
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
399
421
|
#
|
400
422
|
# @overload get_secret(name: nil)
|
401
|
-
#
|
402
|
-
#
|
423
|
+
# Pass arguments to `get_secret` via keyword arguments. Note that at
|
424
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
425
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
403
426
|
#
|
427
|
+
# @param name [::String]
|
428
|
+
# Required. The resource name of the {::Google::Cloud::SecretManager::V1::Secret Secret}, in the format `projects/*/secrets/*`.
|
404
429
|
#
|
405
430
|
# @yield [response, operation] Access the result along with the RPC operation
|
406
|
-
# @yieldparam response [Google::Cloud::SecretManager::V1::Secret]
|
407
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
431
|
+
# @yieldparam response [::Google::Cloud::SecretManager::V1::Secret]
|
432
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
408
433
|
#
|
409
|
-
# @return [Google::Cloud::SecretManager::V1::Secret]
|
434
|
+
# @return [::Google::Cloud::SecretManager::V1::Secret]
|
410
435
|
#
|
411
|
-
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
436
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
412
437
|
#
|
413
438
|
def get_secret request, options = nil
|
414
|
-
raise ArgumentError, "request must be provided" if request.nil?
|
439
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
415
440
|
|
416
|
-
request = Gapic::Protobuf.coerce request, to: Google::Cloud::SecretManager::V1::GetSecretRequest
|
441
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecretManager::V1::GetSecretRequest
|
417
442
|
|
418
443
|
# Converts hash and nil to an options object
|
419
|
-
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
444
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
420
445
|
|
421
446
|
# Customize the options with defaults
|
422
447
|
metadata = @config.rpcs.get_secret.metadata.to_h
|
423
448
|
|
424
449
|
# Set x-goog-api-client and x-goog-user-project headers
|
425
|
-
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
450
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
426
451
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
427
452
|
gapic_version: ::Google::Cloud::SecretManager::V1::VERSION
|
428
453
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
@@ -443,47 +468,54 @@ module Google
|
|
443
468
|
yield response, operation if block_given?
|
444
469
|
return response
|
445
470
|
end
|
446
|
-
rescue GRPC::BadStatus => e
|
447
|
-
raise Google::Cloud::Error.from_error(e)
|
471
|
+
rescue ::GRPC::BadStatus => e
|
472
|
+
raise ::Google::Cloud::Error.from_error(e)
|
448
473
|
end
|
449
474
|
|
450
475
|
##
|
451
|
-
# Updates metadata of an existing {Google::Cloud::SecretManager::V1::Secret Secret}.
|
476
|
+
# Updates metadata of an existing {::Google::Cloud::SecretManager::V1::Secret Secret}.
|
452
477
|
#
|
453
478
|
# @overload update_secret(request, options = nil)
|
454
|
-
#
|
455
|
-
#
|
456
|
-
#
|
479
|
+
# Pass arguments to `update_secret` via a request object, either of type
|
480
|
+
# {::Google::Cloud::SecretManager::V1::UpdateSecretRequest} or an equivalent Hash.
|
481
|
+
#
|
482
|
+
# @param request [::Google::Cloud::SecretManager::V1::UpdateSecretRequest, ::Hash]
|
483
|
+
# A request object representing the call parameters. Required. To specify no
|
484
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
485
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
457
486
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
458
487
|
#
|
459
488
|
# @overload update_secret(secret: nil, update_mask: nil)
|
460
|
-
#
|
461
|
-
#
|
462
|
-
#
|
463
|
-
# Required. Specifies the fields to be updated.
|
489
|
+
# Pass arguments to `update_secret` via keyword arguments. Note that at
|
490
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
491
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
464
492
|
#
|
493
|
+
# @param secret [::Google::Cloud::SecretManager::V1::Secret, ::Hash]
|
494
|
+
# Required. {::Google::Cloud::SecretManager::V1::Secret Secret} with updated field values.
|
495
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
496
|
+
# Required. Specifies the fields to be updated.
|
465
497
|
#
|
466
498
|
# @yield [response, operation] Access the result along with the RPC operation
|
467
|
-
# @yieldparam response [Google::Cloud::SecretManager::V1::Secret]
|
468
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
499
|
+
# @yieldparam response [::Google::Cloud::SecretManager::V1::Secret]
|
500
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
469
501
|
#
|
470
|
-
# @return [Google::Cloud::SecretManager::V1::Secret]
|
502
|
+
# @return [::Google::Cloud::SecretManager::V1::Secret]
|
471
503
|
#
|
472
|
-
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
504
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
473
505
|
#
|
474
506
|
def update_secret request, options = nil
|
475
|
-
raise ArgumentError, "request must be provided" if request.nil?
|
507
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
476
508
|
|
477
|
-
request = Gapic::Protobuf.coerce request, to: Google::Cloud::SecretManager::V1::UpdateSecretRequest
|
509
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecretManager::V1::UpdateSecretRequest
|
478
510
|
|
479
511
|
# Converts hash and nil to an options object
|
480
|
-
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
512
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
481
513
|
|
482
514
|
# Customize the options with defaults
|
483
515
|
metadata = @config.rpcs.update_secret.metadata.to_h
|
484
516
|
|
485
517
|
# Set x-goog-api-client and x-goog-user-project headers
|
486
|
-
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
518
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
487
519
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
488
520
|
gapic_version: ::Google::Cloud::SecretManager::V1::VERSION
|
489
521
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
@@ -504,46 +536,53 @@ module Google
|
|
504
536
|
yield response, operation if block_given?
|
505
537
|
return response
|
506
538
|
end
|
507
|
-
rescue GRPC::BadStatus => e
|
508
|
-
raise Google::Cloud::Error.from_error(e)
|
539
|
+
rescue ::GRPC::BadStatus => e
|
540
|
+
raise ::Google::Cloud::Error.from_error(e)
|
509
541
|
end
|
510
542
|
|
511
543
|
##
|
512
|
-
# Deletes a {Google::Cloud::SecretManager::V1::Secret Secret}.
|
544
|
+
# Deletes a {::Google::Cloud::SecretManager::V1::Secret Secret}.
|
513
545
|
#
|
514
546
|
# @overload delete_secret(request, options = nil)
|
515
|
-
#
|
516
|
-
#
|
517
|
-
#
|
547
|
+
# Pass arguments to `delete_secret` via a request object, either of type
|
548
|
+
# {::Google::Cloud::SecretManager::V1::DeleteSecretRequest} or an equivalent Hash.
|
549
|
+
#
|
550
|
+
# @param request [::Google::Cloud::SecretManager::V1::DeleteSecretRequest, ::Hash]
|
551
|
+
# A request object representing the call parameters. Required. To specify no
|
552
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
553
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
518
554
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
519
555
|
#
|
520
556
|
# @overload delete_secret(name: nil)
|
521
|
-
#
|
522
|
-
#
|
523
|
-
#
|
557
|
+
# Pass arguments to `delete_secret` via keyword arguments. Note that at
|
558
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
559
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
524
560
|
#
|
561
|
+
# @param name [::String]
|
562
|
+
# Required. The resource name of the {::Google::Cloud::SecretManager::V1::Secret Secret} to delete in the format
|
563
|
+
# `projects/*/secrets/*`.
|
525
564
|
#
|
526
565
|
# @yield [response, operation] Access the result along with the RPC operation
|
527
|
-
# @yieldparam response [Google::Protobuf::Empty]
|
528
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
566
|
+
# @yieldparam response [::Google::Protobuf::Empty]
|
567
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
529
568
|
#
|
530
|
-
# @return [Google::Protobuf::Empty]
|
569
|
+
# @return [::Google::Protobuf::Empty]
|
531
570
|
#
|
532
|
-
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
571
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
533
572
|
#
|
534
573
|
def delete_secret request, options = nil
|
535
|
-
raise ArgumentError, "request must be provided" if request.nil?
|
574
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
536
575
|
|
537
|
-
request = Gapic::Protobuf.coerce request, to: Google::Cloud::SecretManager::V1::DeleteSecretRequest
|
576
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecretManager::V1::DeleteSecretRequest
|
538
577
|
|
539
578
|
# Converts hash and nil to an options object
|
540
|
-
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
579
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
541
580
|
|
542
581
|
# Customize the options with defaults
|
543
582
|
metadata = @config.rpcs.delete_secret.metadata.to_h
|
544
583
|
|
545
584
|
# Set x-goog-api-client and x-goog-user-project headers
|
546
|
-
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
585
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
547
586
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
548
587
|
gapic_version: ::Google::Cloud::SecretManager::V1::VERSION
|
549
588
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
@@ -564,56 +603,62 @@ module Google
|
|
564
603
|
yield response, operation if block_given?
|
565
604
|
return response
|
566
605
|
end
|
567
|
-
rescue GRPC::BadStatus => e
|
568
|
-
raise Google::Cloud::Error.from_error(e)
|
606
|
+
rescue ::GRPC::BadStatus => e
|
607
|
+
raise ::Google::Cloud::Error.from_error(e)
|
569
608
|
end
|
570
609
|
|
571
610
|
##
|
572
|
-
# Lists {Google::Cloud::SecretManager::V1::SecretVersion SecretVersions}. This call does not return secret
|
611
|
+
# Lists {::Google::Cloud::SecretManager::V1::SecretVersion SecretVersions}. This call does not return secret
|
573
612
|
# data.
|
574
613
|
#
|
575
614
|
# @overload list_secret_versions(request, options = nil)
|
576
|
-
#
|
577
|
-
#
|
578
|
-
#
|
579
|
-
# @param
|
615
|
+
# Pass arguments to `list_secret_versions` via a request object, either of type
|
616
|
+
# {::Google::Cloud::SecretManager::V1::ListSecretVersionsRequest} or an equivalent Hash.
|
617
|
+
#
|
618
|
+
# @param request [::Google::Cloud::SecretManager::V1::ListSecretVersionsRequest, ::Hash]
|
619
|
+
# A request object representing the call parameters. Required. To specify no
|
620
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
621
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
580
622
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
581
623
|
#
|
582
624
|
# @overload list_secret_versions(parent: nil, page_size: nil, page_token: nil)
|
583
|
-
#
|
584
|
-
#
|
585
|
-
#
|
625
|
+
# Pass arguments to `list_secret_versions` via keyword arguments. Note that at
|
626
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
627
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
628
|
+
#
|
629
|
+
# @param parent [::String]
|
630
|
+
# Required. The resource name of the {::Google::Cloud::SecretManager::V1::Secret Secret} associated with the
|
631
|
+
# {::Google::Cloud::SecretManager::V1::SecretVersion SecretVersions} to list, in the format
|
586
632
|
# `projects/*/secrets/*`.
|
587
|
-
# @param page_size [Integer]
|
633
|
+
# @param page_size [::Integer]
|
588
634
|
# Optional. The maximum number of results to be returned in a single page. If
|
589
635
|
# set to 0, the server decides the number of results to return. If the
|
590
636
|
# number is greater than 25000, it is capped at 25000.
|
591
|
-
# @param page_token [String]
|
637
|
+
# @param page_token [::String]
|
592
638
|
# Optional. Pagination token, returned earlier via
|
593
639
|
# ListSecretVersionsResponse.next_page_token][].
|
594
640
|
#
|
595
|
-
#
|
596
641
|
# @yield [response, operation] Access the result along with the RPC operation
|
597
|
-
# @yieldparam response [Gapic::PagedEnumerable
|
598
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
642
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecretManager::V1::SecretVersion>]
|
643
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
599
644
|
#
|
600
|
-
# @return [Gapic::PagedEnumerable
|
645
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::SecretManager::V1::SecretVersion>]
|
601
646
|
#
|
602
|
-
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
647
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
603
648
|
#
|
604
649
|
def list_secret_versions request, options = nil
|
605
|
-
raise ArgumentError, "request must be provided" if request.nil?
|
650
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
606
651
|
|
607
|
-
request = Gapic::Protobuf.coerce request, to: Google::Cloud::SecretManager::V1::ListSecretVersionsRequest
|
652
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecretManager::V1::ListSecretVersionsRequest
|
608
653
|
|
609
654
|
# Converts hash and nil to an options object
|
610
|
-
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
655
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
611
656
|
|
612
657
|
# Customize the options with defaults
|
613
658
|
metadata = @config.rpcs.list_secret_versions.metadata.to_h
|
614
659
|
|
615
660
|
# Set x-goog-api-client and x-goog-user-project headers
|
616
|
-
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
661
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
617
662
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
618
663
|
gapic_version: ::Google::Cloud::SecretManager::V1::VERSION
|
619
664
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
@@ -631,58 +676,62 @@ module Google
|
|
631
676
|
retry_policy: @config.retry_policy
|
632
677
|
|
633
678
|
@secret_manager_service_stub.call_rpc :list_secret_versions, request, options: options do |response, operation|
|
634
|
-
response = Gapic::PagedEnumerable.new @secret_manager_service_stub, :list_secret_versions, request, response, operation, options
|
679
|
+
response = ::Gapic::PagedEnumerable.new @secret_manager_service_stub, :list_secret_versions, request, response, operation, options
|
635
680
|
yield response, operation if block_given?
|
636
681
|
return response
|
637
682
|
end
|
638
|
-
rescue GRPC::BadStatus => e
|
639
|
-
raise Google::Cloud::Error.from_error(e)
|
683
|
+
rescue ::GRPC::BadStatus => e
|
684
|
+
raise ::Google::Cloud::Error.from_error(e)
|
640
685
|
end
|
641
686
|
|
642
687
|
##
|
643
|
-
# Gets metadata for a {Google::Cloud::SecretManager::V1::SecretVersion SecretVersion}.
|
688
|
+
# Gets metadata for a {::Google::Cloud::SecretManager::V1::SecretVersion SecretVersion}.
|
644
689
|
#
|
645
690
|
# `projects/*/secrets/*/versions/latest` is an alias to the `latest`
|
646
|
-
# {Google::Cloud::SecretManager::V1::SecretVersion SecretVersion}.
|
691
|
+
# {::Google::Cloud::SecretManager::V1::SecretVersion SecretVersion}.
|
647
692
|
#
|
648
693
|
# @overload get_secret_version(request, options = nil)
|
649
|
-
#
|
650
|
-
#
|
694
|
+
# Pass arguments to `get_secret_version` via a request object, either of type
|
695
|
+
# {::Google::Cloud::SecretManager::V1::GetSecretVersionRequest} or an equivalent Hash.
|
651
696
|
#
|
652
|
-
#
|
653
|
-
#
|
654
|
-
#
|
697
|
+
# @param request [::Google::Cloud::SecretManager::V1::GetSecretVersionRequest, ::Hash]
|
698
|
+
# A request object representing the call parameters. Required. To specify no
|
699
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
700
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
655
701
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
656
702
|
#
|
657
703
|
# @overload get_secret_version(name: nil)
|
658
|
-
#
|
659
|
-
#
|
704
|
+
# Pass arguments to `get_secret_version` via keyword arguments. Note that at
|
705
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
706
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
707
|
+
#
|
708
|
+
# @param name [::String]
|
709
|
+
# Required. The resource name of the {::Google::Cloud::SecretManager::V1::SecretVersion SecretVersion} in the format
|
660
710
|
# `projects/*/secrets/*/versions/*`.
|
661
711
|
# `projects/*/secrets/*/versions/latest` is an alias to the `latest`
|
662
|
-
# {Google::Cloud::SecretManager::V1::SecretVersion SecretVersion}.
|
663
|
-
#
|
712
|
+
# {::Google::Cloud::SecretManager::V1::SecretVersion SecretVersion}.
|
664
713
|
#
|
665
714
|
# @yield [response, operation] Access the result along with the RPC operation
|
666
|
-
# @yieldparam response [Google::Cloud::SecretManager::V1::SecretVersion]
|
667
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
715
|
+
# @yieldparam response [::Google::Cloud::SecretManager::V1::SecretVersion]
|
716
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
668
717
|
#
|
669
|
-
# @return [Google::Cloud::SecretManager::V1::SecretVersion]
|
718
|
+
# @return [::Google::Cloud::SecretManager::V1::SecretVersion]
|
670
719
|
#
|
671
|
-
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
720
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
672
721
|
#
|
673
722
|
def get_secret_version request, options = nil
|
674
|
-
raise ArgumentError, "request must be provided" if request.nil?
|
723
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
675
724
|
|
676
|
-
request = Gapic::Protobuf.coerce request, to: Google::Cloud::SecretManager::V1::GetSecretVersionRequest
|
725
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecretManager::V1::GetSecretVersionRequest
|
677
726
|
|
678
727
|
# Converts hash and nil to an options object
|
679
|
-
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
728
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
680
729
|
|
681
730
|
# Customize the options with defaults
|
682
731
|
metadata = @config.rpcs.get_secret_version.metadata.to_h
|
683
732
|
|
684
733
|
# Set x-goog-api-client and x-goog-user-project headers
|
685
|
-
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
734
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
686
735
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
687
736
|
gapic_version: ::Google::Cloud::SecretManager::V1::VERSION
|
688
737
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
@@ -703,52 +752,56 @@ module Google
|
|
703
752
|
yield response, operation if block_given?
|
704
753
|
return response
|
705
754
|
end
|
706
|
-
rescue GRPC::BadStatus => e
|
707
|
-
raise Google::Cloud::Error.from_error(e)
|
755
|
+
rescue ::GRPC::BadStatus => e
|
756
|
+
raise ::Google::Cloud::Error.from_error(e)
|
708
757
|
end
|
709
758
|
|
710
759
|
##
|
711
|
-
# Accesses a {Google::Cloud::SecretManager::V1::SecretVersion SecretVersion}. This call returns the secret data.
|
760
|
+
# Accesses a {::Google::Cloud::SecretManager::V1::SecretVersion SecretVersion}. This call returns the secret data.
|
712
761
|
#
|
713
762
|
# `projects/*/secrets/*/versions/latest` is an alias to the `latest`
|
714
|
-
# {Google::Cloud::SecretManager::V1::SecretVersion SecretVersion}.
|
763
|
+
# {::Google::Cloud::SecretManager::V1::SecretVersion SecretVersion}.
|
715
764
|
#
|
716
765
|
# @overload access_secret_version(request, options = nil)
|
717
|
-
#
|
718
|
-
#
|
766
|
+
# Pass arguments to `access_secret_version` via a request object, either of type
|
767
|
+
# {::Google::Cloud::SecretManager::V1::AccessSecretVersionRequest} or an equivalent Hash.
|
719
768
|
#
|
720
|
-
#
|
721
|
-
#
|
722
|
-
#
|
769
|
+
# @param request [::Google::Cloud::SecretManager::V1::AccessSecretVersionRequest, ::Hash]
|
770
|
+
# A request object representing the call parameters. Required. To specify no
|
771
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
772
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
723
773
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
724
774
|
#
|
725
775
|
# @overload access_secret_version(name: nil)
|
726
|
-
#
|
727
|
-
#
|
728
|
-
#
|
776
|
+
# Pass arguments to `access_secret_version` via keyword arguments. Note that at
|
777
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
778
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
729
779
|
#
|
780
|
+
# @param name [::String]
|
781
|
+
# Required. The resource name of the {::Google::Cloud::SecretManager::V1::SecretVersion SecretVersion} in the format
|
782
|
+
# `projects/*/secrets/*/versions/*`.
|
730
783
|
#
|
731
784
|
# @yield [response, operation] Access the result along with the RPC operation
|
732
|
-
# @yieldparam response [Google::Cloud::SecretManager::V1::AccessSecretVersionResponse]
|
733
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
785
|
+
# @yieldparam response [::Google::Cloud::SecretManager::V1::AccessSecretVersionResponse]
|
786
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
734
787
|
#
|
735
|
-
# @return [Google::Cloud::SecretManager::V1::AccessSecretVersionResponse]
|
788
|
+
# @return [::Google::Cloud::SecretManager::V1::AccessSecretVersionResponse]
|
736
789
|
#
|
737
|
-
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
790
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
738
791
|
#
|
739
792
|
def access_secret_version request, options = nil
|
740
|
-
raise ArgumentError, "request must be provided" if request.nil?
|
793
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
741
794
|
|
742
|
-
request = Gapic::Protobuf.coerce request, to: Google::Cloud::SecretManager::V1::AccessSecretVersionRequest
|
795
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecretManager::V1::AccessSecretVersionRequest
|
743
796
|
|
744
797
|
# Converts hash and nil to an options object
|
745
|
-
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
798
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
746
799
|
|
747
800
|
# Customize the options with defaults
|
748
801
|
metadata = @config.rpcs.access_secret_version.metadata.to_h
|
749
802
|
|
750
803
|
# Set x-goog-api-client and x-goog-user-project headers
|
751
|
-
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
804
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
752
805
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
753
806
|
gapic_version: ::Google::Cloud::SecretManager::V1::VERSION
|
754
807
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
@@ -769,52 +822,56 @@ module Google
|
|
769
822
|
yield response, operation if block_given?
|
770
823
|
return response
|
771
824
|
end
|
772
|
-
rescue GRPC::BadStatus => e
|
773
|
-
raise Google::Cloud::Error.from_error(e)
|
825
|
+
rescue ::GRPC::BadStatus => e
|
826
|
+
raise ::Google::Cloud::Error.from_error(e)
|
774
827
|
end
|
775
828
|
|
776
829
|
##
|
777
|
-
# Disables a {Google::Cloud::SecretManager::V1::SecretVersion SecretVersion}.
|
830
|
+
# Disables a {::Google::Cloud::SecretManager::V1::SecretVersion SecretVersion}.
|
778
831
|
#
|
779
|
-
# Sets the {Google::Cloud::SecretManager::V1::SecretVersion#state state} of the {Google::Cloud::SecretManager::V1::SecretVersion SecretVersion} to
|
780
|
-
# {Google::Cloud::SecretManager::V1::SecretVersion::State::DISABLED DISABLED}.
|
832
|
+
# Sets the {::Google::Cloud::SecretManager::V1::SecretVersion#state state} of the {::Google::Cloud::SecretManager::V1::SecretVersion SecretVersion} to
|
833
|
+
# {::Google::Cloud::SecretManager::V1::SecretVersion::State::DISABLED DISABLED}.
|
781
834
|
#
|
782
835
|
# @overload disable_secret_version(request, options = nil)
|
783
|
-
#
|
784
|
-
#
|
836
|
+
# Pass arguments to `disable_secret_version` via a request object, either of type
|
837
|
+
# {::Google::Cloud::SecretManager::V1::DisableSecretVersionRequest} or an equivalent Hash.
|
785
838
|
#
|
786
|
-
#
|
787
|
-
#
|
788
|
-
#
|
839
|
+
# @param request [::Google::Cloud::SecretManager::V1::DisableSecretVersionRequest, ::Hash]
|
840
|
+
# A request object representing the call parameters. Required. To specify no
|
841
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
842
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
789
843
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
790
844
|
#
|
791
845
|
# @overload disable_secret_version(name: nil)
|
792
|
-
#
|
793
|
-
#
|
794
|
-
#
|
846
|
+
# Pass arguments to `disable_secret_version` via keyword arguments. Note that at
|
847
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
848
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
795
849
|
#
|
850
|
+
# @param name [::String]
|
851
|
+
# Required. The resource name of the {::Google::Cloud::SecretManager::V1::SecretVersion SecretVersion} to disable in the format
|
852
|
+
# `projects/*/secrets/*/versions/*`.
|
796
853
|
#
|
797
854
|
# @yield [response, operation] Access the result along with the RPC operation
|
798
|
-
# @yieldparam response [Google::Cloud::SecretManager::V1::SecretVersion]
|
799
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
855
|
+
# @yieldparam response [::Google::Cloud::SecretManager::V1::SecretVersion]
|
856
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
800
857
|
#
|
801
|
-
# @return [Google::Cloud::SecretManager::V1::SecretVersion]
|
858
|
+
# @return [::Google::Cloud::SecretManager::V1::SecretVersion]
|
802
859
|
#
|
803
|
-
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
860
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
804
861
|
#
|
805
862
|
def disable_secret_version request, options = nil
|
806
|
-
raise ArgumentError, "request must be provided" if request.nil?
|
863
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
807
864
|
|
808
|
-
request = Gapic::Protobuf.coerce request, to: Google::Cloud::SecretManager::V1::DisableSecretVersionRequest
|
865
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecretManager::V1::DisableSecretVersionRequest
|
809
866
|
|
810
867
|
# Converts hash and nil to an options object
|
811
|
-
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
868
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
812
869
|
|
813
870
|
# Customize the options with defaults
|
814
871
|
metadata = @config.rpcs.disable_secret_version.metadata.to_h
|
815
872
|
|
816
873
|
# Set x-goog-api-client and x-goog-user-project headers
|
817
|
-
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
874
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
818
875
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
819
876
|
gapic_version: ::Google::Cloud::SecretManager::V1::VERSION
|
820
877
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
@@ -835,52 +892,56 @@ module Google
|
|
835
892
|
yield response, operation if block_given?
|
836
893
|
return response
|
837
894
|
end
|
838
|
-
rescue GRPC::BadStatus => e
|
839
|
-
raise Google::Cloud::Error.from_error(e)
|
895
|
+
rescue ::GRPC::BadStatus => e
|
896
|
+
raise ::Google::Cloud::Error.from_error(e)
|
840
897
|
end
|
841
898
|
|
842
899
|
##
|
843
|
-
# Enables a {Google::Cloud::SecretManager::V1::SecretVersion SecretVersion}.
|
900
|
+
# Enables a {::Google::Cloud::SecretManager::V1::SecretVersion SecretVersion}.
|
844
901
|
#
|
845
|
-
# Sets the {Google::Cloud::SecretManager::V1::SecretVersion#state state} of the {Google::Cloud::SecretManager::V1::SecretVersion SecretVersion} to
|
846
|
-
# {Google::Cloud::SecretManager::V1::SecretVersion::State::ENABLED ENABLED}.
|
902
|
+
# Sets the {::Google::Cloud::SecretManager::V1::SecretVersion#state state} of the {::Google::Cloud::SecretManager::V1::SecretVersion SecretVersion} to
|
903
|
+
# {::Google::Cloud::SecretManager::V1::SecretVersion::State::ENABLED ENABLED}.
|
847
904
|
#
|
848
905
|
# @overload enable_secret_version(request, options = nil)
|
849
|
-
#
|
850
|
-
#
|
906
|
+
# Pass arguments to `enable_secret_version` via a request object, either of type
|
907
|
+
# {::Google::Cloud::SecretManager::V1::EnableSecretVersionRequest} or an equivalent Hash.
|
851
908
|
#
|
852
|
-
#
|
853
|
-
#
|
854
|
-
#
|
909
|
+
# @param request [::Google::Cloud::SecretManager::V1::EnableSecretVersionRequest, ::Hash]
|
910
|
+
# A request object representing the call parameters. Required. To specify no
|
911
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
912
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
855
913
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
856
914
|
#
|
857
915
|
# @overload enable_secret_version(name: nil)
|
858
|
-
#
|
859
|
-
#
|
860
|
-
#
|
916
|
+
# Pass arguments to `enable_secret_version` via keyword arguments. Note that at
|
917
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
918
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
861
919
|
#
|
920
|
+
# @param name [::String]
|
921
|
+
# Required. The resource name of the {::Google::Cloud::SecretManager::V1::SecretVersion SecretVersion} to enable in the format
|
922
|
+
# `projects/*/secrets/*/versions/*`.
|
862
923
|
#
|
863
924
|
# @yield [response, operation] Access the result along with the RPC operation
|
864
|
-
# @yieldparam response [Google::Cloud::SecretManager::V1::SecretVersion]
|
865
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
925
|
+
# @yieldparam response [::Google::Cloud::SecretManager::V1::SecretVersion]
|
926
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
866
927
|
#
|
867
|
-
# @return [Google::Cloud::SecretManager::V1::SecretVersion]
|
928
|
+
# @return [::Google::Cloud::SecretManager::V1::SecretVersion]
|
868
929
|
#
|
869
|
-
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
930
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
870
931
|
#
|
871
932
|
def enable_secret_version request, options = nil
|
872
|
-
raise ArgumentError, "request must be provided" if request.nil?
|
933
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
873
934
|
|
874
|
-
request = Gapic::Protobuf.coerce request, to: Google::Cloud::SecretManager::V1::EnableSecretVersionRequest
|
935
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecretManager::V1::EnableSecretVersionRequest
|
875
936
|
|
876
937
|
# Converts hash and nil to an options object
|
877
|
-
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
938
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
878
939
|
|
879
940
|
# Customize the options with defaults
|
880
941
|
metadata = @config.rpcs.enable_secret_version.metadata.to_h
|
881
942
|
|
882
943
|
# Set x-goog-api-client and x-goog-user-project headers
|
883
|
-
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
944
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
884
945
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
885
946
|
gapic_version: ::Google::Cloud::SecretManager::V1::VERSION
|
886
947
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
@@ -901,54 +962,57 @@ module Google
|
|
901
962
|
yield response, operation if block_given?
|
902
963
|
return response
|
903
964
|
end
|
904
|
-
rescue GRPC::BadStatus => e
|
905
|
-
raise Google::Cloud::Error.from_error(e)
|
965
|
+
rescue ::GRPC::BadStatus => e
|
966
|
+
raise ::Google::Cloud::Error.from_error(e)
|
906
967
|
end
|
907
968
|
|
908
969
|
##
|
909
|
-
# Destroys a {Google::Cloud::SecretManager::V1::SecretVersion SecretVersion}.
|
970
|
+
# Destroys a {::Google::Cloud::SecretManager::V1::SecretVersion SecretVersion}.
|
910
971
|
#
|
911
|
-
# Sets the {Google::Cloud::SecretManager::V1::SecretVersion#state state} of the {Google::Cloud::SecretManager::V1::SecretVersion SecretVersion} to
|
912
|
-
# {Google::Cloud::SecretManager::V1::SecretVersion::State::DESTROYED DESTROYED} and irrevocably destroys the
|
972
|
+
# Sets the {::Google::Cloud::SecretManager::V1::SecretVersion#state state} of the {::Google::Cloud::SecretManager::V1::SecretVersion SecretVersion} to
|
973
|
+
# {::Google::Cloud::SecretManager::V1::SecretVersion::State::DESTROYED DESTROYED} and irrevocably destroys the
|
913
974
|
# secret data.
|
914
975
|
#
|
915
976
|
# @overload destroy_secret_version(request, options = nil)
|
916
|
-
#
|
917
|
-
#
|
977
|
+
# Pass arguments to `destroy_secret_version` via a request object, either of type
|
978
|
+
# {::Google::Cloud::SecretManager::V1::DestroySecretVersionRequest} or an equivalent Hash.
|
918
979
|
#
|
919
|
-
#
|
920
|
-
#
|
921
|
-
#
|
922
|
-
# @param options [Gapic::CallOptions, Hash]
|
980
|
+
# @param request [::Google::Cloud::SecretManager::V1::DestroySecretVersionRequest, ::Hash]
|
981
|
+
# A request object representing the call parameters. Required. To specify no
|
982
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
983
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
923
984
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
924
985
|
#
|
925
986
|
# @overload destroy_secret_version(name: nil)
|
926
|
-
#
|
927
|
-
#
|
928
|
-
#
|
987
|
+
# Pass arguments to `destroy_secret_version` via keyword arguments. Note that at
|
988
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
989
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
929
990
|
#
|
991
|
+
# @param name [::String]
|
992
|
+
# Required. The resource name of the {::Google::Cloud::SecretManager::V1::SecretVersion SecretVersion} to destroy in the format
|
993
|
+
# `projects/*/secrets/*/versions/*`.
|
930
994
|
#
|
931
995
|
# @yield [response, operation] Access the result along with the RPC operation
|
932
|
-
# @yieldparam response [Google::Cloud::SecretManager::V1::SecretVersion]
|
933
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
996
|
+
# @yieldparam response [::Google::Cloud::SecretManager::V1::SecretVersion]
|
997
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
934
998
|
#
|
935
|
-
# @return [Google::Cloud::SecretManager::V1::SecretVersion]
|
999
|
+
# @return [::Google::Cloud::SecretManager::V1::SecretVersion]
|
936
1000
|
#
|
937
|
-
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
1001
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
938
1002
|
#
|
939
1003
|
def destroy_secret_version request, options = nil
|
940
|
-
raise ArgumentError, "request must be provided" if request.nil?
|
1004
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
941
1005
|
|
942
|
-
request = Gapic::Protobuf.coerce request, to: Google::Cloud::SecretManager::V1::DestroySecretVersionRequest
|
1006
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecretManager::V1::DestroySecretVersionRequest
|
943
1007
|
|
944
1008
|
# Converts hash and nil to an options object
|
945
|
-
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1009
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
946
1010
|
|
947
1011
|
# Customize the options with defaults
|
948
1012
|
metadata = @config.rpcs.destroy_secret_version.metadata.to_h
|
949
1013
|
|
950
1014
|
# Set x-goog-api-client and x-goog-user-project headers
|
951
|
-
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
1015
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
952
1016
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
953
1017
|
gapic_version: ::Google::Cloud::SecretManager::V1::VERSION
|
954
1018
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
@@ -969,60 +1033,62 @@ module Google
|
|
969
1033
|
yield response, operation if block_given?
|
970
1034
|
return response
|
971
1035
|
end
|
972
|
-
rescue GRPC::BadStatus => e
|
973
|
-
raise Google::Cloud::Error.from_error(e)
|
1036
|
+
rescue ::GRPC::BadStatus => e
|
1037
|
+
raise ::Google::Cloud::Error.from_error(e)
|
974
1038
|
end
|
975
1039
|
|
976
1040
|
##
|
977
1041
|
# Sets the access control policy on the specified secret. Replaces any
|
978
1042
|
# existing policy.
|
979
1043
|
#
|
980
|
-
# Permissions on {Google::Cloud::SecretManager::V1::SecretVersion SecretVersions} are enforced according
|
981
|
-
# to the policy set on the associated {Google::Cloud::SecretManager::V1::Secret Secret}.
|
1044
|
+
# Permissions on {::Google::Cloud::SecretManager::V1::SecretVersion SecretVersions} are enforced according
|
1045
|
+
# to the policy set on the associated {::Google::Cloud::SecretManager::V1::Secret Secret}.
|
982
1046
|
#
|
983
1047
|
# @overload set_iam_policy(request, options = nil)
|
984
|
-
#
|
985
|
-
#
|
986
|
-
# existing policy.
|
1048
|
+
# Pass arguments to `set_iam_policy` via a request object, either of type
|
1049
|
+
# {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash.
|
987
1050
|
#
|
988
|
-
#
|
989
|
-
#
|
990
|
-
#
|
1051
|
+
# @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash]
|
1052
|
+
# A request object representing the call parameters. Required. To specify no
|
1053
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1054
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
991
1055
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
992
1056
|
#
|
993
1057
|
# @overload set_iam_policy(resource: nil, policy: nil)
|
994
|
-
#
|
1058
|
+
# Pass arguments to `set_iam_policy` via keyword arguments. Note that at
|
1059
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1060
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1061
|
+
#
|
1062
|
+
# @param resource [::String]
|
995
1063
|
# REQUIRED: The resource for which the policy is being specified.
|
996
|
-
#
|
997
|
-
#
|
998
|
-
# @param policy [Google::Iam::V1::Policy | Hash]
|
1064
|
+
# See the operation documentation for the appropriate value for this field.
|
1065
|
+
# @param policy [::Google::Iam::V1::Policy, ::Hash]
|
999
1066
|
# REQUIRED: The complete policy to be applied to the `resource`. The size of
|
1000
1067
|
# the policy is limited to a few 10s of KB. An empty policy is a
|
1001
1068
|
# valid policy but certain Cloud Platform services (such as Projects)
|
1002
1069
|
# might reject them.
|
1003
1070
|
#
|
1004
|
-
#
|
1005
1071
|
# @yield [response, operation] Access the result along with the RPC operation
|
1006
|
-
# @yieldparam response [Google::Iam::V1::Policy]
|
1007
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
1072
|
+
# @yieldparam response [::Google::Iam::V1::Policy]
|
1073
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1008
1074
|
#
|
1009
|
-
# @return [Google::Iam::V1::Policy]
|
1075
|
+
# @return [::Google::Iam::V1::Policy]
|
1010
1076
|
#
|
1011
|
-
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
1077
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1012
1078
|
#
|
1013
1079
|
def set_iam_policy request, options = nil
|
1014
|
-
raise ArgumentError, "request must be provided" if request.nil?
|
1080
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1015
1081
|
|
1016
|
-
request = Gapic::Protobuf.coerce request, to: Google::Iam::V1::SetIamPolicyRequest
|
1082
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest
|
1017
1083
|
|
1018
1084
|
# Converts hash and nil to an options object
|
1019
|
-
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1085
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1020
1086
|
|
1021
1087
|
# Customize the options with defaults
|
1022
1088
|
metadata = @config.rpcs.set_iam_policy.metadata.to_h
|
1023
1089
|
|
1024
1090
|
# Set x-goog-api-client and x-goog-user-project headers
|
1025
|
-
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
1091
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1026
1092
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1027
1093
|
gapic_version: ::Google::Cloud::SecretManager::V1::VERSION
|
1028
1094
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
@@ -1043,8 +1109,8 @@ module Google
|
|
1043
1109
|
yield response, operation if block_given?
|
1044
1110
|
return response
|
1045
1111
|
end
|
1046
|
-
rescue GRPC::BadStatus => e
|
1047
|
-
raise Google::Cloud::Error.from_error(e)
|
1112
|
+
rescue ::GRPC::BadStatus => e
|
1113
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1048
1114
|
end
|
1049
1115
|
|
1050
1116
|
##
|
@@ -1052,40 +1118,48 @@ module Google
|
|
1052
1118
|
# Returns empty policy if the secret exists and does not have a policy set.
|
1053
1119
|
#
|
1054
1120
|
# @overload get_iam_policy(request, options = nil)
|
1055
|
-
#
|
1056
|
-
#
|
1057
|
-
#
|
1058
|
-
# @param
|
1121
|
+
# Pass arguments to `get_iam_policy` via a request object, either of type
|
1122
|
+
# {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash.
|
1123
|
+
#
|
1124
|
+
# @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash]
|
1125
|
+
# A request object representing the call parameters. Required. To specify no
|
1126
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1127
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1059
1128
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1060
1129
|
#
|
1061
|
-
# @overload get_iam_policy(resource: nil)
|
1062
|
-
#
|
1063
|
-
#
|
1064
|
-
#
|
1065
|
-
# resource is specified as `projects/{project}`.
|
1130
|
+
# @overload get_iam_policy(resource: nil, options: nil)
|
1131
|
+
# Pass arguments to `get_iam_policy` via keyword arguments. Note that at
|
1132
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1133
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1066
1134
|
#
|
1135
|
+
# @param resource [::String]
|
1136
|
+
# REQUIRED: The resource for which the policy is being requested.
|
1137
|
+
# See the operation documentation for the appropriate value for this field.
|
1138
|
+
# @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash]
|
1139
|
+
# OPTIONAL: A `GetPolicyOptions` object for specifying options to
|
1140
|
+
# `GetIamPolicy`. This field is only used by Cloud IAM.
|
1067
1141
|
#
|
1068
1142
|
# @yield [response, operation] Access the result along with the RPC operation
|
1069
|
-
# @yieldparam response [Google::Iam::V1::Policy]
|
1070
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
1143
|
+
# @yieldparam response [::Google::Iam::V1::Policy]
|
1144
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1071
1145
|
#
|
1072
|
-
# @return [Google::Iam::V1::Policy]
|
1146
|
+
# @return [::Google::Iam::V1::Policy]
|
1073
1147
|
#
|
1074
|
-
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
1148
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1075
1149
|
#
|
1076
1150
|
def get_iam_policy request, options = nil
|
1077
|
-
raise ArgumentError, "request must be provided" if request.nil?
|
1151
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1078
1152
|
|
1079
|
-
request = Gapic::Protobuf.coerce request, to: Google::Iam::V1::GetIamPolicyRequest
|
1153
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest
|
1080
1154
|
|
1081
1155
|
# Converts hash and nil to an options object
|
1082
|
-
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1156
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1083
1157
|
|
1084
1158
|
# Customize the options with defaults
|
1085
1159
|
metadata = @config.rpcs.get_iam_policy.metadata.to_h
|
1086
1160
|
|
1087
1161
|
# Set x-goog-api-client and x-goog-user-project headers
|
1088
|
-
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
1162
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1089
1163
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1090
1164
|
gapic_version: ::Google::Cloud::SecretManager::V1::VERSION
|
1091
1165
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
@@ -1106,8 +1180,8 @@ module Google
|
|
1106
1180
|
yield response, operation if block_given?
|
1107
1181
|
return response
|
1108
1182
|
end
|
1109
|
-
rescue GRPC::BadStatus => e
|
1110
|
-
raise Google::Cloud::Error.from_error(e)
|
1183
|
+
rescue ::GRPC::BadStatus => e
|
1184
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1111
1185
|
end
|
1112
1186
|
|
1113
1187
|
##
|
@@ -1120,50 +1194,50 @@ module Google
|
|
1120
1194
|
# may "fail open" without warning.
|
1121
1195
|
#
|
1122
1196
|
# @overload test_iam_permissions(request, options = nil)
|
1123
|
-
#
|
1124
|
-
#
|
1125
|
-
#
|
1126
|
-
#
|
1127
|
-
#
|
1128
|
-
#
|
1129
|
-
#
|
1130
|
-
# may "fail open" without warning.
|
1131
|
-
# @param options [Gapic::CallOptions, Hash]
|
1197
|
+
# Pass arguments to `test_iam_permissions` via a request object, either of type
|
1198
|
+
# {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash.
|
1199
|
+
#
|
1200
|
+
# @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash]
|
1201
|
+
# A request object representing the call parameters. Required. To specify no
|
1202
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1203
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1132
1204
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1133
1205
|
#
|
1134
1206
|
# @overload test_iam_permissions(resource: nil, permissions: nil)
|
1135
|
-
#
|
1207
|
+
# Pass arguments to `test_iam_permissions` via keyword arguments. Note that at
|
1208
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1209
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1210
|
+
#
|
1211
|
+
# @param resource [::String]
|
1136
1212
|
# REQUIRED: The resource for which the policy detail is being requested.
|
1137
|
-
#
|
1138
|
-
#
|
1139
|
-
# @param permissions [Array<String>]
|
1213
|
+
# See the operation documentation for the appropriate value for this field.
|
1214
|
+
# @param permissions [::Array<::String>]
|
1140
1215
|
# The set of permissions to check for the `resource`. Permissions with
|
1141
1216
|
# wildcards (such as '*' or 'storage.*') are not allowed. For more
|
1142
1217
|
# information see
|
1143
1218
|
# [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
|
1144
1219
|
#
|
1145
|
-
#
|
1146
1220
|
# @yield [response, operation] Access the result along with the RPC operation
|
1147
|
-
# @yieldparam response [Google::Iam::V1::TestIamPermissionsResponse]
|
1148
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
1221
|
+
# @yieldparam response [::Google::Iam::V1::TestIamPermissionsResponse]
|
1222
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1149
1223
|
#
|
1150
|
-
# @return [Google::Iam::V1::TestIamPermissionsResponse]
|
1224
|
+
# @return [::Google::Iam::V1::TestIamPermissionsResponse]
|
1151
1225
|
#
|
1152
|
-
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
1226
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1153
1227
|
#
|
1154
1228
|
def test_iam_permissions request, options = nil
|
1155
|
-
raise ArgumentError, "request must be provided" if request.nil?
|
1229
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1156
1230
|
|
1157
|
-
request = Gapic::Protobuf.coerce request, to: Google::Iam::V1::TestIamPermissionsRequest
|
1231
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest
|
1158
1232
|
|
1159
1233
|
# Converts hash and nil to an options object
|
1160
|
-
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1234
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1161
1235
|
|
1162
1236
|
# Customize the options with defaults
|
1163
1237
|
metadata = @config.rpcs.test_iam_permissions.metadata.to_h
|
1164
1238
|
|
1165
1239
|
# Set x-goog-api-client and x-goog-user-project headers
|
1166
|
-
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
1240
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1167
1241
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1168
1242
|
gapic_version: ::Google::Cloud::SecretManager::V1::VERSION
|
1169
1243
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
@@ -1184,8 +1258,8 @@ module Google
|
|
1184
1258
|
yield response, operation if block_given?
|
1185
1259
|
return response
|
1186
1260
|
end
|
1187
|
-
rescue GRPC::BadStatus => e
|
1188
|
-
raise Google::Cloud::Error.from_error(e)
|
1261
|
+
rescue ::GRPC::BadStatus => e
|
1262
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1189
1263
|
end
|
1190
1264
|
|
1191
1265
|
##
|
@@ -1195,7 +1269,7 @@ module Google
|
|
1195
1269
|
# providing control over timeouts, retry behavior, logging, transport
|
1196
1270
|
# parameters, and other low-level controls. Certain parameters can also be
|
1197
1271
|
# applied individually to specific RPCs. See
|
1198
|
-
# {Google::Cloud::SecretManager::V1::SecretManagerService::Client::Configuration::Rpcs}
|
1272
|
+
# {::Google::Cloud::SecretManager::V1::SecretManagerService::Client::Configuration::Rpcs}
|
1199
1273
|
# for a list of RPCs that can be configured independently.
|
1200
1274
|
#
|
1201
1275
|
# Configuration can be applied globally to all clients, or to a single client
|
@@ -1206,22 +1280,22 @@ module Google
|
|
1206
1280
|
# To modify the global config, setting the timeout for list_secrets
|
1207
1281
|
# to 20 seconds, and all remaining timeouts to 10 seconds:
|
1208
1282
|
#
|
1209
|
-
# Google::Cloud::SecretManager::V1::SecretManagerService::Client.configure do |config|
|
1210
|
-
# config.timeout =
|
1211
|
-
# config.rpcs.list_secrets.timeout =
|
1283
|
+
# ::Google::Cloud::SecretManager::V1::SecretManagerService::Client.configure do |config|
|
1284
|
+
# config.timeout = 10.0
|
1285
|
+
# config.rpcs.list_secrets.timeout = 20.0
|
1212
1286
|
# end
|
1213
1287
|
#
|
1214
1288
|
# To apply the above configuration only to a new client:
|
1215
1289
|
#
|
1216
|
-
# client = Google::Cloud::SecretManager::V1::SecretManagerService::Client.new do |config|
|
1217
|
-
# config.timeout =
|
1218
|
-
# config.rpcs.list_secrets.timeout =
|
1290
|
+
# client = ::Google::Cloud::SecretManager::V1::SecretManagerService::Client.new do |config|
|
1291
|
+
# config.timeout = 10.0
|
1292
|
+
# config.rpcs.list_secrets.timeout = 20.0
|
1219
1293
|
# end
|
1220
1294
|
#
|
1221
1295
|
# @!attribute [rw] endpoint
|
1222
1296
|
# The hostname or hostname:port of the service endpoint.
|
1223
1297
|
# Defaults to `"secretmanager.googleapis.com"`.
|
1224
|
-
# @return [String]
|
1298
|
+
# @return [::String]
|
1225
1299
|
# @!attribute [rw] credentials
|
1226
1300
|
# Credentials to send with calls. You may provide any of the following types:
|
1227
1301
|
# * (`String`) The path to a service account key file in JSON format
|
@@ -1233,29 +1307,29 @@ module Google
|
|
1233
1307
|
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
1234
1308
|
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
1235
1309
|
# * (`nil`) indicating no credentials
|
1236
|
-
# @return [Object]
|
1310
|
+
# @return [::Object]
|
1237
1311
|
# @!attribute [rw] scope
|
1238
1312
|
# The OAuth scopes
|
1239
|
-
# @return [Array
|
1313
|
+
# @return [::Array<::String>]
|
1240
1314
|
# @!attribute [rw] lib_name
|
1241
1315
|
# The library name as recorded in instrumentation and logging
|
1242
|
-
# @return [String]
|
1316
|
+
# @return [::String]
|
1243
1317
|
# @!attribute [rw] lib_version
|
1244
1318
|
# The library version as recorded in instrumentation and logging
|
1245
|
-
# @return [String]
|
1319
|
+
# @return [::String]
|
1246
1320
|
# @!attribute [rw] channel_args
|
1247
1321
|
# Extra parameters passed to the gRPC channel. Note: this is ignored if a
|
1248
1322
|
# `GRPC::Core::Channel` object is provided as the credential.
|
1249
|
-
# @return [Hash]
|
1323
|
+
# @return [::Hash]
|
1250
1324
|
# @!attribute [rw] interceptors
|
1251
1325
|
# An array of interceptors that are run before calls are executed.
|
1252
|
-
# @return [Array
|
1326
|
+
# @return [::Array<::GRPC::ClientInterceptor>]
|
1253
1327
|
# @!attribute [rw] timeout
|
1254
|
-
# The call timeout in
|
1255
|
-
# @return [Numeric]
|
1328
|
+
# The call timeout in seconds.
|
1329
|
+
# @return [::Numeric]
|
1256
1330
|
# @!attribute [rw] metadata
|
1257
1331
|
# Additional gRPC headers to be sent with the call.
|
1258
|
-
# @return [Hash{Symbol
|
1332
|
+
# @return [::Hash{::Symbol=>::String}]
|
1259
1333
|
# @!attribute [rw] retry_policy
|
1260
1334
|
# The retry policy. The value is a hash with the following keys:
|
1261
1335
|
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
@@ -1263,25 +1337,29 @@ module Google
|
|
1263
1337
|
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
1264
1338
|
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
1265
1339
|
# trigger a retry.
|
1266
|
-
# @return [Hash]
|
1340
|
+
# @return [::Hash]
|
1341
|
+
# @!attribute [rw] quota_project
|
1342
|
+
# A separate project against which to charge quota.
|
1343
|
+
# @return [::String]
|
1267
1344
|
#
|
1268
1345
|
class Configuration
|
1269
|
-
extend Gapic::Config
|
1346
|
+
extend ::Gapic::Config
|
1270
1347
|
|
1271
|
-
config_attr :endpoint,
|
1272
|
-
config_attr :credentials,
|
1348
|
+
config_attr :endpoint, "secretmanager.googleapis.com", ::String
|
1349
|
+
config_attr :credentials, nil do |value|
|
1273
1350
|
allowed = [::String, ::Hash, ::Proc, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
1274
1351
|
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
|
1275
1352
|
allowed.any? { |klass| klass === value }
|
1276
1353
|
end
|
1277
|
-
config_attr :scope,
|
1278
|
-
config_attr :lib_name,
|
1279
|
-
config_attr :lib_version,
|
1280
|
-
config_attr(:channel_args,
|
1281
|
-
config_attr :interceptors,
|
1282
|
-
config_attr :timeout,
|
1283
|
-
config_attr :metadata,
|
1284
|
-
config_attr :retry_policy,
|
1354
|
+
config_attr :scope, nil, ::String, ::Array, nil
|
1355
|
+
config_attr :lib_name, nil, ::String, nil
|
1356
|
+
config_attr :lib_version, nil, ::String, nil
|
1357
|
+
config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, ::Hash, nil)
|
1358
|
+
config_attr :interceptors, nil, ::Array, nil
|
1359
|
+
config_attr :timeout, nil, ::Numeric, nil
|
1360
|
+
config_attr :metadata, nil, ::Hash, nil
|
1361
|
+
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
1362
|
+
config_attr :quota_project, nil, ::String, nil
|
1285
1363
|
|
1286
1364
|
# @private
|
1287
1365
|
def initialize parent_config = nil
|
@@ -1322,112 +1400,112 @@ module Google
|
|
1322
1400
|
class Rpcs
|
1323
1401
|
##
|
1324
1402
|
# RPC-specific configuration for `list_secrets`
|
1325
|
-
# @return [Gapic::Config::Method]
|
1403
|
+
# @return [::Gapic::Config::Method]
|
1326
1404
|
#
|
1327
1405
|
attr_reader :list_secrets
|
1328
1406
|
##
|
1329
1407
|
# RPC-specific configuration for `create_secret`
|
1330
|
-
# @return [Gapic::Config::Method]
|
1408
|
+
# @return [::Gapic::Config::Method]
|
1331
1409
|
#
|
1332
1410
|
attr_reader :create_secret
|
1333
1411
|
##
|
1334
1412
|
# RPC-specific configuration for `add_secret_version`
|
1335
|
-
# @return [Gapic::Config::Method]
|
1413
|
+
# @return [::Gapic::Config::Method]
|
1336
1414
|
#
|
1337
1415
|
attr_reader :add_secret_version
|
1338
1416
|
##
|
1339
1417
|
# RPC-specific configuration for `get_secret`
|
1340
|
-
# @return [Gapic::Config::Method]
|
1418
|
+
# @return [::Gapic::Config::Method]
|
1341
1419
|
#
|
1342
1420
|
attr_reader :get_secret
|
1343
1421
|
##
|
1344
1422
|
# RPC-specific configuration for `update_secret`
|
1345
|
-
# @return [Gapic::Config::Method]
|
1423
|
+
# @return [::Gapic::Config::Method]
|
1346
1424
|
#
|
1347
1425
|
attr_reader :update_secret
|
1348
1426
|
##
|
1349
1427
|
# RPC-specific configuration for `delete_secret`
|
1350
|
-
# @return [Gapic::Config::Method]
|
1428
|
+
# @return [::Gapic::Config::Method]
|
1351
1429
|
#
|
1352
1430
|
attr_reader :delete_secret
|
1353
1431
|
##
|
1354
1432
|
# RPC-specific configuration for `list_secret_versions`
|
1355
|
-
# @return [Gapic::Config::Method]
|
1433
|
+
# @return [::Gapic::Config::Method]
|
1356
1434
|
#
|
1357
1435
|
attr_reader :list_secret_versions
|
1358
1436
|
##
|
1359
1437
|
# RPC-specific configuration for `get_secret_version`
|
1360
|
-
# @return [Gapic::Config::Method]
|
1438
|
+
# @return [::Gapic::Config::Method]
|
1361
1439
|
#
|
1362
1440
|
attr_reader :get_secret_version
|
1363
1441
|
##
|
1364
1442
|
# RPC-specific configuration for `access_secret_version`
|
1365
|
-
# @return [Gapic::Config::Method]
|
1443
|
+
# @return [::Gapic::Config::Method]
|
1366
1444
|
#
|
1367
1445
|
attr_reader :access_secret_version
|
1368
1446
|
##
|
1369
1447
|
# RPC-specific configuration for `disable_secret_version`
|
1370
|
-
# @return [Gapic::Config::Method]
|
1448
|
+
# @return [::Gapic::Config::Method]
|
1371
1449
|
#
|
1372
1450
|
attr_reader :disable_secret_version
|
1373
1451
|
##
|
1374
1452
|
# RPC-specific configuration for `enable_secret_version`
|
1375
|
-
# @return [Gapic::Config::Method]
|
1453
|
+
# @return [::Gapic::Config::Method]
|
1376
1454
|
#
|
1377
1455
|
attr_reader :enable_secret_version
|
1378
1456
|
##
|
1379
1457
|
# RPC-specific configuration for `destroy_secret_version`
|
1380
|
-
# @return [Gapic::Config::Method]
|
1458
|
+
# @return [::Gapic::Config::Method]
|
1381
1459
|
#
|
1382
1460
|
attr_reader :destroy_secret_version
|
1383
1461
|
##
|
1384
1462
|
# RPC-specific configuration for `set_iam_policy`
|
1385
|
-
# @return [Gapic::Config::Method]
|
1463
|
+
# @return [::Gapic::Config::Method]
|
1386
1464
|
#
|
1387
1465
|
attr_reader :set_iam_policy
|
1388
1466
|
##
|
1389
1467
|
# RPC-specific configuration for `get_iam_policy`
|
1390
|
-
# @return [Gapic::Config::Method]
|
1468
|
+
# @return [::Gapic::Config::Method]
|
1391
1469
|
#
|
1392
1470
|
attr_reader :get_iam_policy
|
1393
1471
|
##
|
1394
1472
|
# RPC-specific configuration for `test_iam_permissions`
|
1395
|
-
# @return [Gapic::Config::Method]
|
1473
|
+
# @return [::Gapic::Config::Method]
|
1396
1474
|
#
|
1397
1475
|
attr_reader :test_iam_permissions
|
1398
1476
|
|
1399
1477
|
# @private
|
1400
1478
|
def initialize parent_rpcs = nil
|
1401
1479
|
list_secrets_config = parent_rpcs&.list_secrets if parent_rpcs&.respond_to? :list_secrets
|
1402
|
-
@list_secrets = Gapic::Config::Method.new list_secrets_config
|
1480
|
+
@list_secrets = ::Gapic::Config::Method.new list_secrets_config
|
1403
1481
|
create_secret_config = parent_rpcs&.create_secret if parent_rpcs&.respond_to? :create_secret
|
1404
|
-
@create_secret = Gapic::Config::Method.new create_secret_config
|
1482
|
+
@create_secret = ::Gapic::Config::Method.new create_secret_config
|
1405
1483
|
add_secret_version_config = parent_rpcs&.add_secret_version if parent_rpcs&.respond_to? :add_secret_version
|
1406
|
-
@add_secret_version = Gapic::Config::Method.new add_secret_version_config
|
1484
|
+
@add_secret_version = ::Gapic::Config::Method.new add_secret_version_config
|
1407
1485
|
get_secret_config = parent_rpcs&.get_secret if parent_rpcs&.respond_to? :get_secret
|
1408
|
-
@get_secret = Gapic::Config::Method.new get_secret_config
|
1486
|
+
@get_secret = ::Gapic::Config::Method.new get_secret_config
|
1409
1487
|
update_secret_config = parent_rpcs&.update_secret if parent_rpcs&.respond_to? :update_secret
|
1410
|
-
@update_secret = Gapic::Config::Method.new update_secret_config
|
1488
|
+
@update_secret = ::Gapic::Config::Method.new update_secret_config
|
1411
1489
|
delete_secret_config = parent_rpcs&.delete_secret if parent_rpcs&.respond_to? :delete_secret
|
1412
|
-
@delete_secret = Gapic::Config::Method.new delete_secret_config
|
1490
|
+
@delete_secret = ::Gapic::Config::Method.new delete_secret_config
|
1413
1491
|
list_secret_versions_config = parent_rpcs&.list_secret_versions if parent_rpcs&.respond_to? :list_secret_versions
|
1414
|
-
@list_secret_versions = Gapic::Config::Method.new list_secret_versions_config
|
1492
|
+
@list_secret_versions = ::Gapic::Config::Method.new list_secret_versions_config
|
1415
1493
|
get_secret_version_config = parent_rpcs&.get_secret_version if parent_rpcs&.respond_to? :get_secret_version
|
1416
|
-
@get_secret_version = Gapic::Config::Method.new get_secret_version_config
|
1494
|
+
@get_secret_version = ::Gapic::Config::Method.new get_secret_version_config
|
1417
1495
|
access_secret_version_config = parent_rpcs&.access_secret_version if parent_rpcs&.respond_to? :access_secret_version
|
1418
|
-
@access_secret_version = Gapic::Config::Method.new access_secret_version_config
|
1496
|
+
@access_secret_version = ::Gapic::Config::Method.new access_secret_version_config
|
1419
1497
|
disable_secret_version_config = parent_rpcs&.disable_secret_version if parent_rpcs&.respond_to? :disable_secret_version
|
1420
|
-
@disable_secret_version = Gapic::Config::Method.new disable_secret_version_config
|
1498
|
+
@disable_secret_version = ::Gapic::Config::Method.new disable_secret_version_config
|
1421
1499
|
enable_secret_version_config = parent_rpcs&.enable_secret_version if parent_rpcs&.respond_to? :enable_secret_version
|
1422
|
-
@enable_secret_version = Gapic::Config::Method.new enable_secret_version_config
|
1500
|
+
@enable_secret_version = ::Gapic::Config::Method.new enable_secret_version_config
|
1423
1501
|
destroy_secret_version_config = parent_rpcs&.destroy_secret_version if parent_rpcs&.respond_to? :destroy_secret_version
|
1424
|
-
@destroy_secret_version = Gapic::Config::Method.new destroy_secret_version_config
|
1502
|
+
@destroy_secret_version = ::Gapic::Config::Method.new destroy_secret_version_config
|
1425
1503
|
set_iam_policy_config = parent_rpcs&.set_iam_policy if parent_rpcs&.respond_to? :set_iam_policy
|
1426
|
-
@set_iam_policy = Gapic::Config::Method.new set_iam_policy_config
|
1504
|
+
@set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config
|
1427
1505
|
get_iam_policy_config = parent_rpcs&.get_iam_policy if parent_rpcs&.respond_to? :get_iam_policy
|
1428
|
-
@get_iam_policy = Gapic::Config::Method.new get_iam_policy_config
|
1506
|
+
@get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config
|
1429
1507
|
test_iam_permissions_config = parent_rpcs&.test_iam_permissions if parent_rpcs&.respond_to? :test_iam_permissions
|
1430
|
-
@test_iam_permissions = Gapic::Config::Method.new test_iam_permissions_config
|
1508
|
+
@test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config
|
1431
1509
|
|
1432
1510
|
yield self if block_given?
|
1433
1511
|
end
|
@@ -1439,13 +1517,3 @@ module Google
|
|
1439
1517
|
end
|
1440
1518
|
end
|
1441
1519
|
end
|
1442
|
-
|
1443
|
-
# rubocop:disable Lint/HandleExceptions
|
1444
|
-
|
1445
|
-
# Once client is loaded, load helpers.rb if it exists.
|
1446
|
-
begin
|
1447
|
-
require "google/cloud/secret_manager/v1/secret_manager_service/helpers"
|
1448
|
-
rescue LoadError
|
1449
|
-
end
|
1450
|
-
|
1451
|
-
# rubocop:enable Lint/HandleExceptions
|