UNPKG

@canonical/jujulib

Version:
366 lines (361 loc) 10.7 kB
/** Juju Controller version 9. This facade is available on: Controller-machine-agent Machine-agent Unit-agent Controllers NOTE: This file was generated using the Juju schema from Juju 2.9-rc3 at the git SHA cb361902f8. Do not manually edit this file. */ import { ConnectionInfo, Transport } from "../../client.js"; import { Facade } from "../../types.js"; export interface AllWatcherId { "watcher-id": string; } export interface CloudCredential { attrs?: Record<string, string>; "auth-type": string; redacted?: string[]; } export interface CloudSpec { cacertificates?: string[]; credential?: CloudCredential; endpoint?: string; "identity-endpoint"?: string; name: string; region?: string; "storage-endpoint"?: string; type: string; } export interface CloudSpecResult { error?: Error; result?: CloudSpec; } export interface CloudSpecResults { results?: CloudSpecResult[]; } export interface ConfigValue { source: string; value: AdditionalProperties; } export interface ControllerAPIInfoResult { addresses: string[]; cacert: string; error?: Error; } export interface ControllerAPIInfoResults { results: ControllerAPIInfoResult[]; } export interface ControllerConfigResult { config: AdditionalProperties; } export interface ControllerConfigSet { config: AdditionalProperties; } export interface ControllerVersionResults { "git-commit": string; version: string; } export interface DestroyControllerArgs { "destroy-models": boolean; "destroy-storage"?: boolean; } export interface Entities { entities: Entity[]; } export interface Entity { tag: string; } export interface Error { code: string; info?: AdditionalProperties; message: string; } export interface ErrorResult { error?: Error; } export interface ErrorResults { results: ErrorResult[]; } export interface HostedModelConfig { "cloud-spec"?: CloudSpec; config?: AdditionalProperties; error?: Error; name: string; owner: string; } export interface HostedModelConfigsResults { models: HostedModelConfig[]; } export interface InitiateMigrationArgs { specs: MigrationSpec[]; } export interface InitiateMigrationResult { error?: Error; "migration-id": string; "model-tag": string; } export interface InitiateMigrationResults { results: InitiateMigrationResult[]; } export interface MachineHardware { arch?: string; "availability-zone"?: string; cores?: number; "cpu-power"?: number; mem?: number; "root-disk"?: number; tags?: string[]; } export interface MigrationSpec { "model-tag": string; "target-info": MigrationTargetInfo; } export interface MigrationTargetInfo { addrs: string[]; "auth-tag": string; "ca-cert": string; "controller-alias"?: string; "controller-tag": string; macaroons?: string; password?: string; } export interface Model { name: string; "owner-tag": string; type: string; uuid: string; } export interface ModelBlockInfo { blocks: string[]; "model-uuid": string; name: string; "owner-tag": string; } export interface ModelBlockInfoList { models?: ModelBlockInfo[]; } export interface ModelConfigResults { config: Record<string, ConfigValue>; } export interface ModelFilesystemInfo { detachable?: boolean; id: string; message?: string; "provider-id"?: string; status?: string; } export interface ModelMachineInfo { "display-name"?: string; "ha-primary"?: boolean; hardware?: MachineHardware; "has-vote"?: boolean; id: string; "instance-id"?: string; message?: string; status?: string; "wants-vote"?: boolean; } export interface ModelStatus { "application-count": number; error?: Error; filesystems?: ModelFilesystemInfo[]; "hosted-machine-count": number; life: string; machines?: ModelMachineInfo[]; "model-tag": string; "owner-tag": string; type: string; "unit-count": number; volumes?: ModelVolumeInfo[]; } export interface ModelStatusResults { models: ModelStatus[]; } export interface ModelTag { [key: string]: AdditionalProperties; } export interface ModelVolumeInfo { detachable?: boolean; id: string; message?: string; "provider-id"?: string; status?: string; } export interface ModifyControllerAccess { access: string; action: string; "user-tag": string; } export interface ModifyControllerAccessRequest { changes: ModifyControllerAccess[]; } export interface NotifyWatchResult { NotifyWatcherId: string; error?: Error; } export interface NotifyWatchResults { results: NotifyWatchResult[]; } export interface RemoveBlocksArgs { all: boolean; } export interface StringResult { error?: Error; result: string; } export interface SummaryWatcherID { "watcher-id": string; } export interface UserAccess { access: string; "user-tag": string; } export interface UserAccessResult { error?: Error; result?: UserAccess; } export interface UserAccessResults { results?: UserAccessResult[]; } export interface UserModel { "last-connection": string; model: Model; } export interface UserModelList { "user-models": UserModel[]; } export interface AdditionalProperties { [key: string]: any; } /** ControllerAPI provides the Controller API. */ declare class ControllerV9 implements Facade { static NAME: string; static VERSION: number; NAME: string; VERSION: number; _transport: Transport; _info: ConnectionInfo; constructor(transport: Transport, info: ConnectionInfo); /** AllModels allows controller administrators to get the list of all the models in the controller. */ allModels(params: any): Promise<UserModelList>; /** CloudSpec returns the model's cloud spec. */ cloudSpec(params: Entities): Promise<CloudSpecResults>; /** ConfigSet changes the value of specified controller configuration settings. Only some settings can be changed after bootstrap. Settings that aren't specified in the params are left unchanged. */ configSet(params: ControllerConfigSet): Promise<any>; /** ControllerAPIInfoForModels returns the controller api connection details for the specified models. */ controllerAPIInfoForModels(params: Entities): Promise<ControllerAPIInfoResults>; /** ControllerConfig returns the controller's configuration. */ controllerConfig(params: any): Promise<ControllerConfigResult>; /** ControllerVersion returns the version information associated with this controller binary. NOTE: the implementation intentionally does not check for SuperuserAccess as the Version is known even to users with login access. */ controllerVersion(params: any): Promise<ControllerVersionResults>; /** DestroyController destroys the controller. If the args specify the destruction of the models, this method will attempt to do so. Otherwise, if the controller has any non-empty, non-Dead hosted models, then an error with the code params.CodeHasHostedModels will be transmitted. */ destroyController(params: DestroyControllerArgs): Promise<any>; /** GetCloudSpec constructs the CloudSpec for a validated and authorized model. */ getCloudSpec(params: ModelTag): Promise<CloudSpecResult>; /** GetControllerAccess returns the level of access the specified users have on the controller. */ getControllerAccess(params: Entities): Promise<UserAccessResults>; /** HostedModelConfigs returns all the information that the client needs in order to connect directly with the host model's provider and destroy it directly. */ hostedModelConfigs(params: any): Promise<HostedModelConfigsResults>; /** IdentityProviderURL returns the URL of the configured external identity provider for this controller or an empty string if no external identity provider has been configured when the controller was bootstrapped. NOTE: the implementation intentionally does not check for SuperuserAccess as the URL is known even to users with login access. */ identityProviderURL(params: any): Promise<StringResult>; /** InitiateMigration attempts to begin the migration of one or more models to other controllers. */ initiateMigration(params: InitiateMigrationArgs): Promise<InitiateMigrationResults>; /** ListBlockedModels returns a list of all models on the controller which have a block in place. The resulting slice is sorted by model name, then owner. Callers must be controller administrators to retrieve the list. */ listBlockedModels(params: any): Promise<ModelBlockInfoList>; /** ModelConfig returns the model config for the controller model. For information on the current model, use client.ModelGet */ modelConfig(params: any): Promise<ModelConfigResults>; /** ModelStatus returns a summary of the model. */ modelStatus(params: Entities): Promise<ModelStatusResults>; /** ModifyControllerAccess changes the model access granted to users. */ modifyControllerAccess(params: ModifyControllerAccessRequest): Promise<ErrorResults>; /** MongoVersion allows the introspection of the mongo version per controller */ mongoVersion(params: any): Promise<StringResult>; /** RemoveBlocks removes all the blocks in the controller. */ removeBlocks(params: RemoveBlocksArgs): Promise<any>; /** WatchAllModelSummaries starts watching the summary updates from the cache. This method is superuser access only, and watches all models in the controller. */ watchAllModelSummaries(params: any): Promise<SummaryWatcherID>; /** WatchAllModels starts watching events for all models in the controller. The returned AllWatcherId should be used with Next on the AllModelWatcher endpoint to receive deltas. */ watchAllModels(params: any): Promise<AllWatcherId>; /** WatchCloudSpecsChanges returns a watcher for cloud spec changes. */ watchCloudSpecsChanges(params: Entities): Promise<NotifyWatchResults>; /** WatchModelSummaries starts watching the summary updates from the cache. Only models that the user has access to are returned. */ watchModelSummaries(params: any): Promise<SummaryWatcherID>; } export default ControllerV9;