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/publiccaConstructors
(constructor)(opts, gaxInstance)
constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback);
Construct an instance of PublicCertificateAuthorityServiceClient.
Parameters | |
---|---|
Name | Description |
opts |
ClientOptions
|
gaxInstance |
typeof gax | typeof gax.fallback
: loaded instance of |
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 | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
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 | |
---|---|
Type | Description |
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. |
/**
* 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 | |
---|---|
Name | Description |
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 | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
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 | |
---|---|
Type | Description |
void |
externalAccountKeyPath(project, location, externalAccountKey)
externalAccountKeyPath(project: string, location: string, externalAccountKey: string): string;
Return a fully-qualified externalAccountKey resource name string.
Parameters | |
---|---|
Name | Description |
project |
string
|
location |
string
|
externalAccountKey |
string
|
Returns | |
---|---|
Type | Description |
string | {string} Resource name string. |
getProjectId()
getProjectId(): Promise<string>;
Returns | |
---|---|
Type | Description |
Promise<string> |
getProjectId(callback)
getProjectId(callback: Callback<string, undefined, undefined>): void;
Parameter | |
---|---|
Name | Description |
callback |
Callback<string, undefined, undefined>
|
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
project |
string
|
location |
string
|
Returns | |
---|---|
Type | Description |
string | {string} Resource name string. |
matchExternalAccountKeyFromExternalAccountKeyName(externalAccountKeyName)
matchExternalAccountKeyFromExternalAccountKeyName(externalAccountKeyName: string): string | number;
Parse the external_account_key from ExternalAccountKey resource.
Parameter | |
---|---|
Name | Description |
externalAccountKeyName |
string
A fully-qualified path representing ExternalAccountKey resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the external_account_key. |
matchLocationFromExternalAccountKeyName(externalAccountKeyName)
matchLocationFromExternalAccountKeyName(externalAccountKeyName: string): string | number;
Parse the location from ExternalAccountKey resource.
Parameter | |
---|---|
Name | Description |
externalAccountKeyName |
string
A fully-qualified path representing ExternalAccountKey resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the location. |
matchLocationFromLocationName(locationName)
matchLocationFromLocationName(locationName: string): string | number;
Parse the location from Location resource.
Parameter | |
---|---|
Name | Description |
locationName |
string
A fully-qualified path representing Location resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the location. |
matchProjectFromExternalAccountKeyName(externalAccountKeyName)
matchProjectFromExternalAccountKeyName(externalAccountKeyName: string): string | number;
Parse the project from ExternalAccountKey resource.
Parameter | |
---|---|
Name | Description |
externalAccountKeyName |
string
A fully-qualified path representing ExternalAccountKey resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the project. |
matchProjectFromLocationName(locationName)
matchProjectFromLocationName(locationName: string): string | number;
Parse the project from Location resource.
Parameter | |
---|---|
Name | Description |
locationName |
string
A fully-qualified path representing Location resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the project. |
matchProjectFromProjectName(projectName)
matchProjectFromProjectName(projectName: string): string | number;
Parse the project from Project resource.
Parameter | |
---|---|
Name | Description |
projectName |
string
A fully-qualified path representing Project resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the project. |
projectPath(project)
projectPath(project: string): string;
Return a fully-qualified project resource name string.
Parameter | |
---|---|
Name | Description |
project |
string
|
Returns | |
---|---|
Type | Description |
string | {string} Resource name string. |