Module: Google::Cloud::ManagedKafka::V1::ManagedKafkaConnect::Paths

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

Overview

Path helper methods for the ManagedKafkaConnect API.

Instance Method Summary collapse

Instance Method Details

#connect_cluster_path(project:, location:, connect_cluster:) ⇒ ::String

Create a fully-qualified ConnectCluster resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/connectClusters/{connect_cluster}

Parameters:

  • project (String)
  • location (String)
  • connect_cluster (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


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

def connect_cluster_path project:, location:, connect_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}/connectClusters/#{connect_cluster}"
end

#connector_path(project:, location:, connect_cluster:, connector:) ⇒ ::String

Create a fully-qualified Connector resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/connectClusters/{connect_cluster}/connectors/{connector}

Parameters:

  • project (String)
  • location (String)
  • connect_cluster (String)
  • connector (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


59
60
61
62
63
64
65
# File 'lib/google/cloud/managed_kafka/v1/managed_kafka_connect/paths.rb', line 59

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

  "projects/#{project}/locations/#{location}/connectClusters/#{connect_cluster}/connectors/#{connector}"
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)


78
79
80
81
82
# File 'lib/google/cloud/managed_kafka/v1/managed_kafka_connect/paths.rb', line 78

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

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

#secret_version_path(project:, secret:, secret_version:) ⇒ ::String

Create a fully-qualified SecretVersion resource string.

The resource will be in the following format:

projects/{project}/secrets/{secret}/versions/{secret_version}

Parameters:

  • project (String)
  • secret (String)
  • secret_version (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


96
97
98
99
100
101
# File 'lib/google/cloud/managed_kafka/v1/managed_kafka_connect/paths.rb', line 96

def secret_version_path project:, secret:, secret_version:
  raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
  raise ::ArgumentError, "secret cannot contain /" if secret.to_s.include? "/"

  "projects/#{project}/secrets/#{secret}/versions/#{secret_version}"
end