Module: Google::Cloud::GkeMultiCloud::V1::AzureClusters::Paths

Extended by:
Paths
Included in:
Client, Paths, Rest::Client
Defined in:
lib/google/cloud/gke_multi_cloud/v1/azure_clusters/paths.rb

Overview

Path helper methods for the AzureClusters API.

Instance Method Summary collapse

Instance Method Details

#azure_client_path(project:, location:, azure_client:) ⇒ ::String

Create a fully-qualified AzureClient resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/azureClients/{azure_client}

Parameters:

  • project (String)
  • location (String)
  • azure_client (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


39
40
41
42
43
44
# File 'lib/google/cloud/gke_multi_cloud/v1/azure_clusters/paths.rb', line 39

def azure_client_path project:, location:, azure_client:
  raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
  raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"

  "projects/#{project}/locations/#{location}/azureClients/#{azure_client}"
end

#azure_cluster_path(project:, location:, azure_cluster:) ⇒ ::String

Create a fully-qualified AzureCluster resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/azureClusters/{azure_cluster}

Parameters:

  • project (String)
  • location (String)
  • azure_cluster (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


58
59
60
61
62
63
# File 'lib/google/cloud/gke_multi_cloud/v1/azure_clusters/paths.rb', line 58

def azure_cluster_path project:, location:, azure_cluster:
  raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
  raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"

  "projects/#{project}/locations/#{location}/azureClusters/#{azure_cluster}"
end

#azure_node_pool_path(project:, location:, azure_cluster:, azure_node_pool:) ⇒ ::String

Create a fully-qualified AzureNodePool resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/azureClusters/{azure_cluster}/azureNodePools/{azure_node_pool}

Parameters:

  • project (String)
  • location (String)
  • azure_cluster (String)
  • azure_node_pool (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


78
79
80
81
82
83
84
# File 'lib/google/cloud/gke_multi_cloud/v1/azure_clusters/paths.rb', line 78

def azure_node_pool_path project:, location:, azure_cluster:, azure_node_pool:
  raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
  raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
  raise ::ArgumentError, "azure_cluster cannot contain /" if azure_cluster.to_s.include? "/"

  "projects/#{project}/locations/#{location}/azureClusters/#{azure_cluster}/azureNodePools/#{azure_node_pool}"
end

#azure_server_config_path(project:, location:) ⇒ ::String

Create a fully-qualified AzureServerConfig resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/azureServerConfig

Parameters:

  • project (String)
  • location (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


97
98
99
100
101
# File 'lib/google/cloud/gke_multi_cloud/v1/azure_clusters/paths.rb', line 97

def azure_server_config_path project:, location:
  raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"

  "projects/#{project}/locations/#{location}/azureServerConfig"
end

#location_path(project:, location:) ⇒ ::String

Create a fully-qualified Location resource string.

The resource will be in the following format:

projects/{project}/locations/{location}

Parameters:

  • project (String)
  • location (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


114
115
116
117
118
# File 'lib/google/cloud/gke_multi_cloud/v1/azure_clusters/paths.rb', line 114

def location_path project:, location:
  raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"

  "projects/#{project}/locations/#{location}"
end