Class v1beta1.PublicCertificateAuthorityServiceClient (0.1.5)

Manages the resources required for ACME [external account binding](https://tools.ietf.org/html/rfc8555#section-7.3.4) for the public certificate authority service. v1beta1

Package

@google-cloud/publicca

Constructors

(constructor)(opts, gaxInstance)

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

Construct an instance of PublicCertificateAuthorityServiceClient.

Parameters
NameDescription
opts ClientOptions
gaxInstance typeof gax | typeof gax.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 PublicCertificateAuthorityServiceClient({fallback: 'rest'}, gax); ```

Properties

apiEndpoint

static get apiEndpoint(): string;

The DNS address for this API service - same as servicePath(), exists for compatibility reasons.

auth

auth: gax.GoogleAuth;

descriptors

descriptors: Descriptors;

innerApiCalls

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

pathTemplates

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

port

static get port(): number;

The port for this API service.

publicCertificateAuthorityServiceStub

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

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.

warn

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

Methods

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.

createExternalAccountKey(request, options)

createExternalAccountKey(request?: protos.google.cloud.security.publicca.v1beta1.ICreateExternalAccountKeyRequest, options?: CallOptions): Promise<[
        protos.google.cloud.security.publicca.v1beta1.IExternalAccountKey,
        (protos.google.cloud.security.publicca.v1beta1.ICreateExternalAccountKeyRequest | undefined),
        {} | undefined
    ]>;

Creates a new bound to the project.

Parameters
NameDescription
request protos.google.cloud.security.publicca.v1beta1.ICreateExternalAccountKeyRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.security.publicca.v1beta1.IExternalAccountKey, (protos.google.cloud.security.publicca.v1beta1.ICreateExternalAccountKeyRequest | undefined), {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) 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 parent resource where this external_account_key will be created.
   *  Format: projects/[project_id]/locations/[location].
   *  At present only the "global" location is supported.
   */
  // const parent = 'abc123'
  /**
   *  Required. The external account key to create. This field only exists to future-proof
   *  the API. At present, all fields in ExternalAccountKey are output only and
   *  all values are ignored. For the purpose of the
   *  CreateExternalAccountKeyRequest, set it to a default/empty value.
   */
  // const externalAccountKey = {}

  // Imports the Publicca library
  const {PublicCertificateAuthorityServiceClient} = require('@google-cloud/publicca').v1beta1;

  // Instantiates a client
  const publiccaClient = new PublicCertificateAuthorityServiceClient();

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

    // Run request
    const response = await publiccaClient.createExternalAccountKey(request);
    console.log(response);
  }

  callCreateExternalAccountKey();

createExternalAccountKey(request, options, callback)

createExternalAccountKey(request: protos.google.cloud.security.publicca.v1beta1.ICreateExternalAccountKeyRequest, options: CallOptions, callback: Callback<protos.google.cloud.security.publicca.v1beta1.IExternalAccountKey, protos.google.cloud.security.publicca.v1beta1.ICreateExternalAccountKeyRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.security.publicca.v1beta1.ICreateExternalAccountKeyRequest
options CallOptions
callback Callback<protos.google.cloud.security.publicca.v1beta1.IExternalAccountKey, protos.google.cloud.security.publicca.v1beta1.ICreateExternalAccountKeyRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createExternalAccountKey(request, callback)

createExternalAccountKey(request: protos.google.cloud.security.publicca.v1beta1.ICreateExternalAccountKeyRequest, callback: Callback<protos.google.cloud.security.publicca.v1beta1.IExternalAccountKey, protos.google.cloud.security.publicca.v1beta1.ICreateExternalAccountKeyRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.security.publicca.v1beta1.ICreateExternalAccountKeyRequest
callback Callback<protos.google.cloud.security.publicca.v1beta1.IExternalAccountKey, protos.google.cloud.security.publicca.v1beta1.ICreateExternalAccountKeyRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

externalAccountKeyPath(project, location, externalAccountKey)

externalAccountKeyPath(project: string, location: string, externalAccountKey: string): string;

Return a fully-qualified externalAccountKey resource name string.

Parameters
NameDescription
project string
location string
externalAccountKey string
Returns
TypeDescription
string

{string} Resource name string.

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.

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.

matchExternalAccountKeyFromExternalAccountKeyName(externalAccountKeyName)

matchExternalAccountKeyFromExternalAccountKeyName(externalAccountKeyName: string): string | number;

Parse the external_account_key from ExternalAccountKey resource.

Parameter
NameDescription
externalAccountKeyName string

A fully-qualified path representing ExternalAccountKey resource.

Returns
TypeDescription
string | number

{string} A string representing the external_account_key.

matchLocationFromExternalAccountKeyName(externalAccountKeyName)

matchLocationFromExternalAccountKeyName(externalAccountKeyName: string): string | number;

Parse the location from ExternalAccountKey resource.

Parameter
NameDescription
externalAccountKeyName string

A fully-qualified path representing ExternalAccountKey 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.

matchProjectFromExternalAccountKeyName(externalAccountKeyName)

matchProjectFromExternalAccountKeyName(externalAccountKeyName: string): string | number;

Parse the project from ExternalAccountKey resource.

Parameter
NameDescription
externalAccountKeyName string

A fully-qualified path representing ExternalAccountKey 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.

matchProjectFromProjectName(projectName)

matchProjectFromProjectName(projectName: string): string | number;

Parse the project from Project resource.

Parameter
NameDescription
projectName string

A fully-qualified path representing Project resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

projectPath(project)

projectPath(project: string): string;

Return a fully-qualified project resource name string.

Parameter
NameDescription
project string
Returns
TypeDescription
string

{string} Resource name string.