Module: Google::Cloud::GkeMultiCloud
- Defined in:
- lib/google/cloud/gke_multi_cloud.rb,
lib/google/cloud/gke_multi_cloud/version.rb
Constant Summary collapse
- VERSION =
"1.2.1"
Class Method Summary collapse
-
.attached_clusters(version: :v1, &block) ⇒ ::Object
Create a new client object for AttachedClusters.
-
.aws_clusters(version: :v1, &block) ⇒ ::Object
Create a new client object for AwsClusters.
-
.azure_clusters(version: :v1, &block) ⇒ ::Object
Create a new client object for AzureClusters.
-
.configure {|::Google::Cloud.configure.gke_multi_cloud| ... } ⇒ ::Google::Cloud::Config
Configure the google-cloud-gke_multi_cloud library.
Class Method Details
.attached_clusters(version: :v1, &block) ⇒ ::Object
Create a new client object for AttachedClusters.
By default, this returns an instance of
Google::Cloud::GkeMultiCloud::V1::AttachedClusters::Client
for a gRPC client for version V1 of the API.
However, you can specify a different API version by passing it in the
version
parameter. If the AttachedClusters service is
supported by that API version, and the corresponding gem is available, the
appropriate versioned client will be returned.
About AttachedClusters
The AttachedClusters API provides a single centrally managed service to register and manage Anthos attached clusters that run on customer's owned infrastructure.
69 70 71 72 73 74 75 76 77 78 |
# File 'lib/google/cloud/gke_multi_cloud.rb', line 69 def self.attached_clusters version: :v1, &block require "google/cloud/gke_multi_cloud/#{version.to_s.downcase}" package_name = Google::Cloud::GkeMultiCloud .constants .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } .first service_module = Google::Cloud::GkeMultiCloud.const_get(package_name).const_get(:AttachedClusters) service_module.const_get(:Client).new(&block) end |
.aws_clusters(version: :v1, &block) ⇒ ::Object
Create a new client object for AwsClusters.
By default, this returns an instance of
Google::Cloud::GkeMultiCloud::V1::AwsClusters::Client
for a gRPC client for version V1 of the API.
However, you can specify a different API version by passing it in the
version
parameter. If the AwsClusters service is
supported by that API version, and the corresponding gem is available, the
appropriate versioned client will be returned.
About AwsClusters
The AwsClusters API provides a single centrally managed service to create and manage Anthos clusters that run on AWS infrastructure.
100 101 102 103 104 105 106 107 108 109 |
# File 'lib/google/cloud/gke_multi_cloud.rb', line 100 def self.aws_clusters version: :v1, &block require "google/cloud/gke_multi_cloud/#{version.to_s.downcase}" package_name = Google::Cloud::GkeMultiCloud .constants .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } .first service_module = Google::Cloud::GkeMultiCloud.const_get(package_name).const_get(:AwsClusters) service_module.const_get(:Client).new(&block) end |
.azure_clusters(version: :v1, &block) ⇒ ::Object
Create a new client object for AzureClusters.
By default, this returns an instance of
Google::Cloud::GkeMultiCloud::V1::AzureClusters::Client
for a gRPC client for version V1 of the API.
However, you can specify a different API version by passing it in the
version
parameter. If the AzureClusters service is
supported by that API version, and the corresponding gem is available, the
appropriate versioned client will be returned.
About AzureClusters
The AzureClusters API provides a single centrally managed service to create and manage Anthos clusters that run on Azure infrastructure.
131 132 133 134 135 136 137 138 139 140 |
# File 'lib/google/cloud/gke_multi_cloud.rb', line 131 def self.azure_clusters version: :v1, &block require "google/cloud/gke_multi_cloud/#{version.to_s.downcase}" package_name = Google::Cloud::GkeMultiCloud .constants .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } .first service_module = Google::Cloud::GkeMultiCloud.const_get(package_name).const_get(:AzureClusters) service_module.const_get(:Client).new(&block) end |
.configure {|::Google::Cloud.configure.gke_multi_cloud| ... } ⇒ ::Google::Cloud::Config
Configure the google-cloud-gke_multi_cloud library.
The following configuration parameters are supported:
credentials
(type:String, Hash, Google::Auth::Credentials
) - The path to the keyfile as a String, the contents of the keyfile as a Hash, or a Google::Auth::Credentials object.lib_name
(type:String
) - The library name as recorded in instrumentation and logging.lib_version
(type:String
) - The library version as recorded in instrumentation and logging.interceptors
(type:Array<GRPC::ClientInterceptor>
) - An array of interceptors that are run before calls are executed.timeout
(type:Numeric
) - Default timeout in seconds.metadata
(type:Hash{Symbol=>String}
) - Additional headers to be sent with the call.retry_policy
(type:Hash
) - The retry policy. The value is a hash with the following keys::initial_delay
(type:Numeric
) - The initial delay in seconds.:max_delay
(type:Numeric
) - The max delay in seconds.:multiplier
(type:Numeric
) - The incremental backoff multiplier.:retry_codes
(type:Array<String>
) - The error codes that should trigger a retry.
170 171 172 173 174 |
# File 'lib/google/cloud/gke_multi_cloud.rb', line 170 def self.configure yield ::Google::Cloud.configure.gke_multi_cloud if block_given? ::Google::Cloud.configure.gke_multi_cloud end |