@canonical/jujulib
Version:
Juju API client
83 lines (82 loc) • 2.39 kB
JavaScript
/**
Juju KeyManager version 1.
This facade is available on:
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 { autoBind } from "../../utils.js";
/**
KeyManagerAPI provides api endpoints for manipulating ssh keys
*/
class KeyManagerV1 {
constructor(transport, info) {
this.NAME = "KeyManager";
this.VERSION = 1;
this._transport = transport;
this._info = info;
// Automatically bind all methods to instances.
autoBind(this);
}
/**
AddKeys adds new authorised ssh keys for the specified user.
*/
addKeys(params) {
return new Promise((resolve, reject) => {
const req = {
type: "KeyManager",
request: "AddKeys",
version: 1,
params: params,
};
this._transport.write(req, resolve, reject);
});
}
/**
DeleteKeys deletes the authorised ssh keys for the specified user.
*/
deleteKeys(params) {
return new Promise((resolve, reject) => {
const req = {
type: "KeyManager",
request: "DeleteKeys",
version: 1,
params: params,
};
this._transport.write(req, resolve, reject);
});
}
/**
ImportKeys imports new authorised ssh keys from the specified key ids for the specified user.
*/
importKeys(params) {
return new Promise((resolve, reject) => {
const req = {
type: "KeyManager",
request: "ImportKeys",
version: 1,
params: params,
};
this._transport.write(req, resolve, reject);
});
}
/**
ListKeys returns the authorised ssh keys for the specified users.
*/
listKeys(params) {
return new Promise((resolve, reject) => {
const req = {
type: "KeyManager",
request: "ListKeys",
version: 1,
params: params,
};
this._transport.write(req, resolve, reject);
});
}
}
KeyManagerV1.NAME = "KeyManager";
KeyManagerV1.VERSION = 1;
export default KeyManagerV1;
//# sourceMappingURL=KeyManagerV1.js.map