google-cloud-certificate_manager-v1 0.3.1 → 0.4.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 993badd8e6f4b17597b7e2dcc33db82c8574bd7c4b63cdb776bc05dd15981e50
4
- data.tar.gz: 74db4180572623be77fc8bb7c0476636bbf99f7f17432294bc2b33abda5c1cbe
3
+ metadata.gz: 5e581375372d0113ee0df9a9698e0a6b2bc992bf9dbc009f87bed0bbedf4124c
4
+ data.tar.gz: 6962b446d02ec8d992c53dffe683696d45cc6fff66078f1f477ac2a6358b81e1
5
5
  SHA512:
6
- metadata.gz: 78fe6ac5eefd6cba40d636223065260a8e9bddc2b1b99683866eaa121e0b9aeb3bba18ce71bddb8afd71069638174d811c9ea4b05326eace925cd713c9c751c7
7
- data.tar.gz: c0da5fe4abe3345beb5c26344324d5d85512b0d07accb949148a4fdbd7203ce470cf5720739f6ab86bf6d0e808052491ff230ab42a5cf74c07d5407fc727df95
6
+ metadata.gz: 9a7770db119042654ba1d882e83034a43beb17e08e6f42a812f39fc6e7278a78c358fe66055e48fd879e1e1563ad549ea0cf4de6670a4fa9b8a2ecfb73385091
7
+ data.tar.gz: 78b23ac6fe8e4e14da2db5222b02e1fda645fe239d65d3a397d7128426040fd9d97dd99fb2c5db6887dfdffcf4cce0b4684958891625f36b37e9ccff47f0667a
data/AUTHENTICATION.md CHANGED
@@ -112,7 +112,7 @@ credentials are discovered.
112
112
  To configure your system for this, simply:
113
113
 
114
114
  1. [Download and install the Cloud SDK](https://cloud.google.com/sdk)
115
- 2. Authenticate using OAuth 2.0 `$ gcloud auth login`
115
+ 2. Authenticate using OAuth 2.0 `$ gcloud auth application-default login`
116
116
  3. Write code as if already authenticated.
117
117
 
118
118
  **NOTE:** This is _not_ recommended for running in production. The Cloud SDK
data/README.md CHANGED
@@ -46,7 +46,7 @@ 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/stdlib/libdoc/logger/rdoc/Logger.html) as shown below,
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
50
  or a [`Google::Cloud::Logging::Logger`](https://googleapis.dev/ruby/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.
@@ -41,15 +41,15 @@ module Google
41
41
  #
42
42
  # The Certificates Manager service exposes the following resources:
43
43
  #
44
- # * `Certificate` which describes a single TLS certificate.
45
- # * `CertificateMap` which describes a collection of certificates that can be
44
+ # * `Certificate` that describes a single TLS certificate.
45
+ # * `CertificateMap` that describes a collection of certificates that can be
46
46
  # attached to a target resource.
47
- # * `CertificateMapEntry` which describes a single configuration entry that
47
+ # * `CertificateMapEntry` that describes a single configuration entry that
48
48
  # consists of a SNI and a group of certificates. It's a subresource of
49
49
  # CertificateMap.
50
50
  #
51
51
  # Certificate, CertificateMap and CertificateMapEntry IDs
52
- # have to match "^[a-z0-9-]\\{1,63}$" regexp, which means that
52
+ # have to fully match the regexp `[a-z0-9-]{1,63}`. In other words,
53
53
  # - only lower case letters, digits, and hyphen are allowed
54
54
  # - length of the resource ID has to be in [1,63] range.
55
55
  #
@@ -190,6 +190,26 @@ module Google
190
190
  initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
191
191
  }
192
192
 
193
+ default_config.rpcs.list_certificate_issuance_configs.timeout = 60.0
194
+ default_config.rpcs.list_certificate_issuance_configs.retry_policy = {
195
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
196
+ }
197
+
198
+ default_config.rpcs.get_certificate_issuance_config.timeout = 60.0
199
+ default_config.rpcs.get_certificate_issuance_config.retry_policy = {
200
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
201
+ }
202
+
203
+ default_config.rpcs.create_certificate_issuance_config.timeout = 60.0
204
+ default_config.rpcs.create_certificate_issuance_config.retry_policy = {
205
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
206
+ }
207
+
208
+ default_config.rpcs.delete_certificate_issuance_config.timeout = 60.0
209
+ default_config.rpcs.delete_certificate_issuance_config.retry_policy = {
210
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
211
+ }
212
+
193
213
  default_config
194
214
  end
195
215
  yield @configure if block_given?
@@ -315,8 +335,8 @@ module Google
315
335
  # the default parameter values, pass an empty Hash as a request object (see above).
316
336
  #
317
337
  # @param parent [::String]
318
- # Required. The project and location from which the certificate should be listed,
319
- # specified in the format `projects/*/locations/*`.
338
+ # Required. The project and location from which the certificate should be
339
+ # listed, specified in the format `projects/*/locations/*`.
320
340
  # @param page_size [::Integer]
321
341
  # Maximum number of certificates to return per call.
322
342
  # @param page_token [::String]
@@ -606,8 +626,8 @@ module Google
606
626
  # @param certificate [::Google::Cloud::CertificateManager::V1::Certificate, ::Hash]
607
627
  # Required. A definition of the certificate to update.
608
628
  # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
609
- # Required. The update mask applies to the resource. For the `FieldMask` definition,
610
- # see
629
+ # Required. The update mask applies to the resource. For the `FieldMask`
630
+ # definition, see
611
631
  # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask.
612
632
  #
613
633
  # @yield [response, operation] Access the result along with the RPC operation
@@ -795,8 +815,8 @@ module Google
795
815
  # the default parameter values, pass an empty Hash as a request object (see above).
796
816
  #
797
817
  # @param parent [::String]
798
- # Required. The project and location from which the certificate maps should be listed,
799
- # specified in the format `projects/*/locations/*`.
818
+ # Required. The project and location from which the certificate maps should
819
+ # be listed, specified in the format `projects/*/locations/*`.
800
820
  # @param page_size [::Integer]
801
821
  # Maximum number of certificate maps to return per call.
802
822
  # @param page_token [::String]
@@ -1086,8 +1106,8 @@ module Google
1086
1106
  # @param certificate_map [::Google::Cloud::CertificateManager::V1::CertificateMap, ::Hash]
1087
1107
  # Required. A definition of the certificate map to update.
1088
1108
  # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
1089
- # Required. The update mask applies to the resource. For the `FieldMask` definition,
1090
- # see
1109
+ # Required. The update mask applies to the resource. For the `FieldMask`
1110
+ # definition, see
1091
1111
  # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask.
1092
1112
  #
1093
1113
  # @yield [response, operation] Access the result along with the RPC operation
@@ -1277,8 +1297,8 @@ module Google
1277
1297
  # the default parameter values, pass an empty Hash as a request object (see above).
1278
1298
  #
1279
1299
  # @param parent [::String]
1280
- # Required. The project, location and certificate map from which the certificate map
1281
- # entries should be listed, specified in the format
1300
+ # Required. The project, location and certificate map from which the
1301
+ # certificate map entries should be listed, specified in the format
1282
1302
  # `projects/*/locations/*/certificateMaps/*`.
1283
1303
  # @param page_size [::Integer]
1284
1304
  # Maximum number of certificate map entries to return. The service may return
@@ -1573,8 +1593,8 @@ module Google
1573
1593
  # @param certificate_map_entry [::Google::Cloud::CertificateManager::V1::CertificateMapEntry, ::Hash]
1574
1594
  # Required. A definition of the certificate map entry to create map entry.
1575
1595
  # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
1576
- # Required. The update mask applies to the resource. For the `FieldMask` definition,
1577
- # see
1596
+ # Required. The update mask applies to the resource. For the `FieldMask`
1597
+ # definition, see
1578
1598
  # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask.
1579
1599
  #
1580
1600
  # @yield [response, operation] Access the result along with the RPC operation
@@ -1668,8 +1688,8 @@ module Google
1668
1688
  # the default parameter values, pass an empty Hash as a request object (see above).
1669
1689
  #
1670
1690
  # @param name [::String]
1671
- # Required. A name of the certificate map entry to delete. Must be in the format
1672
- # `projects/*/locations/*/certificateMaps/*/certificateMapEntries/*`.
1691
+ # Required. A name of the certificate map entry to delete. Must be in the
1692
+ # format `projects/*/locations/*/certificateMaps/*/certificateMapEntries/*`.
1673
1693
  #
1674
1694
  # @yield [response, operation] Access the result along with the RPC operation
1675
1695
  # @yieldparam response [::Gapic::Operation]
@@ -1762,8 +1782,8 @@ module Google
1762
1782
  # the default parameter values, pass an empty Hash as a request object (see above).
1763
1783
  #
1764
1784
  # @param parent [::String]
1765
- # Required. The project and location from which the dns authorizations should be
1766
- # listed, specified in the format `projects/*/locations/*`.
1785
+ # Required. The project and location from which the dns authorizations should
1786
+ # be listed, specified in the format `projects/*/locations/*`.
1767
1787
  # @param page_size [::Integer]
1768
1788
  # Maximum number of dns authorizations to return per call.
1769
1789
  # @param page_token [::String]
@@ -1867,8 +1887,8 @@ module Google
1867
1887
  # the default parameter values, pass an empty Hash as a request object (see above).
1868
1888
  #
1869
1889
  # @param name [::String]
1870
- # Required. A name of the dns authorization to describe. Must be in the format
1871
- # `projects/*/locations/*/dnsAuthorizations/*`.
1890
+ # Required. A name of the dns authorization to describe. Must be in the
1891
+ # format `projects/*/locations/*/dnsAuthorizations/*`.
1872
1892
  #
1873
1893
  # @yield [response, operation] Access the result along with the RPC operation
1874
1894
  # @yieldparam response [::Google::Cloud::CertificateManager::V1::DnsAuthorization]
@@ -1953,8 +1973,8 @@ module Google
1953
1973
  # the default parameter values, pass an empty Hash as a request object (see above).
1954
1974
  #
1955
1975
  # @param parent [::String]
1956
- # Required. The parent resource of the dns authorization. Must be in the format
1957
- # `projects/*/locations/*`.
1976
+ # Required. The parent resource of the dns authorization. Must be in the
1977
+ # format `projects/*/locations/*`.
1958
1978
  # @param dns_authorization_id [::String]
1959
1979
  # Required. A user-provided name of the dns authorization.
1960
1980
  # @param dns_authorization [::Google::Cloud::CertificateManager::V1::DnsAuthorization, ::Hash]
@@ -2053,8 +2073,8 @@ module Google
2053
2073
  # @param dns_authorization [::Google::Cloud::CertificateManager::V1::DnsAuthorization, ::Hash]
2054
2074
  # Required. A definition of the dns authorization to update.
2055
2075
  # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
2056
- # Required. The update mask applies to the resource. For the `FieldMask` definition,
2057
- # see
2076
+ # Required. The update mask applies to the resource. For the `FieldMask`
2077
+ # definition, see
2058
2078
  # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask.
2059
2079
  #
2060
2080
  # @yield [response, operation] Access the result along with the RPC operation
@@ -2223,6 +2243,390 @@ module Google
2223
2243
  raise ::Google::Cloud::Error.from_error(e)
2224
2244
  end
2225
2245
 
2246
+ ##
2247
+ # Lists CertificateIssuanceConfigs in a given project and location.
2248
+ #
2249
+ # @overload list_certificate_issuance_configs(request, options = nil)
2250
+ # Pass arguments to `list_certificate_issuance_configs` via a request object, either of type
2251
+ # {::Google::Cloud::CertificateManager::V1::ListCertificateIssuanceConfigsRequest} or an equivalent Hash.
2252
+ #
2253
+ # @param request [::Google::Cloud::CertificateManager::V1::ListCertificateIssuanceConfigsRequest, ::Hash]
2254
+ # A request object representing the call parameters. Required. To specify no
2255
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2256
+ # @param options [::Gapic::CallOptions, ::Hash]
2257
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2258
+ #
2259
+ # @overload list_certificate_issuance_configs(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
2260
+ # Pass arguments to `list_certificate_issuance_configs` via keyword arguments. Note that at
2261
+ # least one keyword argument is required. To specify no parameters, or to keep all
2262
+ # the default parameter values, pass an empty Hash as a request object (see above).
2263
+ #
2264
+ # @param parent [::String]
2265
+ # Required. The project and location from which the certificate should be
2266
+ # listed, specified in the format `projects/*/locations/*`.
2267
+ # @param page_size [::Integer]
2268
+ # Maximum number of certificate configs to return per call.
2269
+ # @param page_token [::String]
2270
+ # The value returned by the last `ListCertificateIssuanceConfigsResponse`.
2271
+ # Indicates that this is a continuation of a prior
2272
+ # `ListCertificateIssuanceConfigs` call, and that the system should return
2273
+ # the next page of data.
2274
+ # @param filter [::String]
2275
+ # Filter expression to restrict the Certificates Configs returned.
2276
+ # @param order_by [::String]
2277
+ # A list of Certificate Config field names used to specify the order of the
2278
+ # returned results. The default sorting order is ascending. To specify
2279
+ # descending order for a field, add a suffix " desc".
2280
+ #
2281
+ # @yield [response, operation] Access the result along with the RPC operation
2282
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::CertificateManager::V1::CertificateIssuanceConfig>]
2283
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2284
+ #
2285
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::CertificateManager::V1::CertificateIssuanceConfig>]
2286
+ #
2287
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2288
+ #
2289
+ # @example Basic example
2290
+ # require "google/cloud/certificate_manager/v1"
2291
+ #
2292
+ # # Create a client object. The client can be reused for multiple calls.
2293
+ # client = Google::Cloud::CertificateManager::V1::CertificateManager::Client.new
2294
+ #
2295
+ # # Create a request. To set request fields, pass in keyword arguments.
2296
+ # request = Google::Cloud::CertificateManager::V1::ListCertificateIssuanceConfigsRequest.new
2297
+ #
2298
+ # # Call the list_certificate_issuance_configs method.
2299
+ # result = client.list_certificate_issuance_configs request
2300
+ #
2301
+ # # The returned object is of type Gapic::PagedEnumerable. You can
2302
+ # # iterate over all elements by calling #each, and the enumerable
2303
+ # # will lazily make API calls to fetch subsequent pages. Other
2304
+ # # methods are also available for managing paging directly.
2305
+ # result.each do |response|
2306
+ # # Each element is of type ::Google::Cloud::CertificateManager::V1::CertificateIssuanceConfig.
2307
+ # p response
2308
+ # end
2309
+ #
2310
+ def list_certificate_issuance_configs request, options = nil
2311
+ raise ::ArgumentError, "request must be provided" if request.nil?
2312
+
2313
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::ListCertificateIssuanceConfigsRequest
2314
+
2315
+ # Converts hash and nil to an options object
2316
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2317
+
2318
+ # Customize the options with defaults
2319
+ metadata = @config.rpcs.list_certificate_issuance_configs.metadata.to_h
2320
+
2321
+ # Set x-goog-api-client and x-goog-user-project headers
2322
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2323
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2324
+ gapic_version: ::Google::Cloud::CertificateManager::V1::VERSION
2325
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2326
+
2327
+ header_params = {}
2328
+ if request.parent
2329
+ header_params["parent"] = request.parent
2330
+ end
2331
+
2332
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2333
+ metadata[:"x-goog-request-params"] ||= request_params_header
2334
+
2335
+ options.apply_defaults timeout: @config.rpcs.list_certificate_issuance_configs.timeout,
2336
+ metadata: metadata,
2337
+ retry_policy: @config.rpcs.list_certificate_issuance_configs.retry_policy
2338
+
2339
+ options.apply_defaults timeout: @config.timeout,
2340
+ metadata: @config.metadata,
2341
+ retry_policy: @config.retry_policy
2342
+
2343
+ @certificate_manager_stub.call_rpc :list_certificate_issuance_configs, request, options: options do |response, operation|
2344
+ response = ::Gapic::PagedEnumerable.new @certificate_manager_stub, :list_certificate_issuance_configs, request, response, operation, options
2345
+ yield response, operation if block_given?
2346
+ return response
2347
+ end
2348
+ rescue ::GRPC::BadStatus => e
2349
+ raise ::Google::Cloud::Error.from_error(e)
2350
+ end
2351
+
2352
+ ##
2353
+ # Gets details of a single CertificateIssuanceConfig.
2354
+ #
2355
+ # @overload get_certificate_issuance_config(request, options = nil)
2356
+ # Pass arguments to `get_certificate_issuance_config` via a request object, either of type
2357
+ # {::Google::Cloud::CertificateManager::V1::GetCertificateIssuanceConfigRequest} or an equivalent Hash.
2358
+ #
2359
+ # @param request [::Google::Cloud::CertificateManager::V1::GetCertificateIssuanceConfigRequest, ::Hash]
2360
+ # A request object representing the call parameters. Required. To specify no
2361
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2362
+ # @param options [::Gapic::CallOptions, ::Hash]
2363
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2364
+ #
2365
+ # @overload get_certificate_issuance_config(name: nil)
2366
+ # Pass arguments to `get_certificate_issuance_config` via keyword arguments. Note that at
2367
+ # least one keyword argument is required. To specify no parameters, or to keep all
2368
+ # the default parameter values, pass an empty Hash as a request object (see above).
2369
+ #
2370
+ # @param name [::String]
2371
+ # Required. A name of the certificate issuance config to describe. Must be in
2372
+ # the format `projects/*/locations/*/certificateIssuanceConfigs/*`.
2373
+ #
2374
+ # @yield [response, operation] Access the result along with the RPC operation
2375
+ # @yieldparam response [::Google::Cloud::CertificateManager::V1::CertificateIssuanceConfig]
2376
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2377
+ #
2378
+ # @return [::Google::Cloud::CertificateManager::V1::CertificateIssuanceConfig]
2379
+ #
2380
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2381
+ #
2382
+ # @example Basic example
2383
+ # require "google/cloud/certificate_manager/v1"
2384
+ #
2385
+ # # Create a client object. The client can be reused for multiple calls.
2386
+ # client = Google::Cloud::CertificateManager::V1::CertificateManager::Client.new
2387
+ #
2388
+ # # Create a request. To set request fields, pass in keyword arguments.
2389
+ # request = Google::Cloud::CertificateManager::V1::GetCertificateIssuanceConfigRequest.new
2390
+ #
2391
+ # # Call the get_certificate_issuance_config method.
2392
+ # result = client.get_certificate_issuance_config request
2393
+ #
2394
+ # # The returned object is of type Google::Cloud::CertificateManager::V1::CertificateIssuanceConfig.
2395
+ # p result
2396
+ #
2397
+ def get_certificate_issuance_config request, options = nil
2398
+ raise ::ArgumentError, "request must be provided" if request.nil?
2399
+
2400
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::GetCertificateIssuanceConfigRequest
2401
+
2402
+ # Converts hash and nil to an options object
2403
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2404
+
2405
+ # Customize the options with defaults
2406
+ metadata = @config.rpcs.get_certificate_issuance_config.metadata.to_h
2407
+
2408
+ # Set x-goog-api-client and x-goog-user-project headers
2409
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2410
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2411
+ gapic_version: ::Google::Cloud::CertificateManager::V1::VERSION
2412
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2413
+
2414
+ header_params = {}
2415
+ if request.name
2416
+ header_params["name"] = request.name
2417
+ end
2418
+
2419
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2420
+ metadata[:"x-goog-request-params"] ||= request_params_header
2421
+
2422
+ options.apply_defaults timeout: @config.rpcs.get_certificate_issuance_config.timeout,
2423
+ metadata: metadata,
2424
+ retry_policy: @config.rpcs.get_certificate_issuance_config.retry_policy
2425
+
2426
+ options.apply_defaults timeout: @config.timeout,
2427
+ metadata: @config.metadata,
2428
+ retry_policy: @config.retry_policy
2429
+
2430
+ @certificate_manager_stub.call_rpc :get_certificate_issuance_config, request, options: options do |response, operation|
2431
+ yield response, operation if block_given?
2432
+ return response
2433
+ end
2434
+ rescue ::GRPC::BadStatus => e
2435
+ raise ::Google::Cloud::Error.from_error(e)
2436
+ end
2437
+
2438
+ ##
2439
+ # Creates a new CertificateIssuanceConfig in a given project and location.
2440
+ #
2441
+ # @overload create_certificate_issuance_config(request, options = nil)
2442
+ # Pass arguments to `create_certificate_issuance_config` via a request object, either of type
2443
+ # {::Google::Cloud::CertificateManager::V1::CreateCertificateIssuanceConfigRequest} or an equivalent Hash.
2444
+ #
2445
+ # @param request [::Google::Cloud::CertificateManager::V1::CreateCertificateIssuanceConfigRequest, ::Hash]
2446
+ # A request object representing the call parameters. Required. To specify no
2447
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2448
+ # @param options [::Gapic::CallOptions, ::Hash]
2449
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2450
+ #
2451
+ # @overload create_certificate_issuance_config(parent: nil, certificate_issuance_config_id: nil, certificate_issuance_config: nil)
2452
+ # Pass arguments to `create_certificate_issuance_config` via keyword arguments. Note that at
2453
+ # least one keyword argument is required. To specify no parameters, or to keep all
2454
+ # the default parameter values, pass an empty Hash as a request object (see above).
2455
+ #
2456
+ # @param parent [::String]
2457
+ # Required. The parent resource of the certificate issuance config. Must be
2458
+ # in the format `projects/*/locations/*`.
2459
+ # @param certificate_issuance_config_id [::String]
2460
+ # Required. A user-provided name of the certificate config.
2461
+ # @param certificate_issuance_config [::Google::Cloud::CertificateManager::V1::CertificateIssuanceConfig, ::Hash]
2462
+ # Required. A definition of the certificate issuance config to create.
2463
+ #
2464
+ # @yield [response, operation] Access the result along with the RPC operation
2465
+ # @yieldparam response [::Gapic::Operation]
2466
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2467
+ #
2468
+ # @return [::Gapic::Operation]
2469
+ #
2470
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2471
+ #
2472
+ # @example Basic example
2473
+ # require "google/cloud/certificate_manager/v1"
2474
+ #
2475
+ # # Create a client object. The client can be reused for multiple calls.
2476
+ # client = Google::Cloud::CertificateManager::V1::CertificateManager::Client.new
2477
+ #
2478
+ # # Create a request. To set request fields, pass in keyword arguments.
2479
+ # request = Google::Cloud::CertificateManager::V1::CreateCertificateIssuanceConfigRequest.new
2480
+ #
2481
+ # # Call the create_certificate_issuance_config method.
2482
+ # result = client.create_certificate_issuance_config request
2483
+ #
2484
+ # # The returned object is of type Gapic::Operation. You can use this
2485
+ # # object to check the status of an operation, cancel it, or wait
2486
+ # # for results. Here is how to block until completion:
2487
+ # result.wait_until_done! timeout: 60
2488
+ # if result.response?
2489
+ # p result.response
2490
+ # else
2491
+ # puts "Error!"
2492
+ # end
2493
+ #
2494
+ def create_certificate_issuance_config request, options = nil
2495
+ raise ::ArgumentError, "request must be provided" if request.nil?
2496
+
2497
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::CreateCertificateIssuanceConfigRequest
2498
+
2499
+ # Converts hash and nil to an options object
2500
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2501
+
2502
+ # Customize the options with defaults
2503
+ metadata = @config.rpcs.create_certificate_issuance_config.metadata.to_h
2504
+
2505
+ # Set x-goog-api-client and x-goog-user-project headers
2506
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2507
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2508
+ gapic_version: ::Google::Cloud::CertificateManager::V1::VERSION
2509
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2510
+
2511
+ header_params = {}
2512
+ if request.parent
2513
+ header_params["parent"] = request.parent
2514
+ end
2515
+
2516
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2517
+ metadata[:"x-goog-request-params"] ||= request_params_header
2518
+
2519
+ options.apply_defaults timeout: @config.rpcs.create_certificate_issuance_config.timeout,
2520
+ metadata: metadata,
2521
+ retry_policy: @config.rpcs.create_certificate_issuance_config.retry_policy
2522
+
2523
+ options.apply_defaults timeout: @config.timeout,
2524
+ metadata: @config.metadata,
2525
+ retry_policy: @config.retry_policy
2526
+
2527
+ @certificate_manager_stub.call_rpc :create_certificate_issuance_config, request, options: options do |response, operation|
2528
+ response = ::Gapic::Operation.new response, @operations_client, options: options
2529
+ yield response, operation if block_given?
2530
+ return response
2531
+ end
2532
+ rescue ::GRPC::BadStatus => e
2533
+ raise ::Google::Cloud::Error.from_error(e)
2534
+ end
2535
+
2536
+ ##
2537
+ # Deletes a single CertificateIssuanceConfig.
2538
+ #
2539
+ # @overload delete_certificate_issuance_config(request, options = nil)
2540
+ # Pass arguments to `delete_certificate_issuance_config` via a request object, either of type
2541
+ # {::Google::Cloud::CertificateManager::V1::DeleteCertificateIssuanceConfigRequest} or an equivalent Hash.
2542
+ #
2543
+ # @param request [::Google::Cloud::CertificateManager::V1::DeleteCertificateIssuanceConfigRequest, ::Hash]
2544
+ # A request object representing the call parameters. Required. To specify no
2545
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2546
+ # @param options [::Gapic::CallOptions, ::Hash]
2547
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2548
+ #
2549
+ # @overload delete_certificate_issuance_config(name: nil)
2550
+ # Pass arguments to `delete_certificate_issuance_config` via keyword arguments. Note that at
2551
+ # least one keyword argument is required. To specify no parameters, or to keep all
2552
+ # the default parameter values, pass an empty Hash as a request object (see above).
2553
+ #
2554
+ # @param name [::String]
2555
+ # Required. A name of the certificate issuance config to delete. Must be in
2556
+ # the format `projects/*/locations/*/certificateIssuanceConfigs/*`.
2557
+ #
2558
+ # @yield [response, operation] Access the result along with the RPC operation
2559
+ # @yieldparam response [::Gapic::Operation]
2560
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2561
+ #
2562
+ # @return [::Gapic::Operation]
2563
+ #
2564
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2565
+ #
2566
+ # @example Basic example
2567
+ # require "google/cloud/certificate_manager/v1"
2568
+ #
2569
+ # # Create a client object. The client can be reused for multiple calls.
2570
+ # client = Google::Cloud::CertificateManager::V1::CertificateManager::Client.new
2571
+ #
2572
+ # # Create a request. To set request fields, pass in keyword arguments.
2573
+ # request = Google::Cloud::CertificateManager::V1::DeleteCertificateIssuanceConfigRequest.new
2574
+ #
2575
+ # # Call the delete_certificate_issuance_config method.
2576
+ # result = client.delete_certificate_issuance_config request
2577
+ #
2578
+ # # The returned object is of type Gapic::Operation. You can use this
2579
+ # # object to check the status of an operation, cancel it, or wait
2580
+ # # for results. Here is how to block until completion:
2581
+ # result.wait_until_done! timeout: 60
2582
+ # if result.response?
2583
+ # p result.response
2584
+ # else
2585
+ # puts "Error!"
2586
+ # end
2587
+ #
2588
+ def delete_certificate_issuance_config request, options = nil
2589
+ raise ::ArgumentError, "request must be provided" if request.nil?
2590
+
2591
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::DeleteCertificateIssuanceConfigRequest
2592
+
2593
+ # Converts hash and nil to an options object
2594
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2595
+
2596
+ # Customize the options with defaults
2597
+ metadata = @config.rpcs.delete_certificate_issuance_config.metadata.to_h
2598
+
2599
+ # Set x-goog-api-client and x-goog-user-project headers
2600
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2601
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2602
+ gapic_version: ::Google::Cloud::CertificateManager::V1::VERSION
2603
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2604
+
2605
+ header_params = {}
2606
+ if request.name
2607
+ header_params["name"] = request.name
2608
+ end
2609
+
2610
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2611
+ metadata[:"x-goog-request-params"] ||= request_params_header
2612
+
2613
+ options.apply_defaults timeout: @config.rpcs.delete_certificate_issuance_config.timeout,
2614
+ metadata: metadata,
2615
+ retry_policy: @config.rpcs.delete_certificate_issuance_config.retry_policy
2616
+
2617
+ options.apply_defaults timeout: @config.timeout,
2618
+ metadata: @config.metadata,
2619
+ retry_policy: @config.retry_policy
2620
+
2621
+ @certificate_manager_stub.call_rpc :delete_certificate_issuance_config, request, options: options do |response, operation|
2622
+ response = ::Gapic::Operation.new response, @operations_client, options: options
2623
+ yield response, operation if block_given?
2624
+ return response
2625
+ end
2626
+ rescue ::GRPC::BadStatus => e
2627
+ raise ::Google::Cloud::Error.from_error(e)
2628
+ end
2629
+
2226
2630
  ##
2227
2631
  # Configuration class for the CertificateManager API.
2228
2632
  #
@@ -2458,6 +2862,26 @@ module Google
2458
2862
  # @return [::Gapic::Config::Method]
2459
2863
  #
2460
2864
  attr_reader :delete_dns_authorization
2865
+ ##
2866
+ # RPC-specific configuration for `list_certificate_issuance_configs`
2867
+ # @return [::Gapic::Config::Method]
2868
+ #
2869
+ attr_reader :list_certificate_issuance_configs
2870
+ ##
2871
+ # RPC-specific configuration for `get_certificate_issuance_config`
2872
+ # @return [::Gapic::Config::Method]
2873
+ #
2874
+ attr_reader :get_certificate_issuance_config
2875
+ ##
2876
+ # RPC-specific configuration for `create_certificate_issuance_config`
2877
+ # @return [::Gapic::Config::Method]
2878
+ #
2879
+ attr_reader :create_certificate_issuance_config
2880
+ ##
2881
+ # RPC-specific configuration for `delete_certificate_issuance_config`
2882
+ # @return [::Gapic::Config::Method]
2883
+ #
2884
+ attr_reader :delete_certificate_issuance_config
2461
2885
 
2462
2886
  # @private
2463
2887
  def initialize parent_rpcs = nil
@@ -2501,6 +2925,14 @@ module Google
2501
2925
  @update_dns_authorization = ::Gapic::Config::Method.new update_dns_authorization_config
2502
2926
  delete_dns_authorization_config = parent_rpcs.delete_dns_authorization if parent_rpcs.respond_to? :delete_dns_authorization
2503
2927
  @delete_dns_authorization = ::Gapic::Config::Method.new delete_dns_authorization_config
2928
+ list_certificate_issuance_configs_config = parent_rpcs.list_certificate_issuance_configs if parent_rpcs.respond_to? :list_certificate_issuance_configs
2929
+ @list_certificate_issuance_configs = ::Gapic::Config::Method.new list_certificate_issuance_configs_config
2930
+ get_certificate_issuance_config_config = parent_rpcs.get_certificate_issuance_config if parent_rpcs.respond_to? :get_certificate_issuance_config
2931
+ @get_certificate_issuance_config = ::Gapic::Config::Method.new get_certificate_issuance_config_config
2932
+ create_certificate_issuance_config_config = parent_rpcs.create_certificate_issuance_config if parent_rpcs.respond_to? :create_certificate_issuance_config
2933
+ @create_certificate_issuance_config = ::Gapic::Config::Method.new create_certificate_issuance_config_config
2934
+ delete_certificate_issuance_config_config = parent_rpcs.delete_certificate_issuance_config if parent_rpcs.respond_to? :delete_certificate_issuance_config
2935
+ @delete_certificate_issuance_config = ::Gapic::Config::Method.new delete_certificate_issuance_config_config
2504
2936
 
2505
2937
  yield self if block_given?
2506
2938
  end