@canonical/jujulib
Version:
Juju API client
126 lines (124 loc) • 3.22 kB
TypeScript
/**
Juju ModelConfig version 3.
This facade is available on:
Controller-machine-agent
Machine-agent
Unit-agent
Controllers
Models
NOTE: This file was generated using the Juju schema
from Juju 3.3 at the git SHA 65fa4c1ee5.
Do not manually edit this file.
*/
import { ConnectionInfo, Transport } from "../../client.js";
import { Facade } from "../../types.js";
export interface ConfigValue {
source: string;
value: AdditionalProperties;
}
export interface Error {
code: string;
info?: AdditionalProperties;
message: string;
}
export interface GetConstraintsResults {
constraints: Value;
}
export interface ModelConfigResults {
config: Record<string, ConfigValue>;
}
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 ModelUnset {
keys: string[];
}
export interface SetConstraints {
application: string;
constraints: Value;
}
export interface StringResult {
error?: Error;
result: string;
}
export interface Value {
"allocate-public-ip"?: boolean;
arch?: string;
container?: string;
cores?: number;
"cpu-power"?: number;
"image-id"?: string;
"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;
}
/**
ModelConfigAPIV3 is currently the latest.
*/
declare class ModelConfigV3 implements Facade {
static NAME: string;
static VERSION: number;
NAME: string;
VERSION: number;
_transport: Transport;
_info: ConnectionInfo;
constructor(transport: Transport, info: ConnectionInfo);
/**
GetModelConstraints returns the constraints for the model.
*/
getModelConstraints(params: any): Promise<GetConstraintsResults>;
/**
ModelGet implements the server-side part of the
model-config CLI command.
*/
modelGet(params: any): Promise<ModelConfigResults>;
/**
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>;
/**
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>;
/**
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>;
}
export default ModelConfigV3;