google-cloud-container-v1 1.6.1 → 1.8.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 74b6296df475772b2afadfaf2e52dfa6ed99f11318babff8adde79ec09981145
4
- data.tar.gz: 4dc0472119a62d1e4792e8ddfe6f207a52ad7bea9b95cef7b6b3e221446bd0e1
3
+ metadata.gz: c22ab640729108ed9c2dfc91c5399c90fbc4c75dcd8a81d77ce11160ae17a4e5
4
+ data.tar.gz: 8fb531a750ddaa01ab208cac5d50f5eeb9fd95b5f3c0402eef6034bdaf080dcc
5
5
  SHA512:
6
- metadata.gz: 258d45982cb922d03c5f3acd608ab4c34e52af1b5889912290570dfcd64d883fa30f4bf3dfb0de94dc128f49775caa2758aed891528e4234c04ed0c67226c6ba
7
- data.tar.gz: 3832f6f26dc18107cc4fa9558ffa32bf7ad61f18007cf3c340467064e7b5bba3f74ba7079bbd7e7a21cc134ad735f9443b9a1aca5f75b7017e39e178b24278e2
6
+ metadata.gz: 479835d31763cc226f5a0e334e398c571fa36ea49abad0cdec0253022e9a12757fb905288a3c8b7722dad94671ccb9aad4d856ae0b8a6eed1b5fbe86923136ba
7
+ data.tar.gz: 5813fc6d5952d03fe21a563a8bb09974fb1c67b990a03f8e0867da3683b4b8fe6f071ce8eae449665e798a7790fe4daba04369079f40c0e54cf4ebc6e24914e8
@@ -689,7 +689,7 @@ module Google
689
689
  # @param options [::Gapic::CallOptions, ::Hash]
690
690
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
691
691
  #
692
- # @overload update_node_pool(project_id: nil, zone: nil, cluster_id: nil, node_pool_id: nil, node_version: nil, image_type: nil, name: nil, locations: nil, workload_metadata_config: nil, upgrade_settings: nil, tags: nil, taints: nil, labels: nil, linux_node_config: nil, kubelet_config: nil, node_network_config: nil, gcfs_config: nil, confidential_nodes: nil, gvnic: nil, etag: nil, fast_socket: nil, logging_config: nil, resource_labels: nil, windows_node_config: nil, accelerators: nil, machine_type: nil, disk_type: nil, disk_size_gb: nil, resource_manager_tags: nil, containerd_config: nil, queued_provisioning: nil, storage_pools: nil)
692
+ # @overload update_node_pool(project_id: nil, zone: nil, cluster_id: nil, node_pool_id: nil, node_version: nil, image_type: nil, name: nil, locations: nil, workload_metadata_config: nil, upgrade_settings: nil, tags: nil, taints: nil, labels: nil, linux_node_config: nil, kubelet_config: nil, node_network_config: nil, gcfs_config: nil, confidential_nodes: nil, gvnic: nil, etag: nil, fast_socket: nil, logging_config: nil, resource_labels: nil, windows_node_config: nil, accelerators: nil, machine_type: nil, disk_type: nil, disk_size_gb: nil, resource_manager_tags: nil, containerd_config: nil, queued_provisioning: nil, storage_pools: nil, max_run_duration: nil, flex_start: nil)
693
693
  # Pass arguments to `update_node_pool` via keyword arguments. Note that at
694
694
  # least one keyword argument is required. To specify no parameters, or to keep all
695
695
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -809,6 +809,11 @@ module Google
809
809
  # @param storage_pools [::Array<::String>]
810
810
  # List of Storage Pools where boot disks are provisioned.
811
811
  # Existing Storage Pools will be replaced with storage-pools.
812
+ # @param max_run_duration [::Google::Protobuf::Duration, ::Hash]
813
+ # The maximum duration for the nodes to exist.
814
+ # If unspecified, the nodes can exist indefinitely.
815
+ # @param flex_start [::Boolean]
816
+ # Flex Start flag for enabling Flex Start VM.
812
817
  #
813
818
  # @yield [response, operation] Access the result along with the RPC operation
814
819
  # @yieldparam response [::Google::Cloud::Container::V1::Operation]
@@ -1122,7 +1127,7 @@ module Google
1122
1127
  # Required. The monitoring service the cluster should use to write metrics.
1123
1128
  # Currently available options:
1124
1129
  #
1125
- # * "monitoring.googleapis.com/kubernetes" - The Cloud Monitoring
1130
+ # * `monitoring.googleapis.com/kubernetes` - The Cloud Monitoring
1126
1131
  # service with a Kubernetes-native resource model
1127
1132
  # * `monitoring.googleapis.com` - The legacy Cloud Monitoring service (no
1128
1133
  # longer available as of GKE 1.15).
@@ -3806,6 +3811,185 @@ module Google
3806
3811
  raise ::Google::Cloud::Error.from_error(e)
3807
3812
  end
3808
3813
 
3814
+ ##
3815
+ # Fetch upgrade information of a specific cluster.
3816
+ #
3817
+ # @overload fetch_cluster_upgrade_info(request, options = nil)
3818
+ # Pass arguments to `fetch_cluster_upgrade_info` via a request object, either of type
3819
+ # {::Google::Cloud::Container::V1::FetchClusterUpgradeInfoRequest} or an equivalent Hash.
3820
+ #
3821
+ # @param request [::Google::Cloud::Container::V1::FetchClusterUpgradeInfoRequest, ::Hash]
3822
+ # A request object representing the call parameters. Required. To specify no
3823
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3824
+ # @param options [::Gapic::CallOptions, ::Hash]
3825
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
3826
+ #
3827
+ # @overload fetch_cluster_upgrade_info(name: nil, version: nil)
3828
+ # Pass arguments to `fetch_cluster_upgrade_info` via keyword arguments. Note that at
3829
+ # least one keyword argument is required. To specify no parameters, or to keep all
3830
+ # the default parameter values, pass an empty Hash as a request object (see above).
3831
+ #
3832
+ # @param name [::String]
3833
+ # Required. The name (project, location, cluster) of the cluster to get.
3834
+ # Specified in the format `projects/*/locations/*/clusters/*` or
3835
+ # `projects/*/zones/*/clusters/*`.
3836
+ # @param version [::String]
3837
+ # API request version that initiates this operation.
3838
+ #
3839
+ # @yield [response, operation] Access the result along with the RPC operation
3840
+ # @yieldparam response [::Google::Cloud::Container::V1::ClusterUpgradeInfo]
3841
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
3842
+ #
3843
+ # @return [::Google::Cloud::Container::V1::ClusterUpgradeInfo]
3844
+ #
3845
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
3846
+ #
3847
+ # @example Basic example
3848
+ # require "google/cloud/container/v1"
3849
+ #
3850
+ # # Create a client object. The client can be reused for multiple calls.
3851
+ # client = Google::Cloud::Container::V1::ClusterManager::Client.new
3852
+ #
3853
+ # # Create a request. To set request fields, pass in keyword arguments.
3854
+ # request = Google::Cloud::Container::V1::FetchClusterUpgradeInfoRequest.new
3855
+ #
3856
+ # # Call the fetch_cluster_upgrade_info method.
3857
+ # result = client.fetch_cluster_upgrade_info request
3858
+ #
3859
+ # # The returned object is of type Google::Cloud::Container::V1::ClusterUpgradeInfo.
3860
+ # p result
3861
+ #
3862
+ def fetch_cluster_upgrade_info request, options = nil
3863
+ raise ::ArgumentError, "request must be provided" if request.nil?
3864
+
3865
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Container::V1::FetchClusterUpgradeInfoRequest
3866
+
3867
+ # Converts hash and nil to an options object
3868
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3869
+
3870
+ # Customize the options with defaults
3871
+ metadata = @config.rpcs.fetch_cluster_upgrade_info.metadata.to_h
3872
+
3873
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
3874
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3875
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3876
+ gapic_version: ::Google::Cloud::Container::V1::VERSION
3877
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
3878
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3879
+
3880
+ header_params = {}
3881
+ if request.name
3882
+ header_params["name"] = request.name
3883
+ end
3884
+
3885
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
3886
+ metadata[:"x-goog-request-params"] ||= request_params_header
3887
+
3888
+ options.apply_defaults timeout: @config.rpcs.fetch_cluster_upgrade_info.timeout,
3889
+ metadata: metadata,
3890
+ retry_policy: @config.rpcs.fetch_cluster_upgrade_info.retry_policy
3891
+
3892
+ options.apply_defaults timeout: @config.timeout,
3893
+ metadata: @config.metadata,
3894
+ retry_policy: @config.retry_policy
3895
+
3896
+ @cluster_manager_stub.call_rpc :fetch_cluster_upgrade_info, request, options: options do |response, operation|
3897
+ yield response, operation if block_given?
3898
+ end
3899
+ rescue ::GRPC::BadStatus => e
3900
+ raise ::Google::Cloud::Error.from_error(e)
3901
+ end
3902
+
3903
+ ##
3904
+ # Fetch upgrade information of a specific nodepool.
3905
+ #
3906
+ # @overload fetch_node_pool_upgrade_info(request, options = nil)
3907
+ # Pass arguments to `fetch_node_pool_upgrade_info` via a request object, either of type
3908
+ # {::Google::Cloud::Container::V1::FetchNodePoolUpgradeInfoRequest} or an equivalent Hash.
3909
+ #
3910
+ # @param request [::Google::Cloud::Container::V1::FetchNodePoolUpgradeInfoRequest, ::Hash]
3911
+ # A request object representing the call parameters. Required. To specify no
3912
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3913
+ # @param options [::Gapic::CallOptions, ::Hash]
3914
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
3915
+ #
3916
+ # @overload fetch_node_pool_upgrade_info(name: nil, version: nil)
3917
+ # Pass arguments to `fetch_node_pool_upgrade_info` via keyword arguments. Note that at
3918
+ # least one keyword argument is required. To specify no parameters, or to keep all
3919
+ # the default parameter values, pass an empty Hash as a request object (see above).
3920
+ #
3921
+ # @param name [::String]
3922
+ # Required. The name (project, location, cluster, nodepool) of the nodepool
3923
+ # to get. Specified in the format
3924
+ # `projects/*/locations/*/clusters/*/nodePools/*` or
3925
+ # `projects/*/zones/*/clusters/*/nodePools/*`.
3926
+ # @param version [::String]
3927
+ # API request version that initiates this operation.
3928
+ #
3929
+ # @yield [response, operation] Access the result along with the RPC operation
3930
+ # @yieldparam response [::Google::Cloud::Container::V1::NodePoolUpgradeInfo]
3931
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
3932
+ #
3933
+ # @return [::Google::Cloud::Container::V1::NodePoolUpgradeInfo]
3934
+ #
3935
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
3936
+ #
3937
+ # @example Basic example
3938
+ # require "google/cloud/container/v1"
3939
+ #
3940
+ # # Create a client object. The client can be reused for multiple calls.
3941
+ # client = Google::Cloud::Container::V1::ClusterManager::Client.new
3942
+ #
3943
+ # # Create a request. To set request fields, pass in keyword arguments.
3944
+ # request = Google::Cloud::Container::V1::FetchNodePoolUpgradeInfoRequest.new
3945
+ #
3946
+ # # Call the fetch_node_pool_upgrade_info method.
3947
+ # result = client.fetch_node_pool_upgrade_info request
3948
+ #
3949
+ # # The returned object is of type Google::Cloud::Container::V1::NodePoolUpgradeInfo.
3950
+ # p result
3951
+ #
3952
+ def fetch_node_pool_upgrade_info request, options = nil
3953
+ raise ::ArgumentError, "request must be provided" if request.nil?
3954
+
3955
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Container::V1::FetchNodePoolUpgradeInfoRequest
3956
+
3957
+ # Converts hash and nil to an options object
3958
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3959
+
3960
+ # Customize the options with defaults
3961
+ metadata = @config.rpcs.fetch_node_pool_upgrade_info.metadata.to_h
3962
+
3963
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
3964
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3965
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3966
+ gapic_version: ::Google::Cloud::Container::V1::VERSION
3967
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
3968
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3969
+
3970
+ header_params = {}
3971
+ if request.name
3972
+ header_params["name"] = request.name
3973
+ end
3974
+
3975
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
3976
+ metadata[:"x-goog-request-params"] ||= request_params_header
3977
+
3978
+ options.apply_defaults timeout: @config.rpcs.fetch_node_pool_upgrade_info.timeout,
3979
+ metadata: metadata,
3980
+ retry_policy: @config.rpcs.fetch_node_pool_upgrade_info.retry_policy
3981
+
3982
+ options.apply_defaults timeout: @config.timeout,
3983
+ metadata: @config.metadata,
3984
+ retry_policy: @config.retry_policy
3985
+
3986
+ @cluster_manager_stub.call_rpc :fetch_node_pool_upgrade_info, request, options: options do |response, operation|
3987
+ yield response, operation if block_given?
3988
+ end
3989
+ rescue ::GRPC::BadStatus => e
3990
+ raise ::Google::Cloud::Error.from_error(e)
3991
+ end
3992
+
3809
3993
  ##
3810
3994
  # Configuration class for the ClusterManager API.
3811
3995
  #
@@ -4142,6 +4326,16 @@ module Google
4142
4326
  # @return [::Gapic::Config::Method]
4143
4327
  #
4144
4328
  attr_reader :check_autopilot_compatibility
4329
+ ##
4330
+ # RPC-specific configuration for `fetch_cluster_upgrade_info`
4331
+ # @return [::Gapic::Config::Method]
4332
+ #
4333
+ attr_reader :fetch_cluster_upgrade_info
4334
+ ##
4335
+ # RPC-specific configuration for `fetch_node_pool_upgrade_info`
4336
+ # @return [::Gapic::Config::Method]
4337
+ #
4338
+ attr_reader :fetch_node_pool_upgrade_info
4145
4339
 
4146
4340
  # @private
4147
4341
  def initialize parent_rpcs = nil
@@ -4213,6 +4407,10 @@ module Google
4213
4407
  @list_usable_subnetworks = ::Gapic::Config::Method.new list_usable_subnetworks_config
4214
4408
  check_autopilot_compatibility_config = parent_rpcs.check_autopilot_compatibility if parent_rpcs.respond_to? :check_autopilot_compatibility
4215
4409
  @check_autopilot_compatibility = ::Gapic::Config::Method.new check_autopilot_compatibility_config
4410
+ fetch_cluster_upgrade_info_config = parent_rpcs.fetch_cluster_upgrade_info if parent_rpcs.respond_to? :fetch_cluster_upgrade_info
4411
+ @fetch_cluster_upgrade_info = ::Gapic::Config::Method.new fetch_cluster_upgrade_info_config
4412
+ fetch_node_pool_upgrade_info_config = parent_rpcs.fetch_node_pool_upgrade_info if parent_rpcs.respond_to? :fetch_node_pool_upgrade_info
4413
+ @fetch_node_pool_upgrade_info = ::Gapic::Config::Method.new fetch_node_pool_upgrade_info_config
4216
4414
 
4217
4415
  yield self if block_given?
4218
4416
  end
@@ -654,7 +654,7 @@ module Google
654
654
  # @param options [::Gapic::CallOptions, ::Hash]
655
655
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
656
656
  #
657
- # @overload update_node_pool(project_id: nil, zone: nil, cluster_id: nil, node_pool_id: nil, node_version: nil, image_type: nil, name: nil, locations: nil, workload_metadata_config: nil, upgrade_settings: nil, tags: nil, taints: nil, labels: nil, linux_node_config: nil, kubelet_config: nil, node_network_config: nil, gcfs_config: nil, confidential_nodes: nil, gvnic: nil, etag: nil, fast_socket: nil, logging_config: nil, resource_labels: nil, windows_node_config: nil, accelerators: nil, machine_type: nil, disk_type: nil, disk_size_gb: nil, resource_manager_tags: nil, containerd_config: nil, queued_provisioning: nil, storage_pools: nil)
657
+ # @overload update_node_pool(project_id: nil, zone: nil, cluster_id: nil, node_pool_id: nil, node_version: nil, image_type: nil, name: nil, locations: nil, workload_metadata_config: nil, upgrade_settings: nil, tags: nil, taints: nil, labels: nil, linux_node_config: nil, kubelet_config: nil, node_network_config: nil, gcfs_config: nil, confidential_nodes: nil, gvnic: nil, etag: nil, fast_socket: nil, logging_config: nil, resource_labels: nil, windows_node_config: nil, accelerators: nil, machine_type: nil, disk_type: nil, disk_size_gb: nil, resource_manager_tags: nil, containerd_config: nil, queued_provisioning: nil, storage_pools: nil, max_run_duration: nil, flex_start: nil)
658
658
  # Pass arguments to `update_node_pool` via keyword arguments. Note that at
659
659
  # least one keyword argument is required. To specify no parameters, or to keep all
660
660
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -774,6 +774,11 @@ module Google
774
774
  # @param storage_pools [::Array<::String>]
775
775
  # List of Storage Pools where boot disks are provisioned.
776
776
  # Existing Storage Pools will be replaced with storage-pools.
777
+ # @param max_run_duration [::Google::Protobuf::Duration, ::Hash]
778
+ # The maximum duration for the nodes to exist.
779
+ # If unspecified, the nodes can exist indefinitely.
780
+ # @param flex_start [::Boolean]
781
+ # Flex Start flag for enabling Flex Start VM.
777
782
  # @yield [result, operation] Access the result along with the TransportOperation object
778
783
  # @yieldparam result [::Google::Cloud::Container::V1::Operation]
779
784
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -1066,7 +1071,7 @@ module Google
1066
1071
  # Required. The monitoring service the cluster should use to write metrics.
1067
1072
  # Currently available options:
1068
1073
  #
1069
- # * "monitoring.googleapis.com/kubernetes" - The Cloud Monitoring
1074
+ # * `monitoring.googleapis.com/kubernetes` - The Cloud Monitoring
1070
1075
  # service with a Kubernetes-native resource model
1071
1076
  # * `monitoring.googleapis.com` - The legacy Cloud Monitoring service (no
1072
1077
  # longer available as of GKE 1.15).
@@ -3559,6 +3564,171 @@ module Google
3559
3564
  raise ::Google::Cloud::Error.from_error(e)
3560
3565
  end
3561
3566
 
3567
+ ##
3568
+ # Fetch upgrade information of a specific cluster.
3569
+ #
3570
+ # @overload fetch_cluster_upgrade_info(request, options = nil)
3571
+ # Pass arguments to `fetch_cluster_upgrade_info` via a request object, either of type
3572
+ # {::Google::Cloud::Container::V1::FetchClusterUpgradeInfoRequest} or an equivalent Hash.
3573
+ #
3574
+ # @param request [::Google::Cloud::Container::V1::FetchClusterUpgradeInfoRequest, ::Hash]
3575
+ # A request object representing the call parameters. Required. To specify no
3576
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3577
+ # @param options [::Gapic::CallOptions, ::Hash]
3578
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
3579
+ #
3580
+ # @overload fetch_cluster_upgrade_info(name: nil, version: nil)
3581
+ # Pass arguments to `fetch_cluster_upgrade_info` via keyword arguments. Note that at
3582
+ # least one keyword argument is required. To specify no parameters, or to keep all
3583
+ # the default parameter values, pass an empty Hash as a request object (see above).
3584
+ #
3585
+ # @param name [::String]
3586
+ # Required. The name (project, location, cluster) of the cluster to get.
3587
+ # Specified in the format `projects/*/locations/*/clusters/*` or
3588
+ # `projects/*/zones/*/clusters/*`.
3589
+ # @param version [::String]
3590
+ # API request version that initiates this operation.
3591
+ # @yield [result, operation] Access the result along with the TransportOperation object
3592
+ # @yieldparam result [::Google::Cloud::Container::V1::ClusterUpgradeInfo]
3593
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
3594
+ #
3595
+ # @return [::Google::Cloud::Container::V1::ClusterUpgradeInfo]
3596
+ #
3597
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
3598
+ #
3599
+ # @example Basic example
3600
+ # require "google/cloud/container/v1"
3601
+ #
3602
+ # # Create a client object. The client can be reused for multiple calls.
3603
+ # client = Google::Cloud::Container::V1::ClusterManager::Rest::Client.new
3604
+ #
3605
+ # # Create a request. To set request fields, pass in keyword arguments.
3606
+ # request = Google::Cloud::Container::V1::FetchClusterUpgradeInfoRequest.new
3607
+ #
3608
+ # # Call the fetch_cluster_upgrade_info method.
3609
+ # result = client.fetch_cluster_upgrade_info request
3610
+ #
3611
+ # # The returned object is of type Google::Cloud::Container::V1::ClusterUpgradeInfo.
3612
+ # p result
3613
+ #
3614
+ def fetch_cluster_upgrade_info request, options = nil
3615
+ raise ::ArgumentError, "request must be provided" if request.nil?
3616
+
3617
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Container::V1::FetchClusterUpgradeInfoRequest
3618
+
3619
+ # Converts hash and nil to an options object
3620
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3621
+
3622
+ # Customize the options with defaults
3623
+ call_metadata = @config.rpcs.fetch_cluster_upgrade_info.metadata.to_h
3624
+
3625
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
3626
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3627
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3628
+ gapic_version: ::Google::Cloud::Container::V1::VERSION,
3629
+ transports_version_send: [:rest]
3630
+
3631
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
3632
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3633
+
3634
+ options.apply_defaults timeout: @config.rpcs.fetch_cluster_upgrade_info.timeout,
3635
+ metadata: call_metadata,
3636
+ retry_policy: @config.rpcs.fetch_cluster_upgrade_info.retry_policy
3637
+
3638
+ options.apply_defaults timeout: @config.timeout,
3639
+ metadata: @config.metadata,
3640
+ retry_policy: @config.retry_policy
3641
+
3642
+ @cluster_manager_stub.fetch_cluster_upgrade_info request, options do |result, operation|
3643
+ yield result, operation if block_given?
3644
+ end
3645
+ rescue ::Gapic::Rest::Error => e
3646
+ raise ::Google::Cloud::Error.from_error(e)
3647
+ end
3648
+
3649
+ ##
3650
+ # Fetch upgrade information of a specific nodepool.
3651
+ #
3652
+ # @overload fetch_node_pool_upgrade_info(request, options = nil)
3653
+ # Pass arguments to `fetch_node_pool_upgrade_info` via a request object, either of type
3654
+ # {::Google::Cloud::Container::V1::FetchNodePoolUpgradeInfoRequest} or an equivalent Hash.
3655
+ #
3656
+ # @param request [::Google::Cloud::Container::V1::FetchNodePoolUpgradeInfoRequest, ::Hash]
3657
+ # A request object representing the call parameters. Required. To specify no
3658
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3659
+ # @param options [::Gapic::CallOptions, ::Hash]
3660
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
3661
+ #
3662
+ # @overload fetch_node_pool_upgrade_info(name: nil, version: nil)
3663
+ # Pass arguments to `fetch_node_pool_upgrade_info` via keyword arguments. Note that at
3664
+ # least one keyword argument is required. To specify no parameters, or to keep all
3665
+ # the default parameter values, pass an empty Hash as a request object (see above).
3666
+ #
3667
+ # @param name [::String]
3668
+ # Required. The name (project, location, cluster, nodepool) of the nodepool
3669
+ # to get. Specified in the format
3670
+ # `projects/*/locations/*/clusters/*/nodePools/*` or
3671
+ # `projects/*/zones/*/clusters/*/nodePools/*`.
3672
+ # @param version [::String]
3673
+ # API request version that initiates this operation.
3674
+ # @yield [result, operation] Access the result along with the TransportOperation object
3675
+ # @yieldparam result [::Google::Cloud::Container::V1::NodePoolUpgradeInfo]
3676
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
3677
+ #
3678
+ # @return [::Google::Cloud::Container::V1::NodePoolUpgradeInfo]
3679
+ #
3680
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
3681
+ #
3682
+ # @example Basic example
3683
+ # require "google/cloud/container/v1"
3684
+ #
3685
+ # # Create a client object. The client can be reused for multiple calls.
3686
+ # client = Google::Cloud::Container::V1::ClusterManager::Rest::Client.new
3687
+ #
3688
+ # # Create a request. To set request fields, pass in keyword arguments.
3689
+ # request = Google::Cloud::Container::V1::FetchNodePoolUpgradeInfoRequest.new
3690
+ #
3691
+ # # Call the fetch_node_pool_upgrade_info method.
3692
+ # result = client.fetch_node_pool_upgrade_info request
3693
+ #
3694
+ # # The returned object is of type Google::Cloud::Container::V1::NodePoolUpgradeInfo.
3695
+ # p result
3696
+ #
3697
+ def fetch_node_pool_upgrade_info request, options = nil
3698
+ raise ::ArgumentError, "request must be provided" if request.nil?
3699
+
3700
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Container::V1::FetchNodePoolUpgradeInfoRequest
3701
+
3702
+ # Converts hash and nil to an options object
3703
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3704
+
3705
+ # Customize the options with defaults
3706
+ call_metadata = @config.rpcs.fetch_node_pool_upgrade_info.metadata.to_h
3707
+
3708
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
3709
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3710
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3711
+ gapic_version: ::Google::Cloud::Container::V1::VERSION,
3712
+ transports_version_send: [:rest]
3713
+
3714
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
3715
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3716
+
3717
+ options.apply_defaults timeout: @config.rpcs.fetch_node_pool_upgrade_info.timeout,
3718
+ metadata: call_metadata,
3719
+ retry_policy: @config.rpcs.fetch_node_pool_upgrade_info.retry_policy
3720
+
3721
+ options.apply_defaults timeout: @config.timeout,
3722
+ metadata: @config.metadata,
3723
+ retry_policy: @config.retry_policy
3724
+
3725
+ @cluster_manager_stub.fetch_node_pool_upgrade_info request, options do |result, operation|
3726
+ yield result, operation if block_given?
3727
+ end
3728
+ rescue ::Gapic::Rest::Error => e
3729
+ raise ::Google::Cloud::Error.from_error(e)
3730
+ end
3731
+
3562
3732
  ##
3563
3733
  # Configuration class for the ClusterManager REST API.
3564
3734
  #
@@ -3875,6 +4045,16 @@ module Google
3875
4045
  # @return [::Gapic::Config::Method]
3876
4046
  #
3877
4047
  attr_reader :check_autopilot_compatibility
4048
+ ##
4049
+ # RPC-specific configuration for `fetch_cluster_upgrade_info`
4050
+ # @return [::Gapic::Config::Method]
4051
+ #
4052
+ attr_reader :fetch_cluster_upgrade_info
4053
+ ##
4054
+ # RPC-specific configuration for `fetch_node_pool_upgrade_info`
4055
+ # @return [::Gapic::Config::Method]
4056
+ #
4057
+ attr_reader :fetch_node_pool_upgrade_info
3878
4058
 
3879
4059
  # @private
3880
4060
  def initialize parent_rpcs = nil
@@ -3946,6 +4126,10 @@ module Google
3946
4126
  @list_usable_subnetworks = ::Gapic::Config::Method.new list_usable_subnetworks_config
3947
4127
  check_autopilot_compatibility_config = parent_rpcs.check_autopilot_compatibility if parent_rpcs.respond_to? :check_autopilot_compatibility
3948
4128
  @check_autopilot_compatibility = ::Gapic::Config::Method.new check_autopilot_compatibility_config
4129
+ fetch_cluster_upgrade_info_config = parent_rpcs.fetch_cluster_upgrade_info if parent_rpcs.respond_to? :fetch_cluster_upgrade_info
4130
+ @fetch_cluster_upgrade_info = ::Gapic::Config::Method.new fetch_cluster_upgrade_info_config
4131
+ fetch_node_pool_upgrade_info_config = parent_rpcs.fetch_node_pool_upgrade_info if parent_rpcs.respond_to? :fetch_node_pool_upgrade_info
4132
+ @fetch_node_pool_upgrade_info = ::Gapic::Config::Method.new fetch_node_pool_upgrade_info_config
3949
4133
 
3950
4134
  yield self if block_given?
3951
4135
  end
@@ -1433,6 +1433,86 @@ module Google
1433
1433
  end
1434
1434
  end
1435
1435
 
1436
+ ##
1437
+ # Baseline implementation for the fetch_cluster_upgrade_info REST call
1438
+ #
1439
+ # @param request_pb [::Google::Cloud::Container::V1::FetchClusterUpgradeInfoRequest]
1440
+ # A request object representing the call parameters. Required.
1441
+ # @param options [::Gapic::CallOptions]
1442
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1443
+ #
1444
+ # @yield [result, operation] Access the result along with the TransportOperation object
1445
+ # @yieldparam result [::Google::Cloud::Container::V1::ClusterUpgradeInfo]
1446
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1447
+ #
1448
+ # @return [::Google::Cloud::Container::V1::ClusterUpgradeInfo]
1449
+ # A result object deserialized from the server's reply
1450
+ def fetch_cluster_upgrade_info request_pb, options = nil
1451
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
1452
+
1453
+ verb, uri, query_string_params, body = ServiceStub.transcode_fetch_cluster_upgrade_info_request request_pb
1454
+ query_string_params = if query_string_params.any?
1455
+ query_string_params.to_h { |p| p.split "=", 2 }
1456
+ else
1457
+ {}
1458
+ end
1459
+
1460
+ response = @client_stub.make_http_request(
1461
+ verb,
1462
+ uri: uri,
1463
+ body: body || "",
1464
+ params: query_string_params,
1465
+ method_name: "fetch_cluster_upgrade_info",
1466
+ options: options
1467
+ )
1468
+ operation = ::Gapic::Rest::TransportOperation.new response
1469
+ result = ::Google::Cloud::Container::V1::ClusterUpgradeInfo.decode_json response.body, ignore_unknown_fields: true
1470
+ catch :response do
1471
+ yield result, operation if block_given?
1472
+ result
1473
+ end
1474
+ end
1475
+
1476
+ ##
1477
+ # Baseline implementation for the fetch_node_pool_upgrade_info REST call
1478
+ #
1479
+ # @param request_pb [::Google::Cloud::Container::V1::FetchNodePoolUpgradeInfoRequest]
1480
+ # A request object representing the call parameters. Required.
1481
+ # @param options [::Gapic::CallOptions]
1482
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1483
+ #
1484
+ # @yield [result, operation] Access the result along with the TransportOperation object
1485
+ # @yieldparam result [::Google::Cloud::Container::V1::NodePoolUpgradeInfo]
1486
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1487
+ #
1488
+ # @return [::Google::Cloud::Container::V1::NodePoolUpgradeInfo]
1489
+ # A result object deserialized from the server's reply
1490
+ def fetch_node_pool_upgrade_info request_pb, options = nil
1491
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
1492
+
1493
+ verb, uri, query_string_params, body = ServiceStub.transcode_fetch_node_pool_upgrade_info_request request_pb
1494
+ query_string_params = if query_string_params.any?
1495
+ query_string_params.to_h { |p| p.split "=", 2 }
1496
+ else
1497
+ {}
1498
+ end
1499
+
1500
+ response = @client_stub.make_http_request(
1501
+ verb,
1502
+ uri: uri,
1503
+ body: body || "",
1504
+ params: query_string_params,
1505
+ method_name: "fetch_node_pool_upgrade_info",
1506
+ options: options
1507
+ )
1508
+ operation = ::Gapic::Rest::TransportOperation.new response
1509
+ result = ::Google::Cloud::Container::V1::NodePoolUpgradeInfo.decode_json response.body, ignore_unknown_fields: true
1510
+ catch :response do
1511
+ yield result, operation if block_given?
1512
+ result
1513
+ end
1514
+ end
1515
+
1436
1516
  ##
1437
1517
  # @private
1438
1518
  #
@@ -2462,6 +2542,62 @@ module Google
2462
2542
  )
2463
2543
  transcoder.transcode request_pb
2464
2544
  end
2545
+
2546
+ ##
2547
+ # @private
2548
+ #
2549
+ # GRPC transcoding helper method for the fetch_cluster_upgrade_info REST call
2550
+ #
2551
+ # @param request_pb [::Google::Cloud::Container::V1::FetchClusterUpgradeInfoRequest]
2552
+ # A request object representing the call parameters. Required.
2553
+ # @return [Array(String, [String, nil], Hash{String => String})]
2554
+ # Uri, Body, Query string parameters
2555
+ def self.transcode_fetch_cluster_upgrade_info_request request_pb
2556
+ transcoder = Gapic::Rest::GrpcTranscoder.new
2557
+ .with_bindings(
2558
+ uri_method: :get,
2559
+ uri_template: "/v1/{name}:fetchClusterUpgradeInfo",
2560
+ matches: [
2561
+ ["name", %r{^projects/[^/]+/locations/[^/]+/clusters/[^/]+/?$}, false]
2562
+ ]
2563
+ )
2564
+ .with_bindings(
2565
+ uri_method: :get,
2566
+ uri_template: "/v1/{name}:fetchClusterUpgradeInfo",
2567
+ matches: [
2568
+ ["name", %r{^projects/[^/]+/zones/[^/]+/clusters/[^/]+/?$}, false]
2569
+ ]
2570
+ )
2571
+ transcoder.transcode request_pb
2572
+ end
2573
+
2574
+ ##
2575
+ # @private
2576
+ #
2577
+ # GRPC transcoding helper method for the fetch_node_pool_upgrade_info REST call
2578
+ #
2579
+ # @param request_pb [::Google::Cloud::Container::V1::FetchNodePoolUpgradeInfoRequest]
2580
+ # A request object representing the call parameters. Required.
2581
+ # @return [Array(String, [String, nil], Hash{String => String})]
2582
+ # Uri, Body, Query string parameters
2583
+ def self.transcode_fetch_node_pool_upgrade_info_request request_pb
2584
+ transcoder = Gapic::Rest::GrpcTranscoder.new
2585
+ .with_bindings(
2586
+ uri_method: :get,
2587
+ uri_template: "/v1/{name}:fetchNodePoolUpgradeInfo",
2588
+ matches: [
2589
+ ["name", %r{^projects/[^/]+/locations/[^/]+/clusters/[^/]+/nodePools/[^/]+/?$}, false]
2590
+ ]
2591
+ )
2592
+ .with_bindings(
2593
+ uri_method: :get,
2594
+ uri_template: "/v1/{name}:fetchNodePoolUpgradeInfo",
2595
+ matches: [
2596
+ ["name", %r{^projects/[^/]+/zones/[^/]+/clusters/[^/]+/nodePools/[^/]+/?$}, false]
2597
+ ]
2598
+ )
2599
+ transcoder.transcode request_pb
2600
+ end
2465
2601
  end
2466
2602
  end
2467
2603
  end
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module Container
23
23
  module V1
24
- VERSION = "1.6.1"
24
+ VERSION = "1.8.0"
25
25
  end
26
26
  end
27
27
  end