Reference documentation and code samples for the Ceritificate Authority Service V1 API class Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.
Client for the CertificateAuthorityService service.
Certificate Authority Service manages private certificate authorities and issued certificates.
Inherits
- Object
Methods
.configure
def self.configure() { |config| ... } -> Client::Configuration
Configure the CertificateAuthorityService Client class.
See Configuration for a description of the configuration fields.
- (config) — Configure the Client client.
- config (Client::Configuration)
# Modify the configuration for all CertificateAuthorityService clients ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.configure do |config| config.timeout = 10.0 end
#activate_certificate_authority
def activate_certificate_authority(request, options = nil) -> ::Gapic::Operation
def activate_certificate_authority(name: nil, pem_ca_certificate: nil, subordinate_config: nil, request_id: nil) -> ::Gapic::Operation
Activate a CertificateAuthority that is in state AWAITING_USER_ACTIVATION and is of type SUBORDINATE. After the parent Certificate Authority signs a certificate signing request from FetchCertificateAuthorityCsr, this method can complete the activation process.
def activate_certificate_authority(request, options = nil) -> ::Gapic::Operation
activate_certificate_authority
via a request object, either of type
ActivateCertificateAuthorityRequest or an equivalent Hash.
- request (::Google::Cloud::Security::PrivateCA::V1::ActivateCertificateAuthorityRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def activate_certificate_authority(name: nil, pem_ca_certificate: nil, subordinate_config: nil, request_id: nil) -> ::Gapic::Operation
activate_certificate_authority
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
name (::String) — Required. The resource name for this CertificateAuthority in the
format
projects/*/locations/*/caPools/*/certificateAuthorities/*
. - pem_ca_certificate (::String) — Required. The signed CA certificate issued from FetchCertificateAuthorityCsrResponse.pem_csr.
- subordinate_config (::Google::Cloud::Security::PrivateCA::V1::SubordinateConfig, ::Hash) — Required. Must include information about the issuer of 'pem_ca_certificate', and any further issuers until the self-signed CA.
-
request_id (::String) — Optional. An ID to identify requests. Specify a unique request ID so that if you must
retry your request, the server will know to ignore the request if it has
already been completed. The server will guarantee that for at least 60
minutes since the first request.
For example, consider a situation where you make an initial request and t he request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::Operation)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/security/private_ca/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Security::PrivateCA::V1::ActivateCertificateAuthorityRequest.new # Call the activate_certificate_authority method. result = client.activate_certificate_authority request # The returned object is of type Gapic::Operation. You can use this # object to check the status of an operation, cancel it, or wait # for results. Here is how to block until completion: result.wait_until_done! timeout: 60 if result.response? p result.response else puts "Error!" end
#configure
def configure() { |config| ... } -> Client::Configuration
Configure the CertificateAuthorityService Client instance.
The configuration is set to the derived mode, meaning that values can be changed, but structural changes (adding new fields, etc.) are not allowed. Structural changes should be made on Client.configure.
See Configuration for a description of the configuration fields.
- (config) — Configure the Client client.
- config (Client::Configuration)
#create_ca_pool
def create_ca_pool(request, options = nil) -> ::Gapic::Operation
def create_ca_pool(parent: nil, ca_pool_id: nil, ca_pool: nil, request_id: nil) -> ::Gapic::Operation
Create a CaPool.
def create_ca_pool(request, options = nil) -> ::Gapic::Operation
create_ca_pool
via a request object, either of type
Google::Cloud::Security::PrivateCA::V1::CreateCaPoolRequest or an equivalent Hash.
- request (::Google::Cloud::Security::PrivateCA::V1::CreateCaPoolRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def create_ca_pool(parent: nil, ca_pool_id: nil, ca_pool: nil, request_id: nil) -> ::Gapic::Operation
create_ca_pool
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
parent (::String) — Required. The resource name of the location associated with the
CaPool, in the format
projects/*/locations/*
. -
ca_pool_id (::String) — Required. It must be unique within a location and match the regular
expression
[a-zA-Z0-9_-]{1,63}
- ca_pool (::Google::Cloud::Security::PrivateCA::V1::CaPool, ::Hash) — Required. A CaPool with initial field values.
-
request_id (::String) — Optional. An ID to identify requests. Specify a unique request ID so that if you must
retry your request, the server will know to ignore the request if it has
already been completed. The server will guarantee that for at least 60
minutes since the first request.
For example, consider a situation where you make an initial request and t he request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::Operation)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/security/private_ca/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Security::PrivateCA::V1::CreateCaPoolRequest.new # Call the create_ca_pool method. result = client.create_ca_pool request # The returned object is of type Gapic::Operation. You can use this # object to check the status of an operation, cancel it, or wait # for results. Here is how to block until completion: result.wait_until_done! timeout: 60 if result.response? p result.response else puts "Error!" end
#create_certificate
def create_certificate(request, options = nil) -> ::Google::Cloud::Security::PrivateCA::V1::Certificate
def create_certificate(parent: nil, certificate_id: nil, certificate: nil, request_id: nil, validate_only: nil, issuing_certificate_authority_id: nil) -> ::Google::Cloud::Security::PrivateCA::V1::Certificate
Create a new Certificate in a given Project, Location from a particular CaPool.
def create_certificate(request, options = nil) -> ::Google::Cloud::Security::PrivateCA::V1::Certificate
create_certificate
via a request object, either of type
Google::Cloud::Security::PrivateCA::V1::CreateCertificateRequest or an equivalent Hash.
- request (::Google::Cloud::Security::PrivateCA::V1::CreateCertificateRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def create_certificate(parent: nil, certificate_id: nil, certificate: nil, request_id: nil, validate_only: nil, issuing_certificate_authority_id: nil) -> ::Google::Cloud::Security::PrivateCA::V1::Certificate
create_certificate
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
parent (::String) — Required. The resource name of the CaPool associated with the Certificate,
in the format
projects/*/locations/*/caPools/*
. -
certificate_id (::String) — Optional. It must be unique within a location and match the regular
expression
[a-zA-Z0-9_-]{1,63}
. This field is required when using a CertificateAuthority in the Enterprise [CertificateAuthority.Tier][], but is optional and its value is ignored otherwise. - certificate (::Google::Cloud::Security::PrivateCA::V1::Certificate, ::Hash) — Required. A Certificate with initial field values.
-
request_id (::String) — Optional. An ID to identify requests. Specify a unique request ID so that if you must
retry your request, the server will know to ignore the request if it has
already been completed. The server will guarantee that for at least 60
minutes since the first request.
For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
- validate_only (::Boolean) — Optional. If this is true, no Certificate resource will be persisted regardless of the CaPool's tier, and the returned Certificate will not contain the pem_certificate field.
-
issuing_certificate_authority_id (::String) — Optional. The resource ID of the CertificateAuthority that should issue the
certificate. This optional field will ignore the load-balancing scheme of
the Pool and directly issue the certificate from the CA with the specified
ID, contained in the same CaPool referenced by
parent
. Per-CA quota rules apply. If left empty, a CertificateAuthority will be chosen from the CaPool by the service. For example, to issue a Certificate from a Certificate Authority with resource name "projects/my-project/locations/us-central1/caPools/my-pool/certificateAuthorities/my-ca", you can set the parent to "projects/my-project/locations/us-central1/caPools/my-pool" and the issuing_certificate_authority_id to "my-ca".
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::Security::PrivateCA::V1::Certificate)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/security/private_ca/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Security::PrivateCA::V1::CreateCertificateRequest.new # Call the create_certificate method. result = client.create_certificate request # The returned object is of type Google::Cloud::Security::PrivateCA::V1::Certificate. p result
#create_certificate_authority
def create_certificate_authority(request, options = nil) -> ::Gapic::Operation
def create_certificate_authority(parent: nil, certificate_authority_id: nil, certificate_authority: nil, request_id: nil) -> ::Gapic::Operation
Create a new CertificateAuthority in a given Project and Location.
def create_certificate_authority(request, options = nil) -> ::Gapic::Operation
create_certificate_authority
via a request object, either of type
Google::Cloud::Security::PrivateCA::V1::CreateCertificateAuthorityRequest or an equivalent Hash.
- request (::Google::Cloud::Security::PrivateCA::V1::CreateCertificateAuthorityRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def create_certificate_authority(parent: nil, certificate_authority_id: nil, certificate_authority: nil, request_id: nil) -> ::Gapic::Operation
create_certificate_authority
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
parent (::String) — Required. The resource name of the CaPool associated with the
CertificateAuthorities, in the format
projects/*/locations/*/caPools/*
. -
certificate_authority_id (::String) — Required. It must be unique within a location and match the regular
expression
[a-zA-Z0-9_-]{1,63}
- certificate_authority (::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority, ::Hash) — Required. A CertificateAuthority with initial field values.
-
request_id (::String) — Optional. An ID to identify requests. Specify a unique request ID so that if you must
retry your request, the server will know to ignore the request if it has
already been completed. The server will guarantee that for at least 60
minutes since the first request.
For example, consider a situation where you make an initial request and t he request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::Operation)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/security/private_ca/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Security::PrivateCA::V1::CreateCertificateAuthorityRequest.new # Call the create_certificate_authority method. result = client.create_certificate_authority request # The returned object is of type Gapic::Operation. You can use this # object to check the status of an operation, cancel it, or wait # for results. Here is how to block until completion: result.wait_until_done! timeout: 60 if result.response? p result.response else puts "Error!" end
#create_certificate_template
def create_certificate_template(request, options = nil) -> ::Gapic::Operation
def create_certificate_template(parent: nil, certificate_template_id: nil, certificate_template: nil, request_id: nil) -> ::Gapic::Operation
Create a new CertificateTemplate in a given Project and Location.
def create_certificate_template(request, options = nil) -> ::Gapic::Operation
create_certificate_template
via a request object, either of type
Google::Cloud::Security::PrivateCA::V1::CreateCertificateTemplateRequest or an equivalent Hash.
- request (::Google::Cloud::Security::PrivateCA::V1::CreateCertificateTemplateRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def create_certificate_template(parent: nil, certificate_template_id: nil, certificate_template: nil, request_id: nil) -> ::Gapic::Operation
create_certificate_template
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
parent (::String) — Required. The resource name of the location associated with the
CertificateTemplate, in the format
projects/*/locations/*
. -
certificate_template_id (::String) — Required. It must be unique within a location and match the regular
expression
[a-zA-Z0-9_-]{1,63}
- certificate_template (::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate, ::Hash) — Required. A CertificateTemplate with initial field values.
-
request_id (::String) — Optional. An ID to identify requests. Specify a unique request ID so that if you must
retry your request, the server will know to ignore the request if it has
already been completed. The server will guarantee that for at least 60
minutes since the first request.
For example, consider a situation where you make an initial request and t he request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::Operation)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/security/private_ca/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Security::PrivateCA::V1::CreateCertificateTemplateRequest.new # Call the create_certificate_template method. result = client.create_certificate_template request # The returned object is of type Gapic::Operation. You can use this # object to check the status of an operation, cancel it, or wait # for results. Here is how to block until completion: result.wait_until_done! timeout: 60 if result.response? p result.response else puts "Error!" end
#delete_ca_pool
def delete_ca_pool(request, options = nil) -> ::Gapic::Operation
def delete_ca_pool(name: nil, request_id: nil) -> ::Gapic::Operation
Delete a CaPool.
def delete_ca_pool(request, options = nil) -> ::Gapic::Operation
delete_ca_pool
via a request object, either of type
DeleteCaPoolRequest or an equivalent Hash.
- request (::Google::Cloud::Security::PrivateCA::V1::DeleteCaPoolRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def delete_ca_pool(name: nil, request_id: nil) -> ::Gapic::Operation
delete_ca_pool
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
name (::String) — Required. The resource name for this CaPool in the
format
projects/*/locations/*/caPools/*
. -
request_id (::String) — Optional. An ID to identify requests. Specify a unique request ID so that if you must
retry your request, the server will know to ignore the request if it has
already been completed. The server will guarantee that for at least 60
minutes since the first request.
For example, consider a situation where you make an initial request and t he request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::Operation)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/security/private_ca/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Security::PrivateCA::V1::DeleteCaPoolRequest.new # Call the delete_ca_pool method. result = client.delete_ca_pool request # The returned object is of type Gapic::Operation. You can use this # object to check the status of an operation, cancel it, or wait # for results. Here is how to block until completion: result.wait_until_done! timeout: 60 if result.response? p result.response else puts "Error!" end
#delete_certificate_authority
def delete_certificate_authority(request, options = nil) -> ::Gapic::Operation
def delete_certificate_authority(name: nil, request_id: nil, ignore_active_certificates: nil, skip_grace_period: nil) -> ::Gapic::Operation
Delete a CertificateAuthority.
def delete_certificate_authority(request, options = nil) -> ::Gapic::Operation
delete_certificate_authority
via a request object, either of type
DeleteCertificateAuthorityRequest or an equivalent Hash.
- request (::Google::Cloud::Security::PrivateCA::V1::DeleteCertificateAuthorityRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def delete_certificate_authority(name: nil, request_id: nil, ignore_active_certificates: nil, skip_grace_period: nil) -> ::Gapic::Operation
delete_certificate_authority
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
name (::String) — Required. The resource name for this CertificateAuthority in the
format
projects/*/locations/*/caPools/*/certificateAuthorities/*
. -
request_id (::String) — Optional. An ID to identify requests. Specify a unique request ID so that if you must
retry your request, the server will know to ignore the request if it has
already been completed. The server will guarantee that for at least 60
minutes since the first request.
For example, consider a situation where you make an initial request and t he request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
- ignore_active_certificates (::Boolean) — Optional. This field allows the CA to be deleted even if the CA has active certs. Active certs include both unrevoked and unexpired certs.
- skip_grace_period (::Boolean) — Optional. If this flag is set, the Certificate Authority will be deleted as soon as possible without a 30-day grace period where undeletion would have been allowed. If you proceed, there will be no way to recover this CA.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::Operation)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/security/private_ca/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Security::PrivateCA::V1::DeleteCertificateAuthorityRequest.new # Call the delete_certificate_authority method. result = client.delete_certificate_authority request # The returned object is of type Gapic::Operation. You can use this # object to check the status of an operation, cancel it, or wait # for results. Here is how to block until completion: result.wait_until_done! timeout: 60 if result.response? p result.response else puts "Error!" end
#delete_certificate_template
def delete_certificate_template(request, options = nil) -> ::Gapic::Operation
def delete_certificate_template(name: nil, request_id: nil) -> ::Gapic::Operation
DeleteCertificateTemplate deletes a CertificateTemplate.
def delete_certificate_template(request, options = nil) -> ::Gapic::Operation
delete_certificate_template
via a request object, either of type
DeleteCertificateTemplateRequest or an equivalent Hash.
- request (::Google::Cloud::Security::PrivateCA::V1::DeleteCertificateTemplateRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def delete_certificate_template(name: nil, request_id: nil) -> ::Gapic::Operation
delete_certificate_template
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
name (::String) — Required. The resource name for this CertificateTemplate in the format
projects/*/locations/*/certificateTemplates/*
. -
request_id (::String) — Optional. An ID to identify requests. Specify a unique request ID so that if you must
retry your request, the server will know to ignore the request if it has
already been completed. The server will guarantee that for at least 60
minutes since the first request.
For example, consider a situation where you make an initial request and t he request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::Operation)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/security/private_ca/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Security::PrivateCA::V1::DeleteCertificateTemplateRequest.new # Call the delete_certificate_template method. result = client.delete_certificate_template request # The returned object is of type Gapic::Operation. You can use this # object to check the status of an operation, cancel it, or wait # for results. Here is how to block until completion: result.wait_until_done! timeout: 60 if result.response? p result.response else puts "Error!" end
#disable_certificate_authority
def disable_certificate_authority(request, options = nil) -> ::Gapic::Operation
def disable_certificate_authority(name: nil, request_id: nil) -> ::Gapic::Operation
Disable a CertificateAuthority.
def disable_certificate_authority(request, options = nil) -> ::Gapic::Operation
disable_certificate_authority
via a request object, either of type
DisableCertificateAuthorityRequest or an equivalent Hash.
- request (::Google::Cloud::Security::PrivateCA::V1::DisableCertificateAuthorityRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def disable_certificate_authority(name: nil, request_id: nil) -> ::Gapic::Operation
disable_certificate_authority
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
name (::String) — Required. The resource name for this CertificateAuthority in the
format
projects/*/locations/*/caPools/*/certificateAuthorities/*
. -
request_id (::String) — Optional. An ID to identify requests. Specify a unique request ID so that if you must
retry your request, the server will know to ignore the request if it has
already been completed. The server will guarantee that for at least 60
minutes since the first request.
For example, consider a situation where you make an initial request and t he request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::Operation)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/security/private_ca/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Security::PrivateCA::V1::DisableCertificateAuthorityRequest.new # Call the disable_certificate_authority method. result = client.disable_certificate_authority request # The returned object is of type Gapic::Operation. You can use this # object to check the status of an operation, cancel it, or wait # for results. Here is how to block until completion: result.wait_until_done! timeout: 60 if result.response? p result.response else puts "Error!" end
#enable_certificate_authority
def enable_certificate_authority(request, options = nil) -> ::Gapic::Operation
def enable_certificate_authority(name: nil, request_id: nil) -> ::Gapic::Operation
Enable a CertificateAuthority.
def enable_certificate_authority(request, options = nil) -> ::Gapic::Operation
enable_certificate_authority
via a request object, either of type
EnableCertificateAuthorityRequest or an equivalent Hash.
- request (::Google::Cloud::Security::PrivateCA::V1::EnableCertificateAuthorityRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def enable_certificate_authority(name: nil, request_id: nil) -> ::Gapic::Operation
enable_certificate_authority
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
name (::String) — Required. The resource name for this CertificateAuthority in the
format
projects/*/locations/*/caPools/*/certificateAuthorities/*
. -
request_id (::String) — Optional. An ID to identify requests. Specify a unique request ID so that if you must
retry your request, the server will know to ignore the request if it has
already been completed. The server will guarantee that for at least 60
minutes since the first request.
For example, consider a situation where you make an initial request and t he request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::Operation)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/security/private_ca/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Security::PrivateCA::V1::EnableCertificateAuthorityRequest.new # Call the enable_certificate_authority method. result = client.enable_certificate_authority request # The returned object is of type Gapic::Operation. You can use this # object to check the status of an operation, cancel it, or wait # for results. Here is how to block until completion: result.wait_until_done! timeout: 60 if result.response? p result.response else puts "Error!" end
#fetch_ca_certs
def fetch_ca_certs(request, options = nil) -> ::Google::Cloud::Security::PrivateCA::V1::FetchCaCertsResponse
def fetch_ca_certs(ca_pool: nil, request_id: nil) -> ::Google::Cloud::Security::PrivateCA::V1::FetchCaCertsResponse
FetchCaCerts returns the current trust anchor for the CaPool. This will include CA certificate chains for all ACTIVE CertificateAuthority resources in the CaPool.
def fetch_ca_certs(request, options = nil) -> ::Google::Cloud::Security::PrivateCA::V1::FetchCaCertsResponse
fetch_ca_certs
via a request object, either of type
FetchCaCertsRequest or an equivalent Hash.
- request (::Google::Cloud::Security::PrivateCA::V1::FetchCaCertsRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def fetch_ca_certs(ca_pool: nil, request_id: nil) -> ::Google::Cloud::Security::PrivateCA::V1::FetchCaCertsResponse
fetch_ca_certs
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
ca_pool (::String) — Required. The resource name for the CaPool in the
format
projects/*/locations/*/caPools/*
. -
request_id (::String) — Optional. An ID to identify requests. Specify a unique request ID so that if you must
retry your request, the server will know to ignore the request if it has
already been completed. The server will guarantee that for at least 60
minutes since the first request.
For example, consider a situation where you make an initial request and t he request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::Security::PrivateCA::V1::FetchCaCertsResponse)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/security/private_ca/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Security::PrivateCA::V1::FetchCaCertsRequest.new # Call the fetch_ca_certs method. result = client.fetch_ca_certs request # The returned object is of type Google::Cloud::Security::PrivateCA::V1::FetchCaCertsResponse. p result
#fetch_certificate_authority_csr
def fetch_certificate_authority_csr(request, options = nil) -> ::Google::Cloud::Security::PrivateCA::V1::FetchCertificateAuthorityCsrResponse
def fetch_certificate_authority_csr(name: nil) -> ::Google::Cloud::Security::PrivateCA::V1::FetchCertificateAuthorityCsrResponse
Fetch a certificate signing request (CSR) from a CertificateAuthority that is in state AWAITING_USER_ACTIVATION and is of type SUBORDINATE. The CSR must then be signed by the desired parent Certificate Authority, which could be another CertificateAuthority resource, or could be an on-prem certificate authority. See also ActivateCertificateAuthority.
def fetch_certificate_authority_csr(request, options = nil) -> ::Google::Cloud::Security::PrivateCA::V1::FetchCertificateAuthorityCsrResponse
fetch_certificate_authority_csr
via a request object, either of type
FetchCertificateAuthorityCsrRequest or an equivalent Hash.
- request (::Google::Cloud::Security::PrivateCA::V1::FetchCertificateAuthorityCsrRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def fetch_certificate_authority_csr(name: nil) -> ::Google::Cloud::Security::PrivateCA::V1::FetchCertificateAuthorityCsrResponse
fetch_certificate_authority_csr
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
name (::String) — Required. The resource name for this CertificateAuthority in the
format
projects/*/locations/*/caPools/*/certificateAuthorities/*
.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::Security::PrivateCA::V1::FetchCertificateAuthorityCsrResponse)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/security/private_ca/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Security::PrivateCA::V1::FetchCertificateAuthorityCsrRequest.new # Call the fetch_certificate_authority_csr method. result = client.fetch_certificate_authority_csr request # The returned object is of type Google::Cloud::Security::PrivateCA::V1::FetchCertificateAuthorityCsrResponse. p result
#get_ca_pool
def get_ca_pool(request, options = nil) -> ::Google::Cloud::Security::PrivateCA::V1::CaPool
def get_ca_pool(name: nil) -> ::Google::Cloud::Security::PrivateCA::V1::CaPool
Returns a CaPool.
def get_ca_pool(request, options = nil) -> ::Google::Cloud::Security::PrivateCA::V1::CaPool
get_ca_pool
via a request object, either of type
GetCaPoolRequest or an equivalent Hash.
- request (::Google::Cloud::Security::PrivateCA::V1::GetCaPoolRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def get_ca_pool(name: nil) -> ::Google::Cloud::Security::PrivateCA::V1::CaPool
get_ca_pool
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::Security::PrivateCA::V1::CaPool)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/security/private_ca/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Security::PrivateCA::V1::GetCaPoolRequest.new # Call the get_ca_pool method. result = client.get_ca_pool request # The returned object is of type Google::Cloud::Security::PrivateCA::V1::CaPool. p result
#get_certificate
def get_certificate(request, options = nil) -> ::Google::Cloud::Security::PrivateCA::V1::Certificate
def get_certificate(name: nil) -> ::Google::Cloud::Security::PrivateCA::V1::Certificate
Returns a Certificate.
def get_certificate(request, options = nil) -> ::Google::Cloud::Security::PrivateCA::V1::Certificate
get_certificate
via a request object, either of type
GetCertificateRequest or an equivalent Hash.
- request (::Google::Cloud::Security::PrivateCA::V1::GetCertificateRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def get_certificate(name: nil) -> ::Google::Cloud::Security::PrivateCA::V1::Certificate
get_certificate
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- name (::String) — Required. The name of the Certificate to get.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::Security::PrivateCA::V1::Certificate)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/security/private_ca/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Security::PrivateCA::V1::GetCertificateRequest.new # Call the get_certificate method. result = client.get_certificate request # The returned object is of type Google::Cloud::Security::PrivateCA::V1::Certificate. p result
#get_certificate_authority
def get_certificate_authority(request, options = nil) -> ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority
def get_certificate_authority(name: nil) -> ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority
Returns a CertificateAuthority.
def get_certificate_authori