Module: Google::Cloud::Kms::V1::KeyManagementService::Paths
- Extended by:
- Paths
- Included in:
- Client, Paths, Rest::Client
- Defined in:
- lib/google/cloud/kms/v1/key_management_service/paths.rb
Overview
Path helper methods for the KeyManagementService API.
Instance Method Summary collapse
-
#crypto_key_path(project:, location:, key_ring:, crypto_key:) ⇒ ::String
Create a fully-qualified CryptoKey resource string.
-
#crypto_key_version_path(project:, location:, key_ring:, crypto_key:, crypto_key_version:) ⇒ ::String
Create a fully-qualified CryptoKeyVersion resource string.
-
#import_job_path(project:, location:, key_ring:, import_job:) ⇒ ::String
Create a fully-qualified ImportJob resource string.
-
#key_ring_path(project:, location:, key_ring:) ⇒ ::String
Create a fully-qualified KeyRing resource string.
-
#location_path(project:, location:) ⇒ ::String
Create a fully-qualified Location resource string.
Instance Method Details
#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}
40 41 42 43 44 45 46 |
# File 'lib/google/cloud/kms/v1/key_management_service/paths.rb', line 40 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 |
#crypto_key_version_path(project:, location:, key_ring:, crypto_key:, crypto_key_version:) ⇒ ::String
Create a fully-qualified CryptoKeyVersion resource string.
The resource will be in the following format:
projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}
62 63 64 65 66 67 68 69 |
# File 'lib/google/cloud/kms/v1/key_management_service/paths.rb', line 62 def crypto_key_version_path project:, location:, key_ring:, crypto_key:, crypto_key_version: 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? "/" raise ::ArgumentError, "crypto_key cannot contain /" if crypto_key.to_s.include? "/" "projects/#{project}/locations/#{location}/keyRings/#{key_ring}/cryptoKeys/#{crypto_key}/cryptoKeyVersions/#{crypto_key_version}" end |
#import_job_path(project:, location:, key_ring:, import_job:) ⇒ ::String
Create a fully-qualified ImportJob resource string.
The resource will be in the following format:
projects/{project}/locations/{location}/keyRings/{key_ring}/importJobs/{import_job}
84 85 86 87 88 89 90 |
# File 'lib/google/cloud/kms/v1/key_management_service/paths.rb', line 84 def import_job_path project:, location:, key_ring:, import_job: 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}/importJobs/#{import_job}" end |
#key_ring_path(project:, location:, key_ring:) ⇒ ::String
Create a fully-qualified KeyRing resource string.
The resource will be in the following format:
projects/{project}/locations/{location}/keyRings/{key_ring}
104 105 106 107 108 109 |
# File 'lib/google/cloud/kms/v1/key_management_service/paths.rb', line 104 def key_ring_path project:, location:, key_ring: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" "projects/#{project}/locations/#{location}/keyRings/#{key_ring}" 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}
122 123 124 125 126 |
# File 'lib/google/cloud/kms/v1/key_management_service/paths.rb', line 122 def location_path project:, location: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" "projects/#{project}/locations/#{location}" end |