UNPKG

@canonical/jujulib

Version:

Juju API client

353 lines (336 loc) 8.15 kB
/** Juju ModelManager version 11. NOTE: This file was generated using the Juju schema from Juju 4.0.1 at the git SHA 22e0b6a. Do not manually edit this file. */ import { ConnectionInfo, Transport } from "../../client.js"; import { Facade } from "../../types.js"; export interface ChangeModelCredentialParams { "credential-tag": string; "model-tag": string; } export interface ChangeModelCredentialsParams { "model-credentials": ChangeModelCredentialParams[]; } export interface DestroyModelParams { "destroy-storage"?: boolean; force?: boolean; "max-wait"?: number; "model-tag": string; timeout?: number; } export interface DestroyModelsParams { models: DestroyModelParams[]; } export interface DumpModelRequest { entities: Entity[]; simplified: boolean; } export interface Entities { entities: Entity[]; } export interface Entity { tag: string; } export interface EntityStatus { data?: AdditionalProperties; info: string; since: string; status: string; } export interface Error { code: string; info?: AdditionalProperties; message: string; } export interface ErrorResult { error?: Error; } export interface ErrorResults { results: ErrorResult[]; } export interface MachineHardware { arch?: string; "availability-zone"?: string; cores?: number; "cpu-power"?: number; mem?: number; "root-disk"?: number; tags?: string[]; "virt-type"?: string; } export interface MapResult { error?: Error; result: AdditionalProperties; } export interface MapResults { results: MapResult[]; } export interface Model { name: string; qualifier: string; type: string; uuid: string; } export interface ModelApplicationInfo { name: string; } export interface ModelCreateArgs { "cloud-tag"?: string; config?: AdditionalProperties; credential?: string; name: string; qualifier: string; region?: string; "target-controller"?: string; } export interface ModelDefaultValues { "cloud-region"?: string; "cloud-tag"?: string; config: AdditionalProperties; } export interface ModelDefaults { controller?: AdditionalProperties; default?: AdditionalProperties; regions?: RegionDefaults[]; } export interface ModelDefaultsResult { config: Record<string, ModelDefaults>; error?: Error; } export interface ModelDefaultsResults { results: ModelDefaultsResult[]; } export interface ModelEntityCount { count: number; entity: string; } export interface ModelFilesystemInfo { detachable?: boolean; id: string; message?: string; "provider-id"?: string; status?: string; } export interface ModelInfo { "agent-version": string; "cloud-credential-tag"?: string; "cloud-credential-validity"?: boolean; "cloud-region"?: string; "cloud-tag": string; "controller-uuid": string; "is-controller": boolean; life: string; machines: ModelMachineInfo[]; migration?: ModelMigrationStatus; name: string; "provider-type"?: string; qualifier: string; "secret-backends": SecretBackendResult[]; status?: EntityStatus; "supported-features"?: SupportedFeature[]; "target-controller"?: string; type: string; users: ModelUserInfo[]; uuid: string; } export interface ModelInfoResult { error?: Error; result?: ModelInfo; } export interface ModelInfoResults { results: ModelInfoResult[]; } export interface ModelMachineInfo { "display-name"?: string; hardware?: MachineHardware; id: string; "instance-id"?: string; message?: string; status?: string; } export interface ModelMigrationStatus { end?: string; start: string; status: string; } export interface ModelStatus { "application-count": number; applications?: ModelApplicationInfo[]; error?: Error; filesystems?: ModelFilesystemInfo[]; "hosted-machine-count": number; life: string; machines?: ModelMachineInfo[]; "model-tag": string; qualifier: string; type: string; "unit-count": number; volumes?: ModelVolumeInfo[]; } export interface ModelStatusResults { models: ModelStatus[]; } export interface ModelSummariesRequest { all?: boolean; "user-tag": string; } export interface ModelSummary { "agent-version": string; "cloud-credential-tag"?: string; "cloud-region"?: string; "cloud-tag": string; "controller-uuid": string; counts: ModelEntityCount[]; "is-controller": boolean; "last-connection": string; life: string; migration?: ModelMigrationStatus; name: string; "provider-type"?: string; qualifier: string; status?: EntityStatus; type: string; "user-access": string; uuid: string; } export interface ModelSummaryResult { error?: Error; result?: ModelSummary; } export interface ModelSummaryResults { results: ModelSummaryResult[]; } export interface ModelUnsetKeys { "cloud-region"?: string; "cloud-tag"?: string; keys: string[]; } export interface ModelUserInfo { access: string; "display-name": string; "last-connection": string; "model-tag": string; user: string; } export interface ModelVolumeInfo { detachable?: boolean; id: string; message?: string; "provider-id"?: string; status?: string; } export interface ModifyModelAccess { access: string; action: string; "model-tag": string; "user-tag": string; } export interface ModifyModelAccessRequest { changes: ModifyModelAccess[]; } export interface Number { Build: number; Major: number; Minor: number; Patch: number; Tag: string; } export interface RegionDefaults { "region-name": string; value: AdditionalProperties; } export interface SecretBackend { "backend-type": string; config: AdditionalProperties; name: string; "token-rotate-interval"?: number; } export interface SecretBackendResult { error?: Error; id: string; message?: string; "num-secrets": number; result: SecretBackend; status: string; } export interface SetModelDefaults { config: ModelDefaultValues[]; } export interface StringResult { error?: Error; result: string; } export interface StringResults { results: StringResult[]; } export interface SupportedFeature { description: string; name: string; version?: string; } export interface UnsetModelDefaults { keys: ModelUnsetKeys[]; } export interface UserModel { "last-connection": string; model: Model; } export interface UserModelList { "user-models": UserModel[]; } export interface AdditionalProperties { [key: string]: any; } /** */ declare class ModelManagerV11 implements Facade { static NAME: string; static VERSION: number; NAME: string; VERSION: number; _transport: Transport; _info: ConnectionInfo; constructor(transport: Transport, info: ConnectionInfo); /** */ changeModelCredential(params: ChangeModelCredentialsParams): Promise<ErrorResults>; /** */ createModel(params: ModelCreateArgs): Promise<ModelInfo>; /** */ destroyModels(params: DestroyModelsParams): Promise<ErrorResults>; /** */ dumpModels(params: DumpModelRequest): Promise<StringResults>; /** */ dumpModelsDB(params: Entities): Promise<MapResults>; /** */ listModelSummaries(params: ModelSummariesRequest): Promise<ModelSummaryResults>; /** */ listModels(params: Entity): Promise<UserModelList>; /** */ modelDefaultsForClouds(params: Entities): Promise<ModelDefaultsResults>; /** */ modelInfo(params: Entities): Promise<ModelInfoResults>; /** */ modelStatus(params: Entities): Promise<ModelStatusResults>; /** */ modifyModelAccess(params: ModifyModelAccessRequest): Promise<ErrorResults>; /** */ setModelDefaults(params: SetModelDefaults): Promise<ErrorResults>; /** */ unsetModelDefaults(params: UnsetModelDefaults): Promise<ErrorResults>; } export default ModelManagerV11;