Class: Google::Cloud::GkeMultiCloud::V1::AwsClusters::Client
- Inherits:
-
Object
- Object
- Google::Cloud::GkeMultiCloud::V1::AwsClusters::Client
- Includes:
- Paths
- Defined in:
- lib/google/cloud/gke_multi_cloud/v1/aws_clusters/client.rb
Overview
Client for the AwsClusters service.
The AwsClusters API provides a single centrally managed service to create and manage Anthos clusters that run on AWS infrastructure.
Defined Under Namespace
Classes: Configuration
Instance Attribute Summary collapse
-
#operations_client ⇒ ::Google::Cloud::GkeMultiCloud::V1::AwsClusters::Operations
readonly
Get the associated client for long-running operations.
Class Method Summary collapse
-
.configure {|config| ... } ⇒ Client::Configuration
Configure the AwsClusters Client class.
Instance Method Summary collapse
-
#configure {|config| ... } ⇒ Client::Configuration
Configure the AwsClusters Client instance.
-
#create_aws_cluster(request, options = nil) {|response, operation| ... } ⇒ ::Gapic::Operation
Creates a new AwsCluster resource on a given Google Cloud Platform project and region.
-
#create_aws_node_pool(request, options = nil) {|response, operation| ... } ⇒ ::Gapic::Operation
Creates a new AwsNodePool, attached to a given AwsCluster.
-
#delete_aws_cluster(request, options = nil) {|response, operation| ... } ⇒ ::Gapic::Operation
Deletes a specific AwsCluster resource.
-
#delete_aws_node_pool(request, options = nil) {|response, operation| ... } ⇒ ::Gapic::Operation
Deletes a specific AwsNodePool resource.
-
#generate_aws_access_token(request, options = nil) {|response, operation| ... } ⇒ ::Google::Cloud::GkeMultiCloud::V1::GenerateAwsAccessTokenResponse
Generates a short-lived access token to authenticate to a given AwsCluster resource.
-
#generate_aws_cluster_agent_token(request, options = nil) {|response, operation| ... } ⇒ ::Google::Cloud::GkeMultiCloud::V1::GenerateAwsClusterAgentTokenResponse
Generates an access token for a cluster agent.
-
#get_aws_cluster(request, options = nil) {|response, operation| ... } ⇒ ::Google::Cloud::GkeMultiCloud::V1::AwsCluster
Describes a specific AwsCluster resource.
-
#get_aws_json_web_keys(request, options = nil) {|response, operation| ... } ⇒ ::Google::Cloud::GkeMultiCloud::V1::AwsJsonWebKeys
Gets the public component of the cluster signing keys in JSON Web Key format.
-
#get_aws_node_pool(request, options = nil) {|response, operation| ... } ⇒ ::Google::Cloud::GkeMultiCloud::V1::AwsNodePool
Describes a specific AwsNodePool resource.
-
#get_aws_open_id_config(request, options = nil) {|response, operation| ... } ⇒ ::Google::Cloud::GkeMultiCloud::V1::AwsOpenIdConfig
Gets the OIDC discovery document for the cluster.
-
#get_aws_server_config(request, options = nil) {|response, operation| ... } ⇒ ::Google::Cloud::GkeMultiCloud::V1::AwsServerConfig
Returns information, such as supported AWS regions and Kubernetes versions, on a given Google Cloud location.
-
#initialize {|config| ... } ⇒ Client
constructor
Create a new AwsClusters client object.
-
#list_aws_clusters(request, options = nil) {|response, operation| ... } ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::GkeMultiCloud::V1::AwsCluster>
Lists all AwsCluster resources on a given Google Cloud project and region.
-
#list_aws_node_pools(request, options = nil) {|response, operation| ... } ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::GkeMultiCloud::V1::AwsNodePool>
Lists all AwsNodePool resources on a given AwsCluster.
-
#rollback_aws_node_pool_update(request, options = nil) {|response, operation| ... } ⇒ ::Gapic::Operation
Rolls back a previously aborted or failed AwsNodePool update request.
-
#universe_domain ⇒ String
The effective universe domain.
-
#update_aws_cluster(request, options = nil) {|response, operation| ... } ⇒ ::Gapic::Operation
Updates an AwsCluster.
-
#update_aws_node_pool(request, options = nil) {|response, operation| ... } ⇒ ::Gapic::Operation
Updates an AwsNodePool.
Methods included from Paths
#aws_cluster_path, #aws_node_pool_path, #aws_server_config_path, #location_path
Constructor Details
#initialize {|config| ... } ⇒ Client
Create a new AwsClusters client object.
184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 |
# File 'lib/google/cloud/gke_multi_cloud/v1/aws_clusters/client.rb', line 184 def initialize # These require statements are intentionally placed here to initialize # the gRPC module only when it's required. # See https://github.com/googleapis/toolkit/issues/446 require "gapic/grpc" require "google/cloud/gkemulticloud/v1/aws_service_services_pb" # Create the configuration object @config = Configuration.new Client.configure # Yield the configuration if needed yield @config if block_given? # Create credentials credentials = @config.credentials # Use self-signed JWT if the endpoint is unchanged from default, # but only if the default endpoint does not have a region prefix. enable_self_signed_jwt = @config.endpoint.nil? || (@config.endpoint == Configuration::DEFAULT_ENDPOINT && !@config.endpoint.split(".").first.include?("-")) credentials ||= Credentials.default scope: @config.scope, enable_self_signed_jwt: enable_self_signed_jwt if credentials.is_a?(::String) || credentials.is_a?(::Hash) credentials = Credentials.new credentials, scope: @config.scope end @quota_project_id = @config.quota_project @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id @operations_client = Operations.new do |config| config.credentials = credentials config.quota_project = @quota_project_id config.endpoint = @config.endpoint config.universe_domain = @config.universe_domain end @aws_clusters_stub = ::Gapic::ServiceStub.new( ::Google::Cloud::GkeMultiCloud::V1::AwsClusters::Stub, credentials: credentials, endpoint: @config.endpoint, endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, universe_domain: @config.universe_domain, channel_args: @config.channel_args, interceptors: @config.interceptors, channel_pool_config: @config.channel_pool ) end |
Instance Attribute Details
#operations_client ⇒ ::Google::Cloud::GkeMultiCloud::V1::AwsClusters::Operations (readonly)
Get the associated client for long-running operations.
236 237 238 |
# File 'lib/google/cloud/gke_multi_cloud/v1/aws_clusters/client.rb', line 236 def operations_client @operations_client end |
Class Method Details
.configure {|config| ... } ⇒ Client::Configuration
Configure the AwsClusters Client class.
See Configuration for a description of the configuration fields.
63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 |
# File 'lib/google/cloud/gke_multi_cloud/v1/aws_clusters/client.rb', line 63 def self.configure @configure ||= begin namespace = ["Google", "Cloud", "GkeMultiCloud", "V1"] parent_config = while namespace.any? parent_name = namespace.join "::" parent_const = const_get parent_name break parent_const.configure if parent_const.respond_to? :configure namespace.pop end default_config = Client::Configuration.new parent_config default_config.rpcs.create_aws_cluster.timeout = 60.0 default_config.rpcs.update_aws_cluster.timeout = 60.0 default_config.rpcs.get_aws_cluster.timeout = 60.0 default_config.rpcs.get_aws_cluster.retry_policy = { initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] } default_config.rpcs.list_aws_clusters.timeout = 60.0 default_config.rpcs.list_aws_clusters.retry_policy = { initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] } default_config.rpcs.delete_aws_cluster.timeout = 60.0 default_config.rpcs.generate_aws_cluster_agent_token.timeout = 60.0 default_config.rpcs.generate_aws_cluster_agent_token.retry_policy = { initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] } default_config.rpcs.generate_aws_access_token.timeout = 60.0 default_config.rpcs.generate_aws_access_token.retry_policy = { initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] } default_config.rpcs.create_aws_node_pool.timeout = 60.0 default_config.rpcs.update_aws_node_pool.timeout = 60.0 default_config.rpcs.rollback_aws_node_pool_update.timeout = 60.0 default_config.rpcs.get_aws_node_pool.timeout = 60.0 default_config.rpcs.get_aws_node_pool.retry_policy = { initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] } default_config.rpcs.list_aws_node_pools.timeout = 60.0 default_config.rpcs.list_aws_node_pools.retry_policy = { initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] } default_config.rpcs.delete_aws_node_pool.timeout = 60.0 default_config.rpcs.get_aws_open_id_config.timeout = 60.0 default_config.rpcs.get_aws_open_id_config.retry_policy = { initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] } default_config.rpcs.get_aws_json_web_keys.timeout = 60.0 default_config.rpcs.get_aws_json_web_keys.retry_policy = { initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] } default_config.rpcs.get_aws_server_config.timeout = 60.0 default_config.rpcs.get_aws_server_config.retry_policy = { initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] } default_config end yield @configure if block_given? @configure end |
Instance Method Details
#configure {|config| ... } ⇒ Client::Configuration
Configure the AwsClusters Client instance.
The configuration is set to the derived mode, meaning that values can be changed, but structural changes (adding new fields, etc.) are not allowed. Structural changes should be made on configure.
See Configuration for a description of the configuration fields.
154 155 156 157 |
# File 'lib/google/cloud/gke_multi_cloud/v1/aws_clusters/client.rb', line 154 def configure yield @config if block_given? @config end |
#create_aws_cluster(request, options = nil) ⇒ ::Gapic::Operation #create_aws_cluster(parent: nil, aws_cluster: nil, aws_cluster_id: nil, validate_only: nil) ⇒ ::Gapic::Operation
Creates a new AwsCluster resource on a given Google Cloud Platform project and region.
If successful, the response contains a newly created Operation resource that can be described to track the status of the operation.
318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 |
# File 'lib/google/cloud/gke_multi_cloud/v1/aws_clusters/client.rb', line 318 def create_aws_cluster request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeMultiCloud::V1::CreateAwsClusterRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.create_aws_cluster..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::GkeMultiCloud::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.parent header_params["parent"] = request.parent end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.create_aws_cluster.timeout, metadata: , retry_policy: @config.rpcs.create_aws_cluster.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @aws_clusters_stub.call_rpc :create_aws_cluster, request, options: do |response, operation| response = ::Gapic::Operation.new response, @operations_client, options: yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#create_aws_node_pool(request, options = nil) ⇒ ::Gapic::Operation #create_aws_node_pool(parent: nil, aws_node_pool: nil, aws_node_pool_id: nil, validate_only: nil) ⇒ ::Gapic::Operation
Creates a new AwsNodePool, attached to a given AwsCluster.
If successful, the response contains a newly created Operation resource that can be described to track the status of the operation.
1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 |
# File 'lib/google/cloud/gke_multi_cloud/v1/aws_clusters/client.rb', line 1104 def create_aws_node_pool request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeMultiCloud::V1::CreateAwsNodePoolRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.create_aws_node_pool..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::GkeMultiCloud::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.parent header_params["parent"] = request.parent end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.create_aws_node_pool.timeout, metadata: , retry_policy: @config.rpcs.create_aws_node_pool.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @aws_clusters_stub.call_rpc :create_aws_node_pool, request, options: do |response, operation| response = ::Gapic::Operation.new response, @operations_client, options: yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#delete_aws_cluster(request, options = nil) ⇒ ::Gapic::Operation #delete_aws_cluster(name: nil, validate_only: nil, allow_missing: nil, ignore_errors: nil, etag: nil) ⇒ ::Gapic::Operation
Deletes a specific AwsCluster resource.
Fails if the cluster has one or more associated AwsNodePool resources.
If successful, the response contains a newly created Operation resource that can be described to track the status of the operation.
783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 |
# File 'lib/google/cloud/gke_multi_cloud/v1/aws_clusters/client.rb', line 783 def delete_aws_cluster request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeMultiCloud::V1::DeleteAwsClusterRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.delete_aws_cluster..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::GkeMultiCloud::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.delete_aws_cluster.timeout, metadata: , retry_policy: @config.rpcs.delete_aws_cluster.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @aws_clusters_stub.call_rpc :delete_aws_cluster, request, options: do |response, operation| response = ::Gapic::Operation.new response, @operations_client, options: yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#delete_aws_node_pool(request, options = nil) ⇒ ::Gapic::Operation #delete_aws_node_pool(name: nil, validate_only: nil, allow_missing: nil, ignore_errors: nil, etag: nil) ⇒ ::Gapic::Operation
Deletes a specific AwsNodePool resource.
If successful, the response contains a newly created Operation resource that can be described to track the status of the operation.
1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 |
# File 'lib/google/cloud/gke_multi_cloud/v1/aws_clusters/client.rb', line 1682 def delete_aws_node_pool request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeMultiCloud::V1::DeleteAwsNodePoolRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.delete_aws_node_pool..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::GkeMultiCloud::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.delete_aws_node_pool.timeout, metadata: , retry_policy: @config.rpcs.delete_aws_node_pool.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @aws_clusters_stub.call_rpc :delete_aws_node_pool, request, options: do |response, operation| response = ::Gapic::Operation.new response, @operations_client, options: yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#generate_aws_access_token(request, options = nil) ⇒ ::Google::Cloud::GkeMultiCloud::V1::GenerateAwsAccessTokenResponse #generate_aws_access_token(aws_cluster: nil) ⇒ ::Google::Cloud::GkeMultiCloud::V1::GenerateAwsAccessTokenResponse
Generates a short-lived access token to authenticate to a given AwsCluster resource.
983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 |
# File 'lib/google/cloud/gke_multi_cloud/v1/aws_clusters/client.rb', line 983 def generate_aws_access_token request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeMultiCloud::V1::GenerateAwsAccessTokenRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.generate_aws_access_token..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::GkeMultiCloud::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.aws_cluster header_params["aws_cluster"] = request.aws_cluster end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.generate_aws_access_token.timeout, metadata: , retry_policy: @config.rpcs.generate_aws_access_token.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @aws_clusters_stub.call_rpc :generate_aws_access_token, request, options: do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#generate_aws_cluster_agent_token(request, options = nil) ⇒ ::Google::Cloud::GkeMultiCloud::V1::GenerateAwsClusterAgentTokenResponse #generate_aws_cluster_agent_token(aws_cluster: nil, subject_token: nil, subject_token_type: nil, version: nil, node_pool_id: nil, grant_type: nil, audience: nil, scope: nil, requested_token_type: nil, options: nil) ⇒ ::Google::Cloud::GkeMultiCloud::V1::GenerateAwsClusterAgentTokenResponse
Generates an access token for a cluster agent.
888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 |
# File 'lib/google/cloud/gke_multi_cloud/v1/aws_clusters/client.rb', line 888 def generate_aws_cluster_agent_token request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeMultiCloud::V1::GenerateAwsClusterAgentTokenRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.generate_aws_cluster_agent_token..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::GkeMultiCloud::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.aws_cluster header_params["aws_cluster"] = request.aws_cluster end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.generate_aws_cluster_agent_token.timeout, metadata: , retry_policy: @config.rpcs.generate_aws_cluster_agent_token.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @aws_clusters_stub.call_rpc :generate_aws_cluster_agent_token, request, options: do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#get_aws_cluster(request, options = nil) ⇒ ::Google::Cloud::GkeMultiCloud::V1::AwsCluster #get_aws_cluster(name: nil) ⇒ ::Google::Cloud::GkeMultiCloud::V1::AwsCluster
Describes a specific AwsCluster resource.
543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 |
# File 'lib/google/cloud/gke_multi_cloud/v1/aws_clusters/client.rb', line 543 def get_aws_cluster request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeMultiCloud::V1::GetAwsClusterRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.get_aws_cluster..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::GkeMultiCloud::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.get_aws_cluster.timeout, metadata: , retry_policy: @config.rpcs.get_aws_cluster.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @aws_clusters_stub.call_rpc :get_aws_cluster, request, options: do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#get_aws_json_web_keys(request, options = nil) ⇒ ::Google::Cloud::GkeMultiCloud::V1::AwsJsonWebKeys #get_aws_json_web_keys(aws_cluster: nil) ⇒ ::Google::Cloud::GkeMultiCloud::V1::AwsJsonWebKeys
Gets the public component of the cluster signing keys in JSON Web Key format.
1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 |
# File 'lib/google/cloud/gke_multi_cloud/v1/aws_clusters/client.rb', line 1864 def get_aws_json_web_keys request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeMultiCloud::V1::GetAwsJsonWebKeysRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.get_aws_json_web_keys..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::GkeMultiCloud::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.aws_cluster header_params["aws_cluster"] = request.aws_cluster end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.get_aws_json_web_keys.timeout, metadata: , retry_policy: @config.rpcs.get_aws_json_web_keys.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @aws_clusters_stub.call_rpc :get_aws_json_web_keys, request, options: do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#get_aws_node_pool(request, options = nil) ⇒ ::Google::Cloud::GkeMultiCloud::V1::AwsNodePool #get_aws_node_pool(name: nil) ⇒ ::Google::Cloud::GkeMultiCloud::V1::AwsNodePool
Describes a specific AwsNodePool resource.
1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 |
# File 'lib/google/cloud/gke_multi_cloud/v1/aws_clusters/client.rb', line 1442 def get_aws_node_pool request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeMultiCloud::V1::GetAwsNodePoolRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.get_aws_node_pool..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::GkeMultiCloud::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.get_aws_node_pool.timeout, metadata: , retry_policy: @config.rpcs.get_aws_node_pool.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @aws_clusters_stub.call_rpc :get_aws_node_pool, request, options: do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#get_aws_open_id_config(request, options = nil) ⇒ ::Google::Cloud::GkeMultiCloud::V1::AwsOpenIdConfig #get_aws_open_id_config(aws_cluster: nil) ⇒ ::Google::Cloud::GkeMultiCloud::V1::AwsOpenIdConfig
Gets the OIDC discovery document for the cluster. See the OpenID Connect Discovery 1.0 specification for details.
1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 |
# File 'lib/google/cloud/gke_multi_cloud/v1/aws_clusters/client.rb', line 1775 def get_aws_open_id_config request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeMultiCloud::V1::GetAwsOpenIdConfigRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.get_aws_open_id_config..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::GkeMultiCloud::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.aws_cluster header_params["aws_cluster"] = request.aws_cluster end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.get_aws_open_id_config.timeout, metadata: , retry_policy: @config.rpcs.get_aws_open_id_config.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @aws_clusters_stub.call_rpc :get_aws_open_id_config, request, options: do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#get_aws_server_config(request, options = nil) ⇒ ::Google::Cloud::GkeMultiCloud::V1::AwsServerConfig #get_aws_server_config(name: nil) ⇒ ::Google::Cloud::GkeMultiCloud::V1::AwsServerConfig
Returns information, such as supported AWS regions and Kubernetes versions, on a given Google Cloud location.
1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 |
# File 'lib/google/cloud/gke_multi_cloud/v1/aws_clusters/client.rb', line 1959 def get_aws_server_config request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeMultiCloud::V1::GetAwsServerConfigRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.get_aws_server_config..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::GkeMultiCloud::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.get_aws_server_config.timeout, metadata: , retry_policy: @config.rpcs.get_aws_server_config.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @aws_clusters_stub.call_rpc :get_aws_server_config, request, options: do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#list_aws_clusters(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::GkeMultiCloud::V1::AwsCluster> #list_aws_clusters(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::GkeMultiCloud::V1::AwsCluster>
Lists all AwsCluster resources on a given Google Cloud project and region.
652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 |
# File 'lib/google/cloud/gke_multi_cloud/v1/aws_clusters/client.rb', line 652 def list_aws_clusters request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeMultiCloud::V1::ListAwsClustersRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.list_aws_clusters..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::GkeMultiCloud::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.parent header_params["parent"] = request.parent end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.list_aws_clusters.timeout, metadata: , retry_policy: @config.rpcs.list_aws_clusters.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @aws_clusters_stub.call_rpc :list_aws_clusters, request, options: do |response, operation| response = ::Gapic::PagedEnumerable.new @aws_clusters_stub, :list_aws_clusters, request, response, operation, yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#list_aws_node_pools(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::GkeMultiCloud::V1::AwsNodePool> #list_aws_node_pools(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::GkeMultiCloud::V1::AwsNodePool>
Lists all AwsNodePool resources on a given AwsCluster.
1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 |
# File 'lib/google/cloud/gke_multi_cloud/v1/aws_clusters/client.rb', line 1553 def list_aws_node_pools request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeMultiCloud::V1::ListAwsNodePoolsRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.list_aws_node_pools..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::GkeMultiCloud::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.parent header_params["parent"] = request.parent end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.list_aws_node_pools.timeout, metadata: , retry_policy: @config.rpcs.list_aws_node_pools.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @aws_clusters_stub.call_rpc :list_aws_node_pools, request, options: do |response, operation| response = ::Gapic::PagedEnumerable.new @aws_clusters_stub, :list_aws_node_pools, request, response, operation, yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#rollback_aws_node_pool_update(request, options = nil) ⇒ ::Gapic::Operation #rollback_aws_node_pool_update(name: nil, respect_pdb: nil) ⇒ ::Gapic::Operation
Rolls back a previously aborted or failed AwsNodePool update request. Makes no changes if the last update request successfully finished. If an update request is in progress, you cannot rollback the update. You must first cancel or let it finish unsuccessfully before you can rollback.
1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 |
# File 'lib/google/cloud/gke_multi_cloud/v1/aws_clusters/client.rb', line 1346 def rollback_aws_node_pool_update request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeMultiCloud::V1::RollbackAwsNodePoolUpdateRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.rollback_aws_node_pool_update..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::GkeMultiCloud::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.rollback_aws_node_pool_update.timeout, metadata: , retry_policy: @config.rpcs.rollback_aws_node_pool_update.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @aws_clusters_stub.call_rpc :rollback_aws_node_pool_update, request, options: do |response, operation| response = ::Gapic::Operation.new response, @operations_client, options: yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#universe_domain ⇒ String
The effective universe domain
164 165 166 |
# File 'lib/google/cloud/gke_multi_cloud/v1/aws_clusters/client.rb', line 164 def universe_domain @aws_clusters_stub.universe_domain end |
#update_aws_cluster(request, options = nil) ⇒ ::Gapic::Operation #update_aws_cluster(aws_cluster: nil, validate_only: nil, update_mask: nil) ⇒ ::Gapic::Operation
Updates an AwsCluster.
447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 |
# File 'lib/google/cloud/gke_multi_cloud/v1/aws_clusters/client.rb', line 447 def update_aws_cluster request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeMultiCloud::V1::UpdateAwsClusterRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.update_aws_cluster..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::GkeMultiCloud::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.aws_cluster&.name header_params["aws_cluster.name"] = request.aws_cluster.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.update_aws_cluster.timeout, metadata: , retry_policy: @config.rpcs.update_aws_cluster.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @aws_clusters_stub.call_rpc :update_aws_cluster, request, options: do |response, operation| response = ::Gapic::Operation.new response, @operations_client, options: yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#update_aws_node_pool(request, options = nil) ⇒ ::Gapic::Operation #update_aws_node_pool(aws_node_pool: nil, validate_only: nil, update_mask: nil) ⇒ ::Gapic::Operation
Updates an AwsNodePool.
1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 |
# File 'lib/google/cloud/gke_multi_cloud/v1/aws_clusters/client.rb', line 1236 def update_aws_node_pool request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeMultiCloud::V1::UpdateAwsNodePoolRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.update_aws_node_pool..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::GkeMultiCloud::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.aws_node_pool&.name header_params["aws_node_pool.name"] = request.aws_node_pool.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.update_aws_node_pool.timeout, metadata: , retry_policy: @config.rpcs.update_aws_node_pool.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @aws_clusters_stub.call_rpc :update_aws_node_pool, request, options: do |response, operation| response = ::Gapic::Operation.new response, @operations_client, options: yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |