Class v1.CertificateAuthorityServiceClient (5.2.0)

[Certificate Authority Service][google.cloud.security.privateca.v1.CertificateAuthorityService] manages private certificate authorities and issued certificates. v1

Package

@google-cloud/security-private-ca

Constructors

(constructor)(opts, gaxInstance)

constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback);

Construct an instance of CertificateAuthorityServiceClient.

Parameters
NameDescription
opts ClientOptions
gaxInstance typeof gax | typeof fallback

: loaded instance of google-gax. Useful if you need to avoid loading the default gRPC version and want to use the fallback HTTP implementation. Load only fallback version and pass it to the constructor: ``` const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC const client = new CertificateAuthorityServiceClient({fallback: true}, gax); ```

Properties

apiEndpoint

get apiEndpoint(): string;

The DNS address for this API service.

apiEndpoint

static get apiEndpoint(): string;

The DNS address for this API service - same as servicePath.

auth

auth: gax.GoogleAuth;

certificateAuthorityServiceStub

certificateAuthorityServiceStub?: Promise<{
        [name: string]: Function;
    }>;

descriptors

descriptors: Descriptors;

iamClient

iamClient: IamClient;

innerApiCalls

innerApiCalls: {
        [name: string]: Function;
    };

locationsClient

locationsClient: LocationsClient;

operationsClient

operationsClient: gax.OperationsClient;

pathTemplates

pathTemplates: {
        [name: string]: gax.PathTemplate;
    };

port

static get port(): number;

The port for this API service.

scopes

static get scopes(): string[];

The scopes needed to make gRPC calls for every method defined in this service.

servicePath

static get servicePath(): string;

The DNS address for this API service.

universeDomain

get universeDomain(): string;

warn

warn: (code: string, message: string, warnType?: string) => void;

Methods

activateCertificateAuthority(request, options)

activateCertificateAuthority(request?: protos.google.cloud.security.privateca.v1.IActivateCertificateAuthorityRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.security.privateca.v1.ICertificateAuthority, protos.google.cloud.security.privateca.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Activate a that is in state and is of type . After the parent Certificate Authority signs a certificate signing request from , this method can complete the activation process.

Parameters
NameDescription
request IActivateCertificateAuthorityRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.security.privateca.v1.ICertificateAuthority, protos.google.cloud.security.privateca.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The resource name for this
   *  CertificateAuthority google.cloud.security.privateca.v1.CertificateAuthority 
   *  in the format `projects/* /locations/* /caPools/* /certificateAuthorities/*`.
   */
  // const name = 'abc123'
  /**
   *  Required. The signed CA certificate issued from
   *  FetchCertificateAuthorityCsrResponse.pem_csr google.cloud.security.privateca.v1.FetchCertificateAuthorityCsrResponse.pem_csr.
   */
  // const pemCaCertificate = 'abc123'
  /**
   *  Required. Must include information about the issuer of
   *  'pem_ca_certificate', and any further issuers until the self-signed CA.
   */
  // const subordinateConfig = {}
  /**
   *  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).
   */
  // const requestId = 'abc123'

  // Imports the Privateca library
  const {CertificateAuthorityServiceClient} = require('@google-cloud/security-private-ca').v1;

  // Instantiates a client
  const privatecaClient = new CertificateAuthorityServiceClient();

  async function callActivateCertificateAuthority() {
    // Construct request
    const request = {
      name,
      pemCaCertificate,
      subordinateConfig,
    };

    // Run request
    const [operation] = await privatecaClient.activateCertificateAuthority(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callActivateCertificateAuthority();

activateCertificateAuthority(request, options, callback)

activateCertificateAuthority(request: protos.google.cloud.security.privateca.v1.IActivateCertificateAuthorityRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.security.privateca.v1.ICertificateAuthority, protos.google.cloud.security.privateca.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IActivateCertificateAuthorityRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.security.privateca.v1.ICertificateAuthority, protos.google.cloud.security.privateca.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

activateCertificateAuthority(request, callback)

activateCertificateAuthority(request: protos.google.cloud.security.privateca.v1.IActivateCertificateAuthorityRequest, callback: Callback<LROperation<protos.google.cloud.security.privateca.v1.ICertificateAuthority, protos.google.cloud.security.privateca.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IActivateCertificateAuthorityRequest
callback Callback<LROperation<protos.google.cloud.security.privateca.v1.ICertificateAuthority, protos.google.cloud.security.privateca.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

cancelOperation(request, options, callback)

cancelOperation(request: protos.google.longrunning.CancelOperationRequest, options?: gax.CallOptions | Callback<protos.google.protobuf.Empty, protos.google.longrunning.CancelOperationRequest, {} | undefined | null>, callback?: Callback<protos.google.longrunning.CancelOperationRequest, protos.google.protobuf.Empty, {} | undefined | null>): Promise<protos.google.protobuf.Empty>;

Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED. Clients can use or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an value with a of 1, corresponding to Code.CANCELLED.

Parameters
NameDescription
request CancelOperationRequest

The request object that will be sent.

options CallOptions | Callback<protos.google.protobuf.Empty, protos.google.longrunning.CancelOperationRequest, {} | undefined | null>

Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details.

callback Callback<protos.google.longrunning.CancelOperationRequest, protos.google.protobuf.Empty, {} | undefined | null>

The function which will be called with the result of the API call. {Promise} - The promise which resolves when API call finishes. The promise has a method named "cancel" which cancels the ongoing API call.

Returns
TypeDescription
Promise<protos.google.protobuf.Empty>
Example

const client = longrunning.operationsClient();
await client.cancelOperation({name: ''});

caPoolPath(project, location, caPool)

caPoolPath(project: string, location: string, caPool: string): string;

Return a fully-qualified caPool resource name string.

Parameters
NameDescription
project string
location string
caPool string
Returns
TypeDescription
string

{string} Resource name string.

certificateAuthorityPath(project, location, caPool, certificateAuthority)

certificateAuthorityPath(project: string, location: string, caPool: string, certificateAuthority: string): string;

Return a fully-qualified certificateAuthority resource name string.

Parameters
NameDescription
project string
location string
caPool string
certificateAuthority string
Returns
TypeDescription
string

{string} Resource name string.

certificatePath(project, location, caPool, certificate)

certificatePath(project: string, location: string, caPool: string, certificate: string): string;

Return a fully-qualified certificate resource name string.

Parameters
NameDescription
project string
location string
caPool string
certificate string
Returns
TypeDescription
string

{string} Resource name string.

certificateRevocationListPath(project, location, caPool, certificateAuthority, certificateRevocationList)

certificateRevocationListPath(project: string, location: string, caPool: string, certificateAuthority: string, certificateRevocationList: string): string;

Return a fully-qualified certificateRevocationList resource name string.

Parameters
NameDescription
project string
location string
caPool string
certificateAuthority string
certificateRevocationList string
Returns
TypeDescription
string

{string} Resource name string.

certificateTemplatePath(project, location, certificateTemplate)

certificateTemplatePath(project: string, location: string, certificateTemplate: string): string;

Return a fully-qualified certificateTemplate resource name string.

Parameters
NameDescription
project string
location string
certificateTemplate string
Returns
TypeDescription
string

{string} Resource name string.

checkActivateCertificateAuthorityProgress(name)

checkActivateCertificateAuthorityProgress(name: string): Promise<LROperation<protos.google.cloud.security.privateca.v1.CertificateAuthority, protos.google.cloud.security.privateca.v1.OperationMetadata>>;

Check the status of the long running operation returned by activateCertificateAuthority().

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.security.privateca.v1.CertificateAuthority, protos.google.cloud.security.privateca.v1.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The resource name for this
   *  CertificateAuthority google.cloud.security.privateca.v1.CertificateAuthority 
   *  in the format `projects/* /locations/* /caPools/* /certificateAuthorities/*`.
   */
  // const name = 'abc123'
  /**
   *  Required. The signed CA certificate issued from
   *  FetchCertificateAuthorityCsrResponse.pem_csr google.cloud.security.privateca.v1.FetchCertificateAuthorityCsrResponse.pem_csr.
   */
  // const pemCaCertificate = 'abc123'
  /**
   *  Required. Must include information about the issuer of
   *  'pem_ca_certificate', and any further issuers until the self-signed CA.
   */
  // const subordinateConfig = {}
  /**
   *  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).
   */
  // const requestId = 'abc123'

  // Imports the Privateca library
  const {CertificateAuthorityServiceClient} = require('@google-cloud/security-private-ca').v1;

  // Instantiates a client
  const privatecaClient = new CertificateAuthorityServiceClient();

  async function callActivateCertificateAuthority() {
    // Construct request
    const request = {
      name,
      pemCaCertificate,
      subordinateConfig,
    };

    // Run request
    const [operation] = await privatecaClient.activateCertificateAuthority(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callActivateCertificateAuthority();

checkCreateCaPoolProgress(name)

checkCreateCaPoolProgress(name: string): Promise<LROperation<protos.google.cloud.security.privateca.v1.CaPool, protos.google.cloud.security.privateca.v1.OperationMetadata>>;

Check the status of the long running operation returned by createCaPool().

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.security.privateca.v1.CaPool, protos.google.cloud.security.privateca.v1.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The resource name of the location associated with the
   *  CaPool google.cloud.security.privateca.v1.CaPool, in the format
   *  `projects/* /locations/*`.
   */
  // const parent = 'abc123'
  /**
   *  Required. It must be unique within a location and match the regular
   *  expression `[a-zA-Z0-9_-]{1,63}`
   */
  // const caPoolId = 'abc123'
  /**
   *  Required. A CaPool google.cloud.security.privateca.v1.CaPool  with
   *  initial field values.
   */
  // const caPool = {}
  /**
   *  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).
   */
  // const requestId = 'abc123'

  // Imports the Privateca library
  const {CertificateAuthorityServiceClient} = require('@google-cloud/security-private-ca').v1;

  // Instantiates a client
  const privatecaClient = new CertificateAuthorityServiceClient();

  async function callCreateCaPool() {
    // Construct request
    const request = {
      parent,
      caPoolId,
      caPool,
    };

    // Run request
    const [operation] = await privatecaClient.createCaPool(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callCreateCaPool();

checkCreateCertificateAuthorityProgress(name)

checkCreateCertificateAuthorityProgress(name: string): Promise<LROperation<protos.google.cloud.security.privateca.v1.CertificateAuthority, protos.google.cloud.security.privateca.v1.OperationMetadata>>;

Check the status of the long running operation returned by createCertificateAuthority().

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.security.privateca.v1.CertificateAuthority, protos.google.cloud.security.privateca.v1.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The resource name of the
   *  CaPool google.cloud.security.privateca.v1.CaPool  associated with the
   *  CertificateAuthorities google.cloud.security.privateca.v1.CertificateAuthority,
   *  in the format `projects/* /locations/* /caPools/*`.
   */
  // const parent = 'abc123'
  /**
   *  Required. It must be unique within a location and match the regular
   *  expression `[a-zA-Z0-9_-]{1,63}`
   */
  // const certificateAuthorityId = 'abc123'
  /**
   *  Required. A
   *  CertificateAuthority google.cloud.security.privateca.v1.CertificateAuthority 
   *  with initial field values.
   */
  // const certificateAuthority = {}
  /**
   *  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).
   */
  // const requestId = 'abc123'

  // Imports the Privateca library
  const {CertificateAuthorityServiceClient} = require('@google-cloud/security-private-ca').v1;

  // Instantiates a client
  const privatecaClient = new CertificateAuthorityServiceClient();

  async function callCreateCertificateAuthority() {
    // Construct request
    const request = {
      parent,
      certificateAuthorityId,
      certificateAuthority,
    };

    // Run request
    const [operation] = await privatecaClient.createCertificateAuthority(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callCreateCertificateAuthority();

checkCreateCertificateTemplateProgress(name)

checkCreateCertificateTemplateProgress(name: string): Promise<LROperation<protos.google.cloud.security.privateca.v1.CertificateTemplate, protos.google.cloud.security.privateca.v1.OperationMetadata>>;

Check the status of the long running operation returned by createCertificateTemplate().

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.security.privateca.v1.CertificateTemplate, protos.google.cloud.security.privateca.v1.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The resource name of the location associated with the
   *  CertificateTemplate google.cloud.security.privateca.v1.CertificateTemplate,
   *  in the format `projects/* /locations/*`.
   */
  // const parent = 'abc123'
  /**
   *  Required. It must be unique within a location and match the regular
   *  expression `[a-zA-Z0-9_-]{1,63}`
   */
  // const certificateTemplateId = 'abc123'
  /**
   *  Required. A
   *  CertificateTemplate google.cloud.security.privateca.v1.CertificateTemplate 
   *  with initial field values.
   */
  // const certificateTemplate = {}
  /**
   *  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).
   */
  // const requestId = 'abc123'

  // Imports the Privateca library
  const {CertificateAuthorityServiceClient} = require('@google-cloud/security-private-ca').v1;

  // Instantiates a client
  const privatecaClient = new CertificateAuthorityServiceClient();

  async function callCreateCertificateTemplate() {
    // Construct request
    const request = {
      parent,
      certificateTemplateId,
      certificateTemplate,
    };

    // Run request
    const [operation] = await privatecaClient.createCertificateTemplate(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callCreateCertificateTemplate();

checkDeleteCaPoolProgress(name)

checkDeleteCaPoolProgress(name: string): Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.security.privateca.v1.OperationMetadata>>;

Check the status of the long running operation returned by deleteCaPool().

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.security.privateca.v1.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The resource name for this
   *  CaPool google.cloud.security.privateca.v1.CaPool  in the format
   *  `projects/* /locations/* /caPools/*`.
   */
  // const name = 'abc123'
  /**
   *  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).
   */
  // const requestId = 'abc123'
  /**
   *  Optional. This field allows this pool to be deleted even if it's being
   *  depended on by another resource. However, doing so may result in unintended
   *  and unrecoverable effects on any dependent resource(s) since the pool will
   *  no longer be able to issue certificates.
   */
  // const ignoreDependentResources = true

  // Imports the Privateca library
  const {CertificateAuthorityServiceClient} = require('@google-cloud/security-private-ca').v1;

  // Instantiates a client
  const privatecaClient = new CertificateAuthorityServiceClient();

  async function callDeleteCaPool() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const [operation] = await privatecaClient.deleteCaPool(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callDeleteCaPool();

checkDeleteCertificateAuthorityProgress(name)

checkDeleteCertificateAuthorityProgress(name: string): Promise<LROperation<protos.google.cloud.security.privateca.v1.CertificateAuthority, protos.google.cloud.security.privateca.v1.OperationMetadata>>;

Check the status of the long running operation returned by deleteCertificateAuthority().

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.security.privateca.v1.CertificateAuthority, protos.google.cloud.security.privateca.v1.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The resource name for this
   *  CertificateAuthority google.cloud.security.privateca.v1.CertificateAuthority 
   *  in the format `projects/* /locations/* /caPools/* /certificateAuthorities/*`.
   */
  // const name = 'abc123'
  /**
   *  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).
   */
  // const requestId = 'abc123'
  /**
   *  Optional. This field allows the CA to be deleted even if the CA has
   *  active certs. Active certs include both unrevoked and unexpired certs.
   */
  // const ignoreActiveCertificates = true
  /**
   *  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.
   */
  // const skipGracePeriod = true
  /**
   *  Optional. This field allows this ca to be deleted even if it's being
   *  depended on by another resource. However, doing so may result in unintended
   *  and unrecoverable effects on any dependent resource(s) since the CA will
   *  no longer be able to issue certificates.
   */
  // const ignoreDependentResources = true

  // Imports the Privateca library
  const {CertificateAuthorityServiceClient} = require('@google-cloud/security-private-ca').v1;

  // Instantiates a client
  const privatecaClient = new CertificateAuthorityServiceClient();

  async function callDeleteCertificateAuthority() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const [operation] = await privatecaClient.deleteCertificateAuthority(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callDeleteCertificateAuthority();

checkDeleteCertificateTemplateProgress(name)

checkDeleteCertificateTemplateProgress(name: string): Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.security.privateca.v1.OperationMetadata>>;

Check the status of the long running operation returned by deleteCertificateTemplate().

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.security.privateca.v1.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The resource name for this
   *  CertificateTemplate google.cloud.security.privateca.v1.CertificateTemplate 
   *  in the format `projects/* /locations/* /certificateTemplates/*`.
   */
  // const name = 'abc123'
  /**
   *  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).
   */
  // const requestId = 'abc123'

  // Imports the Privateca library
  const {CertificateAuthorityServiceClient} = require('@google-cloud/security-private-ca').v1;

  // Instantiates a client
  const privatecaClient = new CertificateAuthorityServiceClient();

  async function callDeleteCertificateTemplate() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const [operation] = await privatecaClient.deleteCertificateTemplate(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callDeleteCertificateTemplate();

checkDisableCertificateAuthorityProgress(name)

checkDisableCertificateAuthorityProgress(name: string): Promise<LROperation<protos.google.cloud.security.privateca.v1.CertificateAuthority, protos.google.cloud.security.privateca.v1.OperationMetadata>>;

Check the status of the long running operation returned by disableCertificateAuthority().

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.security.privateca.v1.CertificateAuthority, protos.google.cloud.security.privateca.v1.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The resource name for this
   *  CertificateAuthority google.cloud.security.privateca.v1.CertificateAuthority 
   *  in the format `projects/* /locations/* /caPools/* /certificateAuthorities/*`.
   */
  // const name = 'abc123'
  /**
   *  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).
   */
  // const requestId = 'abc123'
  /**
   *  Optional. This field allows this CA to be disabled even if it's being
   *  depended on by another resource. However, doing so may result in unintended
   *  and unrecoverable effects on any dependent resource(s) since the CA will
   *  no longer be able to issue certificates.
   */
  // const ignoreDependentResources = true

  // Imports the Privateca library
  const {CertificateAuthorityServiceClient} = require('@google-cloud/security-private-ca').v1;

  // Instantiates a client
  const privatecaClient = new CertificateAuthorityServiceClient();

  async function callDisableCertificateAuthority() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const [operation] = await privatecaClient.disableCertificateAuthority(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callDisableCertificateAuthority();

checkEnableCertificateAuthorityProgress(name)

checkEnableCertificateAuthorityProgress(name: string): Promise<LROperation<protos.google.cloud.security.privateca.v1.CertificateAuthority, protos.google.cloud.security.privateca.v1.OperationMetadata>>;

Check the status of the long running operation returned by enableCertificateAuthority().

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.security.privateca.v1.CertificateAuthority, protos.google.cloud.security.privateca.v1.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The resource name for this
   *  CertificateAuthority google.cloud.security.privateca.v1.CertificateAuthority 
   *  in the format `projects/* /locations/* /caPools/* /certificateAuthorities/*`.
   */
  // const name = 'abc123'
  /**
   *  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).
   */
  // const requestId = 'abc123'

  // Imports the Privateca library
  const {CertificateAuthorityServiceClient} = require('@google-cloud/security-private-ca').v1;

  // Instantiates a client
  const privatecaClient = new CertificateAuthorityServiceClient();

  async function callEnableCertificateAuthority() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const [operation] = await privatecaClient.enableCertificateAuthority(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callEnableCertificateAuthority();

checkUndeleteCertificateAuthorityProgress(name)

checkUndeleteCertificateAuthorityProgress(name: string): Promise<LROperation<protos.google.cloud.security.privateca.v1.CertificateAuthority, protos.google.cloud.security.privateca.v1.OperationMetadata>>;

Check the status of the long running operation returned by undeleteCertificateAuthority().

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.security.privateca.v1.CertificateAuthority, protos.google.cloud.security.privateca.v1.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The resource name for this
   *  CertificateAuthority google.cloud.security.privateca.v1.CertificateAuthority 
   *  in the format `projects/* /locations/* /caPools/* /certificateAuthorities/*`.
   */
  // const name = 'abc123'
  /**
   *  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).
   */
  // const requestId = 'abc123'

  // Imports the Privateca library
  const {CertificateAuthorityServiceClient} = require('@google-cloud/security-private-ca').v1;

  // Instantiates a client
  const privatecaClient = new CertificateAuthorityServiceClient();

  async function callUndeleteCertificateAuthority() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const [operation] = await privatecaClient.undeleteCertificateAuthority(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callUndeleteCertificateAuthority();

checkUpdateCaPoolProgress(name)

checkUpdateCaPoolProgress(name: string): Promise<LROperation<protos.google.cloud.security.privateca.v1.CaPool, protos.google.cloud.security.privateca.v1.OperationMetadata>>;

Check the status of the long running operation returned by updateCaPool().

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.security.privateca.v1.CaPool, protos.google.cloud.security.privateca.v1.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. CaPool google.cloud.security.privateca.v1.CaPool  with updated
   *  values.
   */
  // const caPool = {}
  /**
   *  Required. A list of fields to be updated in this request.
   */
  // const updateMask = {}
  /**
   *  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).
   */
  // const requestId = 'abc123'

  // Imports the Privateca library
  const {CertificateAuthorityServiceClient} = require('@google-cloud/security-private-ca').v1;

  // Instantiates a client
  const privatecaClient = new CertificateAuthorityServiceClient();

  async function callUpdateCaPool() {
    // Construct request
    const request = {
      caPool,
      updateMask,
    };

    // Run request
    const [operation] = await privatecaClient.updateCaPool(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callUpdateCaPool();

checkUpdateCertificateAuthorityProgress(name)

checkUpdateCertificateAuthorityProgress(name: string): Promise<LROperation<protos.google.cloud.security.privateca.v1.CertificateAuthority, protos.google.cloud.security.privateca.v1.OperationMetadata>>;

Check the status of the long running operation returned by updateCertificateAuthority().

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.security.privateca.v1.CertificateAuthority, protos.google.cloud.security.privateca.v1.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required.
   *  CertificateAuthority google.cloud.security.privateca.v1.CertificateAuthority 
   *  with updated values.
   */
  // const certificateAuthority = {}
  /**
   *  Required. A list of fields to be updated in this request.
   */
  // const updateMask = {}
  /**
   *  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).
   */
  // const requestId = 'abc123'

  // Imports the Privateca library
  const {CertificateAuthorityServiceClient} = require('@google-cloud/security-private-ca').v1;

  // Instantiates a client
  const privatecaClient = new CertificateAuthorityServiceClient();

  async function callUpdateCertificateAuthority() {
    // Construct request
    const request = {
      certificateAuthority,
      updateMask,
    };

    // Run request
    const [operation] = await privatecaClient.updateCertificateAuthority(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callUpdateCertificateAuthority();

checkUpdateCertificateRevocationListProgress(name)

checkUpdateCertificateRevocationListProgress(name: string): Promise<LROperation<protos.google.cloud.security.privateca.v1.CertificateRevocationList, protos.google.cloud.security.privateca.v1.OperationMetadata>>;

Check the status of the long running operation returned by updateCertificateRevocationList().

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.security.privateca.v1.CertificateRevocationList, protos.google.cloud.security.privateca.v1.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required.
   *  CertificateRevocationList google.cloud.security.privateca.v1.CertificateRevocationList 
   *  with updated values.
   */
  // const certificateRevocationList = {}
  /**
   *  Required. A list of fields to be updated in this request.
   */
  // const updateMask = {}
  /**
   *  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).
   */
  // const requestId = 'abc123'

  // Imports the Privateca library
  const {CertificateAuthorityServiceClient} = require('@google-cloud/security-private-ca').v1;

  // Instantiates a client
  const privatecaClient = new CertificateAuthorityServiceClient();

  async function callUpdateCertificateRevocationList() {
    // Construct request
    const request = {
      certificateRevocationList,
      updateMask,
    };

    // Run request
    const [operation] = await privatecaClient.updateCertificateRevocationList(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callUpdateCertificateRevocationList();

checkUpdateCertificateTemplateProgress(name)

checkUpdateCertificateTemplateProgress(name: string): Promise<LROperation<protos.google.cloud.security.privateca.v1.CertificateTemplate, protos.google.cloud.security.privateca.v1.OperationMetadata>>;

Check the status of the long running operation returned by updateCertificateTemplate().

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.security.privateca.v1.CertificateTemplate, protos.google.cloud.security.privateca.v1.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required.
   *  CertificateTemplate google.cloud.security.privateca.v1.CertificateTemplate 
   *  with updated values.
   */
  // const certificateTemplate = {}
  /**
   *  Required. A list of fields to be updated in this request.
   */
  // const updateMask = {}
  /**
   *  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).
   */
  // const requestId = 'abc123'

  // Imports the Privateca library
  const {CertificateAuthorityServiceClient} = require('@google-cloud/security-private-ca').v1;

  // Instantiates a client
  const privatecaClient = new CertificateAuthorityServiceClient();

  async function callUpdateCertificateTemplate() {
    // Construct request
    const request = {
      certificateTemplate,
      updateMask,
    };

    // Run request
    const [operation] = await privatecaClient.updateCertificateTemplate(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callUpdateCertificateTemplate();

close()

close(): Promise<void>;

Terminate the gRPC channel and close the client.

The client will no longer be usable and all future behavior is undefined.

Returns
TypeDescription
Promise<void>

{Promise} A promise that resolves when the client is closed.

createCaPool(request, options)

createCaPool(request?: protos.google.cloud.security.privateca.v1.ICreateCaPoolRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.security.privateca.v1.ICaPool, protos.google.cloud.security.privateca.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Create a .

Parameters
NameDescription
request ICreateCaPoolRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.security.privateca.v1.ICaPool, protos.google.cloud.security.privateca.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The resource name of the location associated with the
   *  CaPool google.cloud.security.privateca.v1.CaPool, in the format
   *  `projects/* /locations/*`.
   */
  // const parent = 'abc123'
  /**
   *  Required. It must be unique within a location and match the regular
   *  expression `[a-zA-Z0-9_-]{1,63}`
   */
  // const caPoolId = 'abc123'
  /**
   *  Required. A CaPool google.cloud.security.privateca.v1.CaPool  with
   *  initial field values.
   */
  // const caPool = {}
  /**
   *  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).
   */
  // const requestId = 'abc123'

  // Imports the Privateca library
  const {CertificateAuthorityServiceClient} = require('@google-cloud/security-private-ca').v1;

  // Instantiates a client
  const privatecaClient = new CertificateAuthorityServiceClient();

  async function callCreateCaPool() {
    // Construct request
    const request = {
      parent,
      caPoolId,
      caPool,
    };

    // Run request
    const [operation] = await privatecaClient.createCaPool(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callCreateCaPool();

createCaPool(request, options, callback)

createCaPool(request: protos.google.cloud.security.privateca.v1.ICreateCaPoolRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.security.privateca.v1.ICaPool, protos.google.cloud.security.privateca.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request ICreateCaPoolRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.security.privateca.v1.ICaPool, protos.google.cloud.security.privateca.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createCaPool(request, callback)

createCaPool(request: protos.google.cloud.security.privateca.v1.ICreateCaPoolRequest, callback: Callback<LROperation<protos.google.cloud.security.privateca.v1.ICaPool, protos.google.cloud.security.privateca.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request ICreateCaPoolRequest
callback Callback<LROperation<protos.google.cloud.security.privateca.v1.ICaPool, protos.google.cloud.security.privateca.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createCertificate(request, options)

createCertificate(request?: protos.google.cloud.security.privateca.v1.ICreateCertificateRequest, options?: CallOptions): Promise<[
        protos.google.cloud.security.privateca.v1.ICertificate,
        (protos.google.cloud.security.privateca.v1.ICreateCertificateRequest | undefined),
        {} | undefined
    ]>;

Create a new in a given Project, Location from a particular .

Parameters
NameDescription
request ICreateCertificateRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.security.privateca.v1.ICertificate, (protos.google.cloud.security.privateca.v1.ICreateCertificateRequest | undefined), {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The resource name of the
   *  CaPool google.cloud.security.privateca.v1.CaPool  associated with the
   *  Certificate google.cloud.security.privateca.v1.Certificate, in the
   *  format `projects/* /locations/* /caPools/*`.
   */
  // const parent = 'abc123'
  /**
   *  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 google.cloud.security.privateca.v1.CertificateAuthority 
   *  in the Enterprise CertificateAuthority.Tier , but is optional and its
   *  value is ignored otherwise.
   */
  // const certificateId = 'abc123'
  /**
   *  Required. A Certificate google.cloud.security.privateca.v1.Certificate 
   *  with initial field values.
   */
  // const certificate = {}
  /**
   *  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).
   */
  // const requestId = 'abc123'
  /**
   *  Optional. If this is true, no
   *  Certificate google.cloud.security.privateca.v1.Certificate  resource will
   *  be persisted regardless of the
   *  CaPool google.cloud.security.privateca.v1.CaPool's
   *  tier google.cloud.security.privateca.v1.CaPool.tier, and the returned
   *  Certificate google.cloud.security.privateca.v1.Certificate  will not
   *  contain the
   *  pem_certificate google.cloud.security.privateca.v1.Certificate.pem_certificate 
   *  field.
   */
  // const validateOnly = true
  /**
   *  Optional. The resource ID of the
   *  CertificateAuthority google.cloud.security.privateca.v1.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 google.cloud.security.privateca.v1.CaPool  referenced by `parent`.
   *  Per-CA quota rules apply. If left empty, a
   *  CertificateAuthority google.cloud.security.privateca.v1.CertificateAuthority 
   *  will be chosen from the CaPool google.cloud.security.privateca.v1.CaPool 
   *  by the service. For example, to issue a
   *  Certificate google.cloud.security.privateca.v1.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 google.cloud.security.privateca.v1.CreateCertificateRequest.parent 
   *  to "projects/my-project/locations/us-central1/caPools/my-pool" and the
   *  issuing_certificate_authority_id google.cloud.security.privateca.v1.CreateCertificateRequest.issuing_certificate_authority_id 
   *  to "my-ca".
   */
  // const issuingCertificateAuthorityId = 'abc123'

  // Imports the Privateca library
  const {CertificateAuthorityServiceClient} = require('@google-cloud/security-private-ca').v1;

  // Instantiates a client
  const privatecaClient = new CertificateAuthorityServiceClient();

  async function callCreateCertificate() {
    // Construct request
    const request = {
      parent,
      certificate,
    };

    // Run request
    const response = await privatecaClient.createCertificate(request);
    console.log(response);
  }

  callCreateCertificate();

createCertificate(request, options, callback)

createCertificate(request: protos.google.cloud.security.privateca.v1.ICreateCertificateRequest, options: CallOptions, callback: Callback<protos.google.cloud.security.privateca.v1.ICertificate, protos.google.cloud.security.privateca.v1.ICreateCertificateRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request ICreateCertificateRequest
options CallOptions
callback Callback<protos.google.cloud.security.privateca.v1.ICertificate, protos.google.cloud.security.privateca.v1.ICreateCertificateRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createCertificate(request, callback)

createCertificate(request: protos.google.cloud.security.privateca.v1.ICreateCertificateRequest, callback: Callback<protos.google.cloud.security.privateca.v1.ICertificate, protos.google.cloud.security.privateca.v1.ICreateCertificateRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request ICreateCertificateRequest
callback Callback<protos.google.cloud.security.privateca.v1.ICertificate, protos.google.cloud.security.privateca.v1.ICreateCertificateRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createCertificateAuthority(request, options)

createCertificateAuthority(request?: protos.google.cloud.security.privateca.v1.ICreateCertificateAuthorityRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.security.privateca.v1.ICertificateAuthority, protos.google.cloud.security.privateca.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Create a new in a given Project and Location.

Parameters
NameDescription
request ICreateCertificateAuthorityRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.security.privateca.v1.ICertificateAuthority, protos.google.cloud.security.privateca.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The resource name of the
   *  CaPool google.cloud.security.privateca.v1.CaPool  associated with the
   *  CertificateAuthorities google.cloud.security.privateca.v1.CertificateAuthority,
   *  in the format `projects/* /locations/* /caPools/*`.
   */
  // const parent = 'abc123'
  /**
   *  Required. It must be unique within a location and match the regular
   *  expression `[a-zA-Z0-9_-]{1,63}`
   */
  // const certificateAuthorityId = 'abc123'
  /**
   *  Required. A
   *  CertificateAuthority google.cloud.security.privateca.v1.CertificateAuthority 
   *  with initial field values.
   */
  // const certificateAuthority = {}
  /**
   *  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).
   */
  // const requestId = 'abc123'

  // Imports the Privateca library
  const {CertificateAuthorityServiceClient} = require('@google-cloud/security-private-ca').v1;

  // Instantiates a client
  const privatecaClient = new CertificateAuthorityServiceClient();

  async function callCreateCertificateAuthority() {
    // Construct request
    const request = {
      parent,
      certificateAuthorityId,
      certificateAuthority,
    };

    // Run request
    const [operation] = await privatecaClient.createCertificateAuthority(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callCreateCertificateAuthority();

createCertificateAuthority(request, options, callback)

createCertificateAuthority(request: protos.google.cloud.security.privateca.v1.ICreateCertificateAuthorityRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.security.privateca.v1.ICertificateAuthority, protos.google.cloud.security.privateca.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request ICreateCertificateAuthorityRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.security.privateca.v1.ICertificateAuthority, protos.google.cloud.security.privateca.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createCertificateAuthority(request, callback)

createCertificateAuthority(request: protos.google.cloud.security.privateca.v1.ICreateCertificateAuthorityRequest, callback: Callback<LROperation<protos.google.cloud.security.privateca.v1.ICertificateAuthority, protos.google.cloud.security.privateca.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request ICreateCertificateAuthorityRequest
callback Callback<LROperation<protos.google.cloud.security.privateca.v1.ICertificateAuthority, protos.google.cloud.security.privateca.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createCertificateTemplate(request, options)

createCertificateTemplate(request?: protos.google.cloud.security.privateca.v1.ICreateCertificateTemplateRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.security.privateca.v1.ICertificateTemplate, protos.google.cloud.security.privateca.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Create a new CertificateTemplate in a given Project and Location.

Parameters
NameDescription
request ICreateCertificateTemplateRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.security.privateca.v1.ICertificateTemplate, protos.google.cloud.security.privateca.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The resource name of the location associated with the
   *  CertificateTemplate google.cloud.security.privateca.v1.CertificateTemplate,
   *  in the format `projects/* /locations/*`.
   */
  // const parent = 'abc123'
  /**
   *  Required. It must be unique within a location and match the regular
   *  expression `[a-zA-Z0-9_-]{1,63}`
   */
  // const certificateTemplateId = 'abc123'
  /**
   *  Required. A
   *  CertificateTemplate google.cloud.security.privateca.v1.CertificateTemplate 
   *  with initial field values.
   */
  // const certificateTemplate = {}
  /**
   *  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).
   */
  // const requestId = 'abc123'

  // Imports the Privateca library
  const {CertificateAuthorityServiceClient} = require('@google-cloud/security-private-ca').v1;

  // Instantiates a client
  const privatecaClient = new CertificateAuthorityServiceClient();

  async function callCreateCertificateTemplate() {
    // Construct request
    const request = {
      parent,
      certificateTemplateId,
      certificateTemplate,
    };

    // Run request
    const [operation] = await privatecaClient.createCertificateTemplate(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callCreateCertificateTemplate();

createCertificateTemplate(request, options, callback)

createCertificateTemplate(request: protos.google.cloud.security.privateca.v1.ICreateCertificateTemplateRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.security.privateca.v1.ICertificateTemplate, protos.google.cloud.security.privateca.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request ICreateCertificateTemplateRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.security.privateca.v1.ICertificateTemplate, protos.google.cloud.security.privateca.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createCertificateTemplate(request, callback)

createCertificateTemplate(request: protos.google.cloud.security.privateca.v1.ICreateCertificateTemplateRequest, callback: Callback<LROperation<protos.google.cloud.security.privateca.v1.ICertificateTemplate, protos.google.cloud.security.privateca.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request ICreateCertificateTemplateRequest
callback Callback<LROperation<protos.google.cloud.security.privateca.v1.ICertificateTemplate, protos.google.cloud.security.privateca.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteCaPool(request, options)

deleteCaPool(request?: protos.google.cloud.security.privateca.v1.IDeleteCaPoolRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.security.privateca.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Delete a .

Parameters
NameDescription
request IDeleteCaPoolRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.security.privateca.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The resource name for this
   *  CaPool google.cloud.security.privateca.v1.CaPool  in the format
   *  `projects/* /locations/* /caPools/*`.
   */
  // const name = 'abc123'
  /**
   *  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).
   */
  // const requestId = 'abc123'
  /**
   *  Optional. This field allows this pool to be deleted even if it's being
   *  depended on by another resource. However, doing so may result in unintended
   *  and unrecoverable effects on any dependent resource(s) since the pool will
   *  no longer be able to issue certificates.
   */
  // const ignoreDependentResources = true

  // Imports the Privateca library
  const {CertificateAuthorityServiceClient} = require('@google-cloud/security-private-ca').v1;

  // Instantiates a client
  const privatecaClient = new CertificateAuthorityServiceClient();

  async function callDeleteCaPool() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const [operation] = await privatecaClient.deleteCaPool(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callDeleteCaPool();

deleteCaPool(request, options, callback)

deleteCaPool(request: protos.google.cloud.security.privateca.v1.IDeleteCaPoolRequest, options: CallOptions, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.security.privateca.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IDeleteCaPoolRequest
options CallOptions
callback Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.security.privateca.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteCaPool(request, callback)

deleteCaPool(request: protos.google.cloud.security.privateca.v1.IDeleteCaPoolRequest, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.security.privateca.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IDeleteCaPoolRequest
callback Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.security.privateca.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteCertificateAuthority(request, options)

deleteCertificateAuthority(request?: protos.google.cloud.security.privateca.v1.IDeleteCertificateAuthorityRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.security.privateca.v1.ICertificateAuthority, protos.google.cloud.security.privateca.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Delete a .

Parameters
NameDescription
request IDeleteCertificateAuthorityRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.security.privateca.v1.ICertificateAuthority, protos.google.cloud.security.privateca.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The resource name for this
   *  CertificateAuthority google.cloud.security.privateca.v1.CertificateAuthority 
   *  in the format `projects/* /locations/* /caPools/* /certificateAuthorities/*`.
   */
  // const name = 'abc123'
  /**
   *  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).
   */
  // const requestId = 'abc123'
  /**
   *  Optional. This field allows the CA to be deleted even if the CA has
   *  active certs. Active certs include both unrevoked and unexpired certs.
   */
  // const ignoreActiveCertificates = true
  /**
   *  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.
   */
  // const skipGracePeriod = true
  /**
   *  Optional. This field allows this ca to be deleted even if it's being
   *  depended on by another resource. However, doing so may result in unintended
   *  and unrecoverable effects on any dependent resource(s) since the CA will
   *  no longer be able to issue certificates.
   */
  // const ignoreDependentResources = true

  // Imports the Privateca library
  const {CertificateAuthorityServiceClient} = require('@google-cloud/security-private-ca').v1;

  // Instantiates a client
  const privatecaClient = new CertificateAuthorityServiceClient();

  async function callDeleteCertificateAuthority() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const [operation] = await privatecaClient.deleteCertificateAuthority(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callDeleteCertificateAuthority();

deleteCertificateAuthority(request, options, callback)

deleteCertificateAuthority(request: protos.google.cloud.security.privateca.v1.IDeleteCertificateAuthorityRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.security.privateca.v1.ICertificateAuthority, protos.google.cloud.security.privateca.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IDeleteCertificateAuthorityRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.security.privateca.v1.ICertificateAuthority, protos.google.cloud.security.privateca.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteCertificateAuthority(request, callback)

deleteCertificateAuthority(request: protos.google.cloud.security.privateca.v1.IDeleteCertificateAuthorityRequest, callback: Callback<LROperation<protos.google.cloud.security.privateca.v1.ICertificateAuthority, protos.google.cloud.security.privateca.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IDeleteCertificateAuthorityRequest
callback Callback<LROperation<protos.google.cloud.security.privateca.v1.ICertificateAuthority, protos.google.cloud.security.privateca.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteCertificateTemplate(request, options)

deleteCertificateTemplate(request?: protos.google.cloud.security.privateca.v1.IDeleteCertificateTemplateRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.security.privateca.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

DeleteCertificateTemplate deletes a CertificateTemplate.

Parameters
NameDescription
request IDeleteCertificateTemplateRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.security.privateca.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The resource name for this
   *  CertificateTemplate google.cloud.security.privateca.v1.CertificateTemplate 
   *  in the format `projects/* /locations/* /certificateTemplates/*`.
   */
  // const name = 'abc123'
  /**
   *  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).
   */
  // const requestId = 'abc123'

  // Imports the Privateca library
  const {CertificateAuthorityServiceClient} = require('@google-cloud/security-private-ca').v1;

  // Instantiates a client
  const privatecaClient = new CertificateAuthorityServiceClient();

  async function callDeleteCertificateTemplate() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const [operation] = await privatecaClient.deleteCertificateTemplate(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callDeleteCertificateTemplate();

deleteCertificateTemplate(request, options, callback)

deleteCertificateTemplate(request: protos.google.cloud.security.privateca.v1.IDeleteCertificateTemplateRequest, options: CallOptions, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.security.privateca.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IDeleteCertificateTemplateRequest
options CallOptions
callback Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.security.privateca.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteCertificateTemplate(request, callback)

deleteCertificateTemplate(request: protos.google.cloud.security.privateca.v1.IDeleteCertificateTemplateRequest, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.security.privateca.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IDeleteCertificateTemplateRequest
callback Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.security.privateca.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteOperation(request, options, callback)

deleteOperation(request: protos.google.longrunning.DeleteOperationRequest, options?: gax.CallOptions | Callback<protos.google.protobuf.Empty, protos.google.longrunning.DeleteOperationRequest, {} | null | undefined>, callback?: Callback<protos.google.protobuf.Empty, protos.google.longrunning.DeleteOperationRequest, {} | null | undefined>): Promise<protos.google.protobuf.Empty>;

Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED.

Parameters
NameDescription
request DeleteOperationRequest

The request object that will be sent.

options CallOptions | Callback<protos.google.protobuf.Empty, protos.google.longrunning.DeleteOperationRequest, {} | null | undefined>

Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details.

callback Callback<protos.google.protobuf.Empty, protos.google.longrunning.DeleteOperationRequest, {} | null | undefined>

The function which will be called with the result of the API call. {Promise} - The promise which resolves when API call finishes. The promise has a method named "cancel" which cancels the ongoing API call.

Returns
TypeDescription
Promise<protos.google.protobuf.Empty>
Example

const client = longrunning.operationsClient();
await client.deleteOperation({name: ''});

disableCertificateAuthority(request, options)

disableCertificateAuthority(request?: protos.google.cloud.security.privateca.v1.IDisableCertificateAuthorityRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.security.privateca.v1.ICertificateAuthority, protos.google.cloud.security.privateca.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Disable a .

Parameters
NameDescription
request IDisableCertificateAuthorityRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.security.privateca.v1.ICertificateAuthority, protos.google.cloud.security.privateca.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The resource name for this
   *  CertificateAuthority google.cloud.security.privateca.v1.CertificateAuthority 
   *  in the format `projects/* /locations/* /caPools/* /certificateAuthorities/*`.
   */
  // const name = 'abc123'
  /**
   *  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).
   */
  // const requestId = 'abc123'
  /**
   *  Optional. This field allows this CA to be disabled even if it's being
   *  depended on by another resource. However, doing so may result in unintended
   *  and unrecoverable effects on any dependent resource(s) since the CA will
   *  no longer be able to issue certificates.
   */
  // const ignoreDependentResources = true

  // Imports the Privateca library
  const {CertificateAuthorityServiceClient} = require('@google-cloud/security-private-ca').v1;

  // Instantiates a client
  const privatecaClient = new CertificateAuthorityServiceClient();

  async function callDisableCertificateAuthority() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const [operation] = await privatecaClient.disableCertificateAuthority(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callDisableCertificateAuthority();

disableCertificateAuthority(request, options, callback)

disableCertificateAuthority(request: protos.google.cloud.security.privateca.v1.IDisableCertificateAuthorityRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.security.privateca.v1.ICertificateAuthority, protos.google.cloud.security.privateca.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IDisableCertificateAuthorityRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.security.privateca.v1.ICertificateAuthority, protos.google.cloud.security.privateca.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

disableCertificateAuthority(request, callback)

disableCertificateAuthority(request: protos.google.cloud.security.privateca.v1.IDisableCertificateAuthorityRequest, callback: Callback<LROperation<protos.google.cloud.security.privateca.v1.ICertificateAuthority, protos.google.cloud.security.privateca.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IDisableCertificateAuthorityRequest
callback Callback<LROperation<protos.google.cloud.security.privateca.v1.ICertificateAuthority, protos.google.cloud.security.privateca.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

enableCertificateAuthority(request, options)

enableCertificateAuthority(request?: protos.google.cloud.security.privateca.v1.IEnableCertificateAuthorityRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.security.privateca.v1.ICertificateAuthority, protos.google.cloud.security.privateca.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Enable a .

Parameters
NameDescription
request IEnableCertificateAuthorityRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.security.privateca.v1.ICertificateAuthority, protos.google.cloud.security.privateca.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The resource name for this
   *  CertificateAuthority google.cloud.security.privateca.v1.CertificateAuthority 
   *  in the format `projects/* /locations/* /caPools/* /certificateAuthorities/*`.
   */
  // const name = 'abc123'
  /**
   *  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).
   */
  // const requestId = 'abc123'

  // Imports the Privateca library
  const {CertificateAuthorityServiceClient} = require('@google-cloud/security-private-ca').v1;

  // Instantiates a client
  const privatecaClient = new CertificateAuthorityServiceClient();

  async function callEnableCertificateAuthority() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const [operation] = await privatecaClient.enableCertificateAuthority(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callEnableCertificateAuthority();

enableCertificateAuthority(request, options, callback)

enableCertificateAuthority(request: protos.google.cloud.security.privateca.v1.IEnableCertificateAuthorityRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.security.privateca.v1.ICertificateAuthority, protos.google.cloud.security.privateca.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IEnableCertificateAuthorityRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.security.privateca.v1.ICertificateAuthority, protos.google.cloud.security.privateca.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

enableCertificateAuthority(request, callback)

enableCertificateAuthority(request: protos.google.cloud.security.privateca.v1.IEnableCertificateAuthorityRequest, callback: Callback<LROperation<protos.google.cloud.security.privateca.v1.ICertificateAuthority, protos.google.cloud.security.privateca.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IEnableCertificateAuthorityRequest
callback Callback<LROperation<protos.google.cloud.security.privateca.v1.ICertificateAuthority, protos.google.cloud.security.privateca.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

fetchCaCerts(request, options)

fetchCaCerts(request?: protos.google.cloud.security.privateca.v1.IFetchCaCertsRequest, options?: CallOptions): Promise<[
        protos.google.cloud.security.privateca.v1.IFetchCaCertsResponse,
        (protos.google.cloud.security.privateca.v1.IFetchCaCertsRequest | undefined),
        {} | undefined
    ]>;

FetchCaCerts returns the current trust anchor for the . This will include CA certificate chains for all Certificate Authorities in the ENABLED, DISABLED, or STAGED states.

Parameters
NameDescription
request IFetchCaCertsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.security.privateca.v1.IFetchCaCertsResponse, (protos.google.cloud.security.privateca.v1.IFetchCaCertsRequest | undefined), {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The resource name for the
   *  CaPool google.cloud.security.privateca.v1.CaPool  in the format
   *  `projects/* /locations/* /caPools/*`.
   */
  // const caPool = 'abc123'
  /**
   *  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).
   */
  // const requestId = 'abc123'

  // Imports the Privateca library
  const {CertificateAuthorityServiceClient} = require('@google-cloud/security-private-ca').v1;

  // Instantiates a client
  const privatecaClient = new CertificateAuthorityServiceClient();

  async function callFetchCaCerts() {
    // Construct request
    const request = {
      caPool,
    };

    // Run request
    const response = await privatecaClient.fetchCaCerts(request);
    console.log(response);
  }

  callFetchCaCerts();

fetchCaCerts(request, options, callback)

fetchCaCerts(request: protos.google.cloud.security.privateca.v1.IFetchCaCertsRequest, options: CallOptions, callback: Callback<protos.google.cloud.security.privateca.v1.IFetchCaCertsResponse, protos.google.cloud.security.privateca.v1.IFetchCaCertsRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IFetchCaCertsRequest
options CallOptions
callback Callback<protos.google.cloud.security.privateca.v1.IFetchCaCertsResponse, protos.google.cloud.security.privateca.v1.IFetchCaCertsRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

fetchCaCerts(request, callback)

fetchCaCerts(request: protos.google.cloud.security.privateca.v1.IFetchCaCertsRequest, callback: Callback<protos.google.cloud.security.privateca.v1.IFetchCaCertsResponse, protos.google.cloud.security.privateca.v1.IFetchCaCertsRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IFetchCaCertsRequest
callback Callback<protos.google.cloud.security.privateca.v1.IFetchCaCertsResponse, protos.google.cloud.security.privateca.v1.IFetchCaCertsRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

fetchCertificateAuthorityCsr(request, options)

fetchCertificateAuthorityCsr(request?: protos.google.cloud.security.privateca.v1.IFetchCertificateAuthorityCsrRequest, options?: CallOptions): Promise<[
        protos.google.cloud.security.privateca.v1.IFetchCertificateAuthorityCsrResponse,
        (protos.google.cloud.security.privateca.v1.IFetchCertificateAuthorityCsrRequest | undefined),
        {} | undefined
    ]>;

Fetch a certificate signing request (CSR) from a that is in state and is of type . The CSR must then be signed by the desired parent Certificate Authority, which could be another resource, or could be an on-prem certificate authority. See also .

Parameters
NameDescription
request IFetchCertificateAuthorityCsrRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.security.privateca.v1.IFetchCertificateAuthorityCsrResponse, (protos.google.cloud.security.privateca.v1.IFetchCertificateAuthorityCsrRequest | undefined), {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing FetchCertificateAuthorityCsrResponse. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The resource name for this
   *  CertificateAuthority google.cloud.security.privateca.v1.CertificateAuthority 
   *  in the format `projects/* /locations/* /caPools/* /certificateAuthorities/*`.
   */
  // const name = 'abc123'

  // Imports the Privateca library
  const {CertificateAuthorityServiceClient} = require('@google-cloud/security-private-ca').v1;

  // Instantiates a client
  const privatecaClient = new CertificateAuthorityServiceClient();

  async function callFetchCertificateAuthorityCsr() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const response = await privatecaClient.fetchCertificateAuthorityCsr(request);
    console.log(response);
  }

  callFetchCertificateAuthorityCsr();

fetchCertificateAuthorityCsr(request, options, callback)

fetchCertificateAuthorityCsr(request: protos.google.cloud.security.privateca.v1.IFetchCertificateAuthorityCsrRequest, options: CallOptions, callback: Callback<protos.google.cloud.security.privateca.v1.IFetchCertificateAuthorityCsrResponse, protos.google.cloud.security.privateca.v1.IFetchCertificateAuthorityCsrRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IFetchCertificateAuthorityCsrRequest
options CallOptions
callback Callback<protos.google.cloud.security.privateca.v1.IFetchCertificateAuthorityCsrResponse, protos.google.cloud.security.privateca.v1.IFetchCertificateAuthorityCsrRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

fetchCertificateAuthorityCsr(request, callback)

fetchCertificateAuthorityCsr(request: protos.google.cloud.security.privateca.v1.IFetchCertificateAuthorityCsrRequest, callback: Callback<protos.google.cloud.security.privateca.v1.IFetchCertificateAuthorityCsrResponse, protos.google.cloud.security.privateca.v1.IFetchCertificateAuthorityCsrRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IFetchCertificateAuthorityCsrRequest
callback Callback<protos.google.cloud.security.privateca.v1.IFetchCertificateAuthorityCsrResponse, protos.google.cloud.security.privateca.v1.IFetchCertificateAuthorityCsrRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getCaPool(request, options)

getCaPool(request?: protos.google.cloud.security.privateca.v1.IGetCaPoolRequest, options?: CallOptions): Promise<[
        protos.google.cloud.security.privateca.v1.ICaPool,
        protos.google.cloud.security.privateca.v1.IGetCaPoolRequest | undefined,
        {} | undefined
    ]>;

Returns a .

Parameters
NameDescription
request IGetCaPoolRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.security.privateca.v1.ICaPool, protos.google.cloud.security.privateca.v1.IGetCaPoolRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The name google.cloud.security.privateca.v1.CaPool.name  of the
   *  CaPool google.cloud.security.privateca.v1.CaPool  to get.
   */
  // const name = 'abc123'

  // Imports the Privateca library
  const {CertificateAuthorityServiceClient} = require('@google-cloud/security-private-ca').v1;

  // Instantiates a client
  const privatecaClient = new CertificateAuthorityServiceClient();

  async function callGetCaPool() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const response = await privatecaClient.getCaPool(request);
    console.log(response);
  }

  callGetCaPool();

getCaPool(request, options, callback)

getCaPool(request: protos.google.cloud.security.privateca.v1.IGetCaPoolRequest, options: CallOptions, callback: Callback<protos.google.cloud.security.privateca.v1.ICaPool, protos.google.cloud.security.privateca.v1.IGetCaPoolRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IGetCaPoolRequest
options CallOptions
callback Callback<protos.google.cloud.security.privateca.v1.ICaPool, protos.google.cloud.security.privateca.v1.IGetCaPoolRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getCaPool(request, callback)

getCaPool(request: protos.google.cloud.security.privateca.v1.IGetCaPoolRequest, callback: Callback<protos.google.cloud.security.privateca.v1.ICaPool, protos.google.cloud.security.privateca.v1.IGetCaPoolRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IGetCaPoolRequest
callback Callback<protos.google.cloud.security.privateca.v1.ICaPool, protos.google.cloud.security.privateca.v1.IGetCaPoolRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getCertificate(request, options)

getCertificate(request?: protos.google.cloud.security.privateca.v1.IGetCertificateRequest, options?: CallOptions): Promise<[
        protos.google.cloud.security.privateca.v1.ICertificate,
        (protos.google.cloud.security.privateca.v1.IGetCertificateRequest | undefined),
        {} | undefined
    ]>;

Returns a .

Parameters
NameDescription
request IGetCertificateRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.security.privateca.v1.ICertificate, (protos.google.cloud.security.privateca.v1.IGetCertificateRequest | undefined), {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The name google.cloud.security.privateca.v1.Certificate.name 
   *  of the Certificate google.cloud.security.privateca.v1.Certificate  to
   *  get.
   */
  // const name = 'abc123'

  // Imports the Privateca library
  const {CertificateAuthorityServiceClient} = require('@google-cloud/security-private-ca').v1;

  // Instantiates a client
  const privatecaClient = new CertificateAuthorityServiceClient();

  async function callGetCertificate() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const response = await privatecaClient.getCertificate(request);
    console.log(response);
  }

  callGetCertificate();

getCertificate(request, options, callback)

getCertificate(request: protos.google.cloud.security.privateca.v1.IGetCertificateRequest, options: CallOptions, callback: Callback<protos.google.cloud.security.privateca.v1.ICertificate, protos.google.cloud.security.privateca.v1.IGetCertificateRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IGetCertificateRequest
options CallOptions
callback Callback<protos.google.cloud.security.privateca.v1.ICertificate, protos.google.cloud.security.privateca.v1.IGetCertificateRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getCertificate(request, callback)

getCertificate(request: protos.google.cloud.security.privateca.v1.IGetCertificateRequest, callback: Callback<protos.google.cloud.security.privateca.v1.ICertificate, protos.google.cloud.security.privateca.v1.IGetCertificateRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IGetCertificateRequest
callback Callback<protos.google.cloud.security.privateca.v1.ICertificate, protos.google.cloud.security.privateca.v1.IGetCertificateRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getCertificateAuthority(request, options)

getCertificateAuthority(request?: protos.google.cloud.security.privateca.v1.IGetCertificateAuthorityRequest, options?: CallOptions): Promise<[
        protos.google.cloud.security.privateca.v1.ICertificateAuthority,
        (protos.google.cloud.security.privateca.v1.IGetCertificateAuthorityRequest | undefined),
        {} | undefined
    ]>;

Returns a .

Parameters
NameDescription
request IGetCertificateAuthorityRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.security.privateca.v1.ICertificateAuthority, (protos.google.cloud.security.privateca.v1.IGetCertificateAuthorityRequest | undefined), {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The
   *  name google.cloud.security.privateca.v1.CertificateAuthority.name  of the
   *  CertificateAuthority google.cloud.security.privateca.v1.CertificateAuthority 
   *  to get.
   */
  // const name = 'abc123'

  // Imports the Privateca library
  const {CertificateAuthorityServiceClient} = require('@google-cloud/security-private-ca').v1;

  // Instantiates a client
  const privatecaClient = new CertificateAuthorityServiceClient();

  async function callGetCertificateAuthority() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const response = await privatecaClient.getCertificateAuthority(request);
    console.log(response);
  }

  callGetCertificateAuthority();

getCertificateAuthority(request, options, callback)

getCertificateAuthority(request: protos.google.cloud.security.privateca.v1.IGetCertificateAuthorityRequest, options: CallOptions, callback: Callback<protos.google.cloud.security.privateca.v1.ICertificateAuthority, protos.google.cloud.security.privateca.v1.IGetCertificateAuthorityRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IGetCertificateAuthorityRequest
options CallOptions
callback Callback<protos.google.cloud.security.privateca.v1.ICertificateAuthority, protos.google.cloud.security.privateca.v1.IGetCertificateAuthorityRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getCertificateAuthority(request, callback)

getCertificateAuthority(request: protos.google.cloud.security.privateca.v1.IGetCertificateAuthorityRequest, callback: Callback<protos.google.cloud.security.privateca.v1.ICertificateAuthority, protos.google.cloud.security.privateca.v1.IGetCertificateAuthorityRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IGetCertificateAuthorityRequest
callback Callback<protos.google.cloud.security.privateca.v1.ICertificateAuthority, protos.google.cloud.security.privateca.v1.IGetCertificateAuthorityRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getCertificateRevocationList(request, options)

getCertificateRevocationList(request?: protos.google.cloud.security.privateca.v1.IGetCertificateRevocationListRequest, options?: CallOptions): Promise<[
        protos.google.cloud.security.privateca.v1.ICertificateRevocationList,
        (protos.google.cloud.security.privateca.v1.IGetCertificateRevocationListRequest | undefined),
        {} | undefined
    ]>;

Returns a .

Parameters
NameDescription
request IGetCertificateRevocationListRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.security.privateca.v1.ICertificateRevocationList, (protos.google.cloud.security.privateca.v1.IGetCertificateRevocationListRequest | undefined), {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The
   *  name google.cloud.security.privateca.v1.CertificateRevocationList.name 
   *  of the
   *  CertificateRevocationList google.cloud.security.privateca.v1.CertificateRevocationList 
   *  to get.
   */
  // const name = 'abc123'

  // Imports the Privateca library
  const {CertificateAuthorityServiceClient} = require('@google-cloud/security-private-ca').v1;

  // Instantiates a client
  const privatecaClient = new CertificateAuthorityServiceClient();

  async function callGetCertificateRevocationList() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const response = await privatecaClient.getCertificateRevocationList(request);
    console.log(response);
  }

  callGetCertificateRevocationList();

getCertificateRevocationList(request, options, callback)

getCertificateRevocationList(request: protos.google.cloud.security.privateca.v1.IGetCertificateRevocationListRequest, options: CallOptions, callback: Callback<protos.google.cloud.security.privateca.v1.ICertificateRevocationList, protos.google.cloud.security.privateca.v1.IGetCertificateRevocationListRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IGetCertificateRevocationListRequest
options CallOptions
callback Callback<protos.google.cloud.security.privateca.v1.ICertificateRevocationList, protos.google.cloud.security.privateca.v1.IGetCertificateRevocationListRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getCertificateRevocationList(request, callback)

getCertificateRevocationList(request: protos.google.cloud.security.privateca.v1.IGetCertificateRevocationListRequest, callback: Callback<protos.google.cloud.security.privateca.v1.ICertificateRevocationList, protos.google.cloud.security.privateca.v1.IGetCertificateRevocationListRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IGetCertificateRevocationListRequest
callback Callback<protos.google.cloud.security.privateca.v1.ICertificateRevocationList, protos.google.cloud.security.privateca.v1.IGetCertificateRevocationListRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getCertificateTemplate(request, options)

getCertificateTemplate(request?: protos.google.cloud.security.privateca.v1.IGetCertificateTemplateRequest, options?: CallOptions): Promise<[
        protos.google.cloud.security.privateca.v1.ICertificateTemplate,
        (protos.google.cloud.security.privateca.v1.IGetCertificateTemplateRequest | undefined),
        {} | undefined
    ]>;
Parameters
NameDescription
request IGetCertificateTemplateRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.security.privateca.v1.ICertificateTemplate, (protos.google.cloud.security.privateca.v1.IGetCertificateTemplateRequest | undefined), {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing CertificateTemplate. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The
   *  name google.cloud.security.privateca.v1.CertificateTemplate.name  of the
   *  CertificateTemplate google.cloud.security.privateca.v1.CertificateTemplate 
   *  to get.
   */
  // const name = 'abc123'

  // Imports the Privateca library
  const {CertificateAuthorityServiceClient} = require('@google-cloud/security-private-ca').v1;

  // Instantiates a client
  const privatecaClient = new CertificateAuthorityServiceClient();

  async function callGetCertificateTemplate() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const response = await privatecaClient.getCertificateTemplate(request);
    console.log(response);
  }

  callGetCertificateTemplate();

getCertificateTemplate(request, options, callback)

getCertificateTemplate(request: protos.google.cloud.security.privateca.v1.IGetCertificateTemplateRequest, options: CallOptions, callback: Callback<protos.google.cloud.security.privateca.v1.ICertificateTemplate, protos.google.cloud.security.privateca.v1.IGetCertificateTemplateRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IGetCertificateTemplateRequest
options CallOptions
callback Callback<protos.google.cloud.security.privateca.v1.ICertificateTemplate, protos.google.cloud.security.privateca.v1.IGetCertificateTemplateRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getCertificateTemplate(request, callback)

getCertificateTemplate(request: protos.google.cloud.security.privateca.v1.IGetCertificateTemplateRequest, callback: Callback<protos.google.cloud.security.privateca.v1.ICertificateTemplate, protos.google.cloud.security.privateca.v1.IGetCertificateTemplateRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IGetCertificateTemplateRequest
callback Callback<protos.google.cloud.security.privateca.v1.ICertificateTemplate, protos.google.cloud.security.privateca.v1.IGetCertificateTemplateRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getIamPolicy(request, options, callback)

getIamPolicy(request: IamProtos.google.iam.v1.GetIamPolicyRequest, options?: gax.CallOptions | Callback<IamProtos.google.iam.v1.Policy, IamProtos.google.iam.v1.GetIamPolicyRequest | null | undefined, {} | null | undefined>, callback?: Callback<IamProtos.google.iam.v1.Policy, IamProtos.google.iam.v1.GetIamPolicyRequest | null | undefined, {} | null | undefined>): Promise<[IamProtos.google.iam.v1.Policy]>;

Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.

Parameters
NameDescription
request IamProtos.google.iam.v1.GetIamPolicyRequest

The request object that will be sent.

options CallOptions | Callback<google.iam.v1.Policy, google.iam.v1.GetIamPolicyRequest | null | undefined, {} | null | undefined>

Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details.

callback Callback<google.iam.v1.Policy, google.iam.v1.GetIamPolicyRequest | null | undefined, {} | null | undefined>

The function which will be called with the result of the API call.

The second parameter to the callback is an object representing .

Returns
TypeDescription
Promise<[google.iam.v1.Policy]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . The promise has a method named "cancel" which cancels the ongoing API call.

getLocation(request, options, callback)

getLocation(request: LocationProtos.google.cloud.location.IGetLocationRequest, options?: gax.CallOptions | Callback<LocationProtos.google.cloud.location.ILocation, LocationProtos.google.cloud.location.IGetLocationRequest | null | undefined, {} | null | undefined>, callback?: Callback<LocationProtos.google.cloud.location.ILocation, LocationProtos.google.cloud.location.IGetLocationRequest | null | undefined, {} | null | undefined>): Promise<LocationProtos.google.cloud.location.ILocation>;

Gets information about a location.

Parameters
NameDescription
request LocationProtos.google.cloud.location.IGetLocationRequest

The request object that will be sent.

options CallOptions | Callback<google.cloud.location.ILocation, google.cloud.location.IGetLocationRequest | null | undefined, {} | null | undefined>

Call options. See CallOptions for more details.

callback Callback<google.cloud.location.ILocation, google.cloud.location.IGetLocationRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
Promise<google.cloud.location.ILocation>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation for more details and examples.

Example

const [response] = await client.getLocation(request);

getOperation(request, options, callback)

getOperation(request: protos.google.longrunning.GetOperationRequest, options?: gax.CallOptions | Callback<protos.google.longrunning.Operation, protos.google.longrunning.GetOperationRequest, {} | null | undefined>, callback?: Callback<protos.google.longrunning.Operation, protos.google.longrunning.GetOperationRequest, {} | null | undefined>): Promise<[protos.google.longrunning.Operation]>;

Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.

Parameters
NameDescription
request GetOperationRequest

The request object that will be sent.

options CallOptions | Callback<protos.google.longrunning.Operation, protos.google.longrunning.GetOperationRequest, {} | null | undefined>

Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details.

callback Callback<protos.google.longrunning.Operation, protos.google.longrunning.GetOperationRequest, {} | null | undefined>

The function which will be called with the result of the API call.

The second parameter to the callback is an object representing . {Promise} - The promise which resolves to an array. The first element of the array is an object representing . The promise has a method named "cancel" which cancels the ongoing API call.

Returns
TypeDescription
Promise<[protos.google.longrunning.Operation]>
Example

const client = longrunning.operationsClient();
const name = '';
const [response] = await client.getOperation({name});
// doThingsWith(response)

getProjectId()

getProjectId(): Promise<string>;
Returns
TypeDescription
Promise<string>

getProjectId(callback)

getProjectId(callback: Callback<string, undefined, undefined>): void;
Parameter
NameDescription
callback Callback<string, undefined, undefined>
Returns
TypeDescription
void

initialize()

initialize(): Promise<{
        [name: string]: Function;
    }>;

Initialize the client. Performs asynchronous operations (such as authentication) and prepares the client. This function will be called automatically when any class method is called for the first time, but if you need to initialize it before calling an actual method, feel free to call initialize() directly.

You can await on this method if you want to make sure the client is initialized.

Returns
TypeDescription
Promise<{ [name: string]: Function; }>

{Promise} A promise that resolves to an authenticated service stub.

listCaPools(request, options)

listCaPools(request?: protos.google.cloud.security.privateca.v1.IListCaPoolsRequest, options?: CallOptions): Promise<[
        protos.google.cloud.security.privateca.v1.ICaPool[],
        protos.google.cloud.security.privateca.v1.IListCaPoolsRequest | null,
        protos.google.cloud.security.privateca.v1.IListCaPoolsResponse
    ]>;

Lists .

Parameters
NameDescription
request IListCaPoolsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.security.privateca.v1.ICaPool[], protos.google.cloud.security.privateca.v1.IListCaPoolsRequest | null, protos.google.cloud.security.privateca.v1.IListCaPoolsResponse ]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of . The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using listCaPoolsAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listCaPools(request, options, callback)

listCaPools(request: protos.google.cloud.security.privateca.v1.IListCaPoolsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.security.privateca.v1.IListCaPoolsRequest, protos.google.cloud.security.privateca.v1.IListCaPoolsResponse | null | undefined, protos.google.cloud.security.privateca.v1.ICaPool>): void;
Parameters
NameDescription
request IListCaPoolsRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.security.privateca.v1.IListCaPoolsRequest, protos.google.cloud.security.privateca.v1.IListCaPoolsResponse | null | undefined, protos.google.cloud.security.privateca.v1.ICaPool>
Returns
TypeDescription
void

listCaPools(request, callback)

listCaPools(request: protos.google.cloud.security.privateca.v1.IListCaPoolsRequest, callback: PaginationCallback<protos.google.cloud.security.privateca.v1.IListCaPoolsRequest, protos.google.cloud.security.privateca.v1.IListCaPoolsResponse | null | undefined, protos.google.cloud.security.privateca.v1.ICaPool>): void;
Parameters
NameDescription
request IListCaPoolsRequest
callback PaginationCallback<protos.google.cloud.security.privateca.v1.IListCaPoolsRequest, protos.google.cloud.security.privateca.v1.IListCaPoolsResponse | null | undefined, protos.google.cloud.security.privateca.v1.ICaPool>
Returns
TypeDescription
void

listCaPoolsAsync(request, options)

listCaPoolsAsync(request?: protos.google.cloud.security.privateca.v1.IListCaPoolsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.security.privateca.v1.ICaPool>;

Equivalent to listCaPools, but returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters
NameDescription
request IListCaPoolsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.cloud.security.privateca.v1.ICaPool>

{Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing . The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The resource name of the location associated with the
   *  CaPools google.cloud.security.privateca.v1.CaPool, in the format
   *  `projects/* /locations/*`.
   */
  // const parent = 'abc123'
  /**
   *  Optional. Limit on the number of
   *  CaPools google.cloud.security.privateca.v1.CaPool  to include in the
   *  response. Further CaPools google.cloud.security.privateca.v1.CaPool  can
   *  subsequently be obtained by including the
   *  ListCaPoolsResponse.next_page_token google.cloud.security.privateca.v1.ListCaPoolsResponse.next_page_token 
   *  in a subsequent request. If unspecified, the server will pick an
   *  appropriate default.
   */
  // const pageSize = 1234
  /**
   *  Optional. Pagination token, returned earlier via
   *  ListCaPoolsResponse.next_page_token google.cloud.security.privateca.v1.ListCaPoolsResponse.next_page_token.
   */
  // const pageToken = 'abc123'
  /**
   *  Optional. Only include resources that match the filter in the response.
   */
  // const filter = 'abc123'
  /**
   *  Optional. Specify how the results should be sorted.
   */
  // const orderBy = 'abc123'

  // Imports the Privateca library
  const {CertificateAuthorityServiceClient} = require('@google-cloud/security-private-ca').v1;

  // Instantiates a client
  const privatecaClient = new CertificateAuthorityServiceClient();

  async function callListCaPools() {
    // Construct request
    const request = {
      parent,
    };

    // Run request
    const iterable = privatecaClient.listCaPoolsAsync(request);
    for await (const response of iterable) {
        console.log(response);
    }
  }

  callListCaPools();

listCaPoolsStream(request, options)

listCaPoolsStream(request?: protos.google.cloud.security.privateca.v1.IListCaPoolsRequest, options?: CallOptions): Transform;

Equivalent to method.name.toCamelCase(), but returns a NodeJS Stream object.

Parameters
NameDescription
request IListCaPoolsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Transform

{Stream} An object stream which emits an object representing on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using listCaPoolsAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listCertificateAuthorities(request, options)

listCertificateAuthorities(request?: protos.google.cloud.security.privateca.v1.IListCertificateAuthoritiesRequest, options?: CallOptions): Promise<[
        protos.google.cloud.security.privateca.v1.ICertificateAuthority[],
        protos.google.cloud.security.privateca.v1.IListCertificateAuthoritiesRequest | null,
        protos.google.cloud.security.privateca.v1.IListCertificateAuthoritiesResponse
    ]>;

Lists .

Parameters
NameDescription
request IListCertificateAuthoritiesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.security.privateca.v1.ICertificateAuthority[], protos.google.cloud.security.privateca.v1.IListCertificateAuthoritiesRequest | null, protos.google.cloud.security.privateca.v1.IListCertificateAuthoritiesResponse ]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of . The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using listCertificateAuthoritiesAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listCertificateAuthorities(request, options, callback)

listCertificateAuthorities(request: protos.google.cloud.security.privateca.v1.IListCertificateAuthoritiesRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.security.privateca.v1.IListCertificateAuthoritiesRequest, protos.google.cloud.security.privateca.v1.IListCertificateAuthoritiesResponse | null | undefined, protos.google.cloud.security.privateca.v1.ICertificateAuthority>): void;
Parameters
NameDescription
request IListCertificateAuthoritiesRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.security.privateca.v1.IListCertificateAuthoritiesRequest, protos.google.cloud.security.privateca.v1.IListCertificateAuthoritiesResponse | null | undefined, protos.google.cloud.security.privateca.v1.ICertificateAuthority>
Returns
TypeDescription
void

listCertificateAuthorities(request, callback)

listCertificateAuthorities(request: protos.google.cloud.security.privateca.v1.IListCertificateAuthoritiesRequest, callback: PaginationCallback<protos.google.cloud.security.privateca.v1.IListCertificateAuthoritiesRequest, protos.google.cloud.security.privateca.v1.IListCertificateAuthoritiesResponse | null | undefined, protos.google.cloud.security.privateca.v1.ICertificateAuthority>): void;
Parameters
NameDescription
request IListCertificateAuthoritiesRequest
callback PaginationCallback<protos.google.cloud.security.privateca.v1.IListCertificateAuthoritiesRequest, protos.google.cloud.security.privateca.v1.IListCertificateAuthoritiesResponse | null | undefined, protos.google.cloud.security.privateca.v1.ICertificateAuthority>
Returns
TypeDescription
void

listCertificateAuthoritiesAsync(request, options)

listCertificateAuthoritiesAsync(request?: protos.google.cloud.security.privateca.v1.IListCertificateAuthoritiesRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.security.privateca.v1.ICertificateAuthority>;

Equivalent to listCertificateAuthorities, but returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters
NameDescription
request IListCertificateAuthoritiesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.cloud.security.privateca.v1.ICertificateAuthority>

{Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing . The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The resource name of the
   *  CaPool google.cloud.security.privateca.v1.CaPool  associated with the
   *  CertificateAuthorities google.cloud.security.privateca.v1.CertificateAuthority,
   *  in the format `projects/* /locations/* /caPools/*`.
   */
  // const parent = 'abc123'
  /**
   *  Optional. Limit on the number of
   *  CertificateAuthorities google.cloud.security.privateca.v1.CertificateAuthority 
   *  to include in the response. Further
   *  CertificateAuthorities google.cloud.security.privateca.v1.CertificateAuthority 
   *  can subsequently be obtained by including the
   *  ListCertificateAuthoritiesResponse.next_page_token google.cloud.security.privateca.v1.ListCertificateAuthoritiesResponse.next_page_token 
   *  in a subsequent request. If unspecified, the server will pick an
   *  appropriate default.
   */
  // const pageSize = 1234
  /**
   *  Optional. Pagination token, returned earlier via
   *  ListCertificateAuthoritiesResponse.next_page_token google.cloud.security.privateca.v1.ListCertificateAuthoritiesResponse.next_page_token.
   */
  // const pageToken = 'abc123'
  /**
   *  Optional. Only include resources that match the filter in the response.
   */
  // const filter = 'abc123'
  /**
   *  Optional. Specify how the results should be sorted.
   */
  // const orderBy = 'abc123'

  // Imports the Privateca library
  const {CertificateAuthorityServiceClient} = require('@google-cloud/security-private-ca').v1;

  // Instantiates a client
  const privatecaClient = new CertificateAuthorityServiceClient();

  async function callListCertificateAuthorities() {
    // Construct request
    const request = {
      parent,
    };

    // Run request
    const iterable = privatecaClient.listCertificateAuthoritiesAsync(request);
    for await (const response of iterable) {
        console.log(response);
    }
  }

  callListCertificateAuthorities();

listCertificateAuthoritiesStream(request, options)

listCertificateAuthoritiesStream(request?: protos.google.cloud.security.privateca.v1.IListCertificateAuthoritiesRequest, options?: CallOptions): Transform;

Equivalent to method.name.toCamelCase(), but returns a NodeJS Stream object.

Parameters
NameDescription
request IListCertificateAuthoritiesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Transform

{Stream} An object stream which emits an object representing on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using listCertificateAuthoritiesAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listCertificateRevocationLists(request, options)

listCertificateRevocationLists(request?: protos.google.cloud.security.privateca.v1.IListCertificateRevocationListsRequest, options?: CallOptions): Promise<[
        protos.google.cloud.security.privateca.v1.ICertificateRevocationList[],
        protos.google.cloud.security.privateca.v1.IListCertificateRevocationListsRequest | null,
        protos.google.cloud.security.privateca.v1.IListCertificateRevocationListsResponse
    ]>;

Lists .

Parameters
NameDescription
request IListCertificateRevocationListsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.security.privateca.v1.ICertificateRevocationList[], protos.google.cloud.security.privateca.v1.IListCertificateRevocationListsRequest | null, protos.google.cloud.security.privateca.v1.IListCertificateRevocationListsResponse ]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of . The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using listCertificateRevocationListsAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listCertificateRevocationLists(request, options, callback)

listCertificateRevocationLists(request: protos.google.cloud.security.privateca.v1.IListCertificateRevocationListsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.security.privateca.v1.IListCertificateRevocationListsRequest, protos.google.cloud.security.privateca.v1.IListCertificateRevocationListsResponse | null | undefined, protos.google.cloud.security.privateca.v1.ICertificateRevocationList>): void;
Parameters
NameDescription
request IListCertificateRevocationListsRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.security.privateca.v1.IListCertificateRevocationListsRequest, protos.google.cloud.security.privateca.v1.IListCertificateRevocationListsResponse | null | undefined, protos.google.cloud.security.privateca.v1.ICertificateRevocationList>
Returns
TypeDescription
void

listCertificateRevocationLists(request, callback)

listCertificateRevocationLists(request: protos.google.cloud.security.privateca.v1.IListCertificateRevocationListsRequest, callback: PaginationCallback<protos.google.cloud.security.privateca.v1.IListCertificateRevocationListsRequest, protos.google.cloud.security.privateca.v1.IListCertificateRevocationListsResponse | null | undefined, protos.google.cloud.security.privateca.v1.ICertificateRevocationList>): void;
Parameters
NameDescription
request IListCertificateRevocationListsRequest
callback PaginationCallback<protos.google.cloud.security.privateca.v1.IListCertificateRevocationListsRequest, protos.google.cloud.security.privateca.v1.IListCertificateRevocationListsResponse | null | undefined, protos.google.cloud.security.privateca.v1.ICertificateRevocationList>
Returns
TypeDescription
void

listCertificateRevocationListsAsync(request, options)

listCertificateRevocationListsAsync(request?: protos.google.cloud.security.privateca.v1.IListCertificateRevocationListsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.security.privateca.v1.ICertificateRevocationList>;

Equivalent to listCertificateRevocationLists, but returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters
NameDescription
request IListCertificateRevocationListsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.cloud.security.privateca.v1.ICertificateRevocationList>

{Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing . The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The resource name of the location associated with the
   *  CertificateRevocationLists google.cloud.security.privateca.v1.CertificateRevocationList,
   *  in the format `projects/* /locations/* /caPools/* /certificateAuthorities/*`.
   */
  // const parent = 'abc123'
  /**
   *  Optional. Limit on the number of
   *  CertificateRevocationLists google.cloud.security.privateca.v1.CertificateRevocationList 
   *  to include in the response. Further
   *  CertificateRevocationLists google.cloud.security.privateca.v1.CertificateRevocationList 
   *  can subsequently be obtained by including the
   *  ListCertificateRevocationListsResponse.next_page_token google.cloud.security.privateca.v1.ListCertificateRevocationListsResponse.next_page_token 
   *  in a subsequent request. If unspecified, the server will pick an
   *  appropriate default.
   */
  // const pageSize = 1234
  /**
   *  Optional. Pagination token, returned earlier via
   *  ListCertificateRevocationListsResponse.next_page_token google.cloud.security.privateca.v1.ListCertificateRevocationListsResponse.next_page_token.
   */
  // const pageToken = 'abc123'
  /**
   *  Optional. Only include resources that match the filter in the response.
   */
  // const filter = 'abc123'
  /**
   *  Optional. Specify how the results should be sorted.
   */
  // const orderBy = 'abc123'

  // Imports the Privateca library
  const {CertificateAuthorityServiceClient} = require('@google-cloud/security-private-ca').v1;

  // Instantiates a client
  const privatecaClient = new CertificateAuthorityServiceClient();

  async function callListCertificateRevocationLists() {
    // Construct request
    const request = {
      parent,
    };

    // Run request
    const iterable = privatecaClient.listCertificateRevocationListsAsync(request);
    for await (const response of iterable) {
        console.log(response);
    }
  }

  callListCertificateRevocationLists();

listCertificateRevocationListsStream(request, options)

listCertificateRevocationListsStream(request?: protos.google.cloud.security.privateca.v1.IListCertificateRevocationListsRequest, options?: CallOptions): Transform;

Equivalent to method.name.toCamelCase(), but returns a NodeJS Stream object.

Parameters
NameDescription
request IListCertificateRevocationListsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Transform

{Stream} An object stream which emits an object representing on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using listCertificateRevocationListsAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listCertificates(request, options)

listCertificates(request?: protos.google.cloud.security.privateca.v1.IListCertificatesRequest, options?: CallOptions): Promise<[
        protos.google.cloud.security.privateca.v1.ICertificate[],
        protos.google.cloud.security.privateca.v1.IListCertificatesRequest | null,
        protos.google.cloud.security.privateca.v1.IListCertificatesResponse
    ]>;

Lists .

Parameters
NameDescription
request IListCertificatesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.security.privateca.v1.ICertificate[], protos.google.cloud.security.privateca.v1.IListCertificatesRequest | null, protos.google.cloud.security.privateca.v1.IListCertificatesResponse ]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of . The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using listCertificatesAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listCertificates(request, options, callback)

listCertificates(request: protos.google.cloud.security.privateca.v1.IListCertificatesRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.security.privateca.v1.IListCertificatesRequest, protos.google.cloud.security.privateca.v1.IListCertificatesResponse | null | undefined, protos.google.cloud.security.privateca.v1.ICertificate>): void;
Parameters
NameDescription
request IListCertificatesRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.security.privateca.v1.IListCertificatesRequest, protos.google.cloud.security.privateca.v1.IListCertificatesResponse | null | undefined, protos.google.cloud.security.privateca.v1.ICertificate>
Returns
TypeDescription
void

listCertificates(request, callback)

listCertificates(request: protos.google.cloud.security.privateca.v1.IListCertificatesRequest, callback: PaginationCallback<protos.google.cloud.security.privateca.v1.IListCertificatesRequest, protos.google.cloud.security.privateca.v1.IListCertificatesResponse | null | undefined, protos.google.cloud.security.privateca.v1.ICertificate>): void;
Parameters
NameDescription
request IListCertificatesRequest
callback PaginationCallback<protos.google.cloud.security.privateca.v1.IListCertificatesRequest, protos.google.cloud.security.privateca.v1.IListCertificatesResponse | null | undefined, protos.google.cloud.security.privateca.v1.ICertificate>
Returns
TypeDescription
void

listCertificatesAsync(request, options)

listCertificatesAsync(request?: protos.google.cloud.security.privateca.v1.IListCertificatesRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.security.privateca.v1.ICertificate>;

Equivalent to listCertificates, but returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters
NameDescription
request IListCertificatesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.cloud.security.privateca.v1.ICertificate>

{Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing . The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The resource name of the location associated with the
   *  Certificates google.cloud.security.privateca.v1.Certificate, in the
   *  format `projects/* /locations/* /caPools/*`.
   */
  // const parent = 'abc123'
  /**
   *  Optional. Limit on the number of
   *  Certificates google.cloud.security.privateca.v1.Certificate  to include
   *  in the response. Further
   *  Certificates google.cloud.security.privateca.v1.Certificate  can
   *  subsequently be obtained by including the
   *  ListCertificatesResponse.next_page_token google.cloud.security.privateca.v1.ListCertificatesResponse.next_page_token 
   *  in a subsequent request. If unspecified, the server will pick an
   *  appropriate default.
   */
  // const pageSize = 1234
  /**
   *  Optional. Pagination token, returned earlier via
   *  ListCertificatesResponse.next_page_token google.cloud.security.privateca.v1.ListCertificatesResponse.next_page_token.
   */
  // const pageToken = 'abc123'
  /**
   *  Optional. Only include resources that match the filter in the response. For
   *  details on supported filters and syntax, see Certificates Filtering
   *  documentation (https://cloud.google.com/certificate-authority-service/docs/sorting-filtering-certificates#filtering_support).
   */
  // const filter = 'abc123'
  /**
   *  Optional. Specify how the results should be sorted. For details on
   *  supported fields and syntax, see Certificates Sorting
   *  documentation (https://cloud.google.com/certificate-authority-service/docs/sorting-filtering-certificates#sorting_support).
   */
  // const orderBy = 'abc123'

  // Imports the Privateca library
  const {CertificateAuthorityServiceClient} = require('@google-cloud/security-private-ca').v1;

  // Instantiates a client
  const privatecaClient = new CertificateAuthorityServiceClient();

  async function callListCertificates() {
    // Construct request
    const request = {
      parent,
    };

    // Run request
    const iterable = privatecaClient.listCertificatesAsync(request);
    for await (const response of iterable) {
        console.log(response);
    }
  }

  callListCertificates();

listCertificatesStream(request, options)

listCertificatesStream(request?: protos.google.cloud.security.privateca.v1.IListCertificatesRequest, options?: CallOptions): Transform;

Equivalent to method.name.toCamelCase(), but returns a NodeJS Stream object.

Parameters
NameDescription
request IListCertificatesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Transform

{Stream} An object stream which emits an object representing on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using listCertificatesAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listCertificateTemplates(request, options)

listCertificateTemplates(request?: protos.google.cloud.security.privateca.v1.IListCertificateTemplatesRequest, options?: CallOptions): Promise<[
        protos.google.cloud.security.privateca.v1.ICertificateTemplate[],
        protos.google.cloud.security.privateca.v1.IListCertificateTemplatesRequest | null,
        protos.google.cloud.security.privateca.v1.IListCertificateTemplatesResponse
    ]>;
Parameters
NameDescription
request IListCertificateTemplatesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.security.privateca.v1.ICertificateTemplate[], protos.google.cloud.security.privateca.v1.IListCertificateTemplatesRequest | null, protos.google.cloud.security.privateca.v1.IListCertificateTemplatesResponse ]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of CertificateTemplate. The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using listCertificateTemplatesAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listCertificateTemplates(request, options, callback)

listCertificateTemplates(request: protos.google.cloud.security.privateca.v1.IListCertificateTemplatesRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.security.privateca.v1.IListCertificateTemplatesRequest, protos.google.cloud.security.privateca.v1.IListCertificateTemplatesResponse | null | undefined, protos.google.cloud.security.privateca.v1.ICertificateTemplate>): void;
Parameters
NameDescription
request IListCertificateTemplatesRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.security.privateca.v1.IListCertificateTemplatesRequest, protos.google.cloud.security.privateca.v1.IListCertificateTemplatesResponse | null | undefined, protos.google.cloud.security.privateca.v1.ICertificateTemplate>
Returns
TypeDescription
void

listCertificateTemplates(request, callback)

listCertificateTemplates(request: protos.google.cloud.security.privateca.v1.IListCertificateTemplatesRequest, callback: PaginationCallback<protos.google.cloud.security.privateca.v1.IListCertificateTemplatesRequest, protos.google.cloud.security.privateca.v1.IListCertificateTemplatesResponse | null | undefined, protos.google.cloud.security.privateca.v1.ICertificateTemplate>): void;
Parameters
NameDescription
request IListCertificateTemplatesRequest
callback PaginationCallback<protos.google.cloud.security.privateca.v1.IListCertificateTemplatesRequest, protos.google.cloud.security.privateca.v1.IListCertificateTemplatesResponse | null | undefined, protos.google.cloud.security.privateca.v1.ICertificateTemplate>
Returns
TypeDescription
void

listCertificateTemplatesAsync(request, options)

listCertificateTemplatesAsync(request?: protos.google.cloud.security.privateca.v1.IListCertificateTemplatesRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.security.privateca.v1.ICertificateTemplate>;

Equivalent to listCertificateTemplates, but returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters
NameDescription
request IListCertificateTemplatesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.cloud.security.privateca.v1.ICertificateTemplate>

{Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing CertificateTemplate. The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The resource name of the location associated with the
   *  CertificateTemplates google.cloud.security.privateca.v1.CertificateTemplate,
   *  in the format `projects/* /locations/*`.
   */
  // const parent = 'abc123'
  /**
   *  Optional. Limit on the number of
   *  CertificateTemplates google.cloud.security.privateca.v1.CertificateTemplate 
   *  to include in the response. Further
   *  CertificateTemplates google.cloud.security.privateca.v1.CertificateTemplate 
   *  can subsequently be obtained by including the
   *  ListCertificateTemplatesResponse.next_page_token google.cloud.security.privateca.v1.ListCertificateTemplatesResponse.next_page_token 
   *  in a subsequent request. If unspecified, the server will pick an
   *  appropriate default.
   */
  // const pageSize = 1234
  /**
   *  Optional. Pagination token, returned earlier via
   *  ListCertificateTemplatesResponse.next_page_token google.cloud.security.privateca.v1.ListCertificateTemplatesResponse.next_page_token.
   */
  // const pageToken = 'abc123'
  /**
   *  Optional. Only include resources that match the filter in the response.
   */
  // const filter = 'abc123'
  /**
   *  Optional. Specify how the results should be sorted.
   */
  // const orderBy = 'abc123'

  // Imports the Privateca library
  const {CertificateAuthorityServiceClient} = require('@google-cloud/security-private-ca').v1;

  // Instantiates a client
  const privatecaClient = new CertificateAuthorityServiceClient();

  async function callListCertificateTemplates() {
    // Construct request
    const request = {
      parent,
    };

    // Run request
    const iterable = privatecaClient.listCertificateTemplatesAsync(request);
    for await (const response of iterable) {
        console.log(response);
    }
  }

  callListCertificateTemplates();

listCertificateTemplatesStream(request, options)

listCertificateTemplatesStream(request?: protos.google.cloud.security.privateca.v1.IListCertificateTemplatesRequest, options?: CallOptions): Transform;

Equivalent to method.name.toCamelCase(), but returns a NodeJS Stream object.

Parameters
NameDescription
request IListCertificateTemplatesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Transform

{Stream} An object stream which emits an object representing CertificateTemplate on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using listCertificateTemplatesAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listLocationsAsync(request, options)

listLocationsAsync(request: LocationProtos.google.cloud.location.IListLocationsRequest, options?: CallOptions): AsyncIterable<LocationProtos.google.cloud.location.ILocation>;

Lists information about the supported locations for this service. Returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters
NameDescription
request LocationProtos.google.cloud.location.IListLocationsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<google.cloud.location.ILocation>

{Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing . The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples.

Example

const iterable = client.listLocationsAsync(request);
for await (const response of iterable) {
  // process response
}

listOperationsAsync(request, options)

listOperationsAsync(request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions): AsyncIterable<protos.google.longrunning.ListOperationsResponse>;

Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns UNIMPLEMENTED. Returns an iterable object.

For-await-of syntax is used with the iterable to recursively get response element on-demand.

Parameters
NameDescription
request ListOperationsRequest

The request object that will be sent.

options CallOptions

Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details.

Returns
TypeDescription
AsyncIterable<protos.google.longrunning.ListOperationsResponse>

{Object} An iterable Object that conforms to iteration protocols.

Example

const client = longrunning.operationsClient();
for await (const response of client.listOperationsAsync(request));
// doThingsWith(response)

locationPath(project, location)

locationPath(project: string, location: string): string;

Return a fully-qualified location resource name string.

Parameters
NameDescription
project string
location string
Returns
TypeDescription
string

{string} Resource name string.

matchCaPoolFromCaPoolName(caPoolName)

matchCaPoolFromCaPoolName(caPoolName: string): string | number;

Parse the ca_pool from CaPool resource.

Parameter
NameDescription
caPoolName string

A fully-qualified path representing CaPool resource.

Returns
TypeDescription
string | number

{string} A string representing the ca_pool.

matchCaPoolFromCertificateAuthorityName(certificateAuthorityName)

matchCaPoolFromCertificateAuthorityName(certificateAuthorityName: string): string | number;

Parse the ca_pool from CertificateAuthority resource.

Parameter
NameDescription
certificateAuthorityName string

A fully-qualified path representing CertificateAuthority resource.

Returns
TypeDescription
string | number

{string} A string representing the ca_pool.

matchCaPoolFromCertificateName(certificateName)

matchCaPoolFromCertificateName(certificateName: string): string | number;

Parse the ca_pool from Certificate resource.

Parameter
NameDescription
certificateName string

A fully-qualified path representing Certificate resource.

Returns
TypeDescription
string | number

{string} A string representing the ca_pool.

matchCaPoolFromCertificateRevocationListName(certificateRevocationListName)

matchCaPoolFromCertificateRevocationListName(certificateRevocationListName: string): string | number;

Parse the ca_pool from CertificateRevocationList resource.

Parameter
NameDescription
certificateRevocationListName string

A fully-qualified path representing CertificateRevocationList resource.

Returns
TypeDescription
string | number

{string} A string representing the ca_pool.

matchCertificateAuthorityFromCertificateAuthorityName(certificateAuthorityName)

matchCertificateAuthorityFromCertificateAuthorityName(certificateAuthorityName: string): string | number;

Parse the certificate_authority from CertificateAuthority resource.

Parameter
NameDescription
certificateAuthorityName string

A fully-qualified path representing CertificateAuthority resource.

Returns
TypeDescription
string | number

{string} A string representing the certificate_authority.

matchCertificateAuthorityFromCertificateRevocationListName(certificateRevocationListName)

matchCertificateAuthorityFromCertificateRevocationListName(certificateRevocationListName: string): string | number;

Parse the certificate_authority from CertificateRevocationList resource.

Parameter
NameDescription
certificateRevocationListName string

A fully-qualified path representing CertificateRevocationList resource.

Returns
TypeDescription
string | number

{string} A string representing the certificate_authority.

matchCertificateFromCertificateName(certificateName)

matchCertificateFromCertificateName(certificateName: string): string | number;

Parse the certificate from Certificate resource.

Parameter
NameDescription
certificateName string

A fully-qualified path representing Certificate resource.

Returns
TypeDescription
string | number

{string} A string representing the certificate.

matchCertificateRevocationListFromCertificateRevocationListName(certificateRevocationListName)

matchCertificateRevocationListFromCertificateRevocationListName(certificateRevocationListName: string): string | number;

Parse the certificate_revocation_list from CertificateRevocationList resource.

Parameter
NameDescription
certificateRevocationListName string

A fully-qualified path representing CertificateRevocationList resource.

Returns
TypeDescription
string | number

{string} A string representing the certificate_revocation_list.

matchCertificateTemplateFromCertificateTemplateName(certificateTemplateName)

matchCertificateTemplateFromCertificateTemplateName(certificateTemplateName: string): string | number;

Parse the certificate_template from CertificateTemplate resource.

Parameter
NameDescription
certificateTemplateName string

A fully-qualified path representing CertificateTemplate resource.

Returns
TypeDescription
string | number

{string} A string representing the certificate_template.

matchLocationFromCaPoolName(caPoolName)

matchLocationFromCaPoolName(caPoolName: string): string | number;

Parse the location from CaPool resource.

Parameter
NameDescription
caPoolName string

A fully-qualified path representing CaPool resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchLocationFromCertificateAuthorityName(certificateAuthorityName)

matchLocationFromCertificateAuthorityName(certificateAuthorityName: string): string | number;

Parse the location from CertificateAuthority resource.

Parameter
NameDescription
certificateAuthorityName string

A fully-qualified path representing CertificateAuthority resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchLocationFromCertificateName(certificateName)

matchLocationFromCertificateName(certificateName: string): string | number;

Parse the location from Certificate resource.

Parameter
NameDescription
certificateName string

A fully-qualified path representing Certificate resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchLocationFromCertificateRevocationListName(certificateRevocationListName)

matchLocationFromCertificateRevocationListName(certificateRevocationListName: string): string | number;

Parse the location from CertificateRevocationList resource.

Parameter
NameDescription
certificateRevocationListName string

A fully-qualified path representing CertificateRevocationList resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchLocationFromCertificateTemplateName(certificateTemplateName)

matchLocationFromCertificateTemplateName(certificateTemplateName: string): string | number;

Parse the location from CertificateTemplate resource.

Parameter
NameDescription
certificateTemplateName string

A fully-qualified path representing CertificateTemplate resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchLocationFromLocationName(locationName)

matchLocationFromLocationName(locationName: string): string | number;

Parse the location from Location resource.

Parameter
NameDescription
locationName string

A fully-qualified path representing Location resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchProjectFromCaPoolName(caPoolName)

matchProjectFromCaPoolName(caPoolName: string): string | number;

Parse the project from CaPool resource.

Parameter
NameDescription
caPoolName string

A fully-qualified path representing CaPool resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromCertificateAuthorityName(certificateAuthorityName)

matchProjectFromCertificateAuthorityName(certificateAuthorityName: string): string | number;

Parse the project from CertificateAuthority resource.

Parameter
NameDescription
certificateAuthorityName string

A fully-qualified path representing CertificateAuthority resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromCertificateName(certificateName)

matchProjectFromCertificateName(certificateName: string): string | number;

Parse the project from Certificate resource.

Parameter
NameDescription
certificateName string

A fully-qualified path representing Certificate resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromCertificateRevocationListName(certificateRevocationListName)

matchProjectFromCertificateRevocationListName(certificateRevocationListName: string): string | number;

Parse the project from CertificateRevocationList resource.

Parameter
NameDescription
certificateRevocationListName string

A fully-qualified path representing CertificateRevocationList resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromCertificateTemplateName(certificateTemplateName)

matchProjectFromCertificateTemplateName(certificateTemplateName: string): string | number;

Parse the project from CertificateTemplate resource.

Parameter
NameDescription
certificateTemplateName string

A fully-qualified path representing CertificateTemplate resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromLocationName(locationName)

matchProjectFromLocationName(locationName: string): string | number;

Parse the project from Location resource.

Parameter
NameDescription
locationName string

A fully-qualified path representing Location resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

revokeCertificate(request, options)

revokeCertificate(request?: protos.google.cloud.security.privateca.v1.IRevokeCertificateRequest, options?: CallOptions): Promise<[
        protos.google.cloud.security.privateca.v1.ICertificate,
        (protos.google.cloud.security.privateca.v1.IRevokeCertificateRequest | undefined),
        {} | undefined
    ]>;

Revoke a .

Parameters
NameDescription
request IRevokeCertificateRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.security.privateca.v1.ICertificate, (protos.google.cloud.security.privateca.v1.IRevokeCertificateRequest | undefined), {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The resource name for this
   *  Certificate google.cloud.security.privateca.v1.Certificate  in the format
   *  `projects/* /locations/* /caPools/* /certificates/*`.
   */
  // const name = 'abc123'
  /**
   *  Required. The
   *  RevocationReason google.cloud.security.privateca.v1.RevocationReason  for
   *  revoking this certificate.
   */
  // const reason = {}
  /**
   *  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).
   */
  // const requestId = 'abc123'

  // Imports the Privateca library
  const {CertificateAuthorityServiceClient} = require('@google-cloud/security-private-ca').v1;

  // Instantiates a client
  const privatecaClient = new CertificateAuthorityServiceClient();

  async function callRevokeCertificate() {
    // Construct request
    const request = {
      name,
      reason,
    };

    // Run request
    const response = await privatecaClient.revokeCertificate(request);
    console.log(response);
  }

  callRevokeCertificate();

revokeCertificate(request, options, callback)

revokeCertificate(request: protos.google.cloud.security.privateca.v1.IRevokeCertificateRequest, options: CallOptions, callback: Callback<protos.google.cloud.security.privateca.v1.ICertificate, protos.google.cloud.security.privateca.v1.IRevokeCertificateRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IRevokeCertificateRequest
options CallOptions
callback Callback<protos.google.cloud.security.privateca.v1.ICertificate, protos.google.cloud.security.privateca.v1.IRevokeCertificateRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

revokeCertificate(request, callback)

revokeCertificate(request: protos.google.cloud.security.privateca.v1.IRevokeCertificateRequest, callback: Callback<protos.google.cloud.security.privateca.v1.ICertificate, protos.google.cloud.security.privateca.v1.IRevokeCertificateRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IRevokeCertificateRequest
callback Callback<protos.google.cloud.security.privateca.v1.ICertificate, protos.google.cloud.security.privateca.v1.IRevokeCertificateRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

setIamPolicy(request, options, callback)

setIamPolicy(request: IamProtos.google.iam.v1.SetIamPolicyRequest, options?: gax.CallOptions | Callback<IamProtos.google.iam.v1.Policy, IamProtos.google.iam.v1.SetIamPolicyRequest | null | undefined, {} | null | undefined>, callback?: Callback<IamProtos.google.iam.v1.Policy, IamProtos.google.iam.v1.SetIamPolicyRequest | null | undefined, {} | null | undefined>): Promise<[IamProtos.google.iam.v1.Policy]>;

Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.

Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning.

Parameters
NameDescription
request IamProtos.google.iam.v1.SetIamPolicyRequest

The request object that will be sent.

options CallOptions | Callback<google.iam.v1.Policy, google.iam.v1.SetIamPolicyRequest | null | undefined, {} | null | undefined>

Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details.

callback Callback<google.iam.v1.Policy, google.iam.v1.SetIamPolicyRequest | null | undefined, {} | null | undefined>

The function which will be called with the result of the API call.

The second parameter to the callback is an object representing .

Returns
TypeDescription
Promise<[google.iam.v1.Policy]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . The promise has a method named "cancel" which cancels the ongoing API call.

testIamPermissions(request, options, callback)

testIamPermissions(request: IamProtos.google.iam.v1.TestIamPermissionsRequest, options?: gax.CallOptions | Callback<IamProtos.google.iam.v1.TestIamPermissionsResponse, IamProtos.google.iam.v1.TestIamPermissionsRequest | null | undefined, {} | null | undefined>, callback?: Callback<IamProtos.google.iam.v1.TestIamPermissionsResponse, IamProtos.google.iam.v1.TestIamPermissionsRequest | null | undefined, {} | null | undefined>): Promise<[IamProtos.google.iam.v1.TestIamPermissionsResponse]>;

Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.

Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning.

Parameters
NameDescription
request IamProtos.google.iam.v1.TestIamPermissionsRequest

The request object that will be sent.

options CallOptions | Callback<google.iam.v1.TestIamPermissionsResponse, google.iam.v1.TestIamPermissionsRequest | null | undefined, {} | null | undefined>

Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details.

callback Callback<google.iam.v1.TestIamPermissionsResponse, google.iam.v1.TestIamPermissionsRequest | null | undefined, {} | null | undefined>

The function which will be called with the result of the API call.

The second parameter to the callback is an object representing .

Returns
TypeDescription
Promise<[google.iam.v1.TestIamPermissionsResponse]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . The promise has a method named "cancel" which cancels the ongoing API call.

undeleteCertificateAuthority(request, options)

undeleteCertificateAuthority(request?: protos.google.cloud.security.privateca.v1.IUndeleteCertificateAuthorityRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.security.privateca.v1.ICertificateAuthority, protos.google.cloud.security.privateca.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Undelete a that has been deleted.

Parameters
NameDescription
request IUndeleteCertificateAuthorityRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.security.privateca.v1.ICertificateAuthority, protos.google.cloud.security.privateca.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The resource name for this
   *  CertificateAuthority google.cloud.security.privateca.v1.CertificateAuthority 
   *  in the format `projects/* /locations/* /caPools/* /certificateAuthorities/*`.
   */
  // const name = 'abc123'
  /**
   *  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).
   */
  // const requestId = 'abc123'

  // Imports the Privateca library
  const {CertificateAuthorityServiceClient} = require('@google-cloud/security-private-ca').v1;

  // Instantiates a client
  const privatecaClient = new CertificateAuthorityServiceClient();

  async function callUndeleteCertificateAuthority() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const [operation] = await privatecaClient.undeleteCertificateAuthority(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callUndeleteCertificateAuthority();

undeleteCertificateAuthority(request, options, callback)

undeleteCertificateAuthority(request: protos.google.cloud.security.privateca.v1.IUndeleteCertificateAuthorityRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.security.privateca.v1.ICertificateAuthority, protos.google.cloud.security.privateca.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IUndeleteCertificateAuthorityRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.security.privateca.v1.ICertificateAuthority, protos.google.cloud.security.privateca.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

undeleteCertificateAuthority(request, callback)

undeleteCertificateAuthority(request: protos.google.cloud.security.privateca.v1.IUndeleteCertificateAuthorityRequest, callback: Callback<LROperation<protos.google.cloud.security.privateca.v1.ICertificateAuthority, protos.google.cloud.security.privateca.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IUndeleteCertificateAuthorityRequest
callback Callback<LROperation<protos.google.cloud.security.privateca.v1.ICertificateAuthority, protos.google.cloud.security.privateca.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateCaPool(request, options)

updateCaPool(request?: protos.google.cloud.security.privateca.v1.IUpdateCaPoolRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.security.privateca.v1.ICaPool, protos.google.cloud.security.privateca.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Update a .

Parameters
NameDescription
request IUpdateCaPoolRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.security.privateca.v1.ICaPool, protos.google.cloud.security.privateca.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. CaPool google.cloud.security.privateca.v1.CaPool  with updated
   *  values.
   */
  // const caPool = {}
  /**
   *  Required. A list of fields to be updated in this request.
   */
  // const updateMask = {}
  /**
   *  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).
   */
  // const requestId = 'abc123'

  // Imports the Privateca library
  const {CertificateAuthorityServiceClient} = require('@google-cloud/security-private-ca').v1;

  // Instantiates a client
  const privatecaClient = new CertificateAuthorityServiceClient();

  async function callUpdateCaPool() {
    // Construct request
    const request = {
      caPool,
      updateMask,
    };

    // Run request
    const [operation] = await privatecaClient.updateCaPool(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callUpdateCaPool();

updateCaPool(request, options, callback)

updateCaPool(request: protos.google.cloud.security.privateca.v1.IUpdateCaPoolRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.security.privateca.v1.ICaPool, protos.google.cloud.security.privateca.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IUpdateCaPoolRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.security.privateca.v1.ICaPool, protos.google.cloud.security.privateca.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateCaPool(request, callback)

updateCaPool(request: protos.google.cloud.security.privateca.v1.IUpdateCaPoolRequest, callback: Callback<LROperation<protos.google.cloud.security.privateca.v1.ICaPool, protos.google.cloud.security.privateca.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IUpdateCaPoolRequest
callback Callback<LROperation<protos.google.cloud.security.privateca.v1.ICaPool, protos.google.cloud.security.privateca.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateCertificate(request, options)

updateCertificate(request?: protos.google.cloud.security.privateca.v1.IUpdateCertificateRequest, options?: CallOptions): Promise<[
        protos.google.cloud.security.privateca.v1.ICertificate,
        (protos.google.cloud.security.privateca.v1.IUpdateCertificateRequest | undefined),
        {} | undefined
    ]>;

Update a . Currently, the only field you can update is the field.

Parameters
NameDescription
request IUpdateCertificateRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.security.privateca.v1.ICertificate, (protos.google.cloud.security.privateca.v1.IUpdateCertificateRequest | undefined), {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Certificate google.cloud.security.privateca.v1.Certificate 
   *  with updated values.
   */
  // const certificate = {}
  /**
   *  Required. A list of fields to be updated in this request.
   */
  // const updateMask = {}
  /**
   *  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).
   */
  // const requestId = 'abc123'

  // Imports the Privateca library
  const {CertificateAuthorityServiceClient} = require('@google-cloud/security-private-ca').v1;

  // Instantiates a client
  const privatecaClient = new CertificateAuthorityServiceClient();

  async function callUpdateCertificate() {
    // Construct request
    const request = {
      certificate,
      updateMask,
    };

    // Run request
    const response = await privatecaClient.updateCertificate(request);
    console.log(response);
  }

  callUpdateCertificate();

updateCertificate(request, options, callback)

updateCertificate(request: protos.google.cloud.security.privateca.v1.IUpdateCertificateRequest, options: CallOptions, callback: Callback<protos.google.cloud.security.privateca.v1.ICertificate, protos.google.cloud.security.privateca.v1.IUpdateCertificateRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IUpdateCertificateRequest
options CallOptions
callback Callback<protos.google.cloud.security.privateca.v1.ICertificate, protos.google.cloud.security.privateca.v1.IUpdateCertificateRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateCertificate(request, callback)

updateCertificate(request: protos.google.cloud.security.privateca.v1.IUpdateCertificateRequest, callback: Callback<protos.google.cloud.security.privateca.v1.ICertificate, protos.google.cloud.security.privateca.v1.IUpdateCertificateRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IUpdateCertificateRequest
callback Callback<protos.google.cloud.security.privateca.v1.ICertificate, protos.google.cloud.security.privateca.v1.IUpdateCertificateRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateCertificateAuthority(request, options)

updateCertificateAuthority(request?: protos.google.cloud.security.privateca.v1.IUpdateCertificateAuthorityRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.security.privateca.v1.ICertificateAuthority, protos.google.cloud.security.privateca.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Update a .

Parameters
NameDescription
request IUpdateCertificateAuthorityRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.security.privateca.v1.ICertificateAuthority, protos.google.cloud.security.privateca.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required.
   *  CertificateAuthority google.cloud.security.privateca.v1.CertificateAuthority 
   *  with updated values.
   */
  // const certificateAuthority = {}
  /**
   *  Required. A list of fields to be updated in this request.
   */
  // const updateMask = {}
  /**
   *  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).
   */
  // const requestId = 'abc123'

  // Imports the Privateca library
  const {CertificateAuthorityServiceClient} = require('@google-cloud/security-private-ca').v1;

  // Instantiates a client
  const privatecaClient = new CertificateAuthorityServiceClient();

  async function callUpdateCertificateAuthority() {
    // Construct request
    const request = {
      certificateAuthority,
      updateMask,
    };

    // Run request
    const [operation] = await privatecaClient.updateCertificateAuthority(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callUpdateCertificateAuthority();

updateCertificateAuthority(request, options, callback)

updateCertificateAuthority(request: protos.google.cloud.security.privateca.v1.IUpdateCertificateAuthorityRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.security.privateca.v1.ICertificateAuthority, protos.google.cloud.security.privateca.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IUpdateCertificateAuthorityRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.security.privateca.v1.ICertificateAuthority, protos.google.cloud.security.privateca.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateCertificateAuthority(request, callback)

updateCertificateAuthority(request: protos.google.cloud.security.privateca.v1.IUpdateCertificateAuthorityRequest, callback: Callback<LROperation<protos.google.cloud.security.privateca.v1.ICertificateAuthority, protos.google.cloud.security.privateca.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IUpdateCertificateAuthorityRequest
callback Callback<LROperation<protos.google.cloud.security.privateca.v1.ICertificateAuthority, protos.google.cloud.security.privateca.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateCertificateRevocationList(request, options)

updateCertificateRevocationList(request?: protos.google.cloud.security.privateca.v1.IUpdateCertificateRevocationListRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.security.privateca.v1.ICertificateRevocationList, protos.google.cloud.security.privateca.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Update a .

Parameters
NameDescription
request IUpdateCertificateRevocationListRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.security.privateca.v1.ICertificateRevocationList, protos.google.cloud.security.privateca.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required.
   *  CertificateRevocationList google.cloud.security.privateca.v1.CertificateRevocationList 
   *  with updated values.
   */
  // const certificateRevocationList = {}
  /**
   *  Required. A list of fields to be updated in this request.
   */
  // const updateMask = {}
  /**
   *  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).
   */
  // const requestId = 'abc123'

  // Imports the Privateca library
  const {CertificateAuthorityServiceClient} = require('@google-cloud/security-private-ca').v1;

  // Instantiates a client
  const privatecaClient = new CertificateAuthorityServiceClient();

  async function callUpdateCertificateRevocationList() {
    // Construct request
    const request = {
      certificateRevocationList,
      updateMask,
    };

    // Run request
    const [operation] = await privatecaClient.updateCertificateRevocationList(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callUpdateCertificateRevocationList();

updateCertificateRevocationList(request, options, callback)

updateCertificateRevocationList(request: protos.google.cloud.security.privateca.v1.IUpdateCertificateRevocationListRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.security.privateca.v1.ICertificateRevocationList, protos.google.cloud.security.privateca.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IUpdateCertificateRevocationListRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.security.privateca.v1.ICertificateRevocationList, protos.google.cloud.security.privateca.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateCertificateRevocationList(request, callback)

updateCertificateRevocationList(request: protos.google.cloud.security.privateca.v1.IUpdateCertificateRevocationListRequest, callback: Callback<LROperation<protos.google.cloud.security.privateca.v1.ICertificateRevocationList, protos.google.cloud.security.privateca.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IUpdateCertificateRevocationListRequest
callback Callback<LROperation<protos.google.cloud.security.privateca.v1.ICertificateRevocationList, protos.google.cloud.security.privateca.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateCertificateTemplate(request, options)

updateCertificateTemplate(request?: protos.google.cloud.security.privateca.v1.IUpdateCertificateTemplateRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.security.privateca.v1.ICertificateTemplate, protos.google.cloud.security.privateca.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;
Parameters
NameDescription
request IUpdateCertificateTemplateRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.security.privateca.v1.ICertificateTemplate, protos.google.cloud.security.privateca.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required.
   *  CertificateTemplate google.cloud.security.privateca.v1.CertificateTemplate 
   *  with updated values.
   */
  // const certificateTemplate = {}
  /**
   *  Required. A list of fields to be updated in this request.
   */
  // const updateMask = {}
  /**
   *  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).
   */
  // const requestId = 'abc123'

  // Imports the Privateca library
  const {CertificateAuthorityServiceClient} = require('@google-cloud/security-private-ca').v1;

  // Instantiates a client
  const privatecaClient = new CertificateAuthorityServiceClient();

  async function callUpdateCertificateTemplate() {
    // Construct request
    const request = {
      certificateTemplate,
      updateMask,
    };

    // Run request
    const [operation] = await privatecaClient.updateCertificateTemplate(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callUpdateCertificateTemplate();

updateCertificateTemplate(request, options, callback)

updateCertificateTemplate(request: protos.google.cloud.security.privateca.v1.IUpdateCertificateTemplateRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.security.privateca.v1.ICertificateTemplate, protos.google.cloud.security.privateca.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IUpdateCertificateTemplateRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.security.privateca.v1.ICertificateTemplate, protos.google.cloud.security.privateca.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateCertificateTemplate(request, callback)

updateCertificateTemplate(request: protos.google.cloud.security.privateca.v1.IUpdateCertificateTemplateRequest, callback: Callback<LROperation<protos.google.cloud.security.privateca.v1.ICertificateTemplate, protos.google.cloud.security.privateca.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IUpdateCertificateTemplateRequest
callback Callback<LROperation<protos.google.cloud.security.privateca.v1.ICertificateTemplate, protos.google.cloud.security.privateca.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void