UNPKG

@canonical/jujulib

Version:
674 lines (670 loc) 17.8 kB
/** Juju Client version 3. This facade is available on: Controller-machine-agent Machine-agent Unit-agent Models NOTE: This file was generated using the Juju schema from Juju 3.0-beta1 at the git SHA 61c87ab7e1. Do not manually edit this file. */ import { ConnectionInfo, Transport } from "../../client.js"; import { Facade } from "../../types.js"; export interface APIHostPortsResult { servers: HostPort[][]; } export interface AddCharm { channel: string; force: boolean; url: string; } export interface AddCharmWithAuthorization { channel: string; force: boolean; macaroon: Macaroon; url: string; } export interface AddMachineParams { addresses: Address[]; constraints: Value; "container-type": string; disks?: Constraints[]; "hardware-characteristics": HardwareCharacteristics; "instance-id": string; jobs: string[]; nonce: string; "parent-id": string; placement?: Placement; series: string; } export interface AddMachines { params: AddMachineParams[]; } export interface AddMachinesResult { error?: Error; machine: string; } export interface AddMachinesResults { machines: AddMachinesResult[]; } export interface Address { cidr?: string; "config-type"?: string; "is-secondary"?: boolean; scope: string; "space-id"?: string; "space-name"?: string; type: string; value: string; } export interface AgentVersionResult { version: Number; } export interface AllWatcherId { "watcher-id": string; } export interface ApplicationOfferStatus { "active-connected-count": number; "application-name": string; charm: string; endpoints: Record<string, RemoteEndpoint>; err?: Error; "offer-name": string; "total-connected-count": number; } export interface ApplicationStatus { "can-upgrade-to": string; charm: string; "charm-channel"?: string; "charm-profile": string; "charm-version": string; "endpoint-bindings": Record<string, string>; err?: Error; exposed: boolean; "exposed-endpoints"?: Record<string, ExposedEndpoint>; int?: number; life: string; "meter-statuses": Record<string, MeterStatus>; "provider-id"?: string; "public-address": string; relations: Record<string, string[]>; series: string; status: DetailedStatus; "subordinate-to": string[]; units: Record<string, UnitStatus>; "workload-version": string; } export interface Binary { Arch: string; Build: number; Major: number; Minor: number; Number: Number; Patch: number; Release: string; Tag: string; } export interface BranchStatus { "assigned-units": Record<string, string[]>; created: number; "created-by": string; } export interface BundleChange { args: object[]; id: string; method: string; requires: string[]; } export interface BundleChangesParams { bundleURL: string; yaml: string; } export interface BundleChangesResults { changes?: BundleChange[]; errors?: string[]; } export interface BytesResult { result: number[]; } export interface ConfigValue { source: string; value: AdditionalProperties; } export interface Constraints { Count: number; Pool: string; Size: number; } export interface DestroyMachines { force: boolean; "machine-names": string[]; } export interface DetailedStatus { data: AdditionalProperties; err?: Error; info: string; kind: string; life: string; since: string; status: string; version: string; } export interface EndpointStatus { application: string; name: string; role: string; subordinate: 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 ExposedEndpoint { "expose-to-cidrs"?: string[]; "expose-to-spaces"?: string[]; } export interface FindToolsParams { agentstream: string; arch: string; major: number; minor: number; number: Number; "os-type": string; series: string; } export interface FindToolsResult { error?: Error; list: Tools[]; } export interface FullStatus { applications: Record<string, ApplicationStatus>; branches: Record<string, BranchStatus>; "controller-timestamp": string; machines: Record<string, MachineStatus>; model: ModelStatusInfo; offers: Record<string, ApplicationOfferStatus>; relations: RelationStatus[]; "remote-applications": Record<string, RemoteApplicationStatus>; } export interface GetConstraintsResults { constraints: Value; } export interface HardwareCharacteristics { arch?: string; "availability-zone"?: string; "cpu-cores"?: number; "cpu-power"?: number; mem?: number; "root-disk"?: number; "root-disk-source"?: string; tags?: string[]; } export interface History { error?: Error; statuses: DetailedStatus[]; } export interface HostPort { Address: Address; cidr?: string; "config-type"?: string; "is-secondary"?: boolean; port: number; scope: string; "space-id"?: string; "space-name"?: string; type: string; value: string; } export interface LXDProfile { config: Record<string, string>; description: string; devices: Record<string, Record<string, string>>; } export interface Macaroon { [key: string]: AdditionalProperties; } export interface MachineHardware { arch?: string; "availability-zone"?: string; cores?: number; "cpu-power"?: number; mem?: number; "root-disk"?: number; tags?: string[]; } export interface MachineStatus { "agent-status": DetailedStatus; constraints: string; containers: Record<string, MachineStatus>; "display-name": string; "dns-name": string; hardware: string; "has-vote": boolean; hostname?: string; id: string; "instance-id": string; "instance-status": DetailedStatus; "ip-addresses"?: string[]; jobs: string[]; "lxd-profiles"?: Record<string, LXDProfile>; "modification-status": DetailedStatus; "network-interfaces"?: Record<string, NetworkInterface>; "primary-controller-machine"?: boolean; series: string; "wants-vote": boolean; } export interface MeterStatus { color: string; message: string; } export interface ModelConfigResults { config: Record<string, ConfigValue>; } export interface ModelInfo { "agent-version": string; "cloud-credential-tag"?: string; "cloud-credential-validity"?: boolean; "cloud-region"?: string; "cloud-tag": string; "controller-uuid": string; "default-series"?: string; "is-controller": boolean; life: string; machines: ModelMachineInfo[]; migration?: ModelMigrationStatus; name: string; "owner-tag": string; "provider-type"?: string; sla: ModelSLAInfo; status?: EntityStatus; type: string; users: ModelUserInfo[]; uuid: 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 ModelMigrationStatus { end?: string; start: string; status: string; } export interface ModelSLA { ModelSLAInfo: ModelSLAInfo; creds: number[]; level: string; owner: string; } export interface ModelSLAInfo { level: string; owner: string; } export interface ModelSequencesResult { sequences: Record<string, number>; } export interface ModelSet { config: AdditionalProperties; } export interface ModelStatusInfo { "available-version": string; "cloud-tag": string; "meter-status": MeterStatus; "model-status": DetailedStatus; name: string; region?: string; sla: string; type: string; version: string; } export interface ModelUnset { keys: string[]; } export interface ModelUserInfo { access: string; "display-name": string; "last-connection": string; user: string; } export interface ModelUserInfoResult { error?: Error; result?: ModelUserInfo; } export interface ModelUserInfoResults { results: ModelUserInfoResult[]; } export interface NetworkInterface { "dns-nameservers"?: string[]; gateway?: string; "ip-addresses": string[]; "is-up": boolean; "mac-address": string; space?: string; } export interface Number { Build: number; Major: number; Minor: number; Patch: number; Tag: string; } export interface Placement { directive: string; scope: string; } export interface PrivateAddress { target: string; } export interface PrivateAddressResults { "private-address": string; } export interface ProvisioningScriptParams { "data-dir": string; "disable-package-commands": boolean; "machine-id": string; nonce: string; } export interface ProvisioningScriptResult { script: string; } export interface PublicAddress { target: string; } export interface PublicAddressResults { "public-address": string; } export interface RelationStatus { endpoints: EndpointStatus[]; id: number; interface: string; key: string; scope: string; status: DetailedStatus; } export interface RemoteApplicationStatus { endpoints: RemoteEndpoint[]; err?: Error; life: string; "offer-name": string; "offer-url": string; relations: Record<string, string[]>; status: DetailedStatus; } export interface RemoteEndpoint { interface: string; limit: number; name: string; role: string; } export interface ResolveCharmResult { error?: string; url?: string; } export interface ResolveCharmResults { urls: ResolveCharmResult[]; } export interface ResolveCharms { references: string[]; } export interface Resolved { retry: boolean; "unit-name": string; } export interface SetConstraints { application: string; constraints: Value; } export interface SetModelAgentVersion { force?: boolean; version: Number; } export interface StatusHistoryFilter { date: string; delta: number; exclude: string[]; size: number; } export interface StatusHistoryRequest { filter: StatusHistoryFilter; historyKind: string; size: number; tag: string; } export interface StatusHistoryRequests { requests: StatusHistoryRequest[]; } export interface StatusHistoryResult { error?: Error; history: History; } export interface StatusHistoryResults { results: StatusHistoryResult[]; } export interface StatusParams { patterns: string[]; } export interface StringResult { error?: Error; result: string; } export interface Tools { sha256?: string; size: number; url: string; version: Binary; } export interface UnitStatus { address?: string; "agent-status": DetailedStatus; charm: string; leader?: boolean; machine: string; "opened-ports": string[]; "provider-id"?: string; "public-address": string; subordinates: Record<string, UnitStatus>; "workload-status": DetailedStatus; "workload-version": string; } export interface Value { "allocate-public-ip"?: boolean; arch?: string; container?: string; cores?: number; "cpu-power"?: number; "instance-role"?: string; "instance-type"?: string; mem?: number; "root-disk"?: number; "root-disk-source"?: string; spaces?: string[]; tags?: string[]; "virt-type"?: string; zones?: string[]; } export interface AdditionalProperties { [key: string]: any; } /** Client serves client-specific API methods. */ declare class ClientV3 implements Facade { static NAME: string; static VERSION: number; NAME: string; VERSION: number; _transport: Transport; _info: ConnectionInfo; constructor(transport: Transport, info: ConnectionInfo); /** APIHostPorts returns the API host/port addresses stored in state. */ aPIHostPorts(params: any): Promise<APIHostPortsResult>; /** AbortCurrentUpgrade aborts and archives the current upgrade synchronisation record, if any. */ abortCurrentUpgrade(params: any): Promise<any>; /** Method was deprecated as of juju 2.9 and removed in juju 3.0. Please use the client/charms facade instead. */ addCharm(params: AddCharm): Promise<any>; /** Method was deprecated as of juju 2.9 and removed in juju 3.0. Please use the client/charms facade instead. */ addCharmWithAuthorization(params: AddCharmWithAuthorization): Promise<any>; /** AddMachines adds new machines with the supplied parameters. */ addMachines(params: AddMachines): Promise<AddMachinesResults>; /** AddMachinesV2 adds new machines with the supplied parameters. */ addMachinesV2(params: AddMachines): Promise<AddMachinesResults>; /** AgentVersion returns the current version that the API server is running. */ agentVersion(params: any): Promise<AgentVersionResult>; /** CACert returns the certificate used to validate the state connection. */ cACert(params: any): Promise<BytesResult>; /** DestroyMachines removes a given set of machines. */ destroyMachines(params: DestroyMachines): Promise<any>; /** FindTools returns a List containing all tools matching the given parameters. */ findTools(params: FindToolsParams): Promise<FindToolsResult>; /** FullStatus gives the information needed for juju status over the api */ fullStatus(params: StatusParams): Promise<FullStatus>; /** GetBundleChanges returns the list of changes required to deploy the given bundle data. The changes are sorted by requirements, so that they can be applied in order. Deprecated: clients should use the GetChanges endpoint on the Bundle facade. Note: any new feature in the future like devices will never be supported here. */ getBundleChanges(params: BundleChangesParams): Promise<BundleChangesResults>; /** GetModelConstraints returns the constraints for the model. */ getModelConstraints(params: any): Promise<GetConstraintsResults>; /** InjectMachines injects a machine into state with provisioned status. */ injectMachines(params: AddMachines): Promise<AddMachinesResults>; /** ModelGet implements the server-side part of the model-config CLI command. */ modelGet(params: any): Promise<ModelConfigResults>; /** ModelInfo returns information about the current model. */ modelInfo(params: any): Promise<ModelInfo>; /** ModelSet implements the server-side part of the set-model-config CLI command. */ modelSet(params: ModelSet): Promise<any>; /** ModelUnset implements the server-side part of the set-model-config CLI command. */ modelUnset(params: ModelUnset): Promise<any>; /** ModelUserInfo returns information on all users in the model. */ modelUserInfo(params: any): Promise<ModelUserInfoResults>; /** PrivateAddress implements the server side of Client.PrivateAddress. */ privateAddress(params: PrivateAddress): Promise<PrivateAddressResults>; /** ProvisioningScript returns a shell script that, when run, provisions a machine agent on the machine executing the script. */ provisioningScript(params: ProvisioningScriptParams): Promise<ProvisioningScriptResult>; /** PublicAddress implements the server side of Client.PublicAddress. */ publicAddress(params: PublicAddress): Promise<PublicAddressResults>; /** ResolveCharms resolves the best available charm URLs with series, for charm locations without a series specified. NOTE: ResolveCharms is deprecated as of juju 2.9 and charms facade version 3. Please discontinue use and move to the charms facade version. TODO: remove in juju 3.0 */ resolveCharms(params: ResolveCharms): Promise<ResolveCharmResults>; /** Resolved implements the server side of Client.Resolved. */ resolved(params: Resolved): Promise<any>; /** RetryProvisioning marks a provisioning error as transient on the machines. */ retryProvisioning(params: Entities): Promise<ErrorResults>; /** SLALevel returns the current sla level for the model. */ sLALevel(params: any): Promise<StringResult>; /** Sequences returns the model's sequence names and next values. */ sequences(params: any): Promise<ModelSequencesResult>; /** SetModelAgentVersion sets the model agent version. */ setModelAgentVersion(params: SetModelAgentVersion): Promise<any>; /** SetModelConstraints sets the constraints for the model. */ setModelConstraints(params: SetConstraints): Promise<any>; /** SetSLALevel sets the sla level on the model. */ setSLALevel(params: ModelSLA): Promise<any>; /** StatusHistory returns a slice of past statuses for several entities. */ statusHistory(params: StatusHistoryRequests): Promise<StatusHistoryResults>; /** WatchAll initiates a watcher for entities in the connected model. */ watchAll(params: any): Promise<AllWatcherId>; } export default ClientV3;