@piiano/vault-client
Version:
Piiano Vault generated typescript client
148 lines • 6.21 kB
TypeScript
import type { AdminAPIKey } from '../models/AdminAPIKey';
import type { APIKey } from '../models/APIKey';
import type { APIKeyExpiry } from '../models/APIKeyExpiry';
import type { IAMConfig } from '../models/IAMConfig';
import type { UserDetails } from '../models/UserDetails';
import type { UserName } from '../models/UserName';
import type { UserNameExpiry } from '../models/UserNameExpiry';
import type { CancelablePromise } from '../core/CancelablePromise';
import type { BaseHttpRequest } from '../core/BaseHttpRequest';
export declare class IamClient {
readonly httpRequest: BaseHttpRequest;
constructor(httpRequest: BaseHttpRequest);
/**
* Get IAM configuration
* Gets the identity and access management (IAM) configuration in TOML format.
*
* The role that performs this operation must have the `CapIAMReader` capability.
* See [Access control](/data-security/identity-and-access-management#access-control) for more information about how
* capabilities are used to control access to operations.
* @returns IAMConfig The request is successful.
* @throws ApiError
*/
getIamConf({ customAudit, additionalHeaders, }?: {
/**
* Custom audit information to be included in the audit log.
*/
customAudit?: string;
additionalHeaders?: Record<string, string>;
}): CancelablePromise<IAMConfig>;
/**
* Set IAM configuration
* Sets the identity and access management (IAM) configuration.
*
* The role that performs this operation must have the `CapIAMWriter` capability.
* See [Access control](/data-security/identity-and-access-management#access-control) for more information about how
* capabilities are used to control access to operations.
* @returns any The request is successful.
* @throws ApiError
*/
setIamConf({ requestBody, customAudit, additionalHeaders, }: {
/**
* IAM configuration in TOML format.
*/
requestBody: IAMConfig;
/**
* Custom audit information to be included in the audit log.
*/
customAudit?: string;
additionalHeaders?: Record<string, string>;
}): CancelablePromise<any>;
/**
* Set Admin API key
* Set the Admin user's API key.
*
* Vault always has an administrative user account with the user name `Admin`. You use this account to update the configuration of Vault.
*
* The API key should meet the specified criteria:
*
* - It must be at least 15 characters long.
* - It must contain a combination of digits, lowercase letters, and uppercase letters.
*
* This API is restricted to the Admin user.
*
* The Admin user API key can also be set using the [`PVAULT_SERVICE_ADMIN_API_KEY` environment variable](/guides/configure/environment-variables#pvault_service_admin_api_key).
*
* @returns any The request is successful.
* @throws ApiError
*/
setAdminApiKey({ requestBody, customAudit, additionalHeaders, }: {
/**
* The API key of the Admin user to set.
*/
requestBody: AdminAPIKey;
/**
* Custom audit information to be included in the audit log.
*/
customAudit?: string;
additionalHeaders?: Record<string, string>;
}): CancelablePromise<any>;
/**
* Update user API key expiration
* Update a user's API key expiration.
*
* The role that performs this operation must have the `CapIAMWriter` capability.
* See [Access control](/data-security/identity-and-access-management#access-control) for more information about how
* capabilities are used to control access to operations.
* @returns APIKeyExpiry The request is successful.
* @throws ApiError
*/
updateApiKeyExpiration({ requestBody, customAudit, additionalHeaders, }: {
/**
* The name of the user and the expiration in seconds to update API key.
*/
requestBody: UserNameExpiry;
/**
* Custom audit information to be included in the audit log.
*/
customAudit?: string;
additionalHeaders?: Record<string, string>;
}): CancelablePromise<APIKeyExpiry>;
/**
* Get a user details
* Get a user's details.
*
* The role that performs this operation must have the `CapIAMReader` capability.
* See [Access control](/data-security/identity-and-access-management#access-control) for more information about how
* capabilities are used to control access to operations.
* @returns UserDetails The request is successful.
* @throws ApiError
*/
getUser({ user, customAudit, additionalHeaders, }: {
/**
* The name of the user.
*/
user: string;
/**
* Custom audit information to be included in the audit log.
*/
customAudit?: string;
additionalHeaders?: Record<string, string>;
}): CancelablePromise<UserDetails>;
/**
* Regenerate user API key
* Regenerates a user's API key. The existing API key is invalidated. This operation is irreversible.
*
* :::note
* You cannot regenerate the key for the Admin user. See [Set the admin's API key](/guides/manage-users-and-policies/set-admin-api-key) for information on how to set a value for this key.
* :::
*
* The role that performs this operation must have the `CapIAMWriter` capability.
* See [Access control](/data-security/identity-and-access-management#access-control) for more information about how
* capabilities are used to control access to operations.
* @returns APIKey The request is successful.
* @throws ApiError
*/
regenerateUserApiKey({ requestBody, customAudit, additionalHeaders, }: {
/**
* The name of the user to regenerate API key for.
*/
requestBody: UserName;
/**
* Custom audit information to be included in the audit log.
*/
customAudit?: string;
additionalHeaders?: Record<string, string>;
}): CancelablePromise<APIKey>;
}
//# sourceMappingURL=IamClient.d.ts.map