Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

APIKeys

import { APIKeys } from "https://googleapis.deno.dev/v1/apikeys:v2.ts";

Manages the API keys associated with developer projects.

class APIKeys {
constructor(client?: CredentialsClient, baseUrl?: string);
async keysLookupKey(opts?: KeysLookupKeyOptions): Promise<V2LookupKeyResponse>;
async operationsGet(name: string): Promise<Operation>;
async projectsLocationsKeysCreate(
parent: string,
req: V2Key,
): Promise<Operation>;
async projectsLocationsKeysDelete(name: string, opts?: ProjectsLocationsKeysDeleteOptions): Promise<Operation>;
async projectsLocationsKeysGet(name: string): Promise<V2Key>;
async projectsLocationsKeysGetKeyString(name: string): Promise<V2GetKeyStringResponse>;
async projectsLocationsKeysList(parent: string, opts?: ProjectsLocationsKeysListOptions): Promise<V2ListKeysResponse>;
async projectsLocationsKeysPatch(
name: string,
req: V2Key,
): Promise<Operation>;
async projectsLocationsKeysUndelete(name: string, req: V2UndeleteKeyRequest): Promise<Operation>;
}

§Constructors

§
new APIKeys(client?: CredentialsClient, baseUrl?: string)
[src]

§Methods

§
keysLookupKey(opts?: KeysLookupKeyOptions): Promise<V2LookupKeyResponse>
[src]

Find the parent project and resource name of the API key that matches the key string in the request. If the API key has been purged, resource name will not be set. The service account must have the apikeys.keys.lookup permission on the parent project.

§
operationsGet(name: string): Promise<Operation>
[src]

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.

@param name

The name of the operation resource.

§
projectsLocationsKeysCreate(parent: string, req: V2Key, opts?: ProjectsLocationsKeysCreateOptions): Promise<Operation>
[src]

Creates a new API key. NOTE: Key is a global resource; hence the only supported value for location is global.

@param parent

Required. The project in which the API key is created.

§
projectsLocationsKeysDelete(name: string, opts?: ProjectsLocationsKeysDeleteOptions): Promise<Operation>
[src]

Deletes an API key. Deleted key can be retrieved within 30 days of deletion. Afterward, key will be purged from the project. NOTE: Key is a global resource; hence the only supported value for location is global.

@param name

Required. The resource name of the API key to be deleted.

§
projectsLocationsKeysGet(name: string): Promise<V2Key>
[src]

Gets the metadata for an API key. The key string of the API key isn't included in the response. NOTE: Key is a global resource; hence the only supported value for location is global.

@param name

Required. The resource name of the API key to get.

§
projectsLocationsKeysGetKeyString(name: string): Promise<V2GetKeyStringResponse>
[src]

Get the key string for an API key. NOTE: Key is a global resource; hence the only supported value for location is global.

@param name

Required. The resource name of the API key to be retrieved.

§
projectsLocationsKeysList(parent: string, opts?: ProjectsLocationsKeysListOptions): Promise<V2ListKeysResponse>
[src]

Lists the API keys owned by a project. The key string of the API key isn't included in the response. NOTE: Key is a global resource; hence the only supported value for location is global.

@param parent

Required. Lists all API keys associated with this project.

§
projectsLocationsKeysPatch(name: string, req: V2Key, opts?: ProjectsLocationsKeysPatchOptions): Promise<Operation>
[src]

Patches the modifiable fields of an API key. The key string of the API key isn't included in the response. NOTE: Key is a global resource; hence the only supported value for location is global.

@param name

Output only. The resource name of the key. The name has the form: projects//locations/global/keys/. For example: projects/123456867718/locations/global/keys/b7ff1f9f-8275-410a-94dd-3855ee9b5dd2 NOTE: Key is a global resource; hence the only supported value for location is global.

§
projectsLocationsKeysUndelete(name: string, req: V2UndeleteKeyRequest): Promise<Operation>
[src]

Undeletes an API key which was deleted within 30 days. NOTE: Key is a global resource; hence the only supported value for location is global.

@param name

Required. The resource name of the API key to be undeleted.