Module: Google::Cloud::Orchestration::Airflow::Service::V1::Environments::Paths

Extended by:
Paths
Included in:
Client, Paths, Rest::Client
Defined in:
lib/google/cloud/orchestration/airflow/service/v1/environments/paths.rb

Overview

Path helper methods for the Environments API.

Instance Method Summary collapse

Instance Method Details

#environment_path(project:, location:, environment:) ⇒ ::String

Create a fully-qualified Environment resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/environments/{environment}

Parameters:

  • project (String)
  • location (String)
  • environment (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


41
42
43
44
45
46
# File 'lib/google/cloud/orchestration/airflow/service/v1/environments/paths.rb', line 41

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

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

#user_workloads_config_map_path(project:, location:, environment:, user_workloads_config_map:) ⇒ ::String

Create a fully-qualified UserWorkloadsConfigMap resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/environments/{environment}/userWorkloadsConfigMaps/{user_workloads_config_map}

Parameters:

  • project (String)
  • location (String)
  • environment (String)
  • user_workloads_config_map (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


61
62
63
64
65
66
67
# File 'lib/google/cloud/orchestration/airflow/service/v1/environments/paths.rb', line 61

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

  "projects/#{project}/locations/#{location}/environments/#{environment}/userWorkloadsConfigMaps/#{user_workloads_config_map}"
end

#user_workloads_secret_path(project:, location:, environment:, user_workloads_secret:) ⇒ ::String

Create a fully-qualified UserWorkloadsSecret resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/environments/{environment}/userWorkloadsSecrets/{user_workloads_secret}

Parameters:

  • project (String)
  • location (String)
  • environment (String)
  • user_workloads_secret (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


82
83
84
85
86
87
88
# File 'lib/google/cloud/orchestration/airflow/service/v1/environments/paths.rb', line 82

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

  "projects/#{project}/locations/#{location}/environments/#{environment}/userWorkloadsSecrets/#{user_workloads_secret}"
end