google-cloud-config_service-v1 2.0.1 → 2.2.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/lib/google/cloud/config/v1/config_pb.rb +14 -1
- data/lib/google/cloud/config/v1/config_services_pb.rb +8 -0
- data/lib/google/cloud/config_service/v1/config/client.rb +442 -4
- data/lib/google/cloud/config_service/v1/config/paths.rb +42 -0
- data/lib/google/cloud/config_service/v1/config/rest/client.rb +414 -4
- data/lib/google/cloud/config_service/v1/config/rest/service_stub.rb +244 -0
- data/lib/google/cloud/config_service/v1/version.rb +1 -1
- data/proto_docs/google/cloud/config/v1/config.rb +292 -11
- metadata +15 -33
@@ -2391,13 +2391,13 @@ module Google
|
|
2391
2391
|
# parent value is in the format:
|
2392
2392
|
# 'projects/\\{project_id}/locations/\\{location}'.
|
2393
2393
|
# @param page_size [::Integer]
|
2394
|
-
# Optional. When requesting a page of
|
2395
|
-
# of
|
2396
|
-
# maximum value is 1000.
|
2394
|
+
# Optional. When requesting a page of terraform versions, 'page_size'
|
2395
|
+
# specifies number of terraform versions to return. If unspecified, at most
|
2396
|
+
# 500 will be returned. The maximum value is 1000.
|
2397
2397
|
# @param page_token [::String]
|
2398
2398
|
# Optional. Token returned by previous call to 'ListTerraformVersions' which
|
2399
2399
|
# specifies the position in the list from where to continue listing the
|
2400
|
-
#
|
2400
|
+
# terraform versions.
|
2401
2401
|
# @param filter [::String]
|
2402
2402
|
# Optional. Lists the TerraformVersions that match the filter expression. A
|
2403
2403
|
# filter expression filters the resources listed in the response. The
|
@@ -2567,6 +2567,416 @@ module Google
|
|
2567
2567
|
raise ::Google::Cloud::Error.from_error(e)
|
2568
2568
|
end
|
2569
2569
|
|
2570
|
+
##
|
2571
|
+
# Lists ResourceChanges for a given preview.
|
2572
|
+
#
|
2573
|
+
# @overload list_resource_changes(request, options = nil)
|
2574
|
+
# Pass arguments to `list_resource_changes` via a request object, either of type
|
2575
|
+
# {::Google::Cloud::ConfigService::V1::ListResourceChangesRequest} or an equivalent Hash.
|
2576
|
+
#
|
2577
|
+
# @param request [::Google::Cloud::ConfigService::V1::ListResourceChangesRequest, ::Hash]
|
2578
|
+
# A request object representing the call parameters. Required. To specify no
|
2579
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2580
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2581
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
2582
|
+
#
|
2583
|
+
# @overload list_resource_changes(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
|
2584
|
+
# Pass arguments to `list_resource_changes` via keyword arguments. Note that at
|
2585
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2586
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2587
|
+
#
|
2588
|
+
# @param parent [::String]
|
2589
|
+
# Required. The parent in whose context the ResourceChanges are listed. The
|
2590
|
+
# parent value is in the format:
|
2591
|
+
# 'projects/\\{project_id}/locations/\\{location}/previews/\\{preview}'.
|
2592
|
+
# @param page_size [::Integer]
|
2593
|
+
# Optional. When requesting a page of resource changes, 'page_size' specifies
|
2594
|
+
# number of resource changes to return. If unspecified, at most 500 will be
|
2595
|
+
# returned. The maximum value is 1000.
|
2596
|
+
# @param page_token [::String]
|
2597
|
+
# Optional. Token returned by previous call to 'ListResourceChanges' which
|
2598
|
+
# specifies the position in the list from where to continue listing the
|
2599
|
+
# resource changes.
|
2600
|
+
# @param filter [::String]
|
2601
|
+
# Optional. Lists the resource changes that match the filter expression. A
|
2602
|
+
# filter expression filters the resource changes listed in the response. The
|
2603
|
+
# expression must be of the form '\\{field} \\{operator} \\{value}' where
|
2604
|
+
# operators: '<', '>',
|
2605
|
+
# '<=',
|
2606
|
+
# '>=',
|
2607
|
+
# '!=', '=', ':' are supported (colon ':' represents a HAS operator which is
|
2608
|
+
# roughly synonymous with equality). \\{field} can refer to a proto or JSON
|
2609
|
+
# field, or a synthetic field. Field names can be camelCase or snake_case.
|
2610
|
+
#
|
2611
|
+
# Examples:
|
2612
|
+
# - Filter by name:
|
2613
|
+
# name =
|
2614
|
+
# "projects/foo/locations/us-central1/previews/dep/resourceChanges/baz
|
2615
|
+
# @param order_by [::String]
|
2616
|
+
# Optional. Field to use to sort the list.
|
2617
|
+
#
|
2618
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
2619
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ConfigService::V1::ResourceChange>]
|
2620
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
2621
|
+
#
|
2622
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::ConfigService::V1::ResourceChange>]
|
2623
|
+
#
|
2624
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2625
|
+
#
|
2626
|
+
# @example Basic example
|
2627
|
+
# require "google/cloud/config_service/v1"
|
2628
|
+
#
|
2629
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2630
|
+
# client = Google::Cloud::ConfigService::V1::Config::Client.new
|
2631
|
+
#
|
2632
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2633
|
+
# request = Google::Cloud::ConfigService::V1::ListResourceChangesRequest.new
|
2634
|
+
#
|
2635
|
+
# # Call the list_resource_changes method.
|
2636
|
+
# result = client.list_resource_changes request
|
2637
|
+
#
|
2638
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
2639
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
2640
|
+
# result.each do |item|
|
2641
|
+
# # Each element is of type ::Google::Cloud::ConfigService::V1::ResourceChange.
|
2642
|
+
# p item
|
2643
|
+
# end
|
2644
|
+
#
|
2645
|
+
def list_resource_changes request, options = nil
|
2646
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2647
|
+
|
2648
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ConfigService::V1::ListResourceChangesRequest
|
2649
|
+
|
2650
|
+
# Converts hash and nil to an options object
|
2651
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2652
|
+
|
2653
|
+
# Customize the options with defaults
|
2654
|
+
metadata = @config.rpcs.list_resource_changes.metadata.to_h
|
2655
|
+
|
2656
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
2657
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2658
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2659
|
+
gapic_version: ::Google::Cloud::ConfigService::V1::VERSION
|
2660
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
2661
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2662
|
+
|
2663
|
+
header_params = {}
|
2664
|
+
if request.parent
|
2665
|
+
header_params["parent"] = request.parent
|
2666
|
+
end
|
2667
|
+
|
2668
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2669
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
2670
|
+
|
2671
|
+
options.apply_defaults timeout: @config.rpcs.list_resource_changes.timeout,
|
2672
|
+
metadata: metadata,
|
2673
|
+
retry_policy: @config.rpcs.list_resource_changes.retry_policy
|
2674
|
+
|
2675
|
+
options.apply_defaults timeout: @config.timeout,
|
2676
|
+
metadata: @config.metadata,
|
2677
|
+
retry_policy: @config.retry_policy
|
2678
|
+
|
2679
|
+
@config_stub.call_rpc :list_resource_changes, request, options: options do |response, operation|
|
2680
|
+
response = ::Gapic::PagedEnumerable.new @config_stub, :list_resource_changes, request, response, operation, options
|
2681
|
+
yield response, operation if block_given?
|
2682
|
+
throw :response, response
|
2683
|
+
end
|
2684
|
+
rescue ::GRPC::BadStatus => e
|
2685
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2686
|
+
end
|
2687
|
+
|
2688
|
+
##
|
2689
|
+
# Get a ResourceChange for a given preview.
|
2690
|
+
#
|
2691
|
+
# @overload get_resource_change(request, options = nil)
|
2692
|
+
# Pass arguments to `get_resource_change` via a request object, either of type
|
2693
|
+
# {::Google::Cloud::ConfigService::V1::GetResourceChangeRequest} or an equivalent Hash.
|
2694
|
+
#
|
2695
|
+
# @param request [::Google::Cloud::ConfigService::V1::GetResourceChangeRequest, ::Hash]
|
2696
|
+
# A request object representing the call parameters. Required. To specify no
|
2697
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2698
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2699
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
2700
|
+
#
|
2701
|
+
# @overload get_resource_change(name: nil)
|
2702
|
+
# Pass arguments to `get_resource_change` via keyword arguments. Note that at
|
2703
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2704
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2705
|
+
#
|
2706
|
+
# @param name [::String]
|
2707
|
+
# Required. The name of the resource change to retrieve.
|
2708
|
+
# Format:
|
2709
|
+
# 'projects/\\{project_id}/locations/\\{location}/previews/\\{preview}/resourceChanges/\\{resource_change}'.
|
2710
|
+
#
|
2711
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
2712
|
+
# @yieldparam response [::Google::Cloud::ConfigService::V1::ResourceChange]
|
2713
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
2714
|
+
#
|
2715
|
+
# @return [::Google::Cloud::ConfigService::V1::ResourceChange]
|
2716
|
+
#
|
2717
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2718
|
+
#
|
2719
|
+
# @example Basic example
|
2720
|
+
# require "google/cloud/config_service/v1"
|
2721
|
+
#
|
2722
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2723
|
+
# client = Google::Cloud::ConfigService::V1::Config::Client.new
|
2724
|
+
#
|
2725
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2726
|
+
# request = Google::Cloud::ConfigService::V1::GetResourceChangeRequest.new
|
2727
|
+
#
|
2728
|
+
# # Call the get_resource_change method.
|
2729
|
+
# result = client.get_resource_change request
|
2730
|
+
#
|
2731
|
+
# # The returned object is of type Google::Cloud::ConfigService::V1::ResourceChange.
|
2732
|
+
# p result
|
2733
|
+
#
|
2734
|
+
def get_resource_change request, options = nil
|
2735
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2736
|
+
|
2737
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ConfigService::V1::GetResourceChangeRequest
|
2738
|
+
|
2739
|
+
# Converts hash and nil to an options object
|
2740
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2741
|
+
|
2742
|
+
# Customize the options with defaults
|
2743
|
+
metadata = @config.rpcs.get_resource_change.metadata.to_h
|
2744
|
+
|
2745
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
2746
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2747
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2748
|
+
gapic_version: ::Google::Cloud::ConfigService::V1::VERSION
|
2749
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
2750
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2751
|
+
|
2752
|
+
header_params = {}
|
2753
|
+
if request.name
|
2754
|
+
header_params["name"] = request.name
|
2755
|
+
end
|
2756
|
+
|
2757
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2758
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
2759
|
+
|
2760
|
+
options.apply_defaults timeout: @config.rpcs.get_resource_change.timeout,
|
2761
|
+
metadata: metadata,
|
2762
|
+
retry_policy: @config.rpcs.get_resource_change.retry_policy
|
2763
|
+
|
2764
|
+
options.apply_defaults timeout: @config.timeout,
|
2765
|
+
metadata: @config.metadata,
|
2766
|
+
retry_policy: @config.retry_policy
|
2767
|
+
|
2768
|
+
@config_stub.call_rpc :get_resource_change, request, options: options do |response, operation|
|
2769
|
+
yield response, operation if block_given?
|
2770
|
+
end
|
2771
|
+
rescue ::GRPC::BadStatus => e
|
2772
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2773
|
+
end
|
2774
|
+
|
2775
|
+
##
|
2776
|
+
# List ResourceDrifts for a given preview.
|
2777
|
+
#
|
2778
|
+
# @overload list_resource_drifts(request, options = nil)
|
2779
|
+
# Pass arguments to `list_resource_drifts` via a request object, either of type
|
2780
|
+
# {::Google::Cloud::ConfigService::V1::ListResourceDriftsRequest} or an equivalent Hash.
|
2781
|
+
#
|
2782
|
+
# @param request [::Google::Cloud::ConfigService::V1::ListResourceDriftsRequest, ::Hash]
|
2783
|
+
# A request object representing the call parameters. Required. To specify no
|
2784
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2785
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2786
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
2787
|
+
#
|
2788
|
+
# @overload list_resource_drifts(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
|
2789
|
+
# Pass arguments to `list_resource_drifts` via keyword arguments. Note that at
|
2790
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2791
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2792
|
+
#
|
2793
|
+
# @param parent [::String]
|
2794
|
+
# Required. The parent in whose context the ResourceDrifts are listed. The
|
2795
|
+
# parent value is in the format:
|
2796
|
+
# 'projects/\\{project_id}/locations/\\{location}/previews/\\{preview}'.
|
2797
|
+
# @param page_size [::Integer]
|
2798
|
+
# Optional. When requesting a page of resource drifts, 'page_size' specifies
|
2799
|
+
# number of resource drifts to return. If unspecified, at most 500 will be
|
2800
|
+
# returned. The maximum value is 1000.
|
2801
|
+
# @param page_token [::String]
|
2802
|
+
# Optional. Token returned by previous call to 'ListResourceDrifts' which
|
2803
|
+
# specifies the position in the list from where to continue listing the
|
2804
|
+
# resource drifts.
|
2805
|
+
# @param filter [::String]
|
2806
|
+
# Optional. Lists the resource drifts that match the filter expression. A
|
2807
|
+
# filter expression filters the resource drifts listed in the response. The
|
2808
|
+
# expression must be of the form '\\{field} \\{operator} \\{value}' where
|
2809
|
+
# operators: '<', '>',
|
2810
|
+
# '<=',
|
2811
|
+
# '>=',
|
2812
|
+
# '!=', '=', ':' are supported (colon ':' represents a HAS operator which is
|
2813
|
+
# roughly synonymous with equality). \\{field} can refer to a proto or JSON
|
2814
|
+
# field, or a synthetic field. Field names can be camelCase or snake_case.
|
2815
|
+
#
|
2816
|
+
# Examples:
|
2817
|
+
# - Filter by name:
|
2818
|
+
# name =
|
2819
|
+
# "projects/foo/locations/us-central1/previews/dep/resourceDrifts/baz
|
2820
|
+
# @param order_by [::String]
|
2821
|
+
# Optional. Field to use to sort the list.
|
2822
|
+
#
|
2823
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
2824
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ConfigService::V1::ResourceDrift>]
|
2825
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
2826
|
+
#
|
2827
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::ConfigService::V1::ResourceDrift>]
|
2828
|
+
#
|
2829
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2830
|
+
#
|
2831
|
+
# @example Basic example
|
2832
|
+
# require "google/cloud/config_service/v1"
|
2833
|
+
#
|
2834
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2835
|
+
# client = Google::Cloud::ConfigService::V1::Config::Client.new
|
2836
|
+
#
|
2837
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2838
|
+
# request = Google::Cloud::ConfigService::V1::ListResourceDriftsRequest.new
|
2839
|
+
#
|
2840
|
+
# # Call the list_resource_drifts method.
|
2841
|
+
# result = client.list_resource_drifts request
|
2842
|
+
#
|
2843
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
2844
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
2845
|
+
# result.each do |item|
|
2846
|
+
# # Each element is of type ::Google::Cloud::ConfigService::V1::ResourceDrift.
|
2847
|
+
# p item
|
2848
|
+
# end
|
2849
|
+
#
|
2850
|
+
def list_resource_drifts request, options = nil
|
2851
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2852
|
+
|
2853
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ConfigService::V1::ListResourceDriftsRequest
|
2854
|
+
|
2855
|
+
# Converts hash and nil to an options object
|
2856
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2857
|
+
|
2858
|
+
# Customize the options with defaults
|
2859
|
+
metadata = @config.rpcs.list_resource_drifts.metadata.to_h
|
2860
|
+
|
2861
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
2862
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2863
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2864
|
+
gapic_version: ::Google::Cloud::ConfigService::V1::VERSION
|
2865
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
2866
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2867
|
+
|
2868
|
+
header_params = {}
|
2869
|
+
if request.parent
|
2870
|
+
header_params["parent"] = request.parent
|
2871
|
+
end
|
2872
|
+
|
2873
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2874
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
2875
|
+
|
2876
|
+
options.apply_defaults timeout: @config.rpcs.list_resource_drifts.timeout,
|
2877
|
+
metadata: metadata,
|
2878
|
+
retry_policy: @config.rpcs.list_resource_drifts.retry_policy
|
2879
|
+
|
2880
|
+
options.apply_defaults timeout: @config.timeout,
|
2881
|
+
metadata: @config.metadata,
|
2882
|
+
retry_policy: @config.retry_policy
|
2883
|
+
|
2884
|
+
@config_stub.call_rpc :list_resource_drifts, request, options: options do |response, operation|
|
2885
|
+
response = ::Gapic::PagedEnumerable.new @config_stub, :list_resource_drifts, request, response, operation, options
|
2886
|
+
yield response, operation if block_given?
|
2887
|
+
throw :response, response
|
2888
|
+
end
|
2889
|
+
rescue ::GRPC::BadStatus => e
|
2890
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2891
|
+
end
|
2892
|
+
|
2893
|
+
##
|
2894
|
+
# Get a ResourceDrift for a given preview.
|
2895
|
+
#
|
2896
|
+
# @overload get_resource_drift(request, options = nil)
|
2897
|
+
# Pass arguments to `get_resource_drift` via a request object, either of type
|
2898
|
+
# {::Google::Cloud::ConfigService::V1::GetResourceDriftRequest} or an equivalent Hash.
|
2899
|
+
#
|
2900
|
+
# @param request [::Google::Cloud::ConfigService::V1::GetResourceDriftRequest, ::Hash]
|
2901
|
+
# A request object representing the call parameters. Required. To specify no
|
2902
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2903
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2904
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
2905
|
+
#
|
2906
|
+
# @overload get_resource_drift(name: nil)
|
2907
|
+
# Pass arguments to `get_resource_drift` via keyword arguments. Note that at
|
2908
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2909
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2910
|
+
#
|
2911
|
+
# @param name [::String]
|
2912
|
+
# Required. The name of the resource drift to retrieve.
|
2913
|
+
# Format:
|
2914
|
+
# 'projects/\\{project_id}/locations/\\{location}/previews/\\{preview}/resourceDrifts/\\{resource_drift}'.
|
2915
|
+
#
|
2916
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
2917
|
+
# @yieldparam response [::Google::Cloud::ConfigService::V1::ResourceDrift]
|
2918
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
2919
|
+
#
|
2920
|
+
# @return [::Google::Cloud::ConfigService::V1::ResourceDrift]
|
2921
|
+
#
|
2922
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2923
|
+
#
|
2924
|
+
# @example Basic example
|
2925
|
+
# require "google/cloud/config_service/v1"
|
2926
|
+
#
|
2927
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2928
|
+
# client = Google::Cloud::ConfigService::V1::Config::Client.new
|
2929
|
+
#
|
2930
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2931
|
+
# request = Google::Cloud::ConfigService::V1::GetResourceDriftRequest.new
|
2932
|
+
#
|
2933
|
+
# # Call the get_resource_drift method.
|
2934
|
+
# result = client.get_resource_drift request
|
2935
|
+
#
|
2936
|
+
# # The returned object is of type Google::Cloud::ConfigService::V1::ResourceDrift.
|
2937
|
+
# p result
|
2938
|
+
#
|
2939
|
+
def get_resource_drift request, options = nil
|
2940
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2941
|
+
|
2942
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ConfigService::V1::GetResourceDriftRequest
|
2943
|
+
|
2944
|
+
# Converts hash and nil to an options object
|
2945
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2946
|
+
|
2947
|
+
# Customize the options with defaults
|
2948
|
+
metadata = @config.rpcs.get_resource_drift.metadata.to_h
|
2949
|
+
|
2950
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
2951
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2952
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2953
|
+
gapic_version: ::Google::Cloud::ConfigService::V1::VERSION
|
2954
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
2955
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2956
|
+
|
2957
|
+
header_params = {}
|
2958
|
+
if request.name
|
2959
|
+
header_params["name"] = request.name
|
2960
|
+
end
|
2961
|
+
|
2962
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2963
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
2964
|
+
|
2965
|
+
options.apply_defaults timeout: @config.rpcs.get_resource_drift.timeout,
|
2966
|
+
metadata: metadata,
|
2967
|
+
retry_policy: @config.rpcs.get_resource_drift.retry_policy
|
2968
|
+
|
2969
|
+
options.apply_defaults timeout: @config.timeout,
|
2970
|
+
metadata: @config.metadata,
|
2971
|
+
retry_policy: @config.retry_policy
|
2972
|
+
|
2973
|
+
@config_stub.call_rpc :get_resource_drift, request, options: options do |response, operation|
|
2974
|
+
yield response, operation if block_given?
|
2975
|
+
end
|
2976
|
+
rescue ::GRPC::BadStatus => e
|
2977
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2978
|
+
end
|
2979
|
+
|
2570
2980
|
##
|
2571
2981
|
# Configuration class for the Config API.
|
2572
2982
|
#
|
@@ -2848,6 +3258,26 @@ module Google
|
|
2848
3258
|
# @return [::Gapic::Config::Method]
|
2849
3259
|
#
|
2850
3260
|
attr_reader :get_terraform_version
|
3261
|
+
##
|
3262
|
+
# RPC-specific configuration for `list_resource_changes`
|
3263
|
+
# @return [::Gapic::Config::Method]
|
3264
|
+
#
|
3265
|
+
attr_reader :list_resource_changes
|
3266
|
+
##
|
3267
|
+
# RPC-specific configuration for `get_resource_change`
|
3268
|
+
# @return [::Gapic::Config::Method]
|
3269
|
+
#
|
3270
|
+
attr_reader :get_resource_change
|
3271
|
+
##
|
3272
|
+
# RPC-specific configuration for `list_resource_drifts`
|
3273
|
+
# @return [::Gapic::Config::Method]
|
3274
|
+
#
|
3275
|
+
attr_reader :list_resource_drifts
|
3276
|
+
##
|
3277
|
+
# RPC-specific configuration for `get_resource_drift`
|
3278
|
+
# @return [::Gapic::Config::Method]
|
3279
|
+
#
|
3280
|
+
attr_reader :get_resource_drift
|
2851
3281
|
|
2852
3282
|
# @private
|
2853
3283
|
def initialize parent_rpcs = nil
|
@@ -2897,6 +3327,14 @@ module Google
|
|
2897
3327
|
@list_terraform_versions = ::Gapic::Config::Method.new list_terraform_versions_config
|
2898
3328
|
get_terraform_version_config = parent_rpcs.get_terraform_version if parent_rpcs.respond_to? :get_terraform_version
|
2899
3329
|
@get_terraform_version = ::Gapic::Config::Method.new get_terraform_version_config
|
3330
|
+
list_resource_changes_config = parent_rpcs.list_resource_changes if parent_rpcs.respond_to? :list_resource_changes
|
3331
|
+
@list_resource_changes = ::Gapic::Config::Method.new list_resource_changes_config
|
3332
|
+
get_resource_change_config = parent_rpcs.get_resource_change if parent_rpcs.respond_to? :get_resource_change
|
3333
|
+
@get_resource_change = ::Gapic::Config::Method.new get_resource_change_config
|
3334
|
+
list_resource_drifts_config = parent_rpcs.list_resource_drifts if parent_rpcs.respond_to? :list_resource_drifts
|
3335
|
+
@list_resource_drifts = ::Gapic::Config::Method.new list_resource_drifts_config
|
3336
|
+
get_resource_drift_config = parent_rpcs.get_resource_drift if parent_rpcs.respond_to? :get_resource_drift
|
3337
|
+
@get_resource_drift = ::Gapic::Config::Method.new get_resource_drift_config
|
2900
3338
|
|
2901
3339
|
yield self if block_given?
|
2902
3340
|
end
|
@@ -102,6 +102,48 @@ module Google
|
|
102
102
|
"projects/#{project}/locations/#{location}/deployments/#{deployment}/revisions/#{revision}/resources/#{resource}"
|
103
103
|
end
|
104
104
|
|
105
|
+
##
|
106
|
+
# Create a fully-qualified ResourceChange resource string.
|
107
|
+
#
|
108
|
+
# The resource will be in the following format:
|
109
|
+
#
|
110
|
+
# `projects/{project}/locations/{location}/previews/{preview}/resourceChanges/{resource_change}`
|
111
|
+
#
|
112
|
+
# @param project [String]
|
113
|
+
# @param location [String]
|
114
|
+
# @param preview [String]
|
115
|
+
# @param resource_change [String]
|
116
|
+
#
|
117
|
+
# @return [::String]
|
118
|
+
def resource_change_path project:, location:, preview:, resource_change:
|
119
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
120
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
121
|
+
raise ::ArgumentError, "preview cannot contain /" if preview.to_s.include? "/"
|
122
|
+
|
123
|
+
"projects/#{project}/locations/#{location}/previews/#{preview}/resourceChanges/#{resource_change}"
|
124
|
+
end
|
125
|
+
|
126
|
+
##
|
127
|
+
# Create a fully-qualified ResourceDrift resource string.
|
128
|
+
#
|
129
|
+
# The resource will be in the following format:
|
130
|
+
#
|
131
|
+
# `projects/{project}/locations/{location}/previews/{preview}/resourceDrifts/{resource_drift}`
|
132
|
+
#
|
133
|
+
# @param project [String]
|
134
|
+
# @param location [String]
|
135
|
+
# @param preview [String]
|
136
|
+
# @param resource_drift [String]
|
137
|
+
#
|
138
|
+
# @return [::String]
|
139
|
+
def resource_drift_path project:, location:, preview:, resource_drift:
|
140
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
141
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
142
|
+
raise ::ArgumentError, "preview cannot contain /" if preview.to_s.include? "/"
|
143
|
+
|
144
|
+
"projects/#{project}/locations/#{location}/previews/#{preview}/resourceDrifts/#{resource_drift}"
|
145
|
+
end
|
146
|
+
|
105
147
|
##
|
106
148
|
# Create a fully-qualified Revision resource string.
|
107
149
|
#
|