google-cloud-deploy-v1 1.1.0 → 1.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.
@@ -135,22 +135,6 @@ module Google
135
135
 
136
136
  default_config.rpcs.abandon_release.timeout = 60.0
137
137
 
138
- default_config.rpcs.create_deploy_policy.timeout = 60.0
139
-
140
- default_config.rpcs.update_deploy_policy.timeout = 60.0
141
-
142
- default_config.rpcs.delete_deploy_policy.timeout = 60.0
143
-
144
- default_config.rpcs.list_deploy_policies.timeout = 60.0
145
- default_config.rpcs.list_deploy_policies.retry_policy = {
146
- initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
147
- }
148
-
149
- default_config.rpcs.get_deploy_policy.timeout = 60.0
150
- default_config.rpcs.get_deploy_policy.retry_policy = {
151
- initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
152
- }
153
-
154
138
  default_config.rpcs.approve_rollout.timeout = 60.0
155
139
 
156
140
  default_config.rpcs.advance_rollout.timeout = 60.0
@@ -1029,7 +1013,7 @@ module Google
1029
1013
  # @param options [::Gapic::CallOptions, ::Hash]
1030
1014
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1031
1015
  #
1032
- # @overload rollback_target(name: nil, target_id: nil, rollout_id: nil, release_id: nil, rollout_to_roll_back: nil, rollback_config: nil, validate_only: nil, override_deploy_policy: nil)
1016
+ # @overload rollback_target(name: nil, target_id: nil, rollout_id: nil, release_id: nil, rollout_to_roll_back: nil, rollback_config: nil, validate_only: nil)
1033
1017
  # Pass arguments to `rollback_target` via keyword arguments. Note that at
1034
1018
  # least one keyword argument is required. To specify no parameters, or to keep all
1035
1019
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -1054,9 +1038,6 @@ module Google
1054
1038
  # @param validate_only [::Boolean]
1055
1039
  # Optional. If set to true, the request is validated and the user is provided
1056
1040
  # with a `RollbackTargetResponse`.
1057
- # @param override_deploy_policy [::Array<::String>]
1058
- # Optional. Deploy policies to override. Format is
1059
- # `projects/{project}/locations/{location}/deployPolicies/{deploy_policy}`.
1060
1041
  #
1061
1042
  # @yield [response, operation] Access the result along with the RPC operation
1062
1043
  # @yieldparam response [::Google::Cloud::Deploy::V1::RollbackTargetResponse]
@@ -2326,7 +2307,7 @@ module Google
2326
2307
  # @param options [::Gapic::CallOptions, ::Hash]
2327
2308
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2328
2309
  #
2329
- # @overload create_release(parent: nil, release_id: nil, release: nil, request_id: nil, validate_only: nil, override_deploy_policy: nil)
2310
+ # @overload create_release(parent: nil, release_id: nil, release: nil, request_id: nil, validate_only: nil)
2330
2311
  # Pass arguments to `create_release` via keyword arguments. Note that at
2331
2312
  # least one keyword argument is required. To specify no parameters, or to keep all
2332
2313
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -2356,9 +2337,6 @@ module Google
2356
2337
  # @param validate_only [::Boolean]
2357
2338
  # Optional. If set to true, the request is validated and the user is provided
2358
2339
  # with an expected result, but no actual change is made.
2359
- # @param override_deploy_policy [::Array<::String>]
2360
- # Optional. Deploy policies to override. Format is
2361
- # `projects/{project}/locations/{location}/deployPolicies/{deployPolicy}`.
2362
2340
  #
2363
2341
  # @yield [response, operation] Access the result along with the RPC operation
2364
2342
  # @yieldparam response [::Gapic::Operation]
@@ -2520,556 +2498,6 @@ module Google
2520
2498
  raise ::Google::Cloud::Error.from_error(e)
2521
2499
  end
2522
2500
 
2523
- ##
2524
- # Creates a new DeployPolicy in a given project and location.
2525
- #
2526
- # @overload create_deploy_policy(request, options = nil)
2527
- # Pass arguments to `create_deploy_policy` via a request object, either of type
2528
- # {::Google::Cloud::Deploy::V1::CreateDeployPolicyRequest} or an equivalent Hash.
2529
- #
2530
- # @param request [::Google::Cloud::Deploy::V1::CreateDeployPolicyRequest, ::Hash]
2531
- # A request object representing the call parameters. Required. To specify no
2532
- # parameters, or to keep all the default parameter values, pass an empty Hash.
2533
- # @param options [::Gapic::CallOptions, ::Hash]
2534
- # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2535
- #
2536
- # @overload create_deploy_policy(parent: nil, deploy_policy_id: nil, deploy_policy: nil, request_id: nil, validate_only: nil)
2537
- # Pass arguments to `create_deploy_policy` via keyword arguments. Note that at
2538
- # least one keyword argument is required. To specify no parameters, or to keep all
2539
- # the default parameter values, pass an empty Hash as a request object (see above).
2540
- #
2541
- # @param parent [::String]
2542
- # Required. The parent collection in which the `DeployPolicy` must be
2543
- # created. The format is `projects/{project_id}/locations/{location_name}`.
2544
- # @param deploy_policy_id [::String]
2545
- # Required. ID of the `DeployPolicy`.
2546
- # @param deploy_policy [::Google::Cloud::Deploy::V1::DeployPolicy, ::Hash]
2547
- # Required. The `DeployPolicy` to create.
2548
- # @param request_id [::String]
2549
- # Optional. A request ID to identify requests. Specify a unique request ID
2550
- # so that if you must retry your request, the server knows to ignore the
2551
- # request if it has already been completed. The server guarantees that for
2552
- # at least 60 minutes after the first request.
2553
- #
2554
- # For example, consider a situation where you make an initial request and the
2555
- # request times out. If you make the request again with the same request ID,
2556
- # the server can check if original operation with the same request ID was
2557
- # received, and if so, will ignore the second request. This prevents clients
2558
- # from accidentally creating duplicate commitments.
2559
- #
2560
- # The request ID must be a valid UUID with the exception that zero UUID is
2561
- # not supported (00000000-0000-0000-0000-000000000000).
2562
- # @param validate_only [::Boolean]
2563
- # Optional. If set to true, the request is validated and the user is provided
2564
- # with an expected result, but no actual change is made.
2565
- #
2566
- # @yield [response, operation] Access the result along with the RPC operation
2567
- # @yieldparam response [::Gapic::Operation]
2568
- # @yieldparam operation [::GRPC::ActiveCall::Operation]
2569
- #
2570
- # @return [::Gapic::Operation]
2571
- #
2572
- # @raise [::Google::Cloud::Error] if the RPC is aborted.
2573
- #
2574
- # @example Basic example
2575
- # require "google/cloud/deploy/v1"
2576
- #
2577
- # # Create a client object. The client can be reused for multiple calls.
2578
- # client = Google::Cloud::Deploy::V1::CloudDeploy::Client.new
2579
- #
2580
- # # Create a request. To set request fields, pass in keyword arguments.
2581
- # request = Google::Cloud::Deploy::V1::CreateDeployPolicyRequest.new
2582
- #
2583
- # # Call the create_deploy_policy method.
2584
- # result = client.create_deploy_policy request
2585
- #
2586
- # # The returned object is of type Gapic::Operation. You can use it to
2587
- # # check the status of an operation, cancel it, or wait for results.
2588
- # # Here is how to wait for a response.
2589
- # result.wait_until_done! timeout: 60
2590
- # if result.response?
2591
- # p result.response
2592
- # else
2593
- # puts "No response received."
2594
- # end
2595
- #
2596
- def create_deploy_policy request, options = nil
2597
- raise ::ArgumentError, "request must be provided" if request.nil?
2598
-
2599
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Deploy::V1::CreateDeployPolicyRequest
2600
-
2601
- # Converts hash and nil to an options object
2602
- options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2603
-
2604
- # Customize the options with defaults
2605
- metadata = @config.rpcs.create_deploy_policy.metadata.to_h
2606
-
2607
- # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2608
- metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2609
- lib_name: @config.lib_name, lib_version: @config.lib_version,
2610
- gapic_version: ::Google::Cloud::Deploy::V1::VERSION
2611
- metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2612
- metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2613
-
2614
- header_params = {}
2615
- if request.parent
2616
- header_params["parent"] = request.parent
2617
- end
2618
-
2619
- request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2620
- metadata[:"x-goog-request-params"] ||= request_params_header
2621
-
2622
- options.apply_defaults timeout: @config.rpcs.create_deploy_policy.timeout,
2623
- metadata: metadata,
2624
- retry_policy: @config.rpcs.create_deploy_policy.retry_policy
2625
-
2626
- options.apply_defaults timeout: @config.timeout,
2627
- metadata: @config.metadata,
2628
- retry_policy: @config.retry_policy
2629
-
2630
- @cloud_deploy_stub.call_rpc :create_deploy_policy, request, options: options do |response, operation|
2631
- response = ::Gapic::Operation.new response, @operations_client, options: options
2632
- yield response, operation if block_given?
2633
- return response
2634
- end
2635
- rescue ::GRPC::BadStatus => e
2636
- raise ::Google::Cloud::Error.from_error(e)
2637
- end
2638
-
2639
- ##
2640
- # Updates the parameters of a single DeployPolicy.
2641
- #
2642
- # @overload update_deploy_policy(request, options = nil)
2643
- # Pass arguments to `update_deploy_policy` via a request object, either of type
2644
- # {::Google::Cloud::Deploy::V1::UpdateDeployPolicyRequest} or an equivalent Hash.
2645
- #
2646
- # @param request [::Google::Cloud::Deploy::V1::UpdateDeployPolicyRequest, ::Hash]
2647
- # A request object representing the call parameters. Required. To specify no
2648
- # parameters, or to keep all the default parameter values, pass an empty Hash.
2649
- # @param options [::Gapic::CallOptions, ::Hash]
2650
- # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2651
- #
2652
- # @overload update_deploy_policy(update_mask: nil, deploy_policy: nil, request_id: nil, allow_missing: nil, validate_only: nil)
2653
- # Pass arguments to `update_deploy_policy` via keyword arguments. Note that at
2654
- # least one keyword argument is required. To specify no parameters, or to keep all
2655
- # the default parameter values, pass an empty Hash as a request object (see above).
2656
- #
2657
- # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
2658
- # Required. Field mask is used to specify the fields to be overwritten by the
2659
- # update in the `DeployPolicy` resource. The fields specified in the
2660
- # update_mask are relative to the resource, not the full request. A field
2661
- # will be overwritten if it's in the mask. If the user doesn't provide a mask
2662
- # then all fields are overwritten.
2663
- # @param deploy_policy [::Google::Cloud::Deploy::V1::DeployPolicy, ::Hash]
2664
- # Required. The `DeployPolicy` to update.
2665
- # @param request_id [::String]
2666
- # Optional. A request ID to identify requests. Specify a unique request ID
2667
- # so that if you must retry your request, the server knows to ignore the
2668
- # request if it has already been completed. The server guarantees that for
2669
- # at least 60 minutes after the first request.
2670
- #
2671
- # For example, consider a situation where you make an initial request and the
2672
- # request times out. If you make the request again with the same request ID,
2673
- # the server can check if original operation with the same request ID was
2674
- # received, and if so, will ignore the second request. This prevents clients
2675
- # from accidentally creating duplicate commitments.
2676
- #
2677
- # The request ID must be a valid UUID with the exception that zero UUID is
2678
- # not supported (00000000-0000-0000-0000-000000000000).
2679
- # @param allow_missing [::Boolean]
2680
- # Optional. If set to true, updating a `DeployPolicy` that does not exist
2681
- # will result in the creation of a new `DeployPolicy`.
2682
- # @param validate_only [::Boolean]
2683
- # Optional. If set to true, the request is validated and the user is provided
2684
- # with an expected result, but no actual change is made.
2685
- #
2686
- # @yield [response, operation] Access the result along with the RPC operation
2687
- # @yieldparam response [::Gapic::Operation]
2688
- # @yieldparam operation [::GRPC::ActiveCall::Operation]
2689
- #
2690
- # @return [::Gapic::Operation]
2691
- #
2692
- # @raise [::Google::Cloud::Error] if the RPC is aborted.
2693
- #
2694
- # @example Basic example
2695
- # require "google/cloud/deploy/v1"
2696
- #
2697
- # # Create a client object. The client can be reused for multiple calls.
2698
- # client = Google::Cloud::Deploy::V1::CloudDeploy::Client.new
2699
- #
2700
- # # Create a request. To set request fields, pass in keyword arguments.
2701
- # request = Google::Cloud::Deploy::V1::UpdateDeployPolicyRequest.new
2702
- #
2703
- # # Call the update_deploy_policy method.
2704
- # result = client.update_deploy_policy request
2705
- #
2706
- # # The returned object is of type Gapic::Operation. You can use it to
2707
- # # check the status of an operation, cancel it, or wait for results.
2708
- # # Here is how to wait for a response.
2709
- # result.wait_until_done! timeout: 60
2710
- # if result.response?
2711
- # p result.response
2712
- # else
2713
- # puts "No response received."
2714
- # end
2715
- #
2716
- def update_deploy_policy request, options = nil
2717
- raise ::ArgumentError, "request must be provided" if request.nil?
2718
-
2719
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Deploy::V1::UpdateDeployPolicyRequest
2720
-
2721
- # Converts hash and nil to an options object
2722
- options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2723
-
2724
- # Customize the options with defaults
2725
- metadata = @config.rpcs.update_deploy_policy.metadata.to_h
2726
-
2727
- # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2728
- metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2729
- lib_name: @config.lib_name, lib_version: @config.lib_version,
2730
- gapic_version: ::Google::Cloud::Deploy::V1::VERSION
2731
- metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2732
- metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2733
-
2734
- header_params = {}
2735
- if request.deploy_policy&.name
2736
- header_params["deploy_policy.name"] = request.deploy_policy.name
2737
- end
2738
-
2739
- request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2740
- metadata[:"x-goog-request-params"] ||= request_params_header
2741
-
2742
- options.apply_defaults timeout: @config.rpcs.update_deploy_policy.timeout,
2743
- metadata: metadata,
2744
- retry_policy: @config.rpcs.update_deploy_policy.retry_policy
2745
-
2746
- options.apply_defaults timeout: @config.timeout,
2747
- metadata: @config.metadata,
2748
- retry_policy: @config.retry_policy
2749
-
2750
- @cloud_deploy_stub.call_rpc :update_deploy_policy, request, options: options do |response, operation|
2751
- response = ::Gapic::Operation.new response, @operations_client, options: options
2752
- yield response, operation if block_given?
2753
- return response
2754
- end
2755
- rescue ::GRPC::BadStatus => e
2756
- raise ::Google::Cloud::Error.from_error(e)
2757
- end
2758
-
2759
- ##
2760
- # Deletes a single DeployPolicy.
2761
- #
2762
- # @overload delete_deploy_policy(request, options = nil)
2763
- # Pass arguments to `delete_deploy_policy` via a request object, either of type
2764
- # {::Google::Cloud::Deploy::V1::DeleteDeployPolicyRequest} or an equivalent Hash.
2765
- #
2766
- # @param request [::Google::Cloud::Deploy::V1::DeleteDeployPolicyRequest, ::Hash]
2767
- # A request object representing the call parameters. Required. To specify no
2768
- # parameters, or to keep all the default parameter values, pass an empty Hash.
2769
- # @param options [::Gapic::CallOptions, ::Hash]
2770
- # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2771
- #
2772
- # @overload delete_deploy_policy(name: nil, request_id: nil, allow_missing: nil, validate_only: nil, etag: nil)
2773
- # Pass arguments to `delete_deploy_policy` via keyword arguments. Note that at
2774
- # least one keyword argument is required. To specify no parameters, or to keep all
2775
- # the default parameter values, pass an empty Hash as a request object (see above).
2776
- #
2777
- # @param name [::String]
2778
- # Required. The name of the `DeployPolicy` to delete. The format is
2779
- # `projects/{project_id}/locations/{location_name}/deployPolicies/{deploy_policy_name}`.
2780
- # @param request_id [::String]
2781
- # Optional. A request ID to identify requests. Specify a unique request ID
2782
- # so that if you must retry your request, the server knows to ignore the
2783
- # request if it has already been completed. The server guarantees that for
2784
- # at least 60 minutes after the first request.
2785
- #
2786
- # For example, consider a situation where you make an initial request and the
2787
- # request times out. If you make the request again with the same request ID,
2788
- # the server can check if original operation with the same request ID was
2789
- # received, and if so, will ignore the second request. This prevents clients
2790
- # from accidentally creating duplicate commitments.
2791
- #
2792
- # The request ID must be a valid UUID with the exception that zero UUID is
2793
- # not supported (00000000-0000-0000-0000-000000000000).
2794
- # @param allow_missing [::Boolean]
2795
- # Optional. If set to true, then deleting an already deleted or non-existing
2796
- # `DeployPolicy` will succeed.
2797
- # @param validate_only [::Boolean]
2798
- # Optional. If set, validate the request and preview the review, but do not
2799
- # actually post it.
2800
- # @param etag [::String]
2801
- # Optional. This checksum is computed by the server based on the value of
2802
- # other fields, and may be sent on update and delete requests to ensure the
2803
- # client has an up-to-date value before proceeding.
2804
- #
2805
- # @yield [response, operation] Access the result along with the RPC operation
2806
- # @yieldparam response [::Gapic::Operation]
2807
- # @yieldparam operation [::GRPC::ActiveCall::Operation]
2808
- #
2809
- # @return [::Gapic::Operation]
2810
- #
2811
- # @raise [::Google::Cloud::Error] if the RPC is aborted.
2812
- #
2813
- # @example Basic example
2814
- # require "google/cloud/deploy/v1"
2815
- #
2816
- # # Create a client object. The client can be reused for multiple calls.
2817
- # client = Google::Cloud::Deploy::V1::CloudDeploy::Client.new
2818
- #
2819
- # # Create a request. To set request fields, pass in keyword arguments.
2820
- # request = Google::Cloud::Deploy::V1::DeleteDeployPolicyRequest.new
2821
- #
2822
- # # Call the delete_deploy_policy method.
2823
- # result = client.delete_deploy_policy request
2824
- #
2825
- # # The returned object is of type Gapic::Operation. You can use it to
2826
- # # check the status of an operation, cancel it, or wait for results.
2827
- # # Here is how to wait for a response.
2828
- # result.wait_until_done! timeout: 60
2829
- # if result.response?
2830
- # p result.response
2831
- # else
2832
- # puts "No response received."
2833
- # end
2834
- #
2835
- def delete_deploy_policy request, options = nil
2836
- raise ::ArgumentError, "request must be provided" if request.nil?
2837
-
2838
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Deploy::V1::DeleteDeployPolicyRequest
2839
-
2840
- # Converts hash and nil to an options object
2841
- options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2842
-
2843
- # Customize the options with defaults
2844
- metadata = @config.rpcs.delete_deploy_policy.metadata.to_h
2845
-
2846
- # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2847
- metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2848
- lib_name: @config.lib_name, lib_version: @config.lib_version,
2849
- gapic_version: ::Google::Cloud::Deploy::V1::VERSION
2850
- metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2851
- metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2852
-
2853
- header_params = {}
2854
- if request.name
2855
- header_params["name"] = request.name
2856
- end
2857
-
2858
- request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2859
- metadata[:"x-goog-request-params"] ||= request_params_header
2860
-
2861
- options.apply_defaults timeout: @config.rpcs.delete_deploy_policy.timeout,
2862
- metadata: metadata,
2863
- retry_policy: @config.rpcs.delete_deploy_policy.retry_policy
2864
-
2865
- options.apply_defaults timeout: @config.timeout,
2866
- metadata: @config.metadata,
2867
- retry_policy: @config.retry_policy
2868
-
2869
- @cloud_deploy_stub.call_rpc :delete_deploy_policy, request, options: options do |response, operation|
2870
- response = ::Gapic::Operation.new response, @operations_client, options: options
2871
- yield response, operation if block_given?
2872
- return response
2873
- end
2874
- rescue ::GRPC::BadStatus => e
2875
- raise ::Google::Cloud::Error.from_error(e)
2876
- end
2877
-
2878
- ##
2879
- # Lists DeployPolicies in a given project and location.
2880
- #
2881
- # @overload list_deploy_policies(request, options = nil)
2882
- # Pass arguments to `list_deploy_policies` via a request object, either of type
2883
- # {::Google::Cloud::Deploy::V1::ListDeployPoliciesRequest} or an equivalent Hash.
2884
- #
2885
- # @param request [::Google::Cloud::Deploy::V1::ListDeployPoliciesRequest, ::Hash]
2886
- # A request object representing the call parameters. Required. To specify no
2887
- # parameters, or to keep all the default parameter values, pass an empty Hash.
2888
- # @param options [::Gapic::CallOptions, ::Hash]
2889
- # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2890
- #
2891
- # @overload list_deploy_policies(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
2892
- # Pass arguments to `list_deploy_policies` via keyword arguments. Note that at
2893
- # least one keyword argument is required. To specify no parameters, or to keep all
2894
- # the default parameter values, pass an empty Hash as a request object (see above).
2895
- #
2896
- # @param parent [::String]
2897
- # Required. The parent, which owns this collection of deploy policies. Format
2898
- # must be `projects/{project_id}/locations/{location_name}`.
2899
- # @param page_size [::Integer]
2900
- # The maximum number of deploy policies to return. The service may return
2901
- # fewer than this value. If unspecified, at most 50 deploy policies will
2902
- # be returned. The maximum value is 1000; values above 1000 will be set
2903
- # to 1000.
2904
- # @param page_token [::String]
2905
- # A page token, received from a previous `ListDeployPolicies` call.
2906
- # Provide this to retrieve the subsequent page.
2907
- #
2908
- # When paginating, all other provided parameters match
2909
- # the call that provided the page token.
2910
- # @param filter [::String]
2911
- # Filter deploy policies to be returned. See https://google.aip.dev/160 for
2912
- # more details. All fields can be used in the filter.
2913
- # @param order_by [::String]
2914
- # Field to sort by. See https://google.aip.dev/132#ordering for more details.
2915
- #
2916
- # @yield [response, operation] Access the result along with the RPC operation
2917
- # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Deploy::V1::DeployPolicy>]
2918
- # @yieldparam operation [::GRPC::ActiveCall::Operation]
2919
- #
2920
- # @return [::Gapic::PagedEnumerable<::Google::Cloud::Deploy::V1::DeployPolicy>]
2921
- #
2922
- # @raise [::Google::Cloud::Error] if the RPC is aborted.
2923
- #
2924
- # @example Basic example
2925
- # require "google/cloud/deploy/v1"
2926
- #
2927
- # # Create a client object. The client can be reused for multiple calls.
2928
- # client = Google::Cloud::Deploy::V1::CloudDeploy::Client.new
2929
- #
2930
- # # Create a request. To set request fields, pass in keyword arguments.
2931
- # request = Google::Cloud::Deploy::V1::ListDeployPoliciesRequest.new
2932
- #
2933
- # # Call the list_deploy_policies method.
2934
- # result = client.list_deploy_policies request
2935
- #
2936
- # # The returned object is of type Gapic::PagedEnumerable. You can iterate
2937
- # # over elements, and API calls will be issued to fetch pages as needed.
2938
- # result.each do |item|
2939
- # # Each element is of type ::Google::Cloud::Deploy::V1::DeployPolicy.
2940
- # p item
2941
- # end
2942
- #
2943
- def list_deploy_policies request, options = nil
2944
- raise ::ArgumentError, "request must be provided" if request.nil?
2945
-
2946
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Deploy::V1::ListDeployPoliciesRequest
2947
-
2948
- # Converts hash and nil to an options object
2949
- options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2950
-
2951
- # Customize the options with defaults
2952
- metadata = @config.rpcs.list_deploy_policies.metadata.to_h
2953
-
2954
- # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2955
- metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2956
- lib_name: @config.lib_name, lib_version: @config.lib_version,
2957
- gapic_version: ::Google::Cloud::Deploy::V1::VERSION
2958
- metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2959
- metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2960
-
2961
- header_params = {}
2962
- if request.parent
2963
- header_params["parent"] = request.parent
2964
- end
2965
-
2966
- request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2967
- metadata[:"x-goog-request-params"] ||= request_params_header
2968
-
2969
- options.apply_defaults timeout: @config.rpcs.list_deploy_policies.timeout,
2970
- metadata: metadata,
2971
- retry_policy: @config.rpcs.list_deploy_policies.retry_policy
2972
-
2973
- options.apply_defaults timeout: @config.timeout,
2974
- metadata: @config.metadata,
2975
- retry_policy: @config.retry_policy
2976
-
2977
- @cloud_deploy_stub.call_rpc :list_deploy_policies, request, options: options do |response, operation|
2978
- response = ::Gapic::PagedEnumerable.new @cloud_deploy_stub, :list_deploy_policies, request, response, operation, options
2979
- yield response, operation if block_given?
2980
- return response
2981
- end
2982
- rescue ::GRPC::BadStatus => e
2983
- raise ::Google::Cloud::Error.from_error(e)
2984
- end
2985
-
2986
- ##
2987
- # Gets details of a single DeployPolicy.
2988
- #
2989
- # @overload get_deploy_policy(request, options = nil)
2990
- # Pass arguments to `get_deploy_policy` via a request object, either of type
2991
- # {::Google::Cloud::Deploy::V1::GetDeployPolicyRequest} or an equivalent Hash.
2992
- #
2993
- # @param request [::Google::Cloud::Deploy::V1::GetDeployPolicyRequest, ::Hash]
2994
- # A request object representing the call parameters. Required. To specify no
2995
- # parameters, or to keep all the default parameter values, pass an empty Hash.
2996
- # @param options [::Gapic::CallOptions, ::Hash]
2997
- # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2998
- #
2999
- # @overload get_deploy_policy(name: nil)
3000
- # Pass arguments to `get_deploy_policy` via keyword arguments. Note that at
3001
- # least one keyword argument is required. To specify no parameters, or to keep all
3002
- # the default parameter values, pass an empty Hash as a request object (see above).
3003
- #
3004
- # @param name [::String]
3005
- # Required. Name of the `DeployPolicy`. Format must be
3006
- # `projects/{project_id}/locations/{location_name}/deployPolicies/{deploy_policy_name}`.
3007
- #
3008
- # @yield [response, operation] Access the result along with the RPC operation
3009
- # @yieldparam response [::Google::Cloud::Deploy::V1::DeployPolicy]
3010
- # @yieldparam operation [::GRPC::ActiveCall::Operation]
3011
- #
3012
- # @return [::Google::Cloud::Deploy::V1::DeployPolicy]
3013
- #
3014
- # @raise [::Google::Cloud::Error] if the RPC is aborted.
3015
- #
3016
- # @example Basic example
3017
- # require "google/cloud/deploy/v1"
3018
- #
3019
- # # Create a client object. The client can be reused for multiple calls.
3020
- # client = Google::Cloud::Deploy::V1::CloudDeploy::Client.new
3021
- #
3022
- # # Create a request. To set request fields, pass in keyword arguments.
3023
- # request = Google::Cloud::Deploy::V1::GetDeployPolicyRequest.new
3024
- #
3025
- # # Call the get_deploy_policy method.
3026
- # result = client.get_deploy_policy request
3027
- #
3028
- # # The returned object is of type Google::Cloud::Deploy::V1::DeployPolicy.
3029
- # p result
3030
- #
3031
- def get_deploy_policy request, options = nil
3032
- raise ::ArgumentError, "request must be provided" if request.nil?
3033
-
3034
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Deploy::V1::GetDeployPolicyRequest
3035
-
3036
- # Converts hash and nil to an options object
3037
- options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3038
-
3039
- # Customize the options with defaults
3040
- metadata = @config.rpcs.get_deploy_policy.metadata.to_h
3041
-
3042
- # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
3043
- metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3044
- lib_name: @config.lib_name, lib_version: @config.lib_version,
3045
- gapic_version: ::Google::Cloud::Deploy::V1::VERSION
3046
- metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
3047
- metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3048
-
3049
- header_params = {}
3050
- if request.name
3051
- header_params["name"] = request.name
3052
- end
3053
-
3054
- request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
3055
- metadata[:"x-goog-request-params"] ||= request_params_header
3056
-
3057
- options.apply_defaults timeout: @config.rpcs.get_deploy_policy.timeout,
3058
- metadata: metadata,
3059
- retry_policy: @config.rpcs.get_deploy_policy.retry_policy
3060
-
3061
- options.apply_defaults timeout: @config.timeout,
3062
- metadata: @config.metadata,
3063
- retry_policy: @config.retry_policy
3064
-
3065
- @cloud_deploy_stub.call_rpc :get_deploy_policy, request, options: options do |response, operation|
3066
- yield response, operation if block_given?
3067
- return response
3068
- end
3069
- rescue ::GRPC::BadStatus => e
3070
- raise ::Google::Cloud::Error.from_error(e)
3071
- end
3072
-
3073
2501
  ##
3074
2502
  # Approves a Rollout.
3075
2503
  #
@@ -3083,7 +2511,7 @@ module Google
3083
2511
  # @param options [::Gapic::CallOptions, ::Hash]
3084
2512
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
3085
2513
  #
3086
- # @overload approve_rollout(name: nil, approved: nil, override_deploy_policy: nil)
2514
+ # @overload approve_rollout(name: nil, approved: nil)
3087
2515
  # Pass arguments to `approve_rollout` via keyword arguments. Note that at
3088
2516
  # least one keyword argument is required. To specify no parameters, or to keep all
3089
2517
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -3093,9 +2521,6 @@ module Google
3093
2521
  # `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`.
3094
2522
  # @param approved [::Boolean]
3095
2523
  # Required. True = approve; false = reject
3096
- # @param override_deploy_policy [::Array<::String>]
3097
- # Optional. Deploy policies to override. Format is
3098
- # `projects/{project}/locations/{location}/deployPolicies/{deployPolicy}`.
3099
2524
  #
3100
2525
  # @yield [response, operation] Access the result along with the RPC operation
3101
2526
  # @yieldparam response [::Google::Cloud::Deploy::V1::ApproveRolloutResponse]
@@ -3175,7 +2600,7 @@ module Google
3175
2600
  # @param options [::Gapic::CallOptions, ::Hash]
3176
2601
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
3177
2602
  #
3178
- # @overload advance_rollout(name: nil, phase_id: nil, override_deploy_policy: nil)
2603
+ # @overload advance_rollout(name: nil, phase_id: nil)
3179
2604
  # Pass arguments to `advance_rollout` via keyword arguments. Note that at
3180
2605
  # least one keyword argument is required. To specify no parameters, or to keep all
3181
2606
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -3185,9 +2610,6 @@ module Google
3185
2610
  # `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`.
3186
2611
  # @param phase_id [::String]
3187
2612
  # Required. The phase ID to advance the `Rollout` to.
3188
- # @param override_deploy_policy [::Array<::String>]
3189
- # Optional. Deploy policies to override. Format is
3190
- # `projects/{project}/locations/{location}/deployPolicies/{deployPolicy}`.
3191
2613
  #
3192
2614
  # @yield [response, operation] Access the result along with the RPC operation
3193
2615
  # @yieldparam response [::Google::Cloud::Deploy::V1::AdvanceRolloutResponse]
@@ -3267,7 +2689,7 @@ module Google
3267
2689
  # @param options [::Gapic::CallOptions, ::Hash]
3268
2690
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
3269
2691
  #
3270
- # @overload cancel_rollout(name: nil, override_deploy_policy: nil)
2692
+ # @overload cancel_rollout(name: nil)
3271
2693
  # Pass arguments to `cancel_rollout` via keyword arguments. Note that at
3272
2694
  # least one keyword argument is required. To specify no parameters, or to keep all
3273
2695
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -3275,9 +2697,6 @@ module Google
3275
2697
  # @param name [::String]
3276
2698
  # Required. Name of the Rollout. Format is
3277
2699
  # `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`.
3278
- # @param override_deploy_policy [::Array<::String>]
3279
- # Optional. Deploy policies to override. Format is
3280
- # `projects/{project}/locations/{location}/deployPolicies/{deployPolicy}`.
3281
2700
  #
3282
2701
  # @yield [response, operation] Access the result along with the RPC operation
3283
2702
  # @yieldparam response [::Google::Cloud::Deploy::V1::CancelRolloutResponse]
@@ -3552,7 +2971,7 @@ module Google
3552
2971
  # @param options [::Gapic::CallOptions, ::Hash]
3553
2972
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
3554
2973
  #
3555
- # @overload create_rollout(parent: nil, rollout_id: nil, rollout: nil, request_id: nil, validate_only: nil, override_deploy_policy: nil, starting_phase_id: nil)
2974
+ # @overload create_rollout(parent: nil, rollout_id: nil, rollout: nil, request_id: nil, validate_only: nil, starting_phase_id: nil)
3556
2975
  # Pass arguments to `create_rollout` via keyword arguments. Note that at
3557
2976
  # least one keyword argument is required. To specify no parameters, or to keep all
3558
2977
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -3582,9 +3001,6 @@ module Google
3582
3001
  # @param validate_only [::Boolean]
3583
3002
  # Optional. If set to true, the request is validated and the user is provided
3584
3003
  # with an expected result, but no actual change is made.
3585
- # @param override_deploy_policy [::Array<::String>]
3586
- # Optional. Deploy policies to override. Format is
3587
- # `projects/{project}/locations/{location}/deployPolicies/{deployPolicy}`.
3588
3004
  # @param starting_phase_id [::String]
3589
3005
  # Optional. The starting phase ID for the `Rollout`. If empty the `Rollout`
3590
3006
  # will start at the first phase.
@@ -3675,7 +3091,7 @@ module Google
3675
3091
  # @param options [::Gapic::CallOptions, ::Hash]
3676
3092
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
3677
3093
  #
3678
- # @overload ignore_job(rollout: nil, phase_id: nil, job_id: nil, override_deploy_policy: nil)
3094
+ # @overload ignore_job(rollout: nil, phase_id: nil, job_id: nil)
3679
3095
  # Pass arguments to `ignore_job` via keyword arguments. Note that at
3680
3096
  # least one keyword argument is required. To specify no parameters, or to keep all
3681
3097
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -3687,9 +3103,6 @@ module Google
3687
3103
  # Required. The phase ID the Job to ignore belongs to.
3688
3104
  # @param job_id [::String]
3689
3105
  # Required. The job ID for the Job to ignore.
3690
- # @param override_deploy_policy [::Array<::String>]
3691
- # Optional. Deploy policies to override. Format is
3692
- # `projects/{project}/locations/{location}/deployPolicies/{deployPolicy}`.
3693
3106
  #
3694
3107
  # @yield [response, operation] Access the result along with the RPC operation
3695
3108
  # @yieldparam response [::Google::Cloud::Deploy::V1::IgnoreJobResponse]
@@ -3769,7 +3182,7 @@ module Google
3769
3182
  # @param options [::Gapic::CallOptions, ::Hash]
3770
3183
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
3771
3184
  #
3772
- # @overload retry_job(rollout: nil, phase_id: nil, job_id: nil, override_deploy_policy: nil)
3185
+ # @overload retry_job(rollout: nil, phase_id: nil, job_id: nil)
3773
3186
  # Pass arguments to `retry_job` via keyword arguments. Note that at
3774
3187
  # least one keyword argument is required. To specify no parameters, or to keep all
3775
3188
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -3781,9 +3194,6 @@ module Google
3781
3194
  # Required. The phase ID the Job to retry belongs to.
3782
3195
  # @param job_id [::String]
3783
3196
  # Required. The job ID for the Job to retry.
3784
- # @param override_deploy_policy [::Array<::String>]
3785
- # Optional. Deploy policies to override. Format is
3786
- # `projects/{project}/locations/{location}/deployPolicies/{deployPolicy}`.
3787
3197
  #
3788
3198
  # @yield [response, operation] Access the result along with the RPC operation
3789
3199
  # @yieldparam response [::Google::Cloud::Deploy::V1::RetryJobResponse]
@@ -4058,7 +3468,7 @@ module Google
4058
3468
  # @param options [::Gapic::CallOptions, ::Hash]
4059
3469
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
4060
3470
  #
4061
- # @overload terminate_job_run(name: nil, override_deploy_policy: nil)
3471
+ # @overload terminate_job_run(name: nil)
4062
3472
  # Pass arguments to `terminate_job_run` via keyword arguments. Note that at
4063
3473
  # least one keyword argument is required. To specify no parameters, or to keep all
4064
3474
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -4066,9 +3476,6 @@ module Google
4066
3476
  # @param name [::String]
4067
3477
  # Required. Name of the `JobRun`. Format must be
4068
3478
  # `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}/jobRuns/{jobRun}`.
4069
- # @param override_deploy_policy [::Array<::String>]
4070
- # Optional. Deploy policies to override. Format is
4071
- # `projects/{project}/locations/{location}/deployPolicies/{deployPolicy}`.
4072
3479
  #
4073
3480
  # @yield [response, operation] Access the result along with the RPC operation
4074
3481
  # @yieldparam response [::Google::Cloud::Deploy::V1::TerminateJobRunResponse]
@@ -5314,31 +4721,6 @@ module Google
5314
4721
  #
5315
4722
  attr_reader :abandon_release
5316
4723
  ##
5317
- # RPC-specific configuration for `create_deploy_policy`
5318
- # @return [::Gapic::Config::Method]
5319
- #
5320
- attr_reader :create_deploy_policy
5321
- ##
5322
- # RPC-specific configuration for `update_deploy_policy`
5323
- # @return [::Gapic::Config::Method]
5324
- #
5325
- attr_reader :update_deploy_policy
5326
- ##
5327
- # RPC-specific configuration for `delete_deploy_policy`
5328
- # @return [::Gapic::Config::Method]
5329
- #
5330
- attr_reader :delete_deploy_policy
5331
- ##
5332
- # RPC-specific configuration for `list_deploy_policies`
5333
- # @return [::Gapic::Config::Method]
5334
- #
5335
- attr_reader :list_deploy_policies
5336
- ##
5337
- # RPC-specific configuration for `get_deploy_policy`
5338
- # @return [::Gapic::Config::Method]
5339
- #
5340
- attr_reader :get_deploy_policy
5341
- ##
5342
4724
  # RPC-specific configuration for `approve_rollout`
5343
4725
  # @return [::Gapic::Config::Method]
5344
4726
  #
@@ -5481,16 +4863,6 @@ module Google
5481
4863
  @create_release = ::Gapic::Config::Method.new create_release_config
5482
4864
  abandon_release_config = parent_rpcs.abandon_release if parent_rpcs.respond_to? :abandon_release
5483
4865
  @abandon_release = ::Gapic::Config::Method.new abandon_release_config
5484
- create_deploy_policy_config = parent_rpcs.create_deploy_policy if parent_rpcs.respond_to? :create_deploy_policy
5485
- @create_deploy_policy = ::Gapic::Config::Method.new create_deploy_policy_config
5486
- update_deploy_policy_config = parent_rpcs.update_deploy_policy if parent_rpcs.respond_to? :update_deploy_policy
5487
- @update_deploy_policy = ::Gapic::Config::Method.new update_deploy_policy_config
5488
- delete_deploy_policy_config = parent_rpcs.delete_deploy_policy if parent_rpcs.respond_to? :delete_deploy_policy
5489
- @delete_deploy_policy = ::Gapic::Config::Method.new delete_deploy_policy_config
5490
- list_deploy_policies_config = parent_rpcs.list_deploy_policies if parent_rpcs.respond_to? :list_deploy_policies
5491
- @list_deploy_policies = ::Gapic::Config::Method.new list_deploy_policies_config
5492
- get_deploy_policy_config = parent_rpcs.get_deploy_policy if parent_rpcs.respond_to? :get_deploy_policy
5493
- @get_deploy_policy = ::Gapic::Config::Method.new get_deploy_policy_config
5494
4866
  approve_rollout_config = parent_rpcs.approve_rollout if parent_rpcs.respond_to? :approve_rollout
5495
4867
  @approve_rollout = ::Gapic::Config::Method.new approve_rollout_config
5496
4868
  advance_rollout_config = parent_rpcs.advance_rollout if parent_rpcs.respond_to? :advance_rollout