Module: Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Paths

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

Overview

Path helper methods for the SecureSourceManager API.

Instance Method Summary collapse

Instance Method Details

#branch_rule_path(project:, location:, repository:, branch_rule:) ⇒ ::String

Create a fully-qualified BranchRule resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/repositories/{repository}/branchRules/{branch_rule}

Parameters:

  • project (String)
  • location (String)
  • repository (String)
  • branch_rule (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


40
41
42
43
44
45
46
# File 'lib/google/cloud/secure_source_manager/v1/secure_source_manager/paths.rb', line 40

def branch_rule_path project:, location:, repository:, branch_rule:
  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}/branchRules/#{branch_rule}"
end

#ca_pool_path(project:, location:, ca_pool:) ⇒ ::String

Create a fully-qualified CaPool resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/caPools/{ca_pool}

Parameters:

  • project (String)
  • location (String)
  • ca_pool (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


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

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

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

#crypto_key_path(project:, location:, key_ring:, crypto_key:) ⇒ ::String

Create a fully-qualified CryptoKey resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}

Parameters:

  • project (String)
  • location (String)
  • key_ring (String)
  • crypto_key (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


80
81
82
83
84
85
86
# File 'lib/google/cloud/secure_source_manager/v1/secure_source_manager/paths.rb', line 80

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

  "projects/#{project}/locations/#{location}/keyRings/#{key_ring}/cryptoKeys/#{crypto_key}"
end

#instance_path(project:, location:, instance:) ⇒ ::String

Create a fully-qualified Instance resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/instances/{instance}

Parameters:

  • project (String)
  • location (String)
  • instance (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


100
101
102
103
104
105
# File 'lib/google/cloud/secure_source_manager/v1/secure_source_manager/paths.rb', line 100

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

  "projects/#{project}/locations/#{location}/instances/#{instance}"
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)


118
119
120
121
122
# File 'lib/google/cloud/secure_source_manager/v1/secure_source_manager/paths.rb', line 118

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

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

#repository_path(project:, location:, repository:) ⇒ ::String

Create a fully-qualified Repository resource string.

The resource will be in the following format:

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

Parameters:

  • project (String)
  • location (String)
  • repository (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


136
137
138
139
140
141
# File 'lib/google/cloud/secure_source_manager/v1/secure_source_manager/paths.rb', line 136

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

#service_attachment_path(project:, region:, service_attachment:) ⇒ ::String

Create a fully-qualified ServiceAttachment resource string.

The resource will be in the following format:

projects/{project}/regions/{region}/serviceAttachments/{service_attachment}

Parameters:

  • project (String)
  • region (String)
  • service_attachment (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


155
156
157
158
159
160
# File 'lib/google/cloud/secure_source_manager/v1/secure_source_manager/paths.rb', line 155

def service_attachment_path project:, region:, service_attachment:
  raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
  raise ::ArgumentError, "region cannot contain /" if region.to_s.include? "/"

  "projects/#{project}/regions/#{region}/serviceAttachments/#{service_attachment}"
end