google-cloud-security-public_ca-v1beta1 0.1.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -3
- data/lib/google/cloud/security/public_ca/v1beta1/public_certificate_authority_service/client.rb +2 -2
- data/lib/google/cloud/security/public_ca/v1beta1/public_certificate_authority_service/rest/client.rb +360 -0
- data/lib/google/cloud/security/public_ca/v1beta1/public_certificate_authority_service/rest/service_stub.rb +110 -0
- data/lib/google/cloud/security/public_ca/v1beta1/public_certificate_authority_service/rest.rb +56 -0
- data/lib/google/cloud/security/public_ca/v1beta1/public_certificate_authority_service.rb +7 -1
- data/lib/google/cloud/security/public_ca/v1beta1/rest.rb +39 -0
- data/lib/google/cloud/security/public_ca/v1beta1/version.rb +1 -1
- data/lib/google/cloud/security/public_ca/v1beta1.rb +7 -2
- data/lib/google/cloud/security/publicca/v1beta1/resources_pb.rb +24 -6
- data/lib/google/cloud/security/publicca/v1beta1/service_pb.rb +25 -5
- data/proto_docs/google/api/client.rb +381 -0
- data/proto_docs/google/api/launch_stage.rb +71 -0
- data/proto_docs/google/protobuf/duration.rb +98 -0
- metadata +17 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1f920937e9d5e8383de014650a966275a7f982fe54082f76fede717c78a4c1be
|
4
|
+
data.tar.gz: 7ae9ab03d8c0919230a6e2ebce3786ce48c124f35c376cafdecc1f19e2ef00fa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9f7501b15b2ba04edbffa90e2930cc50cc3ef89e5cc80dbfacd645148554861dd118ca27ef8630910f4d6dcd11e78546febec11b0951569d2f0daca31a9626c1
|
7
|
+
data.tar.gz: d73da1b1553e32264ad3602f6ad947e9016745523bf36fa650f7a83504b6c864b695f536342d9e7cacea3eb9fa938f15393a9e2872f02cb94890cbd4fd788875
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Ruby Client for the Public Certificate Authority V1beta1 API
|
2
2
|
|
3
|
-
API
|
3
|
+
The Public Certificate Authority API may be used to create and manage ACME external account binding keys associated with Google Trust Services' publicly trusted certificate authority.
|
4
4
|
|
5
5
|
Certificate Manager's Public Certificate Authority (CA) functionality allows you to provision and deploy widely trusted X.509 certificates after validating that the certificate requester controls the domains. Certificate Manager lets you directly and programmatically request publicly trusted TLS certificates that are already in the root of trust stores used by major browsers, operating systems, and applications. You can use these TLS certificates to authenticate and encrypt internet traffic.
|
6
6
|
|
@@ -46,8 +46,8 @@ for general usage information.
|
|
46
46
|
## Enabling Logging
|
47
47
|
|
48
48
|
To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
|
49
|
-
The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/
|
50
|
-
or a [`Google::Cloud::Logging::Logger`](https://
|
49
|
+
The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/current/stdlibs/logger/Logger.html) as shown below,
|
50
|
+
or a [`Google::Cloud::Logging::Logger`](https://cloud.google.com/ruby/docs/reference/google-cloud-logging/latest)
|
51
51
|
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)
|
52
52
|
and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
|
53
53
|
|
data/lib/google/cloud/security/public_ca/v1beta1/public_certificate_authority_service/client.rb
CHANGED
@@ -282,9 +282,9 @@ module Google
|
|
282
282
|
# * (`String`) The path to a service account key file in JSON format
|
283
283
|
# * (`Hash`) A service account key as a Hash
|
284
284
|
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
285
|
-
# (see the [googleauth docs](https://
|
285
|
+
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
286
286
|
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
287
|
-
# (see the [signet docs](https://
|
287
|
+
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
288
288
|
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
289
289
|
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
290
290
|
# * (`nil`) indicating no credentials
|
data/lib/google/cloud/security/public_ca/v1beta1/public_certificate_authority_service/rest/client.rb
ADDED
@@ -0,0 +1,360 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2023 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
|
+
require "google/cloud/errors"
|
20
|
+
require "google/cloud/security/publicca/v1beta1/service_pb"
|
21
|
+
require "google/cloud/security/public_ca/v1beta1/public_certificate_authority_service/rest/service_stub"
|
22
|
+
|
23
|
+
module Google
|
24
|
+
module Cloud
|
25
|
+
module Security
|
26
|
+
module PublicCA
|
27
|
+
module V1beta1
|
28
|
+
module PublicCertificateAuthorityService
|
29
|
+
module Rest
|
30
|
+
##
|
31
|
+
# REST client for the PublicCertificateAuthorityService service.
|
32
|
+
#
|
33
|
+
# Manages the resources required for ACME [external account
|
34
|
+
# binding](https://tools.ietf.org/html/rfc8555#section-7.3.4) for
|
35
|
+
# the public certificate authority service.
|
36
|
+
#
|
37
|
+
class Client
|
38
|
+
include Paths
|
39
|
+
|
40
|
+
# @private
|
41
|
+
attr_reader :public_certificate_authority_service_stub
|
42
|
+
|
43
|
+
##
|
44
|
+
# Configure the PublicCertificateAuthorityService Client class.
|
45
|
+
#
|
46
|
+
# See {::Google::Cloud::Security::PublicCA::V1beta1::PublicCertificateAuthorityService::Rest::Client::Configuration}
|
47
|
+
# for a description of the configuration fields.
|
48
|
+
#
|
49
|
+
# @example
|
50
|
+
#
|
51
|
+
# # Modify the configuration for all PublicCertificateAuthorityService clients
|
52
|
+
# ::Google::Cloud::Security::PublicCA::V1beta1::PublicCertificateAuthorityService::Rest::Client.configure do |config|
|
53
|
+
# config.timeout = 10.0
|
54
|
+
# end
|
55
|
+
#
|
56
|
+
# @yield [config] Configure the Client client.
|
57
|
+
# @yieldparam config [Client::Configuration]
|
58
|
+
#
|
59
|
+
# @return [Client::Configuration]
|
60
|
+
#
|
61
|
+
def self.configure
|
62
|
+
@configure ||= begin
|
63
|
+
namespace = ["Google", "Cloud", "Security", "PublicCA", "V1beta1"]
|
64
|
+
parent_config = while namespace.any?
|
65
|
+
parent_name = namespace.join "::"
|
66
|
+
parent_const = const_get parent_name
|
67
|
+
break parent_const.configure if parent_const.respond_to? :configure
|
68
|
+
namespace.pop
|
69
|
+
end
|
70
|
+
default_config = Client::Configuration.new parent_config
|
71
|
+
|
72
|
+
default_config.timeout = 60.0
|
73
|
+
default_config.retry_policy = {
|
74
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
|
75
|
+
}
|
76
|
+
|
77
|
+
default_config
|
78
|
+
end
|
79
|
+
yield @configure if block_given?
|
80
|
+
@configure
|
81
|
+
end
|
82
|
+
|
83
|
+
##
|
84
|
+
# Configure the PublicCertificateAuthorityService Client instance.
|
85
|
+
#
|
86
|
+
# The configuration is set to the derived mode, meaning that values can be changed,
|
87
|
+
# but structural changes (adding new fields, etc.) are not allowed. Structural changes
|
88
|
+
# should be made on {Client.configure}.
|
89
|
+
#
|
90
|
+
# See {::Google::Cloud::Security::PublicCA::V1beta1::PublicCertificateAuthorityService::Rest::Client::Configuration}
|
91
|
+
# for a description of the configuration fields.
|
92
|
+
#
|
93
|
+
# @yield [config] Configure the Client client.
|
94
|
+
# @yieldparam config [Client::Configuration]
|
95
|
+
#
|
96
|
+
# @return [Client::Configuration]
|
97
|
+
#
|
98
|
+
def configure
|
99
|
+
yield @config if block_given?
|
100
|
+
@config
|
101
|
+
end
|
102
|
+
|
103
|
+
##
|
104
|
+
# Create a new PublicCertificateAuthorityService REST client object.
|
105
|
+
#
|
106
|
+
# @example
|
107
|
+
#
|
108
|
+
# # Create a client using the default configuration
|
109
|
+
# client = ::Google::Cloud::Security::PublicCA::V1beta1::PublicCertificateAuthorityService::Rest::Client.new
|
110
|
+
#
|
111
|
+
# # Create a client using a custom configuration
|
112
|
+
# client = ::Google::Cloud::Security::PublicCA::V1beta1::PublicCertificateAuthorityService::Rest::Client.new do |config|
|
113
|
+
# config.timeout = 10.0
|
114
|
+
# end
|
115
|
+
#
|
116
|
+
# @yield [config] Configure the PublicCertificateAuthorityService client.
|
117
|
+
# @yieldparam config [Client::Configuration]
|
118
|
+
#
|
119
|
+
def initialize
|
120
|
+
# Create the configuration object
|
121
|
+
@config = Configuration.new Client.configure
|
122
|
+
|
123
|
+
# Yield the configuration if needed
|
124
|
+
yield @config if block_given?
|
125
|
+
|
126
|
+
# Create credentials
|
127
|
+
credentials = @config.credentials
|
128
|
+
# Use self-signed JWT if the endpoint is unchanged from default,
|
129
|
+
# but only if the default endpoint does not have a region prefix.
|
130
|
+
enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
|
131
|
+
!@config.endpoint.split(".").first.include?("-")
|
132
|
+
credentials ||= Credentials.default scope: @config.scope,
|
133
|
+
enable_self_signed_jwt: enable_self_signed_jwt
|
134
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
135
|
+
credentials = Credentials.new credentials, scope: @config.scope
|
136
|
+
end
|
137
|
+
|
138
|
+
@quota_project_id = @config.quota_project
|
139
|
+
@quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
|
140
|
+
|
141
|
+
@public_certificate_authority_service_stub = ::Google::Cloud::Security::PublicCA::V1beta1::PublicCertificateAuthorityService::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
|
142
|
+
end
|
143
|
+
|
144
|
+
# Service calls
|
145
|
+
|
146
|
+
##
|
147
|
+
# Creates a new {::Google::Cloud::Security::PublicCA::V1beta1::ExternalAccountKey ExternalAccountKey} bound to the project.
|
148
|
+
#
|
149
|
+
# @overload create_external_account_key(request, options = nil)
|
150
|
+
# Pass arguments to `create_external_account_key` via a request object, either of type
|
151
|
+
# {::Google::Cloud::Security::PublicCA::V1beta1::CreateExternalAccountKeyRequest} or an equivalent Hash.
|
152
|
+
#
|
153
|
+
# @param request [::Google::Cloud::Security::PublicCA::V1beta1::CreateExternalAccountKeyRequest, ::Hash]
|
154
|
+
# A request object representing the call parameters. Required. To specify no
|
155
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
156
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
157
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
158
|
+
#
|
159
|
+
# @overload create_external_account_key(parent: nil, external_account_key: nil)
|
160
|
+
# Pass arguments to `create_external_account_key` via keyword arguments. Note that at
|
161
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
162
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
163
|
+
#
|
164
|
+
# @param parent [::String]
|
165
|
+
# Required. The parent resource where this external_account_key will be created.
|
166
|
+
# Format: projects/[project_id]/locations/[location].
|
167
|
+
# At present only the "global" location is supported.
|
168
|
+
# @param external_account_key [::Google::Cloud::Security::PublicCA::V1beta1::ExternalAccountKey, ::Hash]
|
169
|
+
# Required. The external account key to create. This field only exists to future-proof
|
170
|
+
# the API. At present, all fields in ExternalAccountKey are output only and
|
171
|
+
# all values are ignored. For the purpose of the
|
172
|
+
# CreateExternalAccountKeyRequest, set it to a default/empty value.
|
173
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
174
|
+
# @yieldparam result [::Google::Cloud::Security::PublicCA::V1beta1::ExternalAccountKey]
|
175
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
176
|
+
#
|
177
|
+
# @return [::Google::Cloud::Security::PublicCA::V1beta1::ExternalAccountKey]
|
178
|
+
#
|
179
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
180
|
+
def create_external_account_key request, options = nil
|
181
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
182
|
+
|
183
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PublicCA::V1beta1::CreateExternalAccountKeyRequest
|
184
|
+
|
185
|
+
# Converts hash and nil to an options object
|
186
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
187
|
+
|
188
|
+
# Customize the options with defaults
|
189
|
+
call_metadata = @config.rpcs.create_external_account_key.metadata.to_h
|
190
|
+
|
191
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
192
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
193
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
194
|
+
gapic_version: ::Google::Cloud::Security::PublicCA::V1beta1::VERSION,
|
195
|
+
transports_version_send: [:rest]
|
196
|
+
|
197
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
198
|
+
|
199
|
+
options.apply_defaults timeout: @config.rpcs.create_external_account_key.timeout,
|
200
|
+
metadata: call_metadata,
|
201
|
+
retry_policy: @config.rpcs.create_external_account_key.retry_policy
|
202
|
+
|
203
|
+
options.apply_defaults timeout: @config.timeout,
|
204
|
+
metadata: @config.metadata,
|
205
|
+
retry_policy: @config.retry_policy
|
206
|
+
|
207
|
+
@public_certificate_authority_service_stub.create_external_account_key request, options do |result, operation|
|
208
|
+
yield result, operation if block_given?
|
209
|
+
return result
|
210
|
+
end
|
211
|
+
rescue ::Gapic::Rest::Error => e
|
212
|
+
raise ::Google::Cloud::Error.from_error(e)
|
213
|
+
end
|
214
|
+
|
215
|
+
##
|
216
|
+
# Configuration class for the PublicCertificateAuthorityService REST API.
|
217
|
+
#
|
218
|
+
# This class represents the configuration for PublicCertificateAuthorityService REST,
|
219
|
+
# providing control over timeouts, retry behavior, logging, transport
|
220
|
+
# parameters, and other low-level controls. Certain parameters can also be
|
221
|
+
# applied individually to specific RPCs. See
|
222
|
+
# {::Google::Cloud::Security::PublicCA::V1beta1::PublicCertificateAuthorityService::Rest::Client::Configuration::Rpcs}
|
223
|
+
# for a list of RPCs that can be configured independently.
|
224
|
+
#
|
225
|
+
# Configuration can be applied globally to all clients, or to a single client
|
226
|
+
# on construction.
|
227
|
+
#
|
228
|
+
# @example
|
229
|
+
#
|
230
|
+
# # Modify the global config, setting the timeout for
|
231
|
+
# # create_external_account_key to 20 seconds,
|
232
|
+
# # and all remaining timeouts to 10 seconds.
|
233
|
+
# ::Google::Cloud::Security::PublicCA::V1beta1::PublicCertificateAuthorityService::Rest::Client.configure do |config|
|
234
|
+
# config.timeout = 10.0
|
235
|
+
# config.rpcs.create_external_account_key.timeout = 20.0
|
236
|
+
# end
|
237
|
+
#
|
238
|
+
# # Apply the above configuration only to a new client.
|
239
|
+
# client = ::Google::Cloud::Security::PublicCA::V1beta1::PublicCertificateAuthorityService::Rest::Client.new do |config|
|
240
|
+
# config.timeout = 10.0
|
241
|
+
# config.rpcs.create_external_account_key.timeout = 20.0
|
242
|
+
# end
|
243
|
+
#
|
244
|
+
# @!attribute [rw] endpoint
|
245
|
+
# The hostname or hostname:port of the service endpoint.
|
246
|
+
# Defaults to `"publicca.googleapis.com"`.
|
247
|
+
# @return [::String]
|
248
|
+
# @!attribute [rw] credentials
|
249
|
+
# Credentials to send with calls. You may provide any of the following types:
|
250
|
+
# * (`String`) The path to a service account key file in JSON format
|
251
|
+
# * (`Hash`) A service account key as a Hash
|
252
|
+
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
253
|
+
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
254
|
+
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
255
|
+
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
256
|
+
# * (`nil`) indicating no credentials
|
257
|
+
# @return [::Object]
|
258
|
+
# @!attribute [rw] scope
|
259
|
+
# The OAuth scopes
|
260
|
+
# @return [::Array<::String>]
|
261
|
+
# @!attribute [rw] lib_name
|
262
|
+
# The library name as recorded in instrumentation and logging
|
263
|
+
# @return [::String]
|
264
|
+
# @!attribute [rw] lib_version
|
265
|
+
# The library version as recorded in instrumentation and logging
|
266
|
+
# @return [::String]
|
267
|
+
# @!attribute [rw] timeout
|
268
|
+
# The call timeout in seconds.
|
269
|
+
# @return [::Numeric]
|
270
|
+
# @!attribute [rw] metadata
|
271
|
+
# Additional headers to be sent with the call.
|
272
|
+
# @return [::Hash{::Symbol=>::String}]
|
273
|
+
# @!attribute [rw] retry_policy
|
274
|
+
# The retry policy. The value is a hash with the following keys:
|
275
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
276
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
277
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
278
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
279
|
+
# trigger a retry.
|
280
|
+
# @return [::Hash]
|
281
|
+
# @!attribute [rw] quota_project
|
282
|
+
# A separate project against which to charge quota.
|
283
|
+
# @return [::String]
|
284
|
+
#
|
285
|
+
class Configuration
|
286
|
+
extend ::Gapic::Config
|
287
|
+
|
288
|
+
config_attr :endpoint, "publicca.googleapis.com", ::String
|
289
|
+
config_attr :credentials, nil do |value|
|
290
|
+
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
291
|
+
allowed.any? { |klass| klass === value }
|
292
|
+
end
|
293
|
+
config_attr :scope, nil, ::String, ::Array, nil
|
294
|
+
config_attr :lib_name, nil, ::String, nil
|
295
|
+
config_attr :lib_version, nil, ::String, nil
|
296
|
+
config_attr :timeout, nil, ::Numeric, nil
|
297
|
+
config_attr :metadata, nil, ::Hash, nil
|
298
|
+
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
299
|
+
config_attr :quota_project, nil, ::String, nil
|
300
|
+
|
301
|
+
# @private
|
302
|
+
def initialize parent_config = nil
|
303
|
+
@parent_config = parent_config unless parent_config.nil?
|
304
|
+
|
305
|
+
yield self if block_given?
|
306
|
+
end
|
307
|
+
|
308
|
+
##
|
309
|
+
# Configurations for individual RPCs
|
310
|
+
# @return [Rpcs]
|
311
|
+
#
|
312
|
+
def rpcs
|
313
|
+
@rpcs ||= begin
|
314
|
+
parent_rpcs = nil
|
315
|
+
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
|
316
|
+
Rpcs.new parent_rpcs
|
317
|
+
end
|
318
|
+
end
|
319
|
+
|
320
|
+
##
|
321
|
+
# Configuration RPC class for the PublicCertificateAuthorityService API.
|
322
|
+
#
|
323
|
+
# Includes fields providing the configuration for each RPC in this service.
|
324
|
+
# Each configuration object is of type `Gapic::Config::Method` and includes
|
325
|
+
# the following configuration fields:
|
326
|
+
#
|
327
|
+
# * `timeout` (*type:* `Numeric`) - The call timeout in seconds
|
328
|
+
# * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
|
329
|
+
# * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
|
330
|
+
# include the following keys:
|
331
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
332
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
333
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
334
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
335
|
+
# trigger a retry.
|
336
|
+
#
|
337
|
+
class Rpcs
|
338
|
+
##
|
339
|
+
# RPC-specific configuration for `create_external_account_key`
|
340
|
+
# @return [::Gapic::Config::Method]
|
341
|
+
#
|
342
|
+
attr_reader :create_external_account_key
|
343
|
+
|
344
|
+
# @private
|
345
|
+
def initialize parent_rpcs = nil
|
346
|
+
create_external_account_key_config = parent_rpcs.create_external_account_key if parent_rpcs.respond_to? :create_external_account_key
|
347
|
+
@create_external_account_key = ::Gapic::Config::Method.new create_external_account_key_config
|
348
|
+
|
349
|
+
yield self if block_given?
|
350
|
+
end
|
351
|
+
end
|
352
|
+
end
|
353
|
+
end
|
354
|
+
end
|
355
|
+
end
|
356
|
+
end
|
357
|
+
end
|
358
|
+
end
|
359
|
+
end
|
360
|
+
end
|
@@ -0,0 +1,110 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2023 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
|
+
require "google/cloud/security/publicca/v1beta1/service_pb"
|
20
|
+
|
21
|
+
module Google
|
22
|
+
module Cloud
|
23
|
+
module Security
|
24
|
+
module PublicCA
|
25
|
+
module V1beta1
|
26
|
+
module PublicCertificateAuthorityService
|
27
|
+
module Rest
|
28
|
+
##
|
29
|
+
# REST service stub for the PublicCertificateAuthorityService service.
|
30
|
+
# Service stub contains baseline method implementations
|
31
|
+
# including transcoding, making the REST call, and deserialing the response.
|
32
|
+
#
|
33
|
+
class ServiceStub
|
34
|
+
def initialize endpoint:, credentials:
|
35
|
+
# These require statements are intentionally placed here to initialize
|
36
|
+
# the REST modules only when it's required.
|
37
|
+
require "gapic/rest"
|
38
|
+
|
39
|
+
@client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, credentials: credentials,
|
40
|
+
numeric_enums: true,
|
41
|
+
raise_faraday_errors: false
|
42
|
+
end
|
43
|
+
|
44
|
+
##
|
45
|
+
# Baseline implementation for the create_external_account_key REST call
|
46
|
+
#
|
47
|
+
# @param request_pb [::Google::Cloud::Security::PublicCA::V1beta1::CreateExternalAccountKeyRequest]
|
48
|
+
# A request object representing the call parameters. Required.
|
49
|
+
# @param options [::Gapic::CallOptions]
|
50
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
51
|
+
#
|
52
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
53
|
+
# @yieldparam result [::Google::Cloud::Security::PublicCA::V1beta1::ExternalAccountKey]
|
54
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
55
|
+
#
|
56
|
+
# @return [::Google::Cloud::Security::PublicCA::V1beta1::ExternalAccountKey]
|
57
|
+
# A result object deserialized from the server's reply
|
58
|
+
def create_external_account_key request_pb, options = nil
|
59
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
60
|
+
|
61
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_create_external_account_key_request request_pb
|
62
|
+
query_string_params = if query_string_params.any?
|
63
|
+
query_string_params.to_h { |p| p.split("=", 2) }
|
64
|
+
else
|
65
|
+
{}
|
66
|
+
end
|
67
|
+
|
68
|
+
response = @client_stub.make_http_request(
|
69
|
+
verb,
|
70
|
+
uri: uri,
|
71
|
+
body: body || "",
|
72
|
+
params: query_string_params,
|
73
|
+
options: options
|
74
|
+
)
|
75
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
76
|
+
result = ::Google::Cloud::Security::PublicCA::V1beta1::ExternalAccountKey.decode_json response.body, ignore_unknown_fields: true
|
77
|
+
|
78
|
+
yield result, operation if block_given?
|
79
|
+
result
|
80
|
+
end
|
81
|
+
|
82
|
+
##
|
83
|
+
# @private
|
84
|
+
#
|
85
|
+
# GRPC transcoding helper method for the create_external_account_key REST call
|
86
|
+
#
|
87
|
+
# @param request_pb [::Google::Cloud::Security::PublicCA::V1beta1::CreateExternalAccountKeyRequest]
|
88
|
+
# A request object representing the call parameters. Required.
|
89
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
90
|
+
# Uri, Body, Query string parameters
|
91
|
+
def self.transcode_create_external_account_key_request request_pb
|
92
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
93
|
+
.with_bindings(
|
94
|
+
uri_method: :post,
|
95
|
+
uri_template: "/v1beta1/{parent}/externalAccountKeys",
|
96
|
+
body: "external_account_key",
|
97
|
+
matches: [
|
98
|
+
["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false]
|
99
|
+
]
|
100
|
+
)
|
101
|
+
transcoder.transcode request_pb
|
102
|
+
end
|
103
|
+
end
|
104
|
+
end
|
105
|
+
end
|
106
|
+
end
|
107
|
+
end
|
108
|
+
end
|
109
|
+
end
|
110
|
+
end
|
@@ -0,0 +1,56 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2023 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
|
+
require "gapic/rest"
|
20
|
+
require "gapic/config"
|
21
|
+
require "gapic/config/method"
|
22
|
+
|
23
|
+
require "google/cloud/security/public_ca/v1beta1/version"
|
24
|
+
|
25
|
+
require "google/cloud/security/public_ca/v1beta1/public_certificate_authority_service/credentials"
|
26
|
+
require "google/cloud/security/public_ca/v1beta1/public_certificate_authority_service/paths"
|
27
|
+
require "google/cloud/security/public_ca/v1beta1/public_certificate_authority_service/rest/client"
|
28
|
+
|
29
|
+
module Google
|
30
|
+
module Cloud
|
31
|
+
module Security
|
32
|
+
module PublicCA
|
33
|
+
module V1beta1
|
34
|
+
##
|
35
|
+
# Manages the resources required for ACME [external account
|
36
|
+
# binding](https://tools.ietf.org/html/rfc8555#section-7.3.4) for
|
37
|
+
# the public certificate authority service.
|
38
|
+
#
|
39
|
+
# To load this service and instantiate a REST client:
|
40
|
+
#
|
41
|
+
# require "google/cloud/security/public_ca/v1beta1/public_certificate_authority_service/rest"
|
42
|
+
# client = ::Google::Cloud::Security::PublicCA::V1beta1::PublicCertificateAuthorityService::Rest::Client.new
|
43
|
+
#
|
44
|
+
module PublicCertificateAuthorityService
|
45
|
+
# Client for the REST transport
|
46
|
+
module Rest
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
helper_path = ::File.join __dir__, "rest", "helpers.rb"
|
56
|
+
require "google/cloud/security/public_ca/v1beta1/public_certificate_authority_service/rest/helpers" if ::File.file? helper_path
|
@@ -25,6 +25,7 @@ require "google/cloud/security/public_ca/v1beta1/version"
|
|
25
25
|
require "google/cloud/security/public_ca/v1beta1/public_certificate_authority_service/credentials"
|
26
26
|
require "google/cloud/security/public_ca/v1beta1/public_certificate_authority_service/paths"
|
27
27
|
require "google/cloud/security/public_ca/v1beta1/public_certificate_authority_service/client"
|
28
|
+
require "google/cloud/security/public_ca/v1beta1/public_certificate_authority_service/rest"
|
28
29
|
|
29
30
|
module Google
|
30
31
|
module Cloud
|
@@ -36,11 +37,16 @@ module Google
|
|
36
37
|
# binding](https://tools.ietf.org/html/rfc8555#section-7.3.4) for
|
37
38
|
# the public certificate authority service.
|
38
39
|
#
|
39
|
-
#
|
40
|
+
# @example Load this service and instantiate a gRPC client
|
40
41
|
#
|
41
42
|
# require "google/cloud/security/public_ca/v1beta1/public_certificate_authority_service"
|
42
43
|
# client = ::Google::Cloud::Security::PublicCA::V1beta1::PublicCertificateAuthorityService::Client.new
|
43
44
|
#
|
45
|
+
# @example Load this service and instantiate a REST client
|
46
|
+
#
|
47
|
+
# require "google/cloud/security/public_ca/v1beta1/public_certificate_authority_service/rest"
|
48
|
+
# client = ::Google::Cloud::Security::PublicCA::V1beta1::PublicCertificateAuthorityService::Rest::Client.new
|
49
|
+
#
|
44
50
|
module PublicCertificateAuthorityService
|
45
51
|
end
|
46
52
|
end
|
@@ -0,0 +1,39 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2023 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
|
+
require "google/cloud/security/public_ca/v1beta1/public_certificate_authority_service/rest"
|
20
|
+
require "google/cloud/security/public_ca/v1beta1/version"
|
21
|
+
|
22
|
+
module Google
|
23
|
+
module Cloud
|
24
|
+
module Security
|
25
|
+
module PublicCA
|
26
|
+
##
|
27
|
+
# To load just the REST part of this package, including all its services, and instantiate a REST client:
|
28
|
+
#
|
29
|
+
# @example
|
30
|
+
#
|
31
|
+
# require "google/cloud/security/public_ca/v1beta1/rest"
|
32
|
+
# client = ::Google::Cloud::Security::PublicCA::V1beta1::PublicCertificateAuthorityService::Rest::Client.new
|
33
|
+
#
|
34
|
+
module V1beta1
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|