Class v1.AuthorizedCertificatesClient (3.2.0)

Manages SSL certificates a user is authorized to administer. A user can administer any SSL certificates applicable to their authorized domains. v1

Package

@google-cloud/appengine-admin

Constructors

(constructor)(opts, gaxInstance)

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

Construct an instance of AuthorizedCertificatesClient.

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 AuthorizedCertificatesClient({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;

authorizedCertificatesStub

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

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.

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

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.

createAuthorizedCertificate(request, options)

createAuthorizedCertificate(request?: protos.google.appengine.v1.ICreateAuthorizedCertificateRequest, options?: CallOptions): Promise<[
        protos.google.appengine.v1.IAuthorizedCertificate,
        (protos.google.appengine.v1.ICreateAuthorizedCertificateRequest | undefined),
        {} | undefined
    ]>;

Uploads the specified SSL certificate.

Parameters
NameDescription
request ICreateAuthorizedCertificateRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.appengine.v1.IAuthorizedCertificate, (protos.google.appengine.v1.ICreateAuthorizedCertificateRequest | undefined), {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing AuthorizedCertificate. 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.
   */
  /**
   *  Name of the parent `Application` resource. Example: `apps/myapp`.
   */
  // const parent = 'abc123'
  /**
   *  SSL certificate data.
   */
  // const certificate = {}

  // Imports the Appengine library
  const {AuthorizedCertificatesClient} = require('@google-cloud/appengine-admin').v1;

  // Instantiates a client
  const appengineClient = new AuthorizedCertificatesClient();

  async function callCreateAuthorizedCertificate() {
    // Construct request
    const request = {
    };

    // Run request
    const response = await appengineClient.createAuthorizedCertificate(request);
    console.log(response);
  }

  callCreateAuthorizedCertificate();

createAuthorizedCertificate(request, options, callback)

createAuthorizedCertificate(request: protos.google.appengine.v1.ICreateAuthorizedCertificateRequest, options: CallOptions, callback: Callback<protos.google.appengine.v1.IAuthorizedCertificate, protos.google.appengine.v1.ICreateAuthorizedCertificateRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request ICreateAuthorizedCertificateRequest
options CallOptions
callback Callback<protos.google.appengine.v1.IAuthorizedCertificate, protos.google.appengine.v1.ICreateAuthorizedCertificateRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createAuthorizedCertificate(request, callback)

createAuthorizedCertificate(request: protos.google.appengine.v1.ICreateAuthorizedCertificateRequest, callback: Callback<protos.google.appengine.v1.IAuthorizedCertificate, protos.google.appengine.v1.ICreateAuthorizedCertificateRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request ICreateAuthorizedCertificateRequest
callback Callback<protos.google.appengine.v1.IAuthorizedCertificate, protos.google.appengine.v1.ICreateAuthorizedCertificateRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteAuthorizedCertificate(request, options)

deleteAuthorizedCertificate(request?: protos.google.appengine.v1.IDeleteAuthorizedCertificateRequest, options?: CallOptions): Promise<[
        protos.google.protobuf.IEmpty,
        (protos.google.appengine.v1.IDeleteAuthorizedCertificateRequest | undefined),
        {} | undefined
    ]>;

Deletes the specified SSL certificate.

Parameters
NameDescription
request IDeleteAuthorizedCertificateRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.protobuf.IEmpty, (protos.google.appengine.v1.IDeleteAuthorizedCertificateRequest | undefined), {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing Empty. 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.
   */
  /**
   *  Name of the resource to delete. Example:
   *  `apps/myapp/authorizedCertificates/12345`.
   */
  // const name = 'abc123'

  // Imports the Appengine library
  const {AuthorizedCertificatesClient} = require('@google-cloud/appengine-admin').v1;

  // Instantiates a client
  const appengineClient = new AuthorizedCertificatesClient();

  async function callDeleteAuthorizedCertificate() {
    // Construct request
    const request = {
    };

    // Run request
    const response = await appengineClient.deleteAuthorizedCertificate(request);
    console.log(response);
  }

  callDeleteAuthorizedCertificate();

deleteAuthorizedCertificate(request, options, callback)

deleteAuthorizedCertificate(request: protos.google.appengine.v1.IDeleteAuthorizedCertificateRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.appengine.v1.IDeleteAuthorizedCertificateRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IDeleteAuthorizedCertificateRequest
options CallOptions
callback Callback<protos.google.protobuf.IEmpty, protos.google.appengine.v1.IDeleteAuthorizedCertificateRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteAuthorizedCertificate(request, callback)

deleteAuthorizedCertificate(request: protos.google.appengine.v1.IDeleteAuthorizedCertificateRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.appengine.v1.IDeleteAuthorizedCertificateRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IDeleteAuthorizedCertificateRequest
callback Callback<protos.google.protobuf.IEmpty, protos.google.appengine.v1.IDeleteAuthorizedCertificateRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getAuthorizedCertificate(request, options)

getAuthorizedCertificate(request?: protos.google.appengine.v1.IGetAuthorizedCertificateRequest, options?: CallOptions): Promise<[
        protos.google.appengine.v1.IAuthorizedCertificate,
        protos.google.appengine.v1.IGetAuthorizedCertificateRequest | undefined,
        {} | undefined
    ]>;

Gets the specified SSL certificate.

Parameters
NameDescription
request IGetAuthorizedCertificateRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.appengine.v1.IAuthorizedCertificate, protos.google.appengine.v1.IGetAuthorizedCertificateRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing AuthorizedCertificate. 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.
   */
  /**
   *  Name of the resource requested. Example:
   *  `apps/myapp/authorizedCertificates/12345`.
   */
  // const name = 'abc123'
  /**
   *  Controls the set of fields returned in the `GET` response.
   */
  // const view = {}

  // Imports the Appengine library
  const {AuthorizedCertificatesClient} = require('@google-cloud/appengine-admin').v1;

  // Instantiates a client
  const appengineClient = new AuthorizedCertificatesClient();

  async function callGetAuthorizedCertificate() {
    // Construct request
    const request = {
    };

    // Run request
    const response = await appengineClient.getAuthorizedCertificate(request);
    console.log(response);
  }

  callGetAuthorizedCertificate();

getAuthorizedCertificate(request, options, callback)

getAuthorizedCertificate(request: protos.google.appengine.v1.IGetAuthorizedCertificateRequest, options: CallOptions, callback: Callback<protos.google.appengine.v1.IAuthorizedCertificate, protos.google.appengine.v1.IGetAuthorizedCertificateRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IGetAuthorizedCertificateRequest
options CallOptions
callback Callback<protos.google.appengine.v1.IAuthorizedCertificate, protos.google.appengine.v1.IGetAuthorizedCertificateRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getAuthorizedCertificate(request, callback)

getAuthorizedCertificate(request: protos.google.appengine.v1.IGetAuthorizedCertificateRequest, callback: Callback<protos.google.appengine.v1.IAuthorizedCertificate, protos.google.appengine.v1.IGetAuthorizedCertificateRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IGetAuthorizedCertificateRequest
callback Callback<protos.google.appengine.v1.IAuthorizedCertificate, protos.google.appengine.v1.IGetAuthorizedCertificateRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

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.

instancePath(app, service, version, instance)

instancePath(app: string, service: string, version: string, instance: string): string;

Return a fully-qualified instance resource name string.

Parameters
NameDescription
app string
service string
version string
instance string
Returns
TypeDescription
string

{string} Resource name string.

listAuthorizedCertificates(request, options)

listAuthorizedCertificates(request?: protos.google.appengine.v1.IListAuthorizedCertificatesRequest, options?: CallOptions): Promise<[
        protos.google.appengine.v1.IAuthorizedCertificate[],
        protos.google.appengine.v1.IListAuthorizedCertificatesRequest | null,
        protos.google.appengine.v1.IListAuthorizedCertificatesResponse
    ]>;

Lists all SSL certificates the user is authorized to administer.

Parameters
NameDescription
request IListAuthorizedCertificatesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.appengine.v1.IAuthorizedCertificate[], protos.google.appengine.v1.IListAuthorizedCertificatesRequest | null, protos.google.appengine.v1.IListAuthorizedCertificatesResponse ]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of AuthorizedCertificate. 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 listAuthorizedCertificatesAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listAuthorizedCertificates(request, options, callback)

listAuthorizedCertificates(request: protos.google.appengine.v1.IListAuthorizedCertificatesRequest, options: CallOptions, callback: PaginationCallback<protos.google.appengine.v1.IListAuthorizedCertificatesRequest, protos.google.appengine.v1.IListAuthorizedCertificatesResponse | null | undefined, protos.google.appengine.v1.IAuthorizedCertificate>): void;
Parameters
NameDescription
request IListAuthorizedCertificatesRequest
options CallOptions
callback PaginationCallback<protos.google.appengine.v1.IListAuthorizedCertificatesRequest, protos.google.appengine.v1.IListAuthorizedCertificatesResponse | null | undefined, protos.google.appengine.v1.IAuthorizedCertificate>
Returns
TypeDescription
void

listAuthorizedCertificates(request, callback)

listAuthorizedCertificates(request: protos.google.appengine.v1.IListAuthorizedCertificatesRequest, callback: PaginationCallback<protos.google.appengine.v1.IListAuthorizedCertificatesRequest, protos.google.appengine.v1.IListAuthorizedCertificatesResponse | null | undefined, protos.google.appengine.v1.IAuthorizedCertificate>): void;
Parameters
NameDescription
request IListAuthorizedCertificatesRequest
callback PaginationCallback<protos.google.appengine.v1.IListAuthorizedCertificatesRequest, protos.google.appengine.v1.IListAuthorizedCertificatesResponse | null | undefined, protos.google.appengine.v1.IAuthorizedCertificate>
Returns
TypeDescription
void

listAuthorizedCertificatesAsync(request, options)

listAuthorizedCertificatesAsync(request?: protos.google.appengine.v1.IListAuthorizedCertificatesRequest, options?: CallOptions): AsyncIterable<protos.google.appengine.v1.IAuthorizedCertificate>;

Equivalent to listAuthorizedCertificates, but returns an iterable object.

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

Parameters
NameDescription
request IListAuthorizedCertificatesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.appengine.v1.IAuthorizedCertificate>

{Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing AuthorizedCertificate. 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.
   */
  /**
   *  Name of the parent `Application` resource. Example: `apps/myapp`.
   */
  // const parent = 'abc123'
  /**
   *  Controls the set of fields returned in the `LIST` response.
   */
  // const view = {}
  /**
   *  Maximum results to return per page.
   */
  // const pageSize = 1234
  /**
   *  Continuation token for fetching the next page of results.
   */
  // const pageToken = 'abc123'

  // Imports the Appengine library
  const {AuthorizedCertificatesClient} = require('@google-cloud/appengine-admin').v1;

  // Instantiates a client
  const appengineClient = new AuthorizedCertificatesClient();

  async function callListAuthorizedCertificates() {
    // Construct request
    const request = {
    };

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

  callListAuthorizedCertificates();

listAuthorizedCertificatesStream(request, options)

listAuthorizedCertificatesStream(request?: protos.google.appengine.v1.IListAuthorizedCertificatesRequest, options?: CallOptions): Transform;

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

Parameters
NameDescription
request IListAuthorizedCertificatesRequest

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 AuthorizedCertificate 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 listAuthorizedCertificatesAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

matchAppFromInstanceName(instanceName)

matchAppFromInstanceName(instanceName: string): string | number;

Parse the app from Instance resource.

Parameter
NameDescription
instanceName string

A fully-qualified path representing Instance resource.

Returns
TypeDescription
string | number

{string} A string representing the app.

matchInstanceFromInstanceName(instanceName)

matchInstanceFromInstanceName(instanceName: string): string | number;

Parse the instance from Instance resource.

Parameter
NameDescription
instanceName string

A fully-qualified path representing Instance resource.

Returns
TypeDescription
string | number

{string} A string representing the instance.

matchServiceFromInstanceName(instanceName)

matchServiceFromInstanceName(instanceName: string): string | number;

Parse the service from Instance resource.

Parameter
NameDescription
instanceName string

A fully-qualified path representing Instance resource.

Returns
TypeDescription
string | number

{string} A string representing the service.

matchVersionFromInstanceName(instanceName)

matchVersionFromInstanceName(instanceName: string): string | number;

Parse the version from Instance resource.

Parameter
NameDescription
instanceName string

A fully-qualified path representing Instance resource.

Returns
TypeDescription
string | number

{string} A string representing the version.

updateAuthorizedCertificate(request, options)

updateAuthorizedCertificate(request?: protos.google.appengine.v1.IUpdateAuthorizedCertificateRequest, options?: CallOptions): Promise<[
        protos.google.appengine.v1.IAuthorizedCertificate,
        (protos.google.appengine.v1.IUpdateAuthorizedCertificateRequest | undefined),
        {} | undefined
    ]>;

Updates the specified SSL certificate. To renew a certificate and maintain its existing domain mappings, update certificate_data with a new certificate. The new certificate must be applicable to the same domains as the original certificate. The certificate display_name may also be updated.

Parameters
NameDescription
request IUpdateAuthorizedCertificateRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.appengine.v1.IAuthorizedCertificate, (protos.google.appengine.v1.IUpdateAuthorizedCertificateRequest | undefined), {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing AuthorizedCertificate. 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.
   */
  /**
   *  Name of the resource to update. Example:
   *  `apps/myapp/authorizedCertificates/12345`.
   */
  // const name = 'abc123'
  /**
   *  An `AuthorizedCertificate` containing the updated resource. Only fields set
   *  in the field mask will be updated.
   */
  // const certificate = {}
  /**
   *  Standard field mask for the set of fields to be updated. Updates are only
   *  supported on the `certificate_raw_data` and `display_name` fields.
   */
  // const updateMask = {}

  // Imports the Appengine library
  const {AuthorizedCertificatesClient} = require('@google-cloud/appengine-admin').v1;

  // Instantiates a client
  const appengineClient = new AuthorizedCertificatesClient();

  async function callUpdateAuthorizedCertificate() {
    // Construct request
    const request = {
    };

    // Run request
    const response = await appengineClient.updateAuthorizedCertificate(request);
    console.log(response);
  }

  callUpdateAuthorizedCertificate();

updateAuthorizedCertificate(request, options, callback)

updateAuthorizedCertificate(request: protos.google.appengine.v1.IUpdateAuthorizedCertificateRequest, options: CallOptions, callback: Callback<protos.google.appengine.v1.IAuthorizedCertificate, protos.google.appengine.v1.IUpdateAuthorizedCertificateRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IUpdateAuthorizedCertificateRequest
options CallOptions
callback Callback<protos.google.appengine.v1.IAuthorizedCertificate, protos.google.appengine.v1.IUpdateAuthorizedCertificateRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateAuthorizedCertificate(request, callback)

updateAuthorizedCertificate(request: protos.google.appengine.v1.IUpdateAuthorizedCertificateRequest, callback: Callback<protos.google.appengine.v1.IAuthorizedCertificate, protos.google.appengine.v1.IUpdateAuthorizedCertificateRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IUpdateAuthorizedCertificateRequest
callback Callback<protos.google.appengine.v1.IAuthorizedCertificate, protos.google.appengine.v1.IUpdateAuthorizedCertificateRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void