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
@@ -2239,13 +2239,13 @@ module Google
|
|
2239
2239
|
# parent value is in the format:
|
2240
2240
|
# 'projects/\\{project_id}/locations/\\{location}'.
|
2241
2241
|
# @param page_size [::Integer]
|
2242
|
-
# Optional. When requesting a page of
|
2243
|
-
# of
|
2244
|
-
# maximum value is 1000.
|
2242
|
+
# Optional. When requesting a page of terraform versions, 'page_size'
|
2243
|
+
# specifies number of terraform versions to return. If unspecified, at most
|
2244
|
+
# 500 will be returned. The maximum value is 1000.
|
2245
2245
|
# @param page_token [::String]
|
2246
2246
|
# Optional. Token returned by previous call to 'ListTerraformVersions' which
|
2247
2247
|
# specifies the position in the list from where to continue listing the
|
2248
|
-
#
|
2248
|
+
# terraform versions.
|
2249
2249
|
# @param filter [::String]
|
2250
2250
|
# Optional. Lists the TerraformVersions that match the filter expression. A
|
2251
2251
|
# filter expression filters the resources listed in the response. The
|
@@ -2401,6 +2401,388 @@ module Google
|
|
2401
2401
|
raise ::Google::Cloud::Error.from_error(e)
|
2402
2402
|
end
|
2403
2403
|
|
2404
|
+
##
|
2405
|
+
# Lists ResourceChanges for a given preview.
|
2406
|
+
#
|
2407
|
+
# @overload list_resource_changes(request, options = nil)
|
2408
|
+
# Pass arguments to `list_resource_changes` via a request object, either of type
|
2409
|
+
# {::Google::Cloud::ConfigService::V1::ListResourceChangesRequest} or an equivalent Hash.
|
2410
|
+
#
|
2411
|
+
# @param request [::Google::Cloud::ConfigService::V1::ListResourceChangesRequest, ::Hash]
|
2412
|
+
# A request object representing the call parameters. Required. To specify no
|
2413
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2414
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2415
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
2416
|
+
#
|
2417
|
+
# @overload list_resource_changes(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
|
2418
|
+
# Pass arguments to `list_resource_changes` via keyword arguments. Note that at
|
2419
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2420
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2421
|
+
#
|
2422
|
+
# @param parent [::String]
|
2423
|
+
# Required. The parent in whose context the ResourceChanges are listed. The
|
2424
|
+
# parent value is in the format:
|
2425
|
+
# 'projects/\\{project_id}/locations/\\{location}/previews/\\{preview}'.
|
2426
|
+
# @param page_size [::Integer]
|
2427
|
+
# Optional. When requesting a page of resource changes, 'page_size' specifies
|
2428
|
+
# number of resource changes to return. If unspecified, at most 500 will be
|
2429
|
+
# returned. The maximum value is 1000.
|
2430
|
+
# @param page_token [::String]
|
2431
|
+
# Optional. Token returned by previous call to 'ListResourceChanges' which
|
2432
|
+
# specifies the position in the list from where to continue listing the
|
2433
|
+
# resource changes.
|
2434
|
+
# @param filter [::String]
|
2435
|
+
# Optional. Lists the resource changes that match the filter expression. A
|
2436
|
+
# filter expression filters the resource changes listed in the response. The
|
2437
|
+
# expression must be of the form '\\{field} \\{operator} \\{value}' where
|
2438
|
+
# operators: '<', '>',
|
2439
|
+
# '<=',
|
2440
|
+
# '>=',
|
2441
|
+
# '!=', '=', ':' are supported (colon ':' represents a HAS operator which is
|
2442
|
+
# roughly synonymous with equality). \\{field} can refer to a proto or JSON
|
2443
|
+
# field, or a synthetic field. Field names can be camelCase or snake_case.
|
2444
|
+
#
|
2445
|
+
# Examples:
|
2446
|
+
# - Filter by name:
|
2447
|
+
# name =
|
2448
|
+
# "projects/foo/locations/us-central1/previews/dep/resourceChanges/baz
|
2449
|
+
# @param order_by [::String]
|
2450
|
+
# Optional. Field to use to sort the list.
|
2451
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
2452
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ConfigService::V1::ResourceChange>]
|
2453
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
2454
|
+
#
|
2455
|
+
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ConfigService::V1::ResourceChange>]
|
2456
|
+
#
|
2457
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
2458
|
+
#
|
2459
|
+
# @example Basic example
|
2460
|
+
# require "google/cloud/config_service/v1"
|
2461
|
+
#
|
2462
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2463
|
+
# client = Google::Cloud::ConfigService::V1::Config::Rest::Client.new
|
2464
|
+
#
|
2465
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2466
|
+
# request = Google::Cloud::ConfigService::V1::ListResourceChangesRequest.new
|
2467
|
+
#
|
2468
|
+
# # Call the list_resource_changes method.
|
2469
|
+
# result = client.list_resource_changes request
|
2470
|
+
#
|
2471
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
2472
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
2473
|
+
# result.each do |item|
|
2474
|
+
# # Each element is of type ::Google::Cloud::ConfigService::V1::ResourceChange.
|
2475
|
+
# p item
|
2476
|
+
# end
|
2477
|
+
#
|
2478
|
+
def list_resource_changes request, options = nil
|
2479
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2480
|
+
|
2481
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ConfigService::V1::ListResourceChangesRequest
|
2482
|
+
|
2483
|
+
# Converts hash and nil to an options object
|
2484
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2485
|
+
|
2486
|
+
# Customize the options with defaults
|
2487
|
+
call_metadata = @config.rpcs.list_resource_changes.metadata.to_h
|
2488
|
+
|
2489
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
2490
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2491
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2492
|
+
gapic_version: ::Google::Cloud::ConfigService::V1::VERSION,
|
2493
|
+
transports_version_send: [:rest]
|
2494
|
+
|
2495
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
2496
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2497
|
+
|
2498
|
+
options.apply_defaults timeout: @config.rpcs.list_resource_changes.timeout,
|
2499
|
+
metadata: call_metadata,
|
2500
|
+
retry_policy: @config.rpcs.list_resource_changes.retry_policy
|
2501
|
+
|
2502
|
+
options.apply_defaults timeout: @config.timeout,
|
2503
|
+
metadata: @config.metadata,
|
2504
|
+
retry_policy: @config.retry_policy
|
2505
|
+
|
2506
|
+
@config_stub.list_resource_changes request, options do |result, operation|
|
2507
|
+
result = ::Gapic::Rest::PagedEnumerable.new @config_stub, :list_resource_changes, "resource_changes", request, result, options
|
2508
|
+
yield result, operation if block_given?
|
2509
|
+
throw :response, result
|
2510
|
+
end
|
2511
|
+
rescue ::Gapic::Rest::Error => e
|
2512
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2513
|
+
end
|
2514
|
+
|
2515
|
+
##
|
2516
|
+
# Get a ResourceChange for a given preview.
|
2517
|
+
#
|
2518
|
+
# @overload get_resource_change(request, options = nil)
|
2519
|
+
# Pass arguments to `get_resource_change` via a request object, either of type
|
2520
|
+
# {::Google::Cloud::ConfigService::V1::GetResourceChangeRequest} or an equivalent Hash.
|
2521
|
+
#
|
2522
|
+
# @param request [::Google::Cloud::ConfigService::V1::GetResourceChangeRequest, ::Hash]
|
2523
|
+
# A request object representing the call parameters. Required. To specify no
|
2524
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2525
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2526
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
2527
|
+
#
|
2528
|
+
# @overload get_resource_change(name: nil)
|
2529
|
+
# Pass arguments to `get_resource_change` via keyword arguments. Note that at
|
2530
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2531
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2532
|
+
#
|
2533
|
+
# @param name [::String]
|
2534
|
+
# Required. The name of the resource change to retrieve.
|
2535
|
+
# Format:
|
2536
|
+
# 'projects/\\{project_id}/locations/\\{location}/previews/\\{preview}/resourceChanges/\\{resource_change}'.
|
2537
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
2538
|
+
# @yieldparam result [::Google::Cloud::ConfigService::V1::ResourceChange]
|
2539
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
2540
|
+
#
|
2541
|
+
# @return [::Google::Cloud::ConfigService::V1::ResourceChange]
|
2542
|
+
#
|
2543
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
2544
|
+
#
|
2545
|
+
# @example Basic example
|
2546
|
+
# require "google/cloud/config_service/v1"
|
2547
|
+
#
|
2548
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2549
|
+
# client = Google::Cloud::ConfigService::V1::Config::Rest::Client.new
|
2550
|
+
#
|
2551
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2552
|
+
# request = Google::Cloud::ConfigService::V1::GetResourceChangeRequest.new
|
2553
|
+
#
|
2554
|
+
# # Call the get_resource_change method.
|
2555
|
+
# result = client.get_resource_change request
|
2556
|
+
#
|
2557
|
+
# # The returned object is of type Google::Cloud::ConfigService::V1::ResourceChange.
|
2558
|
+
# p result
|
2559
|
+
#
|
2560
|
+
def get_resource_change request, options = nil
|
2561
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2562
|
+
|
2563
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ConfigService::V1::GetResourceChangeRequest
|
2564
|
+
|
2565
|
+
# Converts hash and nil to an options object
|
2566
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2567
|
+
|
2568
|
+
# Customize the options with defaults
|
2569
|
+
call_metadata = @config.rpcs.get_resource_change.metadata.to_h
|
2570
|
+
|
2571
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
2572
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2573
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2574
|
+
gapic_version: ::Google::Cloud::ConfigService::V1::VERSION,
|
2575
|
+
transports_version_send: [:rest]
|
2576
|
+
|
2577
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
2578
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2579
|
+
|
2580
|
+
options.apply_defaults timeout: @config.rpcs.get_resource_change.timeout,
|
2581
|
+
metadata: call_metadata,
|
2582
|
+
retry_policy: @config.rpcs.get_resource_change.retry_policy
|
2583
|
+
|
2584
|
+
options.apply_defaults timeout: @config.timeout,
|
2585
|
+
metadata: @config.metadata,
|
2586
|
+
retry_policy: @config.retry_policy
|
2587
|
+
|
2588
|
+
@config_stub.get_resource_change request, options do |result, operation|
|
2589
|
+
yield result, operation if block_given?
|
2590
|
+
end
|
2591
|
+
rescue ::Gapic::Rest::Error => e
|
2592
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2593
|
+
end
|
2594
|
+
|
2595
|
+
##
|
2596
|
+
# List ResourceDrifts for a given preview.
|
2597
|
+
#
|
2598
|
+
# @overload list_resource_drifts(request, options = nil)
|
2599
|
+
# Pass arguments to `list_resource_drifts` via a request object, either of type
|
2600
|
+
# {::Google::Cloud::ConfigService::V1::ListResourceDriftsRequest} or an equivalent Hash.
|
2601
|
+
#
|
2602
|
+
# @param request [::Google::Cloud::ConfigService::V1::ListResourceDriftsRequest, ::Hash]
|
2603
|
+
# A request object representing the call parameters. Required. To specify no
|
2604
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2605
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2606
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
2607
|
+
#
|
2608
|
+
# @overload list_resource_drifts(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
|
2609
|
+
# Pass arguments to `list_resource_drifts` via keyword arguments. Note that at
|
2610
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2611
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2612
|
+
#
|
2613
|
+
# @param parent [::String]
|
2614
|
+
# Required. The parent in whose context the ResourceDrifts are listed. The
|
2615
|
+
# parent value is in the format:
|
2616
|
+
# 'projects/\\{project_id}/locations/\\{location}/previews/\\{preview}'.
|
2617
|
+
# @param page_size [::Integer]
|
2618
|
+
# Optional. When requesting a page of resource drifts, 'page_size' specifies
|
2619
|
+
# number of resource drifts to return. If unspecified, at most 500 will be
|
2620
|
+
# returned. The maximum value is 1000.
|
2621
|
+
# @param page_token [::String]
|
2622
|
+
# Optional. Token returned by previous call to 'ListResourceDrifts' which
|
2623
|
+
# specifies the position in the list from where to continue listing the
|
2624
|
+
# resource drifts.
|
2625
|
+
# @param filter [::String]
|
2626
|
+
# Optional. Lists the resource drifts that match the filter expression. A
|
2627
|
+
# filter expression filters the resource drifts listed in the response. The
|
2628
|
+
# expression must be of the form '\\{field} \\{operator} \\{value}' where
|
2629
|
+
# operators: '<', '>',
|
2630
|
+
# '<=',
|
2631
|
+
# '>=',
|
2632
|
+
# '!=', '=', ':' are supported (colon ':' represents a HAS operator which is
|
2633
|
+
# roughly synonymous with equality). \\{field} can refer to a proto or JSON
|
2634
|
+
# field, or a synthetic field. Field names can be camelCase or snake_case.
|
2635
|
+
#
|
2636
|
+
# Examples:
|
2637
|
+
# - Filter by name:
|
2638
|
+
# name =
|
2639
|
+
# "projects/foo/locations/us-central1/previews/dep/resourceDrifts/baz
|
2640
|
+
# @param order_by [::String]
|
2641
|
+
# Optional. Field to use to sort the list.
|
2642
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
2643
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ConfigService::V1::ResourceDrift>]
|
2644
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
2645
|
+
#
|
2646
|
+
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ConfigService::V1::ResourceDrift>]
|
2647
|
+
#
|
2648
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
2649
|
+
#
|
2650
|
+
# @example Basic example
|
2651
|
+
# require "google/cloud/config_service/v1"
|
2652
|
+
#
|
2653
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2654
|
+
# client = Google::Cloud::ConfigService::V1::Config::Rest::Client.new
|
2655
|
+
#
|
2656
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2657
|
+
# request = Google::Cloud::ConfigService::V1::ListResourceDriftsRequest.new
|
2658
|
+
#
|
2659
|
+
# # Call the list_resource_drifts method.
|
2660
|
+
# result = client.list_resource_drifts request
|
2661
|
+
#
|
2662
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
2663
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
2664
|
+
# result.each do |item|
|
2665
|
+
# # Each element is of type ::Google::Cloud::ConfigService::V1::ResourceDrift.
|
2666
|
+
# p item
|
2667
|
+
# end
|
2668
|
+
#
|
2669
|
+
def list_resource_drifts request, options = nil
|
2670
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2671
|
+
|
2672
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ConfigService::V1::ListResourceDriftsRequest
|
2673
|
+
|
2674
|
+
# Converts hash and nil to an options object
|
2675
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2676
|
+
|
2677
|
+
# Customize the options with defaults
|
2678
|
+
call_metadata = @config.rpcs.list_resource_drifts.metadata.to_h
|
2679
|
+
|
2680
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
2681
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2682
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2683
|
+
gapic_version: ::Google::Cloud::ConfigService::V1::VERSION,
|
2684
|
+
transports_version_send: [:rest]
|
2685
|
+
|
2686
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
2687
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2688
|
+
|
2689
|
+
options.apply_defaults timeout: @config.rpcs.list_resource_drifts.timeout,
|
2690
|
+
metadata: call_metadata,
|
2691
|
+
retry_policy: @config.rpcs.list_resource_drifts.retry_policy
|
2692
|
+
|
2693
|
+
options.apply_defaults timeout: @config.timeout,
|
2694
|
+
metadata: @config.metadata,
|
2695
|
+
retry_policy: @config.retry_policy
|
2696
|
+
|
2697
|
+
@config_stub.list_resource_drifts request, options do |result, operation|
|
2698
|
+
result = ::Gapic::Rest::PagedEnumerable.new @config_stub, :list_resource_drifts, "resource_drifts", request, result, options
|
2699
|
+
yield result, operation if block_given?
|
2700
|
+
throw :response, result
|
2701
|
+
end
|
2702
|
+
rescue ::Gapic::Rest::Error => e
|
2703
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2704
|
+
end
|
2705
|
+
|
2706
|
+
##
|
2707
|
+
# Get a ResourceDrift for a given preview.
|
2708
|
+
#
|
2709
|
+
# @overload get_resource_drift(request, options = nil)
|
2710
|
+
# Pass arguments to `get_resource_drift` via a request object, either of type
|
2711
|
+
# {::Google::Cloud::ConfigService::V1::GetResourceDriftRequest} or an equivalent Hash.
|
2712
|
+
#
|
2713
|
+
# @param request [::Google::Cloud::ConfigService::V1::GetResourceDriftRequest, ::Hash]
|
2714
|
+
# A request object representing the call parameters. Required. To specify no
|
2715
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2716
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2717
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
2718
|
+
#
|
2719
|
+
# @overload get_resource_drift(name: nil)
|
2720
|
+
# Pass arguments to `get_resource_drift` via keyword arguments. Note that at
|
2721
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2722
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2723
|
+
#
|
2724
|
+
# @param name [::String]
|
2725
|
+
# Required. The name of the resource drift to retrieve.
|
2726
|
+
# Format:
|
2727
|
+
# 'projects/\\{project_id}/locations/\\{location}/previews/\\{preview}/resourceDrifts/\\{resource_drift}'.
|
2728
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
2729
|
+
# @yieldparam result [::Google::Cloud::ConfigService::V1::ResourceDrift]
|
2730
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
2731
|
+
#
|
2732
|
+
# @return [::Google::Cloud::ConfigService::V1::ResourceDrift]
|
2733
|
+
#
|
2734
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
2735
|
+
#
|
2736
|
+
# @example Basic example
|
2737
|
+
# require "google/cloud/config_service/v1"
|
2738
|
+
#
|
2739
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2740
|
+
# client = Google::Cloud::ConfigService::V1::Config::Rest::Client.new
|
2741
|
+
#
|
2742
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2743
|
+
# request = Google::Cloud::ConfigService::V1::GetResourceDriftRequest.new
|
2744
|
+
#
|
2745
|
+
# # Call the get_resource_drift method.
|
2746
|
+
# result = client.get_resource_drift request
|
2747
|
+
#
|
2748
|
+
# # The returned object is of type Google::Cloud::ConfigService::V1::ResourceDrift.
|
2749
|
+
# p result
|
2750
|
+
#
|
2751
|
+
def get_resource_drift request, options = nil
|
2752
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2753
|
+
|
2754
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ConfigService::V1::GetResourceDriftRequest
|
2755
|
+
|
2756
|
+
# Converts hash and nil to an options object
|
2757
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2758
|
+
|
2759
|
+
# Customize the options with defaults
|
2760
|
+
call_metadata = @config.rpcs.get_resource_drift.metadata.to_h
|
2761
|
+
|
2762
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
2763
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2764
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2765
|
+
gapic_version: ::Google::Cloud::ConfigService::V1::VERSION,
|
2766
|
+
transports_version_send: [:rest]
|
2767
|
+
|
2768
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
2769
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2770
|
+
|
2771
|
+
options.apply_defaults timeout: @config.rpcs.get_resource_drift.timeout,
|
2772
|
+
metadata: call_metadata,
|
2773
|
+
retry_policy: @config.rpcs.get_resource_drift.retry_policy
|
2774
|
+
|
2775
|
+
options.apply_defaults timeout: @config.timeout,
|
2776
|
+
metadata: @config.metadata,
|
2777
|
+
retry_policy: @config.retry_policy
|
2778
|
+
|
2779
|
+
@config_stub.get_resource_drift request, options do |result, operation|
|
2780
|
+
yield result, operation if block_given?
|
2781
|
+
end
|
2782
|
+
rescue ::Gapic::Rest::Error => e
|
2783
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2784
|
+
end
|
2785
|
+
|
2404
2786
|
##
|
2405
2787
|
# Configuration class for the Config REST API.
|
2406
2788
|
#
|
@@ -2669,6 +3051,26 @@ module Google
|
|
2669
3051
|
# @return [::Gapic::Config::Method]
|
2670
3052
|
#
|
2671
3053
|
attr_reader :get_terraform_version
|
3054
|
+
##
|
3055
|
+
# RPC-specific configuration for `list_resource_changes`
|
3056
|
+
# @return [::Gapic::Config::Method]
|
3057
|
+
#
|
3058
|
+
attr_reader :list_resource_changes
|
3059
|
+
##
|
3060
|
+
# RPC-specific configuration for `get_resource_change`
|
3061
|
+
# @return [::Gapic::Config::Method]
|
3062
|
+
#
|
3063
|
+
attr_reader :get_resource_change
|
3064
|
+
##
|
3065
|
+
# RPC-specific configuration for `list_resource_drifts`
|
3066
|
+
# @return [::Gapic::Config::Method]
|
3067
|
+
#
|
3068
|
+
attr_reader :list_resource_drifts
|
3069
|
+
##
|
3070
|
+
# RPC-specific configuration for `get_resource_drift`
|
3071
|
+
# @return [::Gapic::Config::Method]
|
3072
|
+
#
|
3073
|
+
attr_reader :get_resource_drift
|
2672
3074
|
|
2673
3075
|
# @private
|
2674
3076
|
def initialize parent_rpcs = nil
|
@@ -2718,6 +3120,14 @@ module Google
|
|
2718
3120
|
@list_terraform_versions = ::Gapic::Config::Method.new list_terraform_versions_config
|
2719
3121
|
get_terraform_version_config = parent_rpcs.get_terraform_version if parent_rpcs.respond_to? :get_terraform_version
|
2720
3122
|
@get_terraform_version = ::Gapic::Config::Method.new get_terraform_version_config
|
3123
|
+
list_resource_changes_config = parent_rpcs.list_resource_changes if parent_rpcs.respond_to? :list_resource_changes
|
3124
|
+
@list_resource_changes = ::Gapic::Config::Method.new list_resource_changes_config
|
3125
|
+
get_resource_change_config = parent_rpcs.get_resource_change if parent_rpcs.respond_to? :get_resource_change
|
3126
|
+
@get_resource_change = ::Gapic::Config::Method.new get_resource_change_config
|
3127
|
+
list_resource_drifts_config = parent_rpcs.list_resource_drifts if parent_rpcs.respond_to? :list_resource_drifts
|
3128
|
+
@list_resource_drifts = ::Gapic::Config::Method.new list_resource_drifts_config
|
3129
|
+
get_resource_drift_config = parent_rpcs.get_resource_drift if parent_rpcs.respond_to? :get_resource_drift
|
3130
|
+
@get_resource_drift = ::Gapic::Config::Method.new get_resource_drift_config
|
2721
3131
|
|
2722
3132
|
yield self if block_given?
|
2723
3133
|
end
|