google-cloud-certificate_manager-v1 0.8.2 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/google/cloud/certificate_manager/v1/certificate_manager/client.rb +523 -5
- data/lib/google/cloud/certificate_manager/v1/certificate_manager/paths.rb +19 -0
- data/lib/google/cloud/certificate_manager/v1/certificate_manager/rest/client.rb +487 -5
- data/lib/google/cloud/certificate_manager/v1/certificate_manager/rest/service_stub.rb +297 -0
- data/lib/google/cloud/certificate_manager/v1/version.rb +1 -1
- data/lib/google/cloud/certificatemanager/v1/certificate_issuance_config_pb.rb +1 -1
- data/lib/google/cloud/certificatemanager/v1/certificate_manager_pb.rb +3 -1
- data/lib/google/cloud/certificatemanager/v1/certificate_manager_services_pb.rb +10 -0
- data/lib/google/cloud/certificatemanager/v1/trust_config_pb.rb +58 -0
- data/proto_docs/google/api/client.rb +4 -0
- data/proto_docs/google/cloud/certificatemanager/v1/certificate_issuance_config.rb +1 -1
- data/proto_docs/google/cloud/certificatemanager/v1/certificate_manager.rb +31 -7
- data/proto_docs/google/cloud/certificatemanager/v1/trust_config.rb +210 -0
- metadata +6 -116
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e18fd319a03674056b3fe3e67b7440d57f7df0d0c4432d75573d8bad03e62b46
|
4
|
+
data.tar.gz: fdb4b03ef0f0eaa321bf5056fe7f7f393da45a43c43e93ea3e2bcd7ecdba4e19
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f37008edae6d9682d590bc9c4bd7fd83229273f491cf94d6ed95fbc67188cca400d836b3deff2e1612f51752c972588ff7531f717dc8369efda3c988c737947f
|
7
|
+
data.tar.gz: c0ea395df5b0878b4be84cf38e9226661f0ff19e17622f6aef6107154a51690309047fa19c78169695cbb3c3256c45c52554573c7bd97d25e54455d696c2dea2
|
data/README.md
CHANGED
@@ -76,7 +76,7 @@ To browse ready to use code samples check [Google Cloud Samples](https://cloud.g
|
|
76
76
|
|
77
77
|
## Supported Ruby Versions
|
78
78
|
|
79
|
-
This library is supported on Ruby 2.
|
79
|
+
This library is supported on Ruby 2.7+.
|
80
80
|
|
81
81
|
Google provides official support for Ruby versions that are actively supported
|
82
82
|
by Ruby Core—that is, Ruby versions that are either in normal maintenance or
|
@@ -366,7 +366,7 @@ module Google
|
|
366
366
|
# @param order_by [::String]
|
367
367
|
# A list of Certificate field names used to specify the order of the returned
|
368
368
|
# results. The default sorting order is ascending. To specify descending
|
369
|
-
# order for a field, add a suffix " desc"
|
369
|
+
# order for a field, add a suffix `" desc"`.
|
370
370
|
#
|
371
371
|
# @yield [response, operation] Access the result along with the RPC operation
|
372
372
|
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::CertificateManager::V1::Certificate>]
|
@@ -844,7 +844,7 @@ module Google
|
|
844
844
|
# @param order_by [::String]
|
845
845
|
# A list of Certificate Map field names used to specify the order of the
|
846
846
|
# returned results. The default sorting order is ascending. To specify
|
847
|
-
# descending order for a field, add a suffix " desc"
|
847
|
+
# descending order for a field, add a suffix `" desc"`.
|
848
848
|
#
|
849
849
|
# @yield [response, operation] Access the result along with the RPC operation
|
850
850
|
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::CertificateManager::V1::CertificateMap>]
|
@@ -1329,7 +1329,7 @@ module Google
|
|
1329
1329
|
# @param order_by [::String]
|
1330
1330
|
# A list of Certificate Map Entry field names used to specify
|
1331
1331
|
# the order of the returned results. The default sorting order is ascending.
|
1332
|
-
# To specify descending order for a field, add a suffix " desc"
|
1332
|
+
# To specify descending order for a field, add a suffix `" desc"`.
|
1333
1333
|
#
|
1334
1334
|
# @yield [response, operation] Access the result along with the RPC operation
|
1335
1335
|
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::CertificateManager::V1::CertificateMapEntry>]
|
@@ -1807,7 +1807,7 @@ module Google
|
|
1807
1807
|
# @param order_by [::String]
|
1808
1808
|
# A list of Dns Authorization field names used to specify the order of the
|
1809
1809
|
# returned results. The default sorting order is ascending. To specify
|
1810
|
-
# descending order for a field, add a suffix " desc"
|
1810
|
+
# descending order for a field, add a suffix `" desc"`.
|
1811
1811
|
#
|
1812
1812
|
# @yield [response, operation] Access the result along with the RPC operation
|
1813
1813
|
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::CertificateManager::V1::DnsAuthorization>]
|
@@ -2286,7 +2286,7 @@ module Google
|
|
2286
2286
|
# @param order_by [::String]
|
2287
2287
|
# A list of Certificate Config field names used to specify the order of the
|
2288
2288
|
# returned results. The default sorting order is ascending. To specify
|
2289
|
-
# descending order for a field, add a suffix " desc"
|
2289
|
+
# descending order for a field, add a suffix `" desc"`.
|
2290
2290
|
#
|
2291
2291
|
# @yield [response, operation] Access the result along with the RPC operation
|
2292
2292
|
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::CertificateManager::V1::CertificateIssuanceConfig>]
|
@@ -2635,6 +2635,489 @@ module Google
|
|
2635
2635
|
raise ::Google::Cloud::Error.from_error(e)
|
2636
2636
|
end
|
2637
2637
|
|
2638
|
+
##
|
2639
|
+
# Lists TrustConfigs in a given project and location.
|
2640
|
+
#
|
2641
|
+
# @overload list_trust_configs(request, options = nil)
|
2642
|
+
# Pass arguments to `list_trust_configs` via a request object, either of type
|
2643
|
+
# {::Google::Cloud::CertificateManager::V1::ListTrustConfigsRequest} or an equivalent Hash.
|
2644
|
+
#
|
2645
|
+
# @param request [::Google::Cloud::CertificateManager::V1::ListTrustConfigsRequest, ::Hash]
|
2646
|
+
# A request object representing the call parameters. Required. To specify no
|
2647
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2648
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2649
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
2650
|
+
#
|
2651
|
+
# @overload list_trust_configs(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
|
2652
|
+
# Pass arguments to `list_trust_configs` via keyword arguments. Note that at
|
2653
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2654
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2655
|
+
#
|
2656
|
+
# @param parent [::String]
|
2657
|
+
# Required. The project and location from which the TrustConfigs should be
|
2658
|
+
# listed, specified in the format `projects/*/locations/*`.
|
2659
|
+
# @param page_size [::Integer]
|
2660
|
+
# Maximum number of TrustConfigs to return per call.
|
2661
|
+
# @param page_token [::String]
|
2662
|
+
# The value returned by the last `ListTrustConfigsResponse`. Indicates
|
2663
|
+
# that this is a continuation of a prior `ListTrustConfigs` call, and that
|
2664
|
+
# the system should return the next page of data.
|
2665
|
+
# @param filter [::String]
|
2666
|
+
# Filter expression to restrict the TrustConfigs returned.
|
2667
|
+
# @param order_by [::String]
|
2668
|
+
# A list of TrustConfig field names used to specify the order of the
|
2669
|
+
# returned results. The default sorting order is ascending. To specify
|
2670
|
+
# descending order for a field, add a suffix `" desc"`.
|
2671
|
+
#
|
2672
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
2673
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::CertificateManager::V1::TrustConfig>]
|
2674
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
2675
|
+
#
|
2676
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::CertificateManager::V1::TrustConfig>]
|
2677
|
+
#
|
2678
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2679
|
+
#
|
2680
|
+
# @example Basic example
|
2681
|
+
# require "google/cloud/certificate_manager/v1"
|
2682
|
+
#
|
2683
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2684
|
+
# client = Google::Cloud::CertificateManager::V1::CertificateManager::Client.new
|
2685
|
+
#
|
2686
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2687
|
+
# request = Google::Cloud::CertificateManager::V1::ListTrustConfigsRequest.new
|
2688
|
+
#
|
2689
|
+
# # Call the list_trust_configs method.
|
2690
|
+
# result = client.list_trust_configs request
|
2691
|
+
#
|
2692
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
2693
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
2694
|
+
# result.each do |item|
|
2695
|
+
# # Each element is of type ::Google::Cloud::CertificateManager::V1::TrustConfig.
|
2696
|
+
# p item
|
2697
|
+
# end
|
2698
|
+
#
|
2699
|
+
def list_trust_configs request, options = nil
|
2700
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2701
|
+
|
2702
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::ListTrustConfigsRequest
|
2703
|
+
|
2704
|
+
# Converts hash and nil to an options object
|
2705
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2706
|
+
|
2707
|
+
# Customize the options with defaults
|
2708
|
+
metadata = @config.rpcs.list_trust_configs.metadata.to_h
|
2709
|
+
|
2710
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
2711
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2712
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2713
|
+
gapic_version: ::Google::Cloud::CertificateManager::V1::VERSION
|
2714
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2715
|
+
|
2716
|
+
header_params = {}
|
2717
|
+
if request.parent
|
2718
|
+
header_params["parent"] = request.parent
|
2719
|
+
end
|
2720
|
+
|
2721
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2722
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
2723
|
+
|
2724
|
+
options.apply_defaults timeout: @config.rpcs.list_trust_configs.timeout,
|
2725
|
+
metadata: metadata,
|
2726
|
+
retry_policy: @config.rpcs.list_trust_configs.retry_policy
|
2727
|
+
|
2728
|
+
options.apply_defaults timeout: @config.timeout,
|
2729
|
+
metadata: @config.metadata,
|
2730
|
+
retry_policy: @config.retry_policy
|
2731
|
+
|
2732
|
+
@certificate_manager_stub.call_rpc :list_trust_configs, request, options: options do |response, operation|
|
2733
|
+
response = ::Gapic::PagedEnumerable.new @certificate_manager_stub, :list_trust_configs, request, response, operation, options
|
2734
|
+
yield response, operation if block_given?
|
2735
|
+
return response
|
2736
|
+
end
|
2737
|
+
rescue ::GRPC::BadStatus => e
|
2738
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2739
|
+
end
|
2740
|
+
|
2741
|
+
##
|
2742
|
+
# Gets details of a single TrustConfig.
|
2743
|
+
#
|
2744
|
+
# @overload get_trust_config(request, options = nil)
|
2745
|
+
# Pass arguments to `get_trust_config` via a request object, either of type
|
2746
|
+
# {::Google::Cloud::CertificateManager::V1::GetTrustConfigRequest} or an equivalent Hash.
|
2747
|
+
#
|
2748
|
+
# @param request [::Google::Cloud::CertificateManager::V1::GetTrustConfigRequest, ::Hash]
|
2749
|
+
# A request object representing the call parameters. Required. To specify no
|
2750
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2751
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2752
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
2753
|
+
#
|
2754
|
+
# @overload get_trust_config(name: nil)
|
2755
|
+
# Pass arguments to `get_trust_config` via keyword arguments. Note that at
|
2756
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2757
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2758
|
+
#
|
2759
|
+
# @param name [::String]
|
2760
|
+
# Required. A name of the TrustConfig to describe. Must be in the format
|
2761
|
+
# `projects/*/locations/*/trustConfigs/*`.
|
2762
|
+
#
|
2763
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
2764
|
+
# @yieldparam response [::Google::Cloud::CertificateManager::V1::TrustConfig]
|
2765
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
2766
|
+
#
|
2767
|
+
# @return [::Google::Cloud::CertificateManager::V1::TrustConfig]
|
2768
|
+
#
|
2769
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2770
|
+
#
|
2771
|
+
# @example Basic example
|
2772
|
+
# require "google/cloud/certificate_manager/v1"
|
2773
|
+
#
|
2774
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2775
|
+
# client = Google::Cloud::CertificateManager::V1::CertificateManager::Client.new
|
2776
|
+
#
|
2777
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2778
|
+
# request = Google::Cloud::CertificateManager::V1::GetTrustConfigRequest.new
|
2779
|
+
#
|
2780
|
+
# # Call the get_trust_config method.
|
2781
|
+
# result = client.get_trust_config request
|
2782
|
+
#
|
2783
|
+
# # The returned object is of type Google::Cloud::CertificateManager::V1::TrustConfig.
|
2784
|
+
# p result
|
2785
|
+
#
|
2786
|
+
def get_trust_config request, options = nil
|
2787
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2788
|
+
|
2789
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::GetTrustConfigRequest
|
2790
|
+
|
2791
|
+
# Converts hash and nil to an options object
|
2792
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2793
|
+
|
2794
|
+
# Customize the options with defaults
|
2795
|
+
metadata = @config.rpcs.get_trust_config.metadata.to_h
|
2796
|
+
|
2797
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
2798
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2799
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2800
|
+
gapic_version: ::Google::Cloud::CertificateManager::V1::VERSION
|
2801
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2802
|
+
|
2803
|
+
header_params = {}
|
2804
|
+
if request.name
|
2805
|
+
header_params["name"] = request.name
|
2806
|
+
end
|
2807
|
+
|
2808
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2809
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
2810
|
+
|
2811
|
+
options.apply_defaults timeout: @config.rpcs.get_trust_config.timeout,
|
2812
|
+
metadata: metadata,
|
2813
|
+
retry_policy: @config.rpcs.get_trust_config.retry_policy
|
2814
|
+
|
2815
|
+
options.apply_defaults timeout: @config.timeout,
|
2816
|
+
metadata: @config.metadata,
|
2817
|
+
retry_policy: @config.retry_policy
|
2818
|
+
|
2819
|
+
@certificate_manager_stub.call_rpc :get_trust_config, request, options: options do |response, operation|
|
2820
|
+
yield response, operation if block_given?
|
2821
|
+
return response
|
2822
|
+
end
|
2823
|
+
rescue ::GRPC::BadStatus => e
|
2824
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2825
|
+
end
|
2826
|
+
|
2827
|
+
##
|
2828
|
+
# Creates a new TrustConfig in a given project and location.
|
2829
|
+
#
|
2830
|
+
# @overload create_trust_config(request, options = nil)
|
2831
|
+
# Pass arguments to `create_trust_config` via a request object, either of type
|
2832
|
+
# {::Google::Cloud::CertificateManager::V1::CreateTrustConfigRequest} or an equivalent Hash.
|
2833
|
+
#
|
2834
|
+
# @param request [::Google::Cloud::CertificateManager::V1::CreateTrustConfigRequest, ::Hash]
|
2835
|
+
# A request object representing the call parameters. Required. To specify no
|
2836
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2837
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2838
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
2839
|
+
#
|
2840
|
+
# @overload create_trust_config(parent: nil, trust_config_id: nil, trust_config: nil)
|
2841
|
+
# Pass arguments to `create_trust_config` via keyword arguments. Note that at
|
2842
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2843
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2844
|
+
#
|
2845
|
+
# @param parent [::String]
|
2846
|
+
# Required. The parent resource of the TrustConfig. Must be in the format
|
2847
|
+
# `projects/*/locations/*`.
|
2848
|
+
# @param trust_config_id [::String]
|
2849
|
+
# Required. A user-provided name of the TrustConfig. Must match the regexp
|
2850
|
+
# `[a-z0-9-]{1,63}`.
|
2851
|
+
# @param trust_config [::Google::Cloud::CertificateManager::V1::TrustConfig, ::Hash]
|
2852
|
+
# Required. A definition of the TrustConfig to create.
|
2853
|
+
#
|
2854
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
2855
|
+
# @yieldparam response [::Gapic::Operation]
|
2856
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
2857
|
+
#
|
2858
|
+
# @return [::Gapic::Operation]
|
2859
|
+
#
|
2860
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2861
|
+
#
|
2862
|
+
# @example Basic example
|
2863
|
+
# require "google/cloud/certificate_manager/v1"
|
2864
|
+
#
|
2865
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2866
|
+
# client = Google::Cloud::CertificateManager::V1::CertificateManager::Client.new
|
2867
|
+
#
|
2868
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2869
|
+
# request = Google::Cloud::CertificateManager::V1::CreateTrustConfigRequest.new
|
2870
|
+
#
|
2871
|
+
# # Call the create_trust_config method.
|
2872
|
+
# result = client.create_trust_config request
|
2873
|
+
#
|
2874
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
2875
|
+
# # check the status of an operation, cancel it, or wait for results.
|
2876
|
+
# # Here is how to wait for a response.
|
2877
|
+
# result.wait_until_done! timeout: 60
|
2878
|
+
# if result.response?
|
2879
|
+
# p result.response
|
2880
|
+
# else
|
2881
|
+
# puts "No response received."
|
2882
|
+
# end
|
2883
|
+
#
|
2884
|
+
def create_trust_config request, options = nil
|
2885
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2886
|
+
|
2887
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::CreateTrustConfigRequest
|
2888
|
+
|
2889
|
+
# Converts hash and nil to an options object
|
2890
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2891
|
+
|
2892
|
+
# Customize the options with defaults
|
2893
|
+
metadata = @config.rpcs.create_trust_config.metadata.to_h
|
2894
|
+
|
2895
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
2896
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2897
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2898
|
+
gapic_version: ::Google::Cloud::CertificateManager::V1::VERSION
|
2899
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2900
|
+
|
2901
|
+
header_params = {}
|
2902
|
+
if request.parent
|
2903
|
+
header_params["parent"] = request.parent
|
2904
|
+
end
|
2905
|
+
|
2906
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2907
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
2908
|
+
|
2909
|
+
options.apply_defaults timeout: @config.rpcs.create_trust_config.timeout,
|
2910
|
+
metadata: metadata,
|
2911
|
+
retry_policy: @config.rpcs.create_trust_config.retry_policy
|
2912
|
+
|
2913
|
+
options.apply_defaults timeout: @config.timeout,
|
2914
|
+
metadata: @config.metadata,
|
2915
|
+
retry_policy: @config.retry_policy
|
2916
|
+
|
2917
|
+
@certificate_manager_stub.call_rpc :create_trust_config, request, options: options do |response, operation|
|
2918
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
2919
|
+
yield response, operation if block_given?
|
2920
|
+
return response
|
2921
|
+
end
|
2922
|
+
rescue ::GRPC::BadStatus => e
|
2923
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2924
|
+
end
|
2925
|
+
|
2926
|
+
##
|
2927
|
+
# Updates a TrustConfig.
|
2928
|
+
#
|
2929
|
+
# @overload update_trust_config(request, options = nil)
|
2930
|
+
# Pass arguments to `update_trust_config` via a request object, either of type
|
2931
|
+
# {::Google::Cloud::CertificateManager::V1::UpdateTrustConfigRequest} or an equivalent Hash.
|
2932
|
+
#
|
2933
|
+
# @param request [::Google::Cloud::CertificateManager::V1::UpdateTrustConfigRequest, ::Hash]
|
2934
|
+
# A request object representing the call parameters. Required. To specify no
|
2935
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2936
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2937
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
2938
|
+
#
|
2939
|
+
# @overload update_trust_config(trust_config: nil, update_mask: nil)
|
2940
|
+
# Pass arguments to `update_trust_config` via keyword arguments. Note that at
|
2941
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2942
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2943
|
+
#
|
2944
|
+
# @param trust_config [::Google::Cloud::CertificateManager::V1::TrustConfig, ::Hash]
|
2945
|
+
# Required. A definition of the TrustConfig to update.
|
2946
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
2947
|
+
# Required. The update mask applies to the resource. For the `FieldMask`
|
2948
|
+
# definition, see
|
2949
|
+
# https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask.
|
2950
|
+
#
|
2951
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
2952
|
+
# @yieldparam response [::Gapic::Operation]
|
2953
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
2954
|
+
#
|
2955
|
+
# @return [::Gapic::Operation]
|
2956
|
+
#
|
2957
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2958
|
+
#
|
2959
|
+
# @example Basic example
|
2960
|
+
# require "google/cloud/certificate_manager/v1"
|
2961
|
+
#
|
2962
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2963
|
+
# client = Google::Cloud::CertificateManager::V1::CertificateManager::Client.new
|
2964
|
+
#
|
2965
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2966
|
+
# request = Google::Cloud::CertificateManager::V1::UpdateTrustConfigRequest.new
|
2967
|
+
#
|
2968
|
+
# # Call the update_trust_config method.
|
2969
|
+
# result = client.update_trust_config request
|
2970
|
+
#
|
2971
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
2972
|
+
# # check the status of an operation, cancel it, or wait for results.
|
2973
|
+
# # Here is how to wait for a response.
|
2974
|
+
# result.wait_until_done! timeout: 60
|
2975
|
+
# if result.response?
|
2976
|
+
# p result.response
|
2977
|
+
# else
|
2978
|
+
# puts "No response received."
|
2979
|
+
# end
|
2980
|
+
#
|
2981
|
+
def update_trust_config request, options = nil
|
2982
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2983
|
+
|
2984
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::UpdateTrustConfigRequest
|
2985
|
+
|
2986
|
+
# Converts hash and nil to an options object
|
2987
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2988
|
+
|
2989
|
+
# Customize the options with defaults
|
2990
|
+
metadata = @config.rpcs.update_trust_config.metadata.to_h
|
2991
|
+
|
2992
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
2993
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2994
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2995
|
+
gapic_version: ::Google::Cloud::CertificateManager::V1::VERSION
|
2996
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2997
|
+
|
2998
|
+
header_params = {}
|
2999
|
+
if request.trust_config&.name
|
3000
|
+
header_params["trust_config.name"] = request.trust_config.name
|
3001
|
+
end
|
3002
|
+
|
3003
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
3004
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
3005
|
+
|
3006
|
+
options.apply_defaults timeout: @config.rpcs.update_trust_config.timeout,
|
3007
|
+
metadata: metadata,
|
3008
|
+
retry_policy: @config.rpcs.update_trust_config.retry_policy
|
3009
|
+
|
3010
|
+
options.apply_defaults timeout: @config.timeout,
|
3011
|
+
metadata: @config.metadata,
|
3012
|
+
retry_policy: @config.retry_policy
|
3013
|
+
|
3014
|
+
@certificate_manager_stub.call_rpc :update_trust_config, request, options: options do |response, operation|
|
3015
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
3016
|
+
yield response, operation if block_given?
|
3017
|
+
return response
|
3018
|
+
end
|
3019
|
+
rescue ::GRPC::BadStatus => e
|
3020
|
+
raise ::Google::Cloud::Error.from_error(e)
|
3021
|
+
end
|
3022
|
+
|
3023
|
+
##
|
3024
|
+
# Deletes a single TrustConfig.
|
3025
|
+
#
|
3026
|
+
# @overload delete_trust_config(request, options = nil)
|
3027
|
+
# Pass arguments to `delete_trust_config` via a request object, either of type
|
3028
|
+
# {::Google::Cloud::CertificateManager::V1::DeleteTrustConfigRequest} or an equivalent Hash.
|
3029
|
+
#
|
3030
|
+
# @param request [::Google::Cloud::CertificateManager::V1::DeleteTrustConfigRequest, ::Hash]
|
3031
|
+
# A request object representing the call parameters. Required. To specify no
|
3032
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
3033
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
3034
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
3035
|
+
#
|
3036
|
+
# @overload delete_trust_config(name: nil, etag: nil)
|
3037
|
+
# Pass arguments to `delete_trust_config` via keyword arguments. Note that at
|
3038
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
3039
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
3040
|
+
#
|
3041
|
+
# @param name [::String]
|
3042
|
+
# Required. A name of the TrustConfig to delete. Must be in the format
|
3043
|
+
# `projects/*/locations/*/trustConfigs/*`.
|
3044
|
+
# @param etag [::String]
|
3045
|
+
# The current etag of the TrustConfig.
|
3046
|
+
# If an etag is provided and does not match the current etag of the resource,
|
3047
|
+
# deletion will be blocked and an ABORTED error will be returned.
|
3048
|
+
#
|
3049
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
3050
|
+
# @yieldparam response [::Gapic::Operation]
|
3051
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
3052
|
+
#
|
3053
|
+
# @return [::Gapic::Operation]
|
3054
|
+
#
|
3055
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
3056
|
+
#
|
3057
|
+
# @example Basic example
|
3058
|
+
# require "google/cloud/certificate_manager/v1"
|
3059
|
+
#
|
3060
|
+
# # Create a client object. The client can be reused for multiple calls.
|
3061
|
+
# client = Google::Cloud::CertificateManager::V1::CertificateManager::Client.new
|
3062
|
+
#
|
3063
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
3064
|
+
# request = Google::Cloud::CertificateManager::V1::DeleteTrustConfigRequest.new
|
3065
|
+
#
|
3066
|
+
# # Call the delete_trust_config method.
|
3067
|
+
# result = client.delete_trust_config request
|
3068
|
+
#
|
3069
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
3070
|
+
# # check the status of an operation, cancel it, or wait for results.
|
3071
|
+
# # Here is how to wait for a response.
|
3072
|
+
# result.wait_until_done! timeout: 60
|
3073
|
+
# if result.response?
|
3074
|
+
# p result.response
|
3075
|
+
# else
|
3076
|
+
# puts "No response received."
|
3077
|
+
# end
|
3078
|
+
#
|
3079
|
+
def delete_trust_config request, options = nil
|
3080
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
3081
|
+
|
3082
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::DeleteTrustConfigRequest
|
3083
|
+
|
3084
|
+
# Converts hash and nil to an options object
|
3085
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
3086
|
+
|
3087
|
+
# Customize the options with defaults
|
3088
|
+
metadata = @config.rpcs.delete_trust_config.metadata.to_h
|
3089
|
+
|
3090
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
3091
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
3092
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
3093
|
+
gapic_version: ::Google::Cloud::CertificateManager::V1::VERSION
|
3094
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
3095
|
+
|
3096
|
+
header_params = {}
|
3097
|
+
if request.name
|
3098
|
+
header_params["name"] = request.name
|
3099
|
+
end
|
3100
|
+
|
3101
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
3102
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
3103
|
+
|
3104
|
+
options.apply_defaults timeout: @config.rpcs.delete_trust_config.timeout,
|
3105
|
+
metadata: metadata,
|
3106
|
+
retry_policy: @config.rpcs.delete_trust_config.retry_policy
|
3107
|
+
|
3108
|
+
options.apply_defaults timeout: @config.timeout,
|
3109
|
+
metadata: @config.metadata,
|
3110
|
+
retry_policy: @config.retry_policy
|
3111
|
+
|
3112
|
+
@certificate_manager_stub.call_rpc :delete_trust_config, request, options: options do |response, operation|
|
3113
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
3114
|
+
yield response, operation if block_given?
|
3115
|
+
return response
|
3116
|
+
end
|
3117
|
+
rescue ::GRPC::BadStatus => e
|
3118
|
+
raise ::Google::Cloud::Error.from_error(e)
|
3119
|
+
end
|
3120
|
+
|
2638
3121
|
##
|
2639
3122
|
# Configuration class for the CertificateManager API.
|
2640
3123
|
#
|
@@ -2908,6 +3391,31 @@ module Google
|
|
2908
3391
|
# @return [::Gapic::Config::Method]
|
2909
3392
|
#
|
2910
3393
|
attr_reader :delete_certificate_issuance_config
|
3394
|
+
##
|
3395
|
+
# RPC-specific configuration for `list_trust_configs`
|
3396
|
+
# @return [::Gapic::Config::Method]
|
3397
|
+
#
|
3398
|
+
attr_reader :list_trust_configs
|
3399
|
+
##
|
3400
|
+
# RPC-specific configuration for `get_trust_config`
|
3401
|
+
# @return [::Gapic::Config::Method]
|
3402
|
+
#
|
3403
|
+
attr_reader :get_trust_config
|
3404
|
+
##
|
3405
|
+
# RPC-specific configuration for `create_trust_config`
|
3406
|
+
# @return [::Gapic::Config::Method]
|
3407
|
+
#
|
3408
|
+
attr_reader :create_trust_config
|
3409
|
+
##
|
3410
|
+
# RPC-specific configuration for `update_trust_config`
|
3411
|
+
# @return [::Gapic::Config::Method]
|
3412
|
+
#
|
3413
|
+
attr_reader :update_trust_config
|
3414
|
+
##
|
3415
|
+
# RPC-specific configuration for `delete_trust_config`
|
3416
|
+
# @return [::Gapic::Config::Method]
|
3417
|
+
#
|
3418
|
+
attr_reader :delete_trust_config
|
2911
3419
|
|
2912
3420
|
# @private
|
2913
3421
|
def initialize parent_rpcs = nil
|
@@ -2959,6 +3467,16 @@ module Google
|
|
2959
3467
|
@create_certificate_issuance_config = ::Gapic::Config::Method.new create_certificate_issuance_config_config
|
2960
3468
|
delete_certificate_issuance_config_config = parent_rpcs.delete_certificate_issuance_config if parent_rpcs.respond_to? :delete_certificate_issuance_config
|
2961
3469
|
@delete_certificate_issuance_config = ::Gapic::Config::Method.new delete_certificate_issuance_config_config
|
3470
|
+
list_trust_configs_config = parent_rpcs.list_trust_configs if parent_rpcs.respond_to? :list_trust_configs
|
3471
|
+
@list_trust_configs = ::Gapic::Config::Method.new list_trust_configs_config
|
3472
|
+
get_trust_config_config = parent_rpcs.get_trust_config if parent_rpcs.respond_to? :get_trust_config
|
3473
|
+
@get_trust_config = ::Gapic::Config::Method.new get_trust_config_config
|
3474
|
+
create_trust_config_config = parent_rpcs.create_trust_config if parent_rpcs.respond_to? :create_trust_config
|
3475
|
+
@create_trust_config = ::Gapic::Config::Method.new create_trust_config_config
|
3476
|
+
update_trust_config_config = parent_rpcs.update_trust_config if parent_rpcs.respond_to? :update_trust_config
|
3477
|
+
@update_trust_config = ::Gapic::Config::Method.new update_trust_config_config
|
3478
|
+
delete_trust_config_config = parent_rpcs.delete_trust_config if parent_rpcs.respond_to? :delete_trust_config
|
3479
|
+
@delete_trust_config = ::Gapic::Config::Method.new delete_trust_config_config
|
2962
3480
|
|
2963
3481
|
yield self if block_given?
|
2964
3482
|
end
|
@@ -157,6 +157,25 @@ module Google
|
|
157
157
|
"projects/#{project}/locations/#{location}"
|
158
158
|
end
|
159
159
|
|
160
|
+
##
|
161
|
+
# Create a fully-qualified TrustConfig resource string.
|
162
|
+
#
|
163
|
+
# The resource will be in the following format:
|
164
|
+
#
|
165
|
+
# `projects/{project}/locations/{location}/trustConfigs/{trust_config}`
|
166
|
+
#
|
167
|
+
# @param project [String]
|
168
|
+
# @param location [String]
|
169
|
+
# @param trust_config [String]
|
170
|
+
#
|
171
|
+
# @return [::String]
|
172
|
+
def trust_config_path project:, location:, trust_config:
|
173
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
174
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
175
|
+
|
176
|
+
"projects/#{project}/locations/#{location}/trustConfigs/#{trust_config}"
|
177
|
+
end
|
178
|
+
|
160
179
|
extend self
|
161
180
|
end
|
162
181
|
end
|