module Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Paths

Path helper methods for the ArtifactRegistry API.

Public Instance Methods

docker_image_path(project:, location:, repository:, docker_image: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/") click to toggle source

Create a fully-qualified DockerImage resource string.

The resource will be in the following format:

‘projects/{project}/locations/{location}/repositories/{repository}/dockerImages/{docker_image}`

@param project [String] @param location [String] @param repository [String] @param docker_image [String]

@return [::String]

# File lib/google/cloud/artifact_registry/v1/artifact_registry/paths.rb, line 40
def docker_image_path project:, location:, repository:, docker_image:
  raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
  raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
  raise ::ArgumentError, "repository cannot contain /" if repository.to_s.include? "/"

  "projects/#{project}/locations/#{location}/repositories/#{repository}/dockerImages/#{docker_image}"
end
location_path(project:, location: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/") click to toggle source

Create a fully-qualified Location resource string.

The resource will be in the following format:

‘projects/{project}/locations/{location}`

@param project [String] @param location [String]

@return [::String]

# File lib/google/cloud/artifact_registry/v1/artifact_registry/paths.rb, line 59
def location_path project:, location:
  raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"

  "projects/#{project}/locations/#{location}"
end
project_settings_path(project: "projects/ click to toggle source

Create a fully-qualified ProjectSettings resource string.

The resource will be in the following format:

‘projects/{project}/projectSettings`

@param project [String]

@return [::String]

# File lib/google/cloud/artifact_registry/v1/artifact_registry/paths.rb, line 75
def project_settings_path project:
  "projects/#{project}/projectSettings"
end
repository_path(project:, location:, repository: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/") click to toggle source

Create a fully-qualified Repository resource string.

The resource will be in the following format:

‘projects/{project}/locations/{location}/repositories/{repository}`

@param project [String] @param location [String] @param repository [String]

@return [::String]

# File lib/google/cloud/artifact_registry/v1/artifact_registry/paths.rb, line 91
def repository_path project:, location:, repository:
  raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
  raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"

  "projects/#{project}/locations/#{location}/repositories/#{repository}"
end
tag_path(project:, location:, repository:, package:, tag: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/") click to toggle source

Create a fully-qualified Tag resource string.

The resource will be in the following format:

‘projects/{project}/locations/{location}/repositories/{repository}/packages/{package}/tags/{tag}`

@param project [String] @param location [String] @param repository [String] @param package [String] @param tag [String]

@return [::String]

# File lib/google/cloud/artifact_registry/v1/artifact_registry/paths.rb, line 112
def tag_path project:, location:, repository:, package:, tag:
  raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
  raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
  raise ::ArgumentError, "repository cannot contain /" if repository.to_s.include? "/"
  raise ::ArgumentError, "package cannot contain /" if package.to_s.include? "/"

  "projects/#{project}/locations/#{location}/repositories/#{repository}/packages/#{package}/tags/#{tag}"
end