@camunda8/sdk
Version:
[](https://www.npmjs.com/package/@camunda8/sdk)
287 lines (286 loc) • 12.9 kB
TypeScript
import { CamundaPlatform8Configuration, DeepPartial } from '../../lib';
import { IHeadersProvider } from '../../oauth';
import * as Dto from './AdminDto';
/**
* This class provides methods to interact with the Camunda Admin API.
* @throws {RESTError} An error that may occur during API operations.
*/
export declare class AdminApiClient {
private userAgentString;
private oAuthProvider;
private rest;
constructor(options?: {
config?: DeepPartial<CamundaPlatform8Configuration>;
oAuthProvider?: IHeadersProvider;
});
private getHeaders;
/**
*
* Get an array of the current API clients for this cluster. See [the API Documentation](https://console.cloud.camunda.io/customer-api/openapi/docs/#/default/GetClients) for more details.
* @throws {RESTError}
* @param clusterUuid - The cluster UUID
*
*/
getClients(clusterUuid: string): Promise<Dto.ClusterClient[]>;
/**
* Create a new API client for a cluster. See [the API Documentation](https://console.cloud.camunda.io/customer-api/openapi/docs/#/default/CreateClient) for more details.
* @throws {RESTError}
*/
createClient(req: {
clusterUuid: string;
clientName: string;
permissions: string[];
}): Promise<Dto.CreatedClusterClient>;
/**
* Get the details of an API client. See [the API Documentation](https://console.cloud.camunda.io/customer-api/openapi/docs/#/default/GetClient) for more details.
* @param clusterUuid
* @param clientId
* @throws {RESTError}
* @returns
*/
getClient(clusterUuid: string, clientId: string): Promise<Dto.ClusterClientConnectionDetails>;
/**
* See [the API Documentation](https://console.cloud.camunda.io/customer-api/openapi/docs/#/default/DeleteClient) for more details.
* @param clusterUuid
* @param clientId
* @throws {RESTError}
*/
deleteClient(clusterUuid: string, clientId: string): Promise<null>;
/**
*
* Return an array of clusters. See [the API Documentation](https://console.cloud.camunda.io/customer-api/openapi/docs/#/default/GetClusters) for more details.
* @throws {RESTError}
*/
getClusters(): Promise<Dto.Cluster[]>;
/**
*
* Create a new cluster. See [the API Documentation](https://console.cloud.camunda.io/customer-api/openapi/docs/#/default/CreateCluster) for more details.
* @throws {RESTError}
*/
createCluster(createClusterRequest: Dto.CreateClusterBody): Promise<{
clusterId: string;
}>;
/**
*
* Retrieve the metadata for a cluster. See [the API Documentation](https://console.cloud.camunda.io/customer-api/openapi/docs/#/default/GetCluster) for more details.
* @throws {RESTError}
*
*/
getCluster(clusterUuid: string): Promise<Dto.Cluster>;
/**
*
* Delete a cluster. See [the API Documentation](https://console.cloud.camunda.io/customer-api/openapi/docs/#/default/DeleteCluster) for more details.
* @throws {RESTError}
*
*/
deleteCluster(clusterUuid: string): Promise<null>;
/**
*
* Retrieve the available parameters for cluster creation. See [the API Documentation](https://console.cloud.camunda.io/customer-api/openapi/docs/#/default/GetParameters) for more details.
* @throws {RESTError}
*/
getParameters(): Promise<Dto.Parameters>;
/**
*
* Retrieve the connector secrets. See [the API Documentation](https://console.cloud.camunda.io/customer-api/openapi/docs/#/default/GetSecrets) for more details.
* @throws {RESTError}
*/
getSecrets(clusterUuid: string): Promise<{
[key: string]: string;
}>;
/**
*
* Create a new connector secret. See [the API Documentation](https://console.cloud.camunda.io/customer-api/openapi/docs/#/default/CreateSecret) for more details.
* @throws {RESTError}
*/
createSecret({ clusterUuid, secretName, secretValue, }: {
clusterUuid: string;
secretName: string;
secretValue: string;
}): Promise<null>;
/**
*
* Delete a connector secret. See [the API Documentation](https://console.cloud.camunda.io/customer-api/openapi/docs/#/default/DeleteSecret) for more details.
* @throws {RESTError}
*/
deleteSecret(clusterUuid: string, secretName: string): Promise<null>;
/**
*
* Add one or more IPs to the whitelist for the cluster. See [the API Documentation](https://console.cloud.camunda.io/customer-api/openapi/docs/#/default/UpdateIpWhitelist) for more details.
* @throws {RESTError}
* @param ipwhitelist
* @returns
*/
whitelistIPs(clusterUuid: string, ipwhitelist: [
{
description: string;
ip: string;
}
]): Promise<null>;
/**
*
* Retrieve a list of members and pending invites for your organisation. See the [API Documentation]() for more details.
* @throws {RESTError}
*/
getUsers(): Promise<Dto.Member[]>;
/**
*
* Add a member. See the [API Documentation]() for more details.
* @throws {RESTError}
*
*/
createMember(email: string, orgRoles: Dto.OrganizationRole[]): Promise<null>;
/**
*
* Delete a member from your organization. See the [API Documentation]() for more details.
* @throws {RESTError}
*
*/
deleteMember(email: string): Promise<null>;
/**
*
* Get the egress IP ranges for Camunda SaaS. See [the API Documentation](https://console.cloud.camunda.io/customer-api/openapi/docs/#/default/GetMeta) for more details.
* @throws {RESTError}
*/
getIpRanges(): Promise<Dto.MetaDto>;
/**
*
* Update a cluster's name, description, or stage label. See [the API Documentation](https://console.cloud.camunda.io/customer-api/openapi/docs/#/default/UpdateCluster) for more details.
* @param clusterUuid - The cluster UUID
* @param updateRequest - The fields to update
* @throws {RESTError}
*/
updateCluster(clusterUuid: string, updateRequest: Dto.UpdateClusterBody): Promise<void>;
/**
*
* Upgrade a cluster to the latest available generation. See [the API Documentation](https://console.cloud.camunda.io/customer-api/openapi/docs/#/default/UpgradeCluster) for more details.
* @param clusterUuid - The cluster UUID
* @throws {RESTError}
*/
upgradeCluster(clusterUuid: string): Promise<Dto.GenerationUpgradeForClusterDto>;
/**
*
* Resume a suspended cluster. See [the API Documentation](https://console.cloud.camunda.io/customer-api/openapi/docs/#/default/Wake) for more details.
* @param clusterUuid - The cluster UUID
* @throws {RESTError}
*/
wakeCluster(clusterUuid: string): Promise<void>;
/**
*
* Update the IP allowlist for a cluster. See [the API Documentation](https://console.cloud.camunda.io/customer-api/openapi/docs/#/default/UpdateIpAllowlist) for more details.
* @param clusterUuid - The cluster UUID
* @param ipallowlist - Array of IP allowlist entries
* @throws {RESTError}
*/
updateIpAllowlist(clusterUuid: string, ipallowlist: Dto.IpAllowListEntry[]): Promise<void>;
/**
*
* Update a connector secret value. See [the API Documentation](https://console.cloud.camunda.io/customer-api/openapi/docs/#/default/UpdateSecret) for more details.
* @param clusterUuid - The cluster UUID
* @param secretName - The name of the secret to update
* @param secretValue - The new secret value
* @throws {RESTError}
*/
updateSecret(clusterUuid: string, secretName: string, secretValue: string): Promise<void>;
/**
*
* Activate Secure Connectivity for a cluster. See [the API Documentation](https://console.cloud.camunda.io/customer-api/openapi/docs/#/default/ActivateSecureConnectivity) for more details.
* @param clusterUuid - The cluster UUID
* @param request - The allowed principals and regions
* @throws {RESTError}
*/
activateSecureConnectivity(clusterUuid: string, request: Dto.ActivateSecureConnectivityBody): Promise<void>;
/**
*
* Deactivate Secure Connectivity for a cluster. See [the API Documentation](https://console.cloud.camunda.io/customer-api/openapi/docs/#/default/DeactivateSecureConnectivity) for more details.
* @param clusterUuid - The cluster UUID
* @throws {RESTError}
*/
deactivateSecureConnectivity(clusterUuid: string): Promise<void>;
/**
*
* Get the Secure Connectivity status for a cluster. See [the API Documentation](https://console.cloud.camunda.io/customer-api/openapi/docs/#/default/GetSecureConnectivityStatus) for more details.
* @param clusterUuid - The cluster UUID
* @throws {RESTError}
*/
getSecureConnectivityStatus(clusterUuid: string): Promise<Dto.SecureConnectivityStatusResponse>;
/**
*
* Activate External Monitoring (BYOM) for a cluster. See [the API Documentation](https://console.cloud.camunda.io/customer-api/openapi/docs/#/default/ActivateMonitoring) for more details.
* @param clusterUuid - The cluster UUID
* @throws {RESTError}
*/
activateMonitoring(clusterUuid: string): Promise<void>;
/**
*
* Deactivate External Monitoring (BYOM) for a cluster. See [the API Documentation](https://console.cloud.camunda.io/customer-api/openapi/docs/#/default/DeactivateMonitoring) for more details.
* @param clusterUuid - The cluster UUID
* @throws {RESTError}
*/
deactivateMonitoring(clusterUuid: string): Promise<void>;
/**
*
* Get all External Monitoring clients for a cluster. See [the API Documentation](https://console.cloud.camunda.io/customer-api/openapi/docs/#/default/GetMonitoringClients) for more details.
* @param clusterUuid - The cluster UUID
* @throws {RESTError}
*/
getMonitoringClients(clusterUuid: string): Promise<Dto.MonitoringClientsResponse>;
/**
*
* Create a new External Monitoring client for a cluster. See [the API Documentation](https://console.cloud.camunda.io/customer-api/openapi/docs/#/default/CreateMonitoringClient) for more details.
* @param clusterUuid - The cluster UUID
* @param username - The username for the monitoring client
* @throws {RESTError}
*/
createMonitoringClient(clusterUuid: string, username: string): Promise<Dto.CreatedMonitoringClient>;
/**
*
* Rotate the password for an External Monitoring client. See [the API Documentation](https://console.cloud.camunda.io/customer-api/openapi/docs/#/default/RotateMonitoringClientPassword) for more details.
* @param clusterUuid - The cluster UUID
* @param clientUuid - The monitoring client UUID
* @throws {RESTError}
*/
rotateMonitoringClientPassword(clusterUuid: string, clientUuid: string): Promise<Dto.CreatedMonitoringClient>;
/**
*
* Delete an External Monitoring client. See [the API Documentation](https://console.cloud.camunda.io/customer-api/openapi/docs/#/default/DeleteMonitoringClient) for more details.
* @param clusterUuid - The cluster UUID
* @param clientUuid - The monitoring client UUID
* @throws {RESTError}
*/
deleteMonitoringClient(clusterUuid: string, clientUuid: string): Promise<void>;
/**
*
* Get all backups for a cluster. See [the API Documentation](https://console.cloud.camunda.io/customer-api/openapi/docs/#/default/GetBackups) for more details.
* @param clusterUuid - The cluster UUID
* @throws {RESTError}
*/
getBackups(clusterUuid: string): Promise<Dto.Backup[]>;
/**
*
* Create a new backup for a cluster. See [the API Documentation](https://console.cloud.camunda.io/customer-api/openapi/docs/#/default/CreateBackup) for more details.
* @param clusterUuid - The cluster UUID
* @throws {RESTError}
*/
createBackup(clusterUuid: string): Promise<Dto.Backup>;
/**
*
* Delete a backup. See [the API Documentation](https://console.cloud.camunda.io/customer-api/openapi/docs/#/default/DeleteBackup) for more details.
* @param clusterUuid - The cluster UUID
* @param backupId - The backup ID
* @throws {RESTError}
*/
deleteBackup(clusterUuid: string, backupId: string): Promise<Dto.Backup>;
/**
*
* Fetch all activity/audit events as JSON. See [the API Documentation](https://console.cloud.camunda.io/customer-api/openapi/docs/#/default/GetJson) for more details.
* @throws {RESTError}
*/
getActivityEvents(): Promise<Dto.AuditEvent[]>;
/**
*
* Fetch all activity/audit events as CSV. See [the API Documentation](https://console.cloud.camunda.io/customer-api/openapi/docs/#/default/GetCsv) for more details.
* @throws {RESTError}
*/
getActivityEventsCsv(): Promise<string>;
}