import { BaseAPIRequestFactory } from "../../datadog-api-client-common/baseapi"; import { Configuration } from "../../datadog-api-client-common/configuration"; import { RequestContext, ResponseContext } from "../../datadog-api-client-common/http/http"; import { APIKeyCreateRequest } from "../models/APIKeyCreateRequest"; import { APIKeyResponse } from "../models/APIKeyResponse"; import { APIKeysResponse } from "../models/APIKeysResponse"; import { APIKeysSort } from "../models/APIKeysSort"; import { APIKeyUpdateRequest } from "../models/APIKeyUpdateRequest"; import { ApplicationKeyCreateRequest } from "../models/ApplicationKeyCreateRequest"; import { ApplicationKeyResponse } from "../models/ApplicationKeyResponse"; import { ApplicationKeysSort } from "../models/ApplicationKeysSort"; import { ApplicationKeyUpdateRequest } from "../models/ApplicationKeyUpdateRequest"; import { ListApplicationKeysResponse } from "../models/ListApplicationKeysResponse"; import { ListPersonalAccessTokensResponse } from "../models/ListPersonalAccessTokensResponse"; import { PersonalAccessTokenCreateRequest } from "../models/PersonalAccessTokenCreateRequest"; import { PersonalAccessTokenCreateResponse } from "../models/PersonalAccessTokenCreateResponse"; import { PersonalAccessTokenResponse } from "../models/PersonalAccessTokenResponse"; import { PersonalAccessTokensSort } from "../models/PersonalAccessTokensSort"; import { PersonalAccessTokenUpdateRequest } from "../models/PersonalAccessTokenUpdateRequest"; import { ValidateAPIKeyResponse } from "../models/ValidateAPIKeyResponse"; import { ValidateV2Response } from "../models/ValidateV2Response"; export declare class KeyManagementApiRequestFactory extends BaseAPIRequestFactory { createAPIKey(body: APIKeyCreateRequest, _options?: Configuration): Promise; createCurrentUserApplicationKey(body: ApplicationKeyCreateRequest, _options?: Configuration): Promise; createPersonalAccessToken(body: PersonalAccessTokenCreateRequest, _options?: Configuration): Promise; deleteAPIKey(apiKeyId: string, _options?: Configuration): Promise; deleteApplicationKey(appKeyId: string, _options?: Configuration): Promise; deleteCurrentUserApplicationKey(appKeyId: string, _options?: Configuration): Promise; getAPIKey(apiKeyId: string, include?: string, _options?: Configuration): Promise; getApplicationKey(appKeyId: string, include?: string, _options?: Configuration): Promise; getCurrentUserApplicationKey(appKeyId: string, _options?: Configuration): Promise; getPersonalAccessToken(patId: string, _options?: Configuration): Promise; listAPIKeys(pageSize?: number, pageNumber?: number, sort?: APIKeysSort, filter?: string, filterCreatedAtStart?: string, filterCreatedAtEnd?: string, filterModifiedAtStart?: string, filterModifiedAtEnd?: string, include?: string, filterRemoteConfigReadEnabled?: boolean, filterCategory?: string, _options?: Configuration): Promise; listApplicationKeys(pageSize?: number, pageNumber?: number, sort?: ApplicationKeysSort, filter?: string, filterCreatedAtStart?: string, filterCreatedAtEnd?: string, include?: string, _options?: Configuration): Promise; listCurrentUserApplicationKeys(pageSize?: number, pageNumber?: number, sort?: ApplicationKeysSort, filter?: string, filterCreatedAtStart?: string, filterCreatedAtEnd?: string, include?: string, _options?: Configuration): Promise; listPersonalAccessTokens(pageSize?: number, pageNumber?: number, sort?: PersonalAccessTokensSort, filter?: string, filterOwnerUuid?: Array, _options?: Configuration): Promise; revokePersonalAccessToken(patId: string, _options?: Configuration): Promise; updateAPIKey(apiKeyId: string, body: APIKeyUpdateRequest, _options?: Configuration): Promise; updateApplicationKey(appKeyId: string, body: ApplicationKeyUpdateRequest, _options?: Configuration): Promise; updateCurrentUserApplicationKey(appKeyId: string, body: ApplicationKeyUpdateRequest, _options?: Configuration): Promise; updatePersonalAccessToken(patId: string, body: PersonalAccessTokenUpdateRequest, _options?: Configuration): Promise; validate(_options?: Configuration): Promise; validateAPIKey(_options?: Configuration): Promise; } export declare class KeyManagementApiResponseProcessor { /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * * @params response Response returned by the server for a request to createAPIKey * @throws ApiException if the response code was not in [200, 299] */ createAPIKey(response: ResponseContext): Promise; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * * @params response Response returned by the server for a request to createCurrentUserApplicationKey * @throws ApiException if the response code was not in [200, 299] */ createCurrentUserApplicationKey(response: ResponseContext): Promise; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * * @params response Response returned by the server for a request to createPersonalAccessToken * @throws ApiException if the response code was not in [200, 299] */ createPersonalAccessToken(response: ResponseContext): Promise; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * * @params response Response returned by the server for a request to deleteAPIKey * @throws ApiException if the response code was not in [200, 299] */ deleteAPIKey(response: ResponseContext): Promise; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * * @params response Response returned by the server for a request to deleteApplicationKey * @throws ApiException if the response code was not in [200, 299] */ deleteApplicationKey(response: ResponseContext): Promise; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * * @params response Response returned by the server for a request to deleteCurrentUserApplicationKey * @throws ApiException if the response code was not in [200, 299] */ deleteCurrentUserApplicationKey(response: ResponseContext): Promise; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * * @params response Response returned by the server for a request to getAPIKey * @throws ApiException if the response code was not in [200, 299] */ getAPIKey(response: ResponseContext): Promise; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * * @params response Response returned by the server for a request to getApplicationKey * @throws ApiException if the response code was not in [200, 299] */ getApplicationKey(response: ResponseContext): Promise; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * * @params response Response returned by the server for a request to getCurrentUserApplicationKey * @throws ApiException if the response code was not in [200, 299] */ getCurrentUserApplicationKey(response: ResponseContext): Promise; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * * @params response Response returned by the server for a request to getPersonalAccessToken * @throws ApiException if the response code was not in [200, 299] */ getPersonalAccessToken(response: ResponseContext): Promise; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * * @params response Response returned by the server for a request to listAPIKeys * @throws ApiException if the response code was not in [200, 299] */ listAPIKeys(response: ResponseContext): Promise; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * * @params response Response returned by the server for a request to listApplicationKeys * @throws ApiException if the response code was not in [200, 299] */ listApplicationKeys(response: ResponseContext): Promise; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * * @params response Response returned by the server for a request to listCurrentUserApplicationKeys * @throws ApiException if the response code was not in [200, 299] */ listCurrentUserApplicationKeys(response: ResponseContext): Promise; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * * @params response Response returned by the server for a request to listPersonalAccessTokens * @throws ApiException if the response code was not in [200, 299] */ listPersonalAccessTokens(response: ResponseContext): Promise; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * * @params response Response returned by the server for a request to revokePersonalAccessToken * @throws ApiException if the response code was not in [200, 299] */ revokePersonalAccessToken(response: ResponseContext): Promise; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * * @params response Response returned by the server for a request to updateAPIKey * @throws ApiException if the response code was not in [200, 299] */ updateAPIKey(response: ResponseContext): Promise; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * * @params response Response returned by the server for a request to updateApplicationKey * @throws ApiException if the response code was not in [200, 299] */ updateApplicationKey(response: ResponseContext): Promise; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * * @params response Response returned by the server for a request to updateCurrentUserApplicationKey * @throws ApiException if the response code was not in [200, 299] */ updateCurrentUserApplicationKey(response: ResponseContext): Promise; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * * @params response Response returned by the server for a request to updatePersonalAccessToken * @throws ApiException if the response code was not in [200, 299] */ updatePersonalAccessToken(response: ResponseContext): Promise; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * * @params response Response returned by the server for a request to validate * @throws ApiException if the response code was not in [200, 299] */ validate(response: ResponseContext): Promise; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * * @params response Response returned by the server for a request to validateAPIKey * @throws ApiException if the response code was not in [200, 299] */ validateAPIKey(response: ResponseContext): Promise; } export interface KeyManagementApiCreateAPIKeyRequest { /** * @type APIKeyCreateRequest */ body: APIKeyCreateRequest; } export interface KeyManagementApiCreateCurrentUserApplicationKeyRequest { /** * @type ApplicationKeyCreateRequest */ body: ApplicationKeyCreateRequest; } export interface KeyManagementApiCreatePersonalAccessTokenRequest { /** * @type PersonalAccessTokenCreateRequest */ body: PersonalAccessTokenCreateRequest; } export interface KeyManagementApiDeleteAPIKeyRequest { /** * The ID of the API key. * @type string */ apiKeyId: string; } export interface KeyManagementApiDeleteApplicationKeyRequest { /** * The ID of the application key. * @type string */ appKeyId: string; } export interface KeyManagementApiDeleteCurrentUserApplicationKeyRequest { /** * The ID of the application key. * @type string */ appKeyId: string; } export interface KeyManagementApiGetAPIKeyRequest { /** * The ID of the API key. * @type string */ apiKeyId: string; /** * Comma separated list of resource paths for related resources to include in the response. Supported resource paths are `created_by` and `modified_by`. * @type string */ include?: string; } export interface KeyManagementApiGetApplicationKeyRequest { /** * The ID of the application key. * @type string */ appKeyId: string; /** * Resource path for related resources to include in the response. Only `owned_by` is supported. * @type string */ include?: string; } export interface KeyManagementApiGetCurrentUserApplicationKeyRequest { /** * The ID of the application key. * @type string */ appKeyId: string; } export interface KeyManagementApiGetPersonalAccessTokenRequest { /** * The ID of the personal access token. * @type string */ patId: string; } export interface KeyManagementApiListAPIKeysRequest { /** * Size for a given page. The maximum allowed value is 100. * @type number */ pageSize?: number; /** * Specific page number to return. * @type number */ pageNumber?: number; /** * API key attribute used to sort results. Sort order is ascending * by default. In order to specify a descending sort, prefix the * attribute with a minus sign. * @type APIKeysSort */ sort?: APIKeysSort; /** * Filter API keys by the specified string. * @type string */ filter?: string; /** * Only include API keys created on or after the specified date. * @type string */ filterCreatedAtStart?: string; /** * Only include API keys created on or before the specified date. * @type string */ filterCreatedAtEnd?: string; /** * Only include API keys modified on or after the specified date. * @type string */ filterModifiedAtStart?: string; /** * Only include API keys modified on or before the specified date. * @type string */ filterModifiedAtEnd?: string; /** * Comma separated list of resource paths for related resources to include in the response. Supported resource paths are `created_by` and `modified_by`. * @type string */ include?: string; /** * Filter API keys by remote config read enabled status. * @type boolean */ filterRemoteConfigReadEnabled?: boolean; /** * Filter API keys by category. * @type string */ filterCategory?: string; } export interface KeyManagementApiListApplicationKeysRequest { /** * Size for a given page. The maximum allowed value is 100. * @type number */ pageSize?: number; /** * Specific page number to return. * @type number */ pageNumber?: number; /** * Application key attribute used to sort results. Sort order is ascending * by default. In order to specify a descending sort, prefix the * attribute with a minus sign. * @type ApplicationKeysSort */ sort?: ApplicationKeysSort; /** * Filter application keys by the specified string. * @type string */ filter?: string; /** * Only include application keys created on or after the specified date. * @type string */ filterCreatedAtStart?: string; /** * Only include application keys created on or before the specified date. * @type string */ filterCreatedAtEnd?: string; /** * Resource path for related resources to include in the response. Only `owned_by` is supported. * @type string */ include?: string; } export interface KeyManagementApiListCurrentUserApplicationKeysRequest { /** * Size for a given page. The maximum allowed value is 100. * @type number */ pageSize?: number; /** * Specific page number to return. * @type number */ pageNumber?: number; /** * Application key attribute used to sort results. Sort order is ascending * by default. In order to specify a descending sort, prefix the * attribute with a minus sign. * @type ApplicationKeysSort */ sort?: ApplicationKeysSort; /** * Filter application keys by the specified string. * @type string */ filter?: string; /** * Only include application keys created on or after the specified date. * @type string */ filterCreatedAtStart?: string; /** * Only include application keys created on or before the specified date. * @type string */ filterCreatedAtEnd?: string; /** * Resource path for related resources to include in the response. Only `owned_by` is supported. * @type string */ include?: string; } export interface KeyManagementApiListPersonalAccessTokensRequest { /** * Size for a given page. The maximum allowed value is 100. * @type number */ pageSize?: number; /** * Specific page number to return. * @type number */ pageNumber?: number; /** * Personal access token attribute used to sort results. Sort order is ascending * by default. In order to specify a descending sort, prefix the * attribute with a minus sign. * @type PersonalAccessTokensSort */ sort?: PersonalAccessTokensSort; /** * Filter personal access tokens by the specified string. * @type string */ filter?: string; /** * Filter personal access tokens by the owner's UUID. Supports multiple values. * @type Array */ filterOwnerUuid?: Array; } export interface KeyManagementApiRevokePersonalAccessTokenRequest { /** * The ID of the personal access token. * @type string */ patId: string; } export interface KeyManagementApiUpdateAPIKeyRequest { /** * The ID of the API key. * @type string */ apiKeyId: string; /** * @type APIKeyUpdateRequest */ body: APIKeyUpdateRequest; } export interface KeyManagementApiUpdateApplicationKeyRequest { /** * The ID of the application key. * @type string */ appKeyId: string; /** * @type ApplicationKeyUpdateRequest */ body: ApplicationKeyUpdateRequest; } export interface KeyManagementApiUpdateCurrentUserApplicationKeyRequest { /** * The ID of the application key. * @type string */ appKeyId: string; /** * @type ApplicationKeyUpdateRequest */ body: ApplicationKeyUpdateRequest; } export interface KeyManagementApiUpdatePersonalAccessTokenRequest { /** * The ID of the personal access token. * @type string */ patId: string; /** * @type PersonalAccessTokenUpdateRequest */ body: PersonalAccessTokenUpdateRequest; } export declare class KeyManagementApi { private requestFactory; private responseProcessor; private configuration; constructor(configuration: Configuration, requestFactory?: KeyManagementApiRequestFactory, responseProcessor?: KeyManagementApiResponseProcessor); /** * Create an API key. * @param param The request object */ createAPIKey(param: KeyManagementApiCreateAPIKeyRequest, options?: Configuration): Promise; /** * Create an application key for current user * @param param The request object */ createCurrentUserApplicationKey(param: KeyManagementApiCreateCurrentUserApplicationKeyRequest, options?: Configuration): Promise; /** * Create a personal access token for the current user. * @param param The request object */ createPersonalAccessToken(param: KeyManagementApiCreatePersonalAccessTokenRequest, options?: Configuration): Promise; /** * Delete an API key. * @param param The request object */ deleteAPIKey(param: KeyManagementApiDeleteAPIKeyRequest, options?: Configuration): Promise; /** * Delete an application key * @param param The request object */ deleteApplicationKey(param: KeyManagementApiDeleteApplicationKeyRequest, options?: Configuration): Promise; /** * Delete an application key owned by current user * @param param The request object */ deleteCurrentUserApplicationKey(param: KeyManagementApiDeleteCurrentUserApplicationKeyRequest, options?: Configuration): Promise; /** * Get an API key. * @param param The request object */ getAPIKey(param: KeyManagementApiGetAPIKeyRequest, options?: Configuration): Promise; /** * Get an application key for your org. * @param param The request object */ getApplicationKey(param: KeyManagementApiGetApplicationKeyRequest, options?: Configuration): Promise; /** * Get an application key owned by current user. * The `key` field is not returned for organizations in [One-Time Read mode](https://docs.datadoghq.com/account_management/api-app-keys/#one-time-read-mode). * @param param The request object */ getCurrentUserApplicationKey(param: KeyManagementApiGetCurrentUserApplicationKeyRequest, options?: Configuration): Promise; /** * Get a specific personal access token by its UUID. * @param param The request object */ getPersonalAccessToken(param: KeyManagementApiGetPersonalAccessTokenRequest, options?: Configuration): Promise; /** * List all API keys available for your account. * @param param The request object */ listAPIKeys(param?: KeyManagementApiListAPIKeysRequest, options?: Configuration): Promise; /** * List all application keys available for your org * @param param The request object */ listApplicationKeys(param?: KeyManagementApiListApplicationKeysRequest, options?: Configuration): Promise; /** * List all application keys available for current user * @param param The request object */ listCurrentUserApplicationKeys(param?: KeyManagementApiListCurrentUserApplicationKeysRequest, options?: Configuration): Promise; /** * List all personal access tokens for the organization. * @param param The request object */ listPersonalAccessTokens(param?: KeyManagementApiListPersonalAccessTokensRequest, options?: Configuration): Promise; /** * Revoke a specific personal access token. * @param param The request object */ revokePersonalAccessToken(param: KeyManagementApiRevokePersonalAccessTokenRequest, options?: Configuration): Promise; /** * Update an API key. * @param param The request object */ updateAPIKey(param: KeyManagementApiUpdateAPIKeyRequest, options?: Configuration): Promise; /** * Edit an application key * @param param The request object */ updateApplicationKey(param: KeyManagementApiUpdateApplicationKeyRequest, options?: Configuration): Promise; /** * Edit an application key owned by current user. * The `key` field is not returned for organizations in [One-Time Read mode](https://docs.datadoghq.com/account_management/api-app-keys/#one-time-read-mode). * @param param The request object */ updateCurrentUserApplicationKey(param: KeyManagementApiUpdateCurrentUserApplicationKeyRequest, options?: Configuration): Promise; /** * Update a specific personal access token. * @param param The request object */ updatePersonalAccessToken(param: KeyManagementApiUpdatePersonalAccessTokenRequest, options?: Configuration): Promise; /** * Check if the API key is valid. Returns the organization UUID, API key ID, and associated scopes. * @param param The request object */ validate(options?: Configuration): Promise; /** * Check that the API key and application key used for the request are both valid. * Returns `{"status": "ok"}` on success, `401` or `403` otherwise. Useful as a * lightweight authentication probe before issuing other API calls that require * full credentials. * @param param The request object */ validateAPIKey(options?: Configuration): Promise; }