Module: Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Paths

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

Overview

Path helper methods for the CertificateAuthorityService API.

Instance Method Summary collapse

Instance Method Details

#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)


40
41
42
43
44
45
# File 'lib/google/cloud/security/private_ca/v1/certificate_authority_service/paths.rb', line 40

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

#certificate_authority_path(project:, location:, ca_pool:, certificate_authority:) ⇒ ::String

Create a fully-qualified CertificateAuthority resource string.

The resource will be in the following format:

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

Parameters:

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

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


81
82
83
84
85
86
87
# File 'lib/google/cloud/security/private_ca/v1/certificate_authority_service/paths.rb', line 81

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

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

#certificate_path(project:, location:, ca_pool:, certificate:) ⇒ ::String

Create a fully-qualified Certificate resource string.

The resource will be in the following format:

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

Parameters:

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

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


60
61
62
63
64
65
66
# File 'lib/google/cloud/security/private_ca/v1/certificate_authority_service/paths.rb', line 60

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

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

#certificate_revocation_list_path(project:, location:, ca_pool:, certificate_authority:, certificate_revocation_list:) ⇒ ::String

Create a fully-qualified CertificateRevocationList resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/caPools/{ca_pool}/certificateAuthorities/{certificate_authority}/certificateRevocationLists/{certificate_revocation_list}

Parameters:

  • project (String)
  • location (String)
  • ca_pool (String)
  • certificate_authority (String)
  • certificate_revocation_list (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


103
104
105
106
107
108
109
110
# File 'lib/google/cloud/security/private_ca/v1/certificate_authority_service/paths.rb', line 103

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

  "projects/#{project}/locations/#{location}/caPools/#{ca_pool}/certificateAuthorities/#{certificate_authority}/certificateRevocationLists/#{certificate_revocation_list}"
end

#certificate_template_path(project:, location:, certificate_template:) ⇒ ::String

Create a fully-qualified CertificateTemplate resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/certificateTemplates/{certificate_template}

Parameters:

  • project (String)
  • location (String)
  • certificate_template (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


124
125
126
127
128
129
# File 'lib/google/cloud/security/private_ca/v1/certificate_authority_service/paths.rb', line 124

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

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


142
143
144
145
146
# File 'lib/google/cloud/security/private_ca/v1/certificate_authority_service/paths.rb', line 142

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

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