From a8622c3456385c8d310380f1b30b3599026fe963 Mon Sep 17 00:00:00 2001 From: James Garner Date: Mon, 30 Sep 2024 09:17:30 +1300 Subject: [PATCH] fix: try full schemas for 3.1.9 and 3.3.6, as tests are failing --- juju/client/schemas-juju-3.1.9.json | 53235 ++++++++++++++++++++----- juju/client/schemas-juju-3.3.6.json | 54448 +++++++++++++++++++++----- 2 files changed, 89020 insertions(+), 18663 deletions(-) diff --git a/juju/client/schemas-juju-3.1.9.json b/juju/client/schemas-juju-3.1.9.json index bd18742b..a802390a 100644 --- a/juju/client/schemas-juju-3.1.9.json +++ b/juju/client/schemas-juju-3.1.9.json @@ -546,6 +546,125 @@ } } }, + { + "Name": "ActionPruner", + "Description": "API provides access to the action pruner API.", + "Version": 1, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "ModelConfig": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/ModelConfigResult" + } + }, + "description": "ModelConfig returns the current model's configuration." + }, + "Prune": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ActionPruneArgs" + } + }, + "description": "Prune endpoint removes action entries until\nonly the ones newer than now - p.MaxHistoryTime remain and\nthe history is smaller than p.MaxHistoryMB." + }, + "WatchForModelConfigChanges": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/NotifyWatchResult" + } + }, + "description": "WatchForModelConfigChanges returns a NotifyWatcher that observes\nchanges to the model configuration.\nNote that although the NotifyWatchResult contains an Error field,\nit's not used because we are only returning a single watcher,\nso we use the regular error return." + } + }, + "definitions": { + "ActionPruneArgs": { + "type": "object", + "properties": { + "max-history-mb": { + "type": "integer" + }, + "max-history-time": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "max-history-time", + "max-history-mb" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ModelConfigResult": { + "type": "object", + "properties": { + "config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + } + }, + "additionalProperties": false, + "required": [ + "config" + ] + }, + "NotifyWatchResult": { + "type": "object", + "properties": { + "NotifyWatcherId": { + "type": "string" + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false, + "required": [ + "NotifyWatcherId" + ] + } + } + } + }, { "Name": "Admin", "Description": "admin is the only object that unlogged-in clients can access. It holds any\nmethods that are needed to log in.", @@ -829,213 +948,344 @@ } }, { - "Name": "AllModelWatcher", - "Description": "SrvAllWatcher defines the API methods on a state.Multiwatcher.\nwhich watches any changes to the state. Each client has its own\ncurrent set of watchers, stored in resources. It is used by both\nthe AllWatcher and AllModelWatcher facades.", - "Version": 4, + "Name": "Agent", + "Description": "AgentAPI implements the version 3 of the API provided to an agent.", + "Version": 3, "AvailableTo": [ - "controller-user" + "controller-machine-agent", + "machine-agent", + "unit-agent" ], "Schema": { "type": "object", "properties": { - "Next": { + "ClearReboot": { "type": "object", "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, "Result": { - "$ref": "#/definitions/AllWatcherNextResults" + "$ref": "#/definitions/ErrorResults" } }, - "description": "Next will return the current state of everything on the first call\nand subsequent calls will" + "description": "ClearReboot will clear the reboot flag on provided machines, if it exists." }, - "Stop": { - "type": "object", - "description": "Stop stops the watcher." - } - }, - "definitions": { - "AllWatcherNextResults": { + "CloudSpec": { "type": "object", "properties": { - "deltas": { - "type": "array", - "items": { - "$ref": "#/definitions/Delta" - } + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/CloudSpecResults" } }, - "additionalProperties": false, - "required": [ - "deltas" - ] + "description": "CloudSpec returns the model's cloud spec." }, - "Delta": { + "ControllerAPIInfoForModels": { "type": "object", "properties": { - "entity": { - "type": "object", - "additionalProperties": true + "Params": { + "$ref": "#/definitions/Entities" }, - "removed": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "removed", - "entity" - ] - } - } - } - }, - { - "Name": "AllWatcher", - "Description": "SrvAllWatcher defines the API methods on a state.Multiwatcher.\nwhich watches any changes to the state. Each client has its own\ncurrent set of watchers, stored in resources. It is used by both\nthe AllWatcher and AllModelWatcher facades.", - "Version": 3, - "AvailableTo": [ - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "Next": { - "type": "object", - "properties": { "Result": { - "$ref": "#/definitions/AllWatcherNextResults" + "$ref": "#/definitions/ControllerAPIInfoResults" } }, - "description": "Next will return the current state of everything on the first call\nand subsequent calls will" + "description": "ControllerAPIInfoForModels returns the controller api connection details for the specified models." }, - "Stop": { - "type": "object", - "description": "Stop stops the watcher." - } - }, - "definitions": { - "AllWatcherNextResults": { + "ControllerConfig": { "type": "object", "properties": { - "deltas": { - "type": "array", - "items": { - "$ref": "#/definitions/Delta" - } + "Result": { + "$ref": "#/definitions/ControllerConfigResult" } }, - "additionalProperties": false, - "required": [ - "deltas" - ] + "description": "ControllerConfig returns the controller's configuration." }, - "Delta": { + "GetCloudSpec": { "type": "object", "properties": { - "entity": { - "type": "object", - "additionalProperties": true + "Params": { + "$ref": "#/definitions/ModelTag" }, - "removed": { - "type": "boolean" + "Result": { + "$ref": "#/definitions/CloudSpecResult" } }, - "additionalProperties": false, - "required": [ - "removed", - "entity" - ] - } - } - } - }, - { - "Name": "Annotations", - "Description": "API implements the service interface and is the concrete\nimplementation of the api end point.", - "Version": 2, - "AvailableTo": [ - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "Get": { + "description": "GetCloudSpec constructs the CloudSpec for a validated and authorized model." + }, + "GetEntities": { "type": "object", "properties": { "Params": { "$ref": "#/definitions/Entities" }, "Result": { - "$ref": "#/definitions/AnnotationsGetResults" + "$ref": "#/definitions/AgentGetEntitiesResults" + } + } + }, + "IsMaster": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/IsMasterResult" + } + } + }, + "ModelConfig": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/ModelConfigResult" } }, - "description": "Get returns annotations for given entities.\nIf annotations cannot be retrieved for a given entity, an error is returned.\nEach entity is treated independently and, hence, will fail or succeed independently." + "description": "ModelConfig returns the current model's configuration." }, - "Set": { + "SetPasswords": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/AnnotationsSet" + "$ref": "#/definitions/EntityPasswords" }, "Result": { "$ref": "#/definitions/ErrorResults" } }, - "description": "Set stores annotations for given entities" - } - }, - "definitions": { - "AnnotationsGetResult": { + "description": "SetPasswords sets the given password for each supplied entity, if possible." + }, + "StateServingInfo": { "type": "object", "properties": { - "annotations": { - "type": "object", - "patternProperties": { - ".*": { + "Result": { + "$ref": "#/definitions/StateServingInfo" + } + } + }, + "WatchCloudSpecsChanges": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/NotifyWatchResults" + } + }, + "description": "WatchCloudSpecsChanges returns a watcher for cloud spec changes." + }, + "WatchCredentials": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/NotifyWatchResults" + } + }, + "description": "WatchCredentials watches for changes to the specified credentials." + }, + "WatchForModelConfigChanges": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/NotifyWatchResult" + } + }, + "description": "WatchForModelConfigChanges returns a NotifyWatcher that observes\nchanges to the model configuration.\nNote that although the NotifyWatchResult contains an Error field,\nit's not used because we are only returning a single watcher,\nso we use the regular error return." + } + }, + "definitions": { + "AgentGetEntitiesResult": { + "type": "object", + "properties": { + "container-type": { + "type": "string" + }, + "error": { + "$ref": "#/definitions/Error" + }, + "jobs": { + "type": "array", + "items": { + "type": "string" + } + }, + "life": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "life", + "jobs", + "container-type" + ] + }, + "AgentGetEntitiesResults": { + "type": "object", + "properties": { + "entities": { + "type": "array", + "items": { + "$ref": "#/definitions/AgentGetEntitiesResult" + } + } + }, + "additionalProperties": false, + "required": [ + "entities" + ] + }, + "CloudCredential": { + "type": "object", + "properties": { + "attrs": { + "type": "object", + "patternProperties": { + ".*": { "type": "string" } } }, - "entity": { + "auth-type": { "type": "string" }, - "error": { - "$ref": "#/definitions/ErrorResult" + "redacted": { + "type": "array", + "items": { + "type": "string" + } } }, "additionalProperties": false, "required": [ - "entity", - "annotations" + "auth-type" ] }, - "AnnotationsGetResults": { + "CloudSpec": { + "type": "object", + "properties": { + "cacertificates": { + "type": "array", + "items": { + "type": "string" + } + }, + "credential": { + "$ref": "#/definitions/CloudCredential" + }, + "endpoint": { + "type": "string" + }, + "identity-endpoint": { + "type": "string" + }, + "is-controller-cloud": { + "type": "boolean" + }, + "name": { + "type": "string" + }, + "region": { + "type": "string" + }, + "skip-tls-verify": { + "type": "boolean" + }, + "storage-endpoint": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "type", + "name" + ] + }, + "CloudSpecResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "$ref": "#/definitions/CloudSpec" + } + }, + "additionalProperties": false + }, + "CloudSpecResults": { "type": "object", "properties": { "results": { "type": "array", "items": { - "$ref": "#/definitions/AnnotationsGetResult" + "$ref": "#/definitions/CloudSpecResult" + } + } + }, + "additionalProperties": false + }, + "ControllerAPIInfoResult": { + "type": "object", + "properties": { + "addresses": { + "type": "array", + "items": { + "type": "string" } + }, + "cacert": { + "type": "string" + }, + "error": { + "$ref": "#/definitions/Error" } }, "additionalProperties": false, "required": [ - "results" + "addresses", + "cacert" ] }, - "AnnotationsSet": { + "ControllerAPIInfoResults": { "type": "object", "properties": { - "annotations": { + "results": { "type": "array", "items": { - "$ref": "#/definitions/EntityAnnotations" + "$ref": "#/definitions/ControllerAPIInfoResult" } } }, "additionalProperties": false, "required": [ - "annotations" + "results" + ] + }, + "ControllerConfigResult": { + "type": "object", + "properties": { + "config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + } + }, + "additionalProperties": false, + "required": [ + "config" ] }, "Entities": { @@ -1065,25 +1315,35 @@ "tag" ] }, - "EntityAnnotations": { + "EntityPassword": { "type": "object", "properties": { - "annotations": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } + "password": { + "type": "string" }, - "entity": { + "tag": { "type": "string" } }, "additionalProperties": false, "required": [ - "entity", - "annotations" + "tag", + "password" + ] + }, + "EntityPasswords": { + "type": "object", + "properties": { + "changes": { + "type": "array", + "items": { + "$ref": "#/definitions/EntityPassword" + } + } + }, + "additionalProperties": false, + "required": [ + "changes" ] }, "Error": { @@ -1134,547 +1394,528 @@ "required": [ "results" ] - } - } - } - }, - { - "Name": "Application", - "Description": "APIv17 provides the Application API facade for version 17.", - "Version": 17, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "AddRelation": { + }, + "IsMasterResult": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/AddRelation" - }, - "Result": { - "$ref": "#/definitions/AddRelationResults" + "master": { + "type": "boolean" } }, - "description": "AddRelation adds a relation between the specified endpoints and returns the relation info." + "additionalProperties": false, + "required": [ + "master" + ] }, - "AddUnits": { + "ModelConfigResult": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/AddApplicationUnits" - }, - "Result": { - "$ref": "#/definitions/AddApplicationUnitsResults" + "config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } } }, - "description": "AddUnits adds a given number of units to an application." + "additionalProperties": false, + "required": [ + "config" + ] }, - "ApplicationsInfo": { + "ModelTag": { "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ApplicationInfoResults" - } - }, - "description": "ApplicationsInfo returns applications information." + "additionalProperties": false }, - "CharmConfig": { + "NotifyWatchResult": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/ApplicationGetArgs" + "NotifyWatcherId": { + "type": "string" }, - "Result": { - "$ref": "#/definitions/ApplicationGetConfigResults" + "error": { + "$ref": "#/definitions/Error" } }, - "description": "CharmConfig returns charm config for the input list of applications and\nmodel generations." + "additionalProperties": false, + "required": [ + "NotifyWatcherId" + ] }, - "CharmRelations": { + "NotifyWatchResults": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/ApplicationCharmRelations" - }, - "Result": { - "$ref": "#/definitions/ApplicationCharmRelationsResults" + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/NotifyWatchResult" + } } }, - "description": "CharmRelations implements the server side of Application.CharmRelations." + "additionalProperties": false, + "required": [ + "results" + ] }, - "Consume": { + "StateServingInfo": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/ConsumeApplicationArgs" + "api-port": { + "type": "integer" }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "Consume adds remote applications to the model without creating any\nrelations." - }, - "Deploy": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ApplicationsDeploy" + "ca-private-key": { + "type": "string" }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "Deploy fetches the charms from the charm store and deploys them\nusing the specified placement directives." - }, - "DestroyApplication": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/DestroyApplicationsParams" + "cert": { + "type": "string" }, - "Result": { - "$ref": "#/definitions/DestroyApplicationResults" + "controller-api-port": { + "type": "integer" + }, + "private-key": { + "type": "string" + }, + "shared-secret": { + "type": "string" + }, + "state-port": { + "type": "integer" + }, + "system-identity": { + "type": "string" } }, - "description": "DestroyApplication removes a given set of applications." - }, - "DestroyConsumedApplications": { + "additionalProperties": false, + "required": [ + "api-port", + "state-port", + "cert", + "private-key", + "ca-private-key", + "shared-secret", + "system-identity" + ] + } + } + } + }, + { + "Name": "AgentLifeFlag", + "Description": "", + "Version": 1, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "Life": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/DestroyConsumedApplicationsParams" + "$ref": "#/definitions/Entities" }, "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "DestroyConsumedApplications removes a given set of consumed (remote) applications." - }, - "DestroyRelation": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/DestroyRelation" + "$ref": "#/definitions/LifeResults" } }, - "description": "DestroyRelation removes the relation between the\nspecified endpoints or an id." + "description": "Life returns the life status of every supplied entity, where available." }, - "DestroyUnit": { + "Watch": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/DestroyUnitsParams" + "$ref": "#/definitions/Entities" }, "Result": { - "$ref": "#/definitions/DestroyUnitResults" + "$ref": "#/definitions/NotifyWatchResults" } }, - "description": "DestroyUnit removes a given set of application units." - }, - "Expose": { + "description": "Watch starts an NotifyWatcher for each given entity." + } + }, + "definitions": { + "Entities": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/ApplicationExpose" + "entities": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } } }, - "description": "Expose changes the juju-managed firewall to expose any ports that\nwere also explicitly marked by units as open." + "additionalProperties": false, + "required": [ + "entities" + ] }, - "Get": { + "Entity": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/ApplicationGet" - }, - "Result": { - "$ref": "#/definitions/ApplicationGetResults" + "tag": { + "type": "string" } }, - "description": "Get returns the charm configuration for an application." + "additionalProperties": false, + "required": [ + "tag" + ] }, - "GetCharmURLOrigin": { + "Error": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/ApplicationGet" + "code": { + "type": "string" }, - "Result": { - "$ref": "#/definitions/CharmURLOriginResult" + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" } }, - "description": "GetCharmURLOrigin returns the charm URL and charm origin the given\napplication is running at present." + "additionalProperties": false, + "required": [ + "message", + "code" + ] }, - "GetConfig": { + "LifeResult": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/Entities" + "error": { + "$ref": "#/definitions/Error" }, - "Result": { - "$ref": "#/definitions/ApplicationGetConfigResults" + "life": { + "type": "string" } }, - "description": "GetConfig returns the charm config for each of the input applications." + "additionalProperties": false, + "required": [ + "life" + ] }, - "GetConstraints": { + "LifeResults": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ApplicationGetConstraintsResults" + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/LifeResult" + } } }, - "description": "GetConstraints returns the constraints for a given application." + "additionalProperties": false, + "required": [ + "results" + ] }, - "Leader": { + "NotifyWatchResult": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/Entity" + "NotifyWatcherId": { + "type": "string" }, - "Result": { - "$ref": "#/definitions/StringResult" + "error": { + "$ref": "#/definitions/Error" } }, - "description": "Leader returns the unit name of the leader for the given application." + "additionalProperties": false, + "required": [ + "NotifyWatcherId" + ] }, - "MergeBindings": { + "NotifyWatchResults": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/ApplicationMergeBindingsArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/NotifyWatchResult" + } } }, - "description": "MergeBindings merges operator-defined bindings with the current bindings for\none or more applications." - }, - "ResolveUnitErrors": { + "additionalProperties": false, + "required": [ + "results" + ] + } + } + } + }, + { + "Name": "AgentTools", + "Description": "AgentToolsAPI implements the API used by the machine model worker.", + "Version": 1, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "UpdateToolsAvailable": { "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/UnitsResolved" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "ResolveUnitErrors marks errors on the specified units as resolved." - }, - "ScaleApplications": { + "description": "UpdateToolsAvailable invokes a lookup and further update in environ\nfor new patches of the current tool versions." + } + } + } + }, + { + "Name": "AllModelWatcher", + "Description": "SrvAllWatcher defines the API methods on a state.Multiwatcher.\nwhich watches any changes to the state. Each client has its own\ncurrent set of watchers, stored in resources. It is used by both\nthe AllWatcher and AllModelWatcher facades.", + "Version": 4, + "AvailableTo": [ + "controller-user" + ], + "Schema": { + "type": "object", + "properties": { + "Next": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/ScaleApplicationsParams" - }, "Result": { - "$ref": "#/definitions/ScaleApplicationResults" - } - }, - "description": "ScaleApplications scales the specified application to the requested number of units." - }, - "SetCharm": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ApplicationSetCharm" + "$ref": "#/definitions/AllWatcherNextResults" } }, - "description": "SetCharm sets the charm for a given for the application." + "description": "Next will return the current state of everything on the first call\nand subsequent calls will" }, - "SetConfigs": { + "Stop": { "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ConfigSetArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetConfigs implements the server side of Application.SetConfig. Both\napplication and charm config are set. It does not unset values in\nConfig map that are set to an empty string. Unset should be used for that." - }, - "SetConstraints": { + "description": "Stop stops the watcher." + } + }, + "definitions": { + "AllWatcherNextResults": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/SetConstraints" + "deltas": { + "type": "array", + "items": { + "$ref": "#/definitions/Delta" + } } }, - "description": "SetConstraints sets the constraints for a given application." + "additionalProperties": false, + "required": [ + "deltas" + ] }, - "SetMetricCredentials": { + "Delta": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/ApplicationMetricCredentials" + "entity": { + "type": "object", + "additionalProperties": true }, - "Result": { - "$ref": "#/definitions/ErrorResults" + "removed": { + "type": "boolean" } }, - "description": "SetMetricCredentials sets credentials on the application." - }, - "SetRelationsSuspended": { + "additionalProperties": false, + "required": [ + "removed", + "entity" + ] + } + } + } + }, + { + "Name": "AllWatcher", + "Description": "SrvAllWatcher defines the API methods on a state.Multiwatcher.\nwhich watches any changes to the state. Each client has its own\ncurrent set of watchers, stored in resources. It is used by both\nthe AllWatcher and AllModelWatcher facades.", + "Version": 3, + "AvailableTo": [ + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "Next": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/RelationSuspendedArgs" - }, "Result": { - "$ref": "#/definitions/ErrorResults" + "$ref": "#/definitions/AllWatcherNextResults" } }, - "description": "SetRelationsSuspended sets the suspended status of the specified relations." + "description": "Next will return the current state of everything on the first call\nand subsequent calls will" }, - "Unexpose": { + "Stop": { + "type": "object", + "description": "Stop stops the watcher." + } + }, + "definitions": { + "AllWatcherNextResults": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/ApplicationUnexpose" + "deltas": { + "type": "array", + "items": { + "$ref": "#/definitions/Delta" + } } }, - "description": "Unexpose changes the juju-managed firewall to unexpose any ports that\nwere also explicitly marked by units as open." + "additionalProperties": false, + "required": [ + "deltas" + ] }, - "UnitsInfo": { + "Delta": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/Entities" + "entity": { + "type": "object", + "additionalProperties": true }, - "Result": { - "$ref": "#/definitions/UnitInfoResults" + "removed": { + "type": "boolean" } }, - "description": "UnitsInfo returns unit information for the given entities (units or\napplications)." - }, - "UnsetApplicationsConfig": { + "additionalProperties": false, + "required": [ + "removed", + "entity" + ] + } + } + } + }, + { + "Name": "Annotations", + "Description": "API implements the service interface and is the concrete\nimplementation of the api end point.", + "Version": 2, + "AvailableTo": [ + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "Get": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/ApplicationConfigUnsetArgs" + "$ref": "#/definitions/Entities" }, "Result": { - "$ref": "#/definitions/ErrorResults" + "$ref": "#/definitions/AnnotationsGetResults" } }, - "description": "UnsetApplicationsConfig implements the server side of Application.UnsetApplicationsConfig." + "description": "Get returns annotations for given entities.\nIf annotations cannot be retrieved for a given entity, an error is returned.\nEach entity is treated independently and, hence, will fail or succeed independently." }, - "UpdateApplicationBase": { + "Set": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/UpdateChannelArgs" + "$ref": "#/definitions/AnnotationsSet" }, "Result": { "$ref": "#/definitions/ErrorResults" } }, - "description": "UpdateApplicationBase updates the application base.\nBase for subordinates is updated too." + "description": "Set stores annotations for given entities" } }, "definitions": { - "AddApplicationUnits": { + "AnnotationsGetResult": { "type": "object", "properties": { - "application": { - "type": "string" - }, - "attach-storage": { - "type": "array", - "items": { - "type": "string" - } - }, - "num-units": { - "type": "integer" - }, - "placement": { - "type": "array", - "items": { - "$ref": "#/definitions/Placement" + "annotations": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } } }, - "policy": { + "entity": { "type": "string" + }, + "error": { + "$ref": "#/definitions/ErrorResult" } }, "additionalProperties": false, "required": [ - "application", - "num-units", - "placement" + "entity", + "annotations" ] }, - "AddApplicationUnitsResults": { + "AnnotationsGetResults": { "type": "object", "properties": { - "units": { + "results": { "type": "array", "items": { - "type": "string" + "$ref": "#/definitions/AnnotationsGetResult" } } }, "additionalProperties": false, "required": [ - "units" + "results" ] }, - "AddRelation": { + "AnnotationsSet": { "type": "object", "properties": { - "endpoints": { - "type": "array", - "items": { - "type": "string" - } - }, - "via-cidrs": { + "annotations": { "type": "array", "items": { - "type": "string" + "$ref": "#/definitions/EntityAnnotations" } } }, "additionalProperties": false, "required": [ - "endpoints" - ] - }, - "AddRelationResults": { - "type": "object", - "properties": { - "endpoints": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmRelation" - } - } - } - }, - "additionalProperties": false, - "required": [ - "endpoints" - ] - }, - "ApplicationCharmRelations": { - "type": "object", - "properties": { - "application": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "application" - ] - }, - "ApplicationCharmRelationsResults": { - "type": "object", - "properties": { - "charm-relations": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "charm-relations" + "annotations" ] }, - "ApplicationConfigUnsetArgs": { + "Entities": { "type": "object", "properties": { - "Args": { + "entities": { "type": "array", "items": { - "$ref": "#/definitions/ApplicationUnset" + "$ref": "#/definitions/Entity" } } }, "additionalProperties": false, "required": [ - "Args" + "entities" ] }, - "ApplicationConstraint": { + "Entity": { "type": "object", "properties": { - "constraints": { - "$ref": "#/definitions/Value" - }, - "error": { - "$ref": "#/definitions/Error" + "tag": { + "type": "string" } }, "additionalProperties": false, "required": [ - "constraints" + "tag" ] }, - "ApplicationDeploy": { + "EntityAnnotations": { "type": "object", "properties": { - "Force": { - "type": "boolean" - }, - "application": { - "type": "string" - }, - "attach-storage": { - "type": "array", - "items": { - "type": "string" - } - }, - "channel": { - "type": "string" - }, - "charm-origin": { - "$ref": "#/definitions/CharmOrigin" - }, - "charm-url": { - "type": "string" - }, - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "config-yaml": { - "type": "string" - }, - "constraints": { - "$ref": "#/definitions/Value" - }, - "devices": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/Constraints" - } - } - }, - "endpoint-bindings": { + "annotations": { "type": "object", "patternProperties": { ".*": { @@ -1682,216 +1923,34407 @@ } } }, - "num-units": { - "type": "integer" - }, - "placement": { - "type": "array", - "items": { - "$ref": "#/definitions/Placement" - } - }, - "policy": { + "entity": { "type": "string" - }, - "resources": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "storage": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/Constraints" - } - } } }, "additionalProperties": false, "required": [ - "application", - "charm-url", - "channel", - "num-units", - "config-yaml", - "constraints", - "Force" + "entity", + "annotations" ] }, - "ApplicationExpose": { + "Error": { "type": "object", "properties": { - "application": { + "code": { "type": "string" }, - "exposed-endpoints": { + "info": { "type": "object", "patternProperties": { ".*": { - "$ref": "#/definitions/ExposedEndpoint" + "type": "object", + "additionalProperties": true } } + }, + "message": { + "type": "string" } }, "additionalProperties": false, "required": [ - "application" + "message", + "code" ] }, - "ApplicationGet": { + "ErrorResult": { "type": "object", "properties": { - "application": { - "type": "string" - }, - "branch": { - "type": "string" + "error": { + "$ref": "#/definitions/Error" } }, - "additionalProperties": false, - "required": [ - "application", - "branch" - ] + "additionalProperties": false }, - "ApplicationGetArgs": { + "ErrorResults": { "type": "object", "properties": { - "args": { + "results": { "type": "array", "items": { - "$ref": "#/definitions/ApplicationGet" + "$ref": "#/definitions/ErrorResult" } } }, "additionalProperties": false, "required": [ - "args" + "results" ] + } + } + } + }, + { + "Name": "Application", + "Description": "APIv17 provides the Application API facade for version 17.", + "Version": 17, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "AddRelation": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/AddRelation" + }, + "Result": { + "$ref": "#/definitions/AddRelationResults" + } + }, + "description": "AddRelation adds a relation between the specified endpoints and returns the relation info." }, - "ApplicationGetConfigResults": { + "AddUnits": { "type": "object", "properties": { - "Results": { - "type": "array", - "items": { - "$ref": "#/definitions/ConfigResult" - } + "Params": { + "$ref": "#/definitions/AddApplicationUnits" + }, + "Result": { + "$ref": "#/definitions/AddApplicationUnitsResults" } }, - "additionalProperties": false, - "required": [ - "Results" - ] + "description": "AddUnits adds a given number of units to an application." }, - "ApplicationGetConstraintsResults": { + "ApplicationsInfo": { "type": "object", "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ApplicationConstraint" - } + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ApplicationInfoResults" } }, - "additionalProperties": false, - "required": [ - "results" - ] + "description": "ApplicationsInfo returns applications information." }, - "ApplicationGetResults": { + "CharmConfig": { "type": "object", "properties": { - "application": { - "type": "string" + "Params": { + "$ref": "#/definitions/ApplicationGetArgs" }, - "application-config": { - "type": "object", - "patternProperties": { + "Result": { + "$ref": "#/definitions/ApplicationGetConfigResults" + } + }, + "description": "CharmConfig returns charm config for the input list of applications and\nmodel generations." + }, + "CharmRelations": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ApplicationCharmRelations" + }, + "Result": { + "$ref": "#/definitions/ApplicationCharmRelationsResults" + } + }, + "description": "CharmRelations implements the server side of Application.CharmRelations." + }, + "Consume": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ConsumeApplicationArgs" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "Consume adds remote applications to the model without creating any\nrelations." + }, + "Deploy": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ApplicationsDeploy" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "Deploy fetches the charms from the charm store and deploys them\nusing the specified placement directives." + }, + "DestroyApplication": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/DestroyApplicationsParams" + }, + "Result": { + "$ref": "#/definitions/DestroyApplicationResults" + } + }, + "description": "DestroyApplication removes a given set of applications." + }, + "DestroyConsumedApplications": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/DestroyConsumedApplicationsParams" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "DestroyConsumedApplications removes a given set of consumed (remote) applications." + }, + "DestroyRelation": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/DestroyRelation" + } + }, + "description": "DestroyRelation removes the relation between the\nspecified endpoints or an id." + }, + "DestroyUnit": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/DestroyUnitsParams" + }, + "Result": { + "$ref": "#/definitions/DestroyUnitResults" + } + }, + "description": "DestroyUnit removes a given set of application units." + }, + "Expose": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ApplicationExpose" + } + }, + "description": "Expose changes the juju-managed firewall to expose any ports that\nwere also explicitly marked by units as open." + }, + "Get": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ApplicationGet" + }, + "Result": { + "$ref": "#/definitions/ApplicationGetResults" + } + }, + "description": "Get returns the charm configuration for an application." + }, + "GetCharmURLOrigin": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ApplicationGet" + }, + "Result": { + "$ref": "#/definitions/CharmURLOriginResult" + } + }, + "description": "GetCharmURLOrigin returns the charm URL and charm origin the given\napplication is running at present." + }, + "GetConfig": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ApplicationGetConfigResults" + } + }, + "description": "GetConfig returns the charm config for each of the input applications." + }, + "GetConstraints": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ApplicationGetConstraintsResults" + } + }, + "description": "GetConstraints returns the constraints for a given application." + }, + "Leader": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entity" + }, + "Result": { + "$ref": "#/definitions/StringResult" + } + }, + "description": "Leader returns the unit name of the leader for the given application." + }, + "MergeBindings": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ApplicationMergeBindingsArgs" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "MergeBindings merges operator-defined bindings with the current bindings for\none or more applications." + }, + "ResolveUnitErrors": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/UnitsResolved" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "ResolveUnitErrors marks errors on the specified units as resolved." + }, + "ScaleApplications": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ScaleApplicationsParams" + }, + "Result": { + "$ref": "#/definitions/ScaleApplicationResults" + } + }, + "description": "ScaleApplications scales the specified application to the requested number of units." + }, + "SetCharm": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ApplicationSetCharm" + } + }, + "description": "SetCharm sets the charm for a given for the application." + }, + "SetConfigs": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ConfigSetArgs" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "SetConfigs implements the server side of Application.SetConfig. Both\napplication and charm config are set. It does not unset values in\nConfig map that are set to an empty string. Unset should be used for that." + }, + "SetConstraints": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/SetConstraints" + } + }, + "description": "SetConstraints sets the constraints for a given application." + }, + "SetMetricCredentials": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ApplicationMetricCredentials" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "SetMetricCredentials sets credentials on the application." + }, + "SetRelationsSuspended": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/RelationSuspendedArgs" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "SetRelationsSuspended sets the suspended status of the specified relations." + }, + "Unexpose": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ApplicationUnexpose" + } + }, + "description": "Unexpose changes the juju-managed firewall to unexpose any ports that\nwere also explicitly marked by units as open." + }, + "UnitsInfo": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/UnitInfoResults" + } + }, + "description": "UnitsInfo returns unit information for the given entities (units or\napplications)." + }, + "UnsetApplicationsConfig": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ApplicationConfigUnsetArgs" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "UnsetApplicationsConfig implements the server side of Application.UnsetApplicationsConfig." + }, + "UpdateApplicationBase": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/UpdateChannelArgs" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "UpdateApplicationBase updates the application base.\nBase for subordinates is updated too." + } + }, + "definitions": { + "AddApplicationUnits": { + "type": "object", + "properties": { + "application": { + "type": "string" + }, + "attach-storage": { + "type": "array", + "items": { + "type": "string" + } + }, + "num-units": { + "type": "integer" + }, + "placement": { + "type": "array", + "items": { + "$ref": "#/definitions/Placement" + } + }, + "policy": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "application", + "num-units", + "placement" + ] + }, + "AddApplicationUnitsResults": { + "type": "object", + "properties": { + "units": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "units" + ] + }, + "AddRelation": { + "type": "object", + "properties": { + "endpoints": { + "type": "array", + "items": { + "type": "string" + } + }, + "via-cidrs": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "endpoints" + ] + }, + "AddRelationResults": { + "type": "object", + "properties": { + "endpoints": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmRelation" + } + } + } + }, + "additionalProperties": false, + "required": [ + "endpoints" + ] + }, + "ApplicationCharmRelations": { + "type": "object", + "properties": { + "application": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "application" + ] + }, + "ApplicationCharmRelationsResults": { + "type": "object", + "properties": { + "charm-relations": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "charm-relations" + ] + }, + "ApplicationConfigUnsetArgs": { + "type": "object", + "properties": { + "Args": { + "type": "array", + "items": { + "$ref": "#/definitions/ApplicationUnset" + } + } + }, + "additionalProperties": false, + "required": [ + "Args" + ] + }, + "ApplicationConstraint": { + "type": "object", + "properties": { + "constraints": { + "$ref": "#/definitions/Value" + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false, + "required": [ + "constraints" + ] + }, + "ApplicationDeploy": { + "type": "object", + "properties": { + "Force": { + "type": "boolean" + }, + "application": { + "type": "string" + }, + "attach-storage": { + "type": "array", + "items": { + "type": "string" + } + }, + "channel": { + "type": "string" + }, + "charm-origin": { + "$ref": "#/definitions/CharmOrigin" + }, + "charm-url": { + "type": "string" + }, + "config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "config-yaml": { + "type": "string" + }, + "constraints": { + "$ref": "#/definitions/Value" + }, + "devices": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/Constraints" + } + } + }, + "endpoint-bindings": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "num-units": { + "type": "integer" + }, + "placement": { + "type": "array", + "items": { + "$ref": "#/definitions/Placement" + } + }, + "policy": { + "type": "string" + }, + "resources": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "storage": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/Constraints" + } + } + } + }, + "additionalProperties": false, + "required": [ + "application", + "charm-url", + "channel", + "num-units", + "config-yaml", + "constraints", + "Force" + ] + }, + "ApplicationExpose": { + "type": "object", + "properties": { + "application": { + "type": "string" + }, + "exposed-endpoints": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/ExposedEndpoint" + } + } + } + }, + "additionalProperties": false, + "required": [ + "application" + ] + }, + "ApplicationGet": { + "type": "object", + "properties": { + "application": { + "type": "string" + }, + "branch": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "application", + "branch" + ] + }, + "ApplicationGetArgs": { + "type": "object", + "properties": { + "args": { + "type": "array", + "items": { + "$ref": "#/definitions/ApplicationGet" + } + } + }, + "additionalProperties": false, + "required": [ + "args" + ] + }, + "ApplicationGetConfigResults": { + "type": "object", + "properties": { + "Results": { + "type": "array", + "items": { + "$ref": "#/definitions/ConfigResult" + } + } + }, + "additionalProperties": false, + "required": [ + "Results" + ] + }, + "ApplicationGetConstraintsResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ApplicationConstraint" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "ApplicationGetResults": { + "type": "object", + "properties": { + "application": { + "type": "string" + }, + "application-config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "base": { + "$ref": "#/definitions/Base" + }, + "channel": { + "type": "string" + }, + "charm": { + "type": "string" + }, + "config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "constraints": { + "$ref": "#/definitions/Value" + }, + "endpoint-bindings": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + } + }, + "additionalProperties": false, + "required": [ + "application", + "charm", + "config", + "constraints", + "base", + "channel" + ] + }, + "ApplicationInfoResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "$ref": "#/definitions/ApplicationResult" + } + }, + "additionalProperties": false + }, + "ApplicationInfoResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ApplicationInfoResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "ApplicationMergeBindings": { + "type": "object", + "properties": { + "application-tag": { + "type": "string" + }, + "bindings": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "force": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "application-tag", + "bindings", + "force" + ] + }, + "ApplicationMergeBindingsArgs": { + "type": "object", + "properties": { + "args": { + "type": "array", + "items": { + "$ref": "#/definitions/ApplicationMergeBindings" + } + } + }, + "additionalProperties": false, + "required": [ + "args" + ] + }, + "ApplicationMetricCredential": { + "type": "object", + "properties": { + "application": { + "type": "string" + }, + "metrics-credentials": { + "type": "array", + "items": { + "type": "integer" + } + } + }, + "additionalProperties": false, + "required": [ + "application", + "metrics-credentials" + ] + }, + "ApplicationMetricCredentials": { + "type": "object", + "properties": { + "creds": { + "type": "array", + "items": { + "$ref": "#/definitions/ApplicationMetricCredential" + } + } + }, + "additionalProperties": false, + "required": [ + "creds" + ] + }, + "ApplicationOfferDetails": { + "type": "object", + "properties": { + "application-description": { + "type": "string" + }, + "bindings": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "endpoints": { + "type": "array", + "items": { + "$ref": "#/definitions/RemoteEndpoint" + } + }, + "offer-name": { + "type": "string" + }, + "offer-url": { + "type": "string" + }, + "offer-uuid": { + "type": "string" + }, + "source-model-tag": { + "type": "string" + }, + "spaces": { + "type": "array", + "items": { + "$ref": "#/definitions/RemoteSpace" + } + }, + "users": { + "type": "array", + "items": { + "$ref": "#/definitions/OfferUserDetails" + } + } + }, + "additionalProperties": false, + "required": [ + "source-model-tag", + "offer-uuid", + "offer-url", + "offer-name", + "application-description" + ] + }, + "ApplicationResult": { + "type": "object", + "properties": { + "base": { + "$ref": "#/definitions/Base" + }, + "channel": { + "type": "string" + }, + "charm": { + "type": "string" + }, + "constraints": { + "$ref": "#/definitions/Value" + }, + "endpoint-bindings": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "exposed": { + "type": "boolean" + }, + "exposed-endpoints": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/ExposedEndpoint" + } + } + }, + "life": { + "type": "string" + }, + "principal": { + "type": "boolean" + }, + "remote": { + "type": "boolean" + }, + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag", + "principal", + "exposed", + "remote", + "life" + ] + }, + "ApplicationSetCharm": { + "type": "object", + "properties": { + "application": { + "type": "string" + }, + "channel": { + "type": "string" + }, + "charm-origin": { + "$ref": "#/definitions/CharmOrigin" + }, + "charm-url": { + "type": "string" + }, + "config-settings": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "config-settings-yaml": { + "type": "string" + }, + "endpoint-bindings": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "force": { + "type": "boolean" + }, + "force-base": { + "type": "boolean" + }, + "force-units": { + "type": "boolean" + }, + "generation": { + "type": "string" + }, + "resource-ids": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "storage-constraints": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/StorageConstraints" + } + } + } + }, + "additionalProperties": false, + "required": [ + "application", + "generation", + "charm-url", + "channel", + "force", + "force-units", + "force-base" + ] + }, + "ApplicationUnexpose": { + "type": "object", + "properties": { + "application": { + "type": "string" + }, + "exposed-endpoints": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "application", + "exposed-endpoints" + ] + }, + "ApplicationUnset": { + "type": "object", + "properties": { + "application": { + "type": "string" + }, + "branch": { + "type": "string" + }, + "options": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "application", + "branch", + "options" + ] + }, + "ApplicationsDeploy": { + "type": "object", + "properties": { + "applications": { + "type": "array", + "items": { + "$ref": "#/definitions/ApplicationDeploy" + } + } + }, + "additionalProperties": false, + "required": [ + "applications" + ] + }, + "Base": { + "type": "object", + "properties": { + "channel": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "channel" + ] + }, + "CharmOrigin": { + "type": "object", + "properties": { + "architecture": { + "type": "string" + }, + "base": { + "$ref": "#/definitions/Base" + }, + "branch": { + "type": "string" + }, + "hash": { + "type": "string" + }, + "id": { + "type": "string" + }, + "instance-key": { + "type": "string" + }, + "revision": { + "type": "integer" + }, + "risk": { + "type": "string" + }, + "source": { + "type": "string" + }, + "track": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "source", + "type", + "id" + ] + }, + "CharmRelation": { + "type": "object", + "properties": { + "interface": { + "type": "string" + }, + "limit": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "optional": { + "type": "boolean" + }, + "role": { + "type": "string" + }, + "scope": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "role", + "interface", + "optional", + "limit", + "scope" + ] + }, + "CharmURLOriginResult": { + "type": "object", + "properties": { + "charm-origin": { + "$ref": "#/definitions/CharmOrigin" + }, + "error": { + "$ref": "#/definitions/Error" + }, + "url": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "url", + "charm-origin" + ] + }, + "ConfigResult": { + "type": "object", + "properties": { + "config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false, + "required": [ + "config" + ] + }, + "ConfigSet": { + "type": "object", + "properties": { + "application": { + "type": "string" + }, + "config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "config-yaml": { + "type": "string" + }, + "generation": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "application", + "generation", + "config", + "config-yaml" + ] + }, + "ConfigSetArgs": { + "type": "object", + "properties": { + "Args": { + "type": "array", + "items": { + "$ref": "#/definitions/ConfigSet" + } + } + }, + "additionalProperties": false, + "required": [ + "Args" + ] + }, + "Constraints": { + "type": "object", + "properties": { + "Count": { + "type": "integer" + }, + "Pool": { + "type": "string" + }, + "Size": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "Pool", + "Size", + "Count" + ] + }, + "ConsumeApplicationArg": { + "type": "object", + "properties": { + "ApplicationOfferDetails": { + "$ref": "#/definitions/ApplicationOfferDetails" + }, + "application-alias": { + "type": "string" + }, + "application-description": { + "type": "string" + }, + "bindings": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "endpoints": { + "type": "array", + "items": { + "$ref": "#/definitions/RemoteEndpoint" + } + }, + "external-controller": { + "$ref": "#/definitions/ExternalControllerInfo" + }, + "macaroon": { + "$ref": "#/definitions/Macaroon" + }, + "offer-name": { + "type": "string" + }, + "offer-url": { + "type": "string" + }, + "offer-uuid": { + "type": "string" + }, + "source-model-tag": { + "type": "string" + }, + "spaces": { + "type": "array", + "items": { + "$ref": "#/definitions/RemoteSpace" + } + }, + "users": { + "type": "array", + "items": { + "$ref": "#/definitions/OfferUserDetails" + } + } + }, + "additionalProperties": false, + "required": [ + "source-model-tag", + "offer-uuid", + "offer-url", + "offer-name", + "application-description", + "ApplicationOfferDetails" + ] + }, + "ConsumeApplicationArgs": { + "type": "object", + "properties": { + "args": { + "type": "array", + "items": { + "$ref": "#/definitions/ConsumeApplicationArg" + } + } + }, + "additionalProperties": false + }, + "DestroyApplicationInfo": { + "type": "object", + "properties": { + "destroyed-storage": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } + }, + "destroyed-units": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } + }, + "detached-storage": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } + } + }, + "additionalProperties": false + }, + "DestroyApplicationParams": { + "type": "object", + "properties": { + "application-tag": { + "type": "string" + }, + "destroy-storage": { + "type": "boolean" + }, + "dry-run": { + "type": "boolean" + }, + "force": { + "type": "boolean" + }, + "max-wait": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "application-tag", + "force" + ] + }, + "DestroyApplicationResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "info": { + "$ref": "#/definitions/DestroyApplicationInfo" + } + }, + "additionalProperties": false + }, + "DestroyApplicationResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/DestroyApplicationResult" + } + } + }, + "additionalProperties": false + }, + "DestroyApplicationsParams": { + "type": "object", + "properties": { + "applications": { + "type": "array", + "items": { + "$ref": "#/definitions/DestroyApplicationParams" + } + } + }, + "additionalProperties": false, + "required": [ + "applications" + ] + }, + "DestroyConsumedApplicationParams": { + "type": "object", + "properties": { + "application-tag": { + "type": "string" + }, + "force": { + "type": "boolean" + }, + "max-wait": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "application-tag" + ] + }, + "DestroyConsumedApplicationsParams": { + "type": "object", + "properties": { + "applications": { + "type": "array", + "items": { + "$ref": "#/definitions/DestroyConsumedApplicationParams" + } + } + }, + "additionalProperties": false, + "required": [ + "applications" + ] + }, + "DestroyRelation": { + "type": "object", + "properties": { + "endpoints": { + "type": "array", + "items": { + "type": "string" + } + }, + "force": { + "type": "boolean" + }, + "max-wait": { + "type": "integer" + }, + "relation-id": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "relation-id" + ] + }, + "DestroyUnitInfo": { + "type": "object", + "properties": { + "destroyed-storage": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } + }, + "detached-storage": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } + } + }, + "additionalProperties": false + }, + "DestroyUnitParams": { + "type": "object", + "properties": { + "destroy-storage": { + "type": "boolean" + }, + "dry-run": { + "type": "boolean" + }, + "force": { + "type": "boolean" + }, + "max-wait": { + "type": "integer" + }, + "unit-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "unit-tag" + ] + }, + "DestroyUnitResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "info": { + "$ref": "#/definitions/DestroyUnitInfo" + } + }, + "additionalProperties": false + }, + "DestroyUnitResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/DestroyUnitResult" + } + } + }, + "additionalProperties": false + }, + "DestroyUnitsParams": { + "type": "object", + "properties": { + "units": { + "type": "array", + "items": { + "$ref": "#/definitions/DestroyUnitParams" + } + } + }, + "additionalProperties": false, + "required": [ + "units" + ] + }, + "EndpointRelationData": { + "type": "object", + "properties": { + "ApplicationData": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "cross-model": { + "type": "boolean" + }, + "endpoint": { + "type": "string" + }, + "related-endpoint": { + "type": "string" + }, + "relation-id": { + "type": "integer" + }, + "unit-relation-data": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/RelationData" + } + } + } + }, + "additionalProperties": false, + "required": [ + "relation-id", + "endpoint", + "cross-model", + "related-endpoint", + "ApplicationData", + "unit-relation-data" + ] + }, + "Entities": { + "type": "object", + "properties": { + "entities": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } + } + }, + "additionalProperties": false, + "required": [ + "entities" + ] + }, + "Entity": { + "type": "object", + "properties": { + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ErrorResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "ErrorResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "ExposedEndpoint": { + "type": "object", + "properties": { + "expose-to-cidrs": { + "type": "array", + "items": { + "type": "string" + } + }, + "expose-to-spaces": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "ExternalControllerInfo": { + "type": "object", + "properties": { + "addrs": { + "type": "array", + "items": { + "type": "string" + } + }, + "ca-cert": { + "type": "string" + }, + "controller-alias": { + "type": "string" + }, + "controller-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "controller-tag", + "controller-alias", + "addrs", + "ca-cert" + ] + }, + "Macaroon": { + "type": "object", + "additionalProperties": false + }, + "OfferUserDetails": { + "type": "object", + "properties": { + "access": { + "type": "string" + }, + "display-name": { + "type": "string" + }, + "user": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "user", + "display-name", + "access" + ] + }, + "Placement": { + "type": "object", + "properties": { + "directive": { + "type": "string" + }, + "scope": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "scope", + "directive" + ] + }, + "RelationData": { + "type": "object", + "properties": { + "InScope": { + "type": "boolean" + }, + "UnitData": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + } + }, + "additionalProperties": false, + "required": [ + "InScope", + "UnitData" + ] + }, + "RelationSuspendedArg": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "relation-id": { + "type": "integer" + }, + "suspended": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "relation-id", + "message", + "suspended" + ] + }, + "RelationSuspendedArgs": { + "type": "object", + "properties": { + "args": { + "type": "array", + "items": { + "$ref": "#/definitions/RelationSuspendedArg" + } + } + }, + "additionalProperties": false, + "required": [ + "args" + ] + }, + "RemoteEndpoint": { + "type": "object", + "properties": { + "interface": { + "type": "string" + }, + "limit": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "role": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "role", + "interface", + "limit" + ] + }, + "RemoteSpace": { + "type": "object", + "properties": { + "cloud-type": { + "type": "string" + }, + "name": { + "type": "string" + }, + "provider-attributes": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "provider-id": { + "type": "string" + }, + "subnets": { + "type": "array", + "items": { + "$ref": "#/definitions/Subnet" + } + } + }, + "additionalProperties": false, + "required": [ + "cloud-type", + "name", + "provider-id", + "provider-attributes", + "subnets" + ] + }, + "ScaleApplicationInfo": { + "type": "object", + "properties": { + "num-units": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "num-units" + ] + }, + "ScaleApplicationParams": { + "type": "object", + "properties": { + "application-tag": { + "type": "string" + }, + "force": { + "type": "boolean" + }, + "scale": { + "type": "integer" + }, + "scale-change": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "application-tag", + "scale", + "force" + ] + }, + "ScaleApplicationResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "info": { + "$ref": "#/definitions/ScaleApplicationInfo" + } + }, + "additionalProperties": false + }, + "ScaleApplicationResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ScaleApplicationResult" + } + } + }, + "additionalProperties": false + }, + "ScaleApplicationsParams": { + "type": "object", + "properties": { + "applications": { + "type": "array", + "items": { + "$ref": "#/definitions/ScaleApplicationParams" + } + } + }, + "additionalProperties": false, + "required": [ + "applications" + ] + }, + "SetConstraints": { + "type": "object", + "properties": { + "application": { + "type": "string" + }, + "constraints": { + "$ref": "#/definitions/Value" + } + }, + "additionalProperties": false, + "required": [ + "application", + "constraints" + ] + }, + "StorageConstraints": { + "type": "object", + "properties": { + "count": { + "type": "integer" + }, + "pool": { + "type": "string" + }, + "size": { + "type": "integer" + } + }, + "additionalProperties": false + }, + "StringResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "result" + ] + }, + "Subnet": { + "type": "object", + "properties": { + "cidr": { + "type": "string" + }, + "life": { + "type": "string" + }, + "provider-id": { + "type": "string" + }, + "provider-network-id": { + "type": "string" + }, + "provider-space-id": { + "type": "string" + }, + "space-tag": { + "type": "string" + }, + "status": { + "type": "string" + }, + "vlan-tag": { + "type": "integer" + }, + "zones": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "cidr", + "vlan-tag", + "life", + "space-tag", + "zones" + ] + }, + "UnitInfoResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "$ref": "#/definitions/UnitResult" + } + }, + "additionalProperties": false + }, + "UnitInfoResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/UnitInfoResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "UnitResult": { + "type": "object", + "properties": { + "address": { + "type": "string" + }, + "charm": { + "type": "string" + }, + "leader": { + "type": "boolean" + }, + "life": { + "type": "string" + }, + "machine": { + "type": "string" + }, + "opened-ports": { + "type": "array", + "items": { + "type": "string" + } + }, + "provider-id": { + "type": "string" + }, + "public-address": { + "type": "string" + }, + "relation-data": { + "type": "array", + "items": { + "$ref": "#/definitions/EndpointRelationData" + } + }, + "tag": { + "type": "string" + }, + "workload-version": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag", + "workload-version", + "opened-ports", + "charm" + ] + }, + "UnitsResolved": { + "type": "object", + "properties": { + "all": { + "type": "boolean" + }, + "retry": { + "type": "boolean" + }, + "tags": { + "$ref": "#/definitions/Entities" + } + }, + "additionalProperties": false + }, + "UpdateChannelArg": { + "type": "object", + "properties": { + "channel": { + "type": "string" + }, + "force": { + "type": "boolean" + }, + "tag": { + "$ref": "#/definitions/Entity" + } + }, + "additionalProperties": false, + "required": [ + "tag", + "force", + "channel" + ] + }, + "UpdateChannelArgs": { + "type": "object", + "properties": { + "args": { + "type": "array", + "items": { + "$ref": "#/definitions/UpdateChannelArg" + } + } + }, + "additionalProperties": false, + "required": [ + "args" + ] + }, + "Value": { + "type": "object", + "properties": { + "allocate-public-ip": { + "type": "boolean" + }, + "arch": { + "type": "string" + }, + "container": { + "type": "string" + }, + "cores": { + "type": "integer" + }, + "cpu-power": { + "type": "integer" + }, + "instance-role": { + "type": "string" + }, + "instance-type": { + "type": "string" + }, + "mem": { + "type": "integer" + }, + "root-disk": { + "type": "integer" + }, + "root-disk-source": { + "type": "string" + }, + "spaces": { + "type": "array", + "items": { + "type": "string" + } + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "virt-type": { + "type": "string" + }, + "zones": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + } + } + } + }, + { + "Name": "ApplicationOffers", + "Description": "OffersAPI implements the cross model interface and is the concrete\nimplementation of the api end point.", + "Version": 4, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "controller-user" + ], + "Schema": { + "type": "object", + "properties": { + "ApplicationOffers": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/OfferURLs" + }, + "Result": { + "$ref": "#/definitions/ApplicationOffersResults" + } + }, + "description": "ApplicationOffers gets details about remote applications that match given URLs." + }, + "DestroyOffers": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/DestroyApplicationOffers" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "DestroyOffers removes the offers specified by the given URLs, forcing if necessary." + }, + "FindApplicationOffers": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/OfferFilters" + }, + "Result": { + "$ref": "#/definitions/QueryApplicationOffersResults" + } + }, + "description": "FindApplicationOffers gets details about remote applications that match given filter." + }, + "GetConsumeDetails": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ConsumeOfferDetailsArg" + }, + "Result": { + "$ref": "#/definitions/ConsumeOfferDetailsResults" + } + }, + "description": "GetConsumeDetails returns the details necessary to pass to another model\nto allow the specified args user to consume the offers represented by the args URLs." + }, + "ListApplicationOffers": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/OfferFilters" + }, + "Result": { + "$ref": "#/definitions/QueryApplicationOffersResults" + } + }, + "description": "ListApplicationOffers gets deployed details about application offers that match given filter.\nThe results contain details about the deployed applications such as connection count." + }, + "ModifyOfferAccess": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ModifyOfferAccessRequest" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "ModifyOfferAccess changes the application offer access granted to users." + }, + "Offer": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/AddApplicationOffers" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "Offer makes application endpoints available for consumption at a specified URL." + }, + "RemoteApplicationInfo": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/OfferURLs" + }, + "Result": { + "$ref": "#/definitions/RemoteApplicationInfoResults" + } + }, + "description": "RemoteApplicationInfo returns information about the requested remote application.\nThis call currently has no client side API, only there for the Dashboard at this stage." + } + }, + "definitions": { + "AddApplicationOffer": { + "type": "object", + "properties": { + "application-description": { + "type": "string" + }, + "application-name": { + "type": "string" + }, + "endpoints": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "model-tag": { + "type": "string" + }, + "offer-name": { + "type": "string" + }, + "owner-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "model-tag", + "offer-name", + "application-name", + "application-description", + "endpoints" + ] + }, + "AddApplicationOffers": { + "type": "object", + "properties": { + "Offers": { + "type": "array", + "items": { + "$ref": "#/definitions/AddApplicationOffer" + } + } + }, + "additionalProperties": false, + "required": [ + "Offers" + ] + }, + "ApplicationOfferAdminDetails": { + "type": "object", + "properties": { + "ApplicationOfferDetails": { + "$ref": "#/definitions/ApplicationOfferDetails" + }, + "application-description": { + "type": "string" + }, + "application-name": { + "type": "string" + }, + "bindings": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "charm-url": { + "type": "string" + }, + "connections": { + "type": "array", + "items": { + "$ref": "#/definitions/OfferConnection" + } + }, + "endpoints": { + "type": "array", + "items": { + "$ref": "#/definitions/RemoteEndpoint" + } + }, + "offer-name": { + "type": "string" + }, + "offer-url": { + "type": "string" + }, + "offer-uuid": { + "type": "string" + }, + "source-model-tag": { + "type": "string" + }, + "spaces": { + "type": "array", + "items": { + "$ref": "#/definitions/RemoteSpace" + } + }, + "users": { + "type": "array", + "items": { + "$ref": "#/definitions/OfferUserDetails" + } + } + }, + "additionalProperties": false, + "required": [ + "source-model-tag", + "offer-uuid", + "offer-url", + "offer-name", + "application-description", + "ApplicationOfferDetails", + "application-name", + "charm-url" + ] + }, + "ApplicationOfferDetails": { + "type": "object", + "properties": { + "application-description": { + "type": "string" + }, + "bindings": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "endpoints": { + "type": "array", + "items": { + "$ref": "#/definitions/RemoteEndpoint" + } + }, + "offer-name": { + "type": "string" + }, + "offer-url": { + "type": "string" + }, + "offer-uuid": { + "type": "string" + }, + "source-model-tag": { + "type": "string" + }, + "spaces": { + "type": "array", + "items": { + "$ref": "#/definitions/RemoteSpace" + } + }, + "users": { + "type": "array", + "items": { + "$ref": "#/definitions/OfferUserDetails" + } + } + }, + "additionalProperties": false, + "required": [ + "source-model-tag", + "offer-uuid", + "offer-url", + "offer-name", + "application-description" + ] + }, + "ApplicationOfferResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "$ref": "#/definitions/ApplicationOfferAdminDetails" + } + }, + "additionalProperties": false + }, + "ApplicationOffersResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ApplicationOfferResult" + } + } + }, + "additionalProperties": false + }, + "ConsumeOfferDetails": { + "type": "object", + "properties": { + "external-controller": { + "$ref": "#/definitions/ExternalControllerInfo" + }, + "macaroon": { + "$ref": "#/definitions/Macaroon" + }, + "offer": { + "$ref": "#/definitions/ApplicationOfferDetails" + } + }, + "additionalProperties": false + }, + "ConsumeOfferDetailsArg": { + "type": "object", + "properties": { + "offer-urls": { + "$ref": "#/definitions/OfferURLs" + }, + "user-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "offer-urls" + ] + }, + "ConsumeOfferDetailsResult": { + "type": "object", + "properties": { + "ConsumeOfferDetails": { + "$ref": "#/definitions/ConsumeOfferDetails" + }, + "error": { + "$ref": "#/definitions/Error" + }, + "external-controller": { + "$ref": "#/definitions/ExternalControllerInfo" + }, + "macaroon": { + "$ref": "#/definitions/Macaroon" + }, + "offer": { + "$ref": "#/definitions/ApplicationOfferDetails" + } + }, + "additionalProperties": false, + "required": [ + "ConsumeOfferDetails" + ] + }, + "ConsumeOfferDetailsResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ConsumeOfferDetailsResult" + } + } + }, + "additionalProperties": false + }, + "DestroyApplicationOffers": { + "type": "object", + "properties": { + "force": { + "type": "boolean" + }, + "offer-urls": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "offer-urls" + ] + }, + "EndpointFilterAttributes": { + "type": "object", + "properties": { + "interface": { + "type": "string" + }, + "name": { + "type": "string" + }, + "role": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "role", + "interface", + "name" + ] + }, + "EntityStatus": { + "type": "object", + "properties": { + "data": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "info": { + "type": "string" + }, + "since": { + "type": "string", + "format": "date-time" + }, + "status": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "status", + "info", + "since" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ErrorResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "ErrorResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "ExternalControllerInfo": { + "type": "object", + "properties": { + "addrs": { + "type": "array", + "items": { + "type": "string" + } + }, + "ca-cert": { + "type": "string" + }, + "controller-alias": { + "type": "string" + }, + "controller-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "controller-tag", + "controller-alias", + "addrs", + "ca-cert" + ] + }, + "Macaroon": { + "type": "object", + "additionalProperties": false + }, + "ModifyOfferAccess": { + "type": "object", + "properties": { + "access": { + "type": "string" + }, + "action": { + "type": "string" + }, + "offer-url": { + "type": "string" + }, + "user-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "user-tag", + "action", + "access", + "offer-url" + ] + }, + "ModifyOfferAccessRequest": { + "type": "object", + "properties": { + "changes": { + "type": "array", + "items": { + "$ref": "#/definitions/ModifyOfferAccess" + } + } + }, + "additionalProperties": false, + "required": [ + "changes" + ] + }, + "OfferConnection": { + "type": "object", + "properties": { + "endpoint": { + "type": "string" + }, + "ingress-subnets": { + "type": "array", + "items": { + "type": "string" + } + }, + "relation-id": { + "type": "integer" + }, + "source-model-tag": { + "type": "string" + }, + "status": { + "$ref": "#/definitions/EntityStatus" + }, + "username": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "source-model-tag", + "relation-id", + "username", + "endpoint", + "status", + "ingress-subnets" + ] + }, + "OfferFilter": { + "type": "object", + "properties": { + "allowed-users": { + "type": "array", + "items": { + "type": "string" + } + }, + "application-description": { + "type": "string" + }, + "application-name": { + "type": "string" + }, + "application-user": { + "type": "string" + }, + "connected-users": { + "type": "array", + "items": { + "type": "string" + } + }, + "endpoints": { + "type": "array", + "items": { + "$ref": "#/definitions/EndpointFilterAttributes" + } + }, + "model-name": { + "type": "string" + }, + "offer-name": { + "type": "string" + }, + "owner-name": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "owner-name", + "model-name", + "offer-name", + "application-name", + "application-description", + "application-user", + "endpoints", + "connected-users", + "allowed-users" + ] + }, + "OfferFilters": { + "type": "object", + "properties": { + "Filters": { + "type": "array", + "items": { + "$ref": "#/definitions/OfferFilter" + } + } + }, + "additionalProperties": false, + "required": [ + "Filters" + ] + }, + "OfferURLs": { + "type": "object", + "properties": { + "bakery-version": { + "type": "integer" + }, + "offer-urls": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "OfferUserDetails": { + "type": "object", + "properties": { + "access": { + "type": "string" + }, + "display-name": { + "type": "string" + }, + "user": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "user", + "display-name", + "access" + ] + }, + "QueryApplicationOffersResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ApplicationOfferAdminDetails" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "RemoteApplicationInfo": { + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "endpoints": { + "type": "array", + "items": { + "$ref": "#/definitions/RemoteEndpoint" + } + }, + "icon-url-path": { + "type": "string" + }, + "model-tag": { + "type": "string" + }, + "name": { + "type": "string" + }, + "offer-url": { + "type": "string" + }, + "source-model-label": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "model-tag", + "name", + "description", + "offer-url", + "endpoints", + "icon-url-path" + ] + }, + "RemoteApplicationInfoResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "$ref": "#/definitions/RemoteApplicationInfo" + } + }, + "additionalProperties": false + }, + "RemoteApplicationInfoResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/RemoteApplicationInfoResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "RemoteEndpoint": { + "type": "object", + "properties": { + "interface": { + "type": "string" + }, + "limit": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "role": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "role", + "interface", + "limit" + ] + }, + "RemoteSpace": { + "type": "object", + "properties": { + "cloud-type": { + "type": "string" + }, + "name": { + "type": "string" + }, + "provider-attributes": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "provider-id": { + "type": "string" + }, + "subnets": { + "type": "array", + "items": { + "$ref": "#/definitions/Subnet" + } + } + }, + "additionalProperties": false, + "required": [ + "cloud-type", + "name", + "provider-id", + "provider-attributes", + "subnets" + ] + }, + "Subnet": { + "type": "object", + "properties": { + "cidr": { + "type": "string" + }, + "life": { + "type": "string" + }, + "provider-id": { + "type": "string" + }, + "provider-network-id": { + "type": "string" + }, + "provider-space-id": { + "type": "string" + }, + "space-tag": { + "type": "string" + }, + "status": { + "type": "string" + }, + "vlan-tag": { + "type": "integer" + }, + "zones": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "cidr", + "vlan-tag", + "life", + "space-tag", + "zones" + ] + } + } + } + }, + { + "Name": "ApplicationScaler", + "Description": "Facade allows model-manager clients to watch and rescale services.", + "Version": 1, + "AvailableTo": [ + "controller-machine-agent" + ], + "Schema": { + "type": "object", + "properties": { + "Rescale": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "Rescale causes any supplied services to be scaled up to their\nminimum size." + }, + "Watch": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/StringsWatchResult" + } + }, + "description": "Watch returns a watcher that sends the names of services whose\nunit count may be below their configured minimum." + } + }, + "definitions": { + "Entities": { + "type": "object", + "properties": { + "entities": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } + } + }, + "additionalProperties": false, + "required": [ + "entities" + ] + }, + "Entity": { + "type": "object", + "properties": { + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ErrorResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "ErrorResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "StringsWatchResult": { + "type": "object", + "properties": { + "changes": { + "type": "array", + "items": { + "type": "string" + } + }, + "error": { + "$ref": "#/definitions/Error" + }, + "watcher-id": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "watcher-id" + ] + } + } + } + }, + { + "Name": "Backups", + "Description": "API provides backup-specific API methods.", + "Version": 3, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "Create": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/BackupsCreateArgs" + }, + "Result": { + "$ref": "#/definitions/BackupsMetadataResult" + } + }, + "description": "Create is the API method that requests juju to create a new backup\nof its state." + } + }, + "definitions": { + "BackupsCreateArgs": { + "type": "object", + "properties": { + "no-download": { + "type": "boolean" + }, + "notes": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "notes", + "no-download" + ] + }, + "BackupsMetadataResult": { + "type": "object", + "properties": { + "base": { + "type": "string" + }, + "checksum": { + "type": "string" + }, + "checksum-format": { + "type": "string" + }, + "controller-machine-id": { + "type": "string" + }, + "controller-machine-inst-id": { + "type": "string" + }, + "controller-uuid": { + "type": "string" + }, + "filename": { + "type": "string" + }, + "finished": { + "type": "string", + "format": "date-time" + }, + "format-version": { + "type": "integer" + }, + "ha-nodes": { + "type": "integer" + }, + "hostname": { + "type": "string" + }, + "id": { + "type": "string" + }, + "machine": { + "type": "string" + }, + "model": { + "type": "string" + }, + "notes": { + "type": "string" + }, + "size": { + "type": "integer" + }, + "started": { + "type": "string", + "format": "date-time" + }, + "stored": { + "type": "string", + "format": "date-time" + }, + "version": { + "$ref": "#/definitions/Number" + } + }, + "additionalProperties": false, + "required": [ + "id", + "checksum", + "checksum-format", + "size", + "stored", + "started", + "finished", + "notes", + "model", + "machine", + "hostname", + "version", + "base", + "filename", + "format-version", + "controller-uuid", + "controller-machine-id", + "controller-machine-inst-id", + "ha-nodes" + ] + }, + "Number": { + "type": "object", + "properties": { + "Build": { + "type": "integer" + }, + "Major": { + "type": "integer" + }, + "Minor": { + "type": "integer" + }, + "Patch": { + "type": "integer" + }, + "Tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "Major", + "Minor", + "Tag", + "Patch", + "Build" + ] + } + } + } + }, + { + "Name": "Block", + "Description": "API implements Block interface and is the concrete\nimplementation of the api end point.", + "Version": 2, + "AvailableTo": [ + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "List": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/BlockResults" + } + }, + "description": "List implements Block.List()." + }, + "SwitchBlockOff": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/BlockSwitchParams" + }, + "Result": { + "$ref": "#/definitions/ErrorResult" + } + }, + "description": "SwitchBlockOff implements Block.SwitchBlockOff()." + }, + "SwitchBlockOn": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/BlockSwitchParams" + }, + "Result": { + "$ref": "#/definitions/ErrorResult" + } + }, + "description": "SwitchBlockOn implements Block.SwitchBlockOn()." + } + }, + "definitions": { + "Block": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "message": { + "type": "string" + }, + "tag": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "id", + "tag", + "type" + ] + }, + "BlockResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "$ref": "#/definitions/Block" + } + }, + "additionalProperties": false, + "required": [ + "result" + ] + }, + "BlockResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/BlockResult" + } + } + }, + "additionalProperties": false + }, + "BlockSwitchParams": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "type" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ErrorResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + } + } + } + }, + { + "Name": "Bundle", + "Description": "APIv6 provides the Bundle API facade for version 6. It is otherwise\nidentical to V5 with the exception that the V6 adds the support for\nmulti-part yaml handling to GetChanges and GetChangesMapArgs.", + "Version": 6, + "AvailableTo": [ + "controller-user", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "ExportBundle": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ExportBundleParams" + }, + "Result": { + "$ref": "#/definitions/StringResult" + } + }, + "description": "ExportBundle exports the current model configuration as bundle." + }, + "GetChanges": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/BundleChangesParams" + }, + "Result": { + "$ref": "#/definitions/BundleChangesResults" + } + }, + "description": "GetChanges returns the list of changes required to deploy the given bundle\ndata. The changes are sorted by requirements, so that they can be applied in\norder.\nGetChanges has been superseded in favour of GetChangesMapArgs. It's\npreferable to use that new method to add new functionality and move clients\naway from this one." + }, + "GetChangesMapArgs": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/BundleChangesParams" + }, + "Result": { + "$ref": "#/definitions/BundleChangesMapArgsResults" + } + }, + "description": "GetChangesMapArgs returns the list of changes required to deploy the given\nbundle data. The changes are sorted by requirements, so that they can be\napplied in order.\nV4 GetChangesMapArgs is not supported on anything less than v4" + } + }, + "definitions": { + "BundleChange": { + "type": "object", + "properties": { + "args": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true + } + }, + "id": { + "type": "string" + }, + "method": { + "type": "string" + }, + "requires": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "id", + "method", + "args", + "requires" + ] + }, + "BundleChangesMapArgs": { + "type": "object", + "properties": { + "args": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "id": { + "type": "string" + }, + "method": { + "type": "string" + }, + "requires": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "id", + "method", + "args", + "requires" + ] + }, + "BundleChangesMapArgsResults": { + "type": "object", + "properties": { + "changes": { + "type": "array", + "items": { + "$ref": "#/definitions/BundleChangesMapArgs" + } + }, + "errors": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "BundleChangesParams": { + "type": "object", + "properties": { + "bundleURL": { + "type": "string" + }, + "yaml": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "yaml", + "bundleURL" + ] + }, + "BundleChangesResults": { + "type": "object", + "properties": { + "changes": { + "type": "array", + "items": { + "$ref": "#/definitions/BundleChange" + } + }, + "errors": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ExportBundleParams": { + "type": "object", + "properties": { + "include-charm-defaults": { + "type": "boolean" + } + }, + "additionalProperties": false + }, + "StringResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "result" + ] + } + } + } + }, + { + "Name": "CAASAdmission", + "Description": "", + "Version": 1, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent" + ], + "Schema": { + "type": "object", + "properties": { + "ControllerAPIInfoForModels": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ControllerAPIInfoResults" + } + }, + "description": "ControllerAPIInfoForModels returns the controller api connection details for the specified models." + }, + "ControllerConfig": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/ControllerConfigResult" + } + }, + "description": "ControllerConfig returns the controller's configuration." + } + }, + "definitions": { + "ControllerAPIInfoResult": { + "type": "object", + "properties": { + "addresses": { + "type": "array", + "items": { + "type": "string" + } + }, + "cacert": { + "type": "string" + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false, + "required": [ + "addresses", + "cacert" + ] + }, + "ControllerAPIInfoResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ControllerAPIInfoResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "ControllerConfigResult": { + "type": "object", + "properties": { + "config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + } + }, + "additionalProperties": false, + "required": [ + "config" + ] + }, + "Entities": { + "type": "object", + "properties": { + "entities": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } + } + }, + "additionalProperties": false, + "required": [ + "entities" + ] + }, + "Entity": { + "type": "object", + "properties": { + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + } + } + } + }, + { + "Name": "CAASAgent", + "Description": "FacadeV2 is the V2 facade of the caas agent", + "Version": 2, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "CloudSpec": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/CloudSpecResults" + } + }, + "description": "CloudSpec returns the model's cloud spec." + }, + "ControllerAPIInfoForModels": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ControllerAPIInfoResults" + } + }, + "description": "ControllerAPIInfoForModels returns the controller api connection details for the specified models." + }, + "ControllerConfig": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/ControllerConfigResult" + } + }, + "description": "ControllerConfig returns the controller's configuration." + }, + "GetCloudSpec": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ModelTag" + }, + "Result": { + "$ref": "#/definitions/CloudSpecResult" + } + }, + "description": "GetCloudSpec constructs the CloudSpec for a validated and authorized model." + }, + "ModelConfig": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/ModelConfigResult" + } + }, + "description": "ModelConfig returns the current model's configuration." + }, + "WatchCloudSpecsChanges": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/NotifyWatchResults" + } + }, + "description": "WatchCloudSpecsChanges returns a watcher for cloud spec changes." + }, + "WatchForModelConfigChanges": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/NotifyWatchResult" + } + }, + "description": "WatchForModelConfigChanges returns a NotifyWatcher that observes\nchanges to the model configuration.\nNote that although the NotifyWatchResult contains an Error field,\nit's not used because we are only returning a single watcher,\nso we use the regular error return." + } + }, + "definitions": { + "CloudCredential": { + "type": "object", + "properties": { + "attrs": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "auth-type": { + "type": "string" + }, + "redacted": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "auth-type" + ] + }, + "CloudSpec": { + "type": "object", + "properties": { + "cacertificates": { + "type": "array", + "items": { + "type": "string" + } + }, + "credential": { + "$ref": "#/definitions/CloudCredential" + }, + "endpoint": { + "type": "string" + }, + "identity-endpoint": { + "type": "string" + }, + "is-controller-cloud": { + "type": "boolean" + }, + "name": { + "type": "string" + }, + "region": { + "type": "string" + }, + "skip-tls-verify": { + "type": "boolean" + }, + "storage-endpoint": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "type", + "name" + ] + }, + "CloudSpecResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "$ref": "#/definitions/CloudSpec" + } + }, + "additionalProperties": false + }, + "CloudSpecResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/CloudSpecResult" + } + } + }, + "additionalProperties": false + }, + "ControllerAPIInfoResult": { + "type": "object", + "properties": { + "addresses": { + "type": "array", + "items": { + "type": "string" + } + }, + "cacert": { + "type": "string" + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false, + "required": [ + "addresses", + "cacert" + ] + }, + "ControllerAPIInfoResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ControllerAPIInfoResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "ControllerConfigResult": { + "type": "object", + "properties": { + "config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + } + }, + "additionalProperties": false, + "required": [ + "config" + ] + }, + "Entities": { + "type": "object", + "properties": { + "entities": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } + } + }, + "additionalProperties": false, + "required": [ + "entities" + ] + }, + "Entity": { + "type": "object", + "properties": { + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ModelConfigResult": { + "type": "object", + "properties": { + "config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + } + }, + "additionalProperties": false, + "required": [ + "config" + ] + }, + "ModelTag": { + "type": "object", + "additionalProperties": false + }, + "NotifyWatchResult": { + "type": "object", + "properties": { + "NotifyWatcherId": { + "type": "string" + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false, + "required": [ + "NotifyWatcherId" + ] + }, + "NotifyWatchResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/NotifyWatchResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + } + } + } + }, + { + "Name": "CAASApplication", + "Description": "", + "Version": 1, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "UnitIntroduction": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/CAASUnitIntroductionArgs" + }, + "Result": { + "$ref": "#/definitions/CAASUnitIntroductionResult" + } + }, + "description": "UnitIntroduction sets the status of each given entity." + }, + "UnitTerminating": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entity" + }, + "Result": { + "$ref": "#/definitions/CAASUnitTerminationResult" + } + }, + "description": "UnitTerminating should be called by the CAASUnitTerminationWorker when\nthe agent receives a signal to exit. UnitTerminating will return how\nthe agent should shutdown." + } + }, + "definitions": { + "CAASUnitIntroduction": { + "type": "object", + "properties": { + "agent-conf": { + "type": "array", + "items": { + "type": "integer" + } + }, + "unit-name": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "unit-name", + "agent-conf" + ] + }, + "CAASUnitIntroductionArgs": { + "type": "object", + "properties": { + "pod-name": { + "type": "string" + }, + "pod-uuid": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "pod-name", + "pod-uuid" + ] + }, + "CAASUnitIntroductionResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "$ref": "#/definitions/CAASUnitIntroduction" + } + }, + "additionalProperties": false + }, + "CAASUnitTerminationResult": { + "type": "object", + "properties": { + "Error": { + "$ref": "#/definitions/Error" + }, + "WillRestart": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "WillRestart", + "Error" + ] + }, + "Entity": { + "type": "object", + "properties": { + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + } + } + } + }, + { + "Name": "CAASApplicationProvisioner", + "Description": "", + "Version": 1, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "ApplicationCharmInfo": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entity" + }, + "Result": { + "$ref": "#/definitions/Charm" + } + }, + "description": "ApplicationCharmInfo returns information about an application's charm." + }, + "ApplicationOCIResources": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/CAASApplicationOCIResourceResults" + } + }, + "description": "ApplicationOCIResources returns the OCI image resources for an application." + }, + "CharmInfo": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/CharmURL" + }, + "Result": { + "$ref": "#/definitions/Charm" + } + }, + "description": "CharmInfo returns information about the requested charm." + }, + "ClearApplicationsResources": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "ClearApplicationsResources clears the flags which indicate\napplications still have resources in the cluster." + }, + "DestroyUnits": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/DestroyUnitsParams" + }, + "Result": { + "$ref": "#/definitions/DestroyUnitResults" + } + }, + "description": "DestroyUnits is responsible for scaling down a set of units on the this\nApplication." + }, + "Life": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/LifeResults" + } + }, + "description": "Life returns the life status of every supplied entity, where available." + }, + "ProvisionerConfig": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/CAASApplicationProvisionerConfigResult" + } + }, + "description": "ProvisionerConfig returns the provisioner's configuration." + }, + "ProvisioningInfo": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/CAASApplicationProvisioningInfoResults" + } + }, + "description": "ProvisioningInfo returns the info needed to provision a caas application." + }, + "ProvisioningState": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entity" + }, + "Result": { + "$ref": "#/definitions/CAASApplicationProvisioningStateResult" + } + }, + "description": "ProvisioningState returns the provisioning state for the application." + }, + "Remove": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "Remove removes every given entity from state, calling EnsureDead\nfirst, then Remove. It will fail if the entity is not present." + }, + "SetOperatorStatus": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/SetStatus" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "SetOperatorStatus sets the status of each given entity." + }, + "SetPasswords": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/EntityPasswords" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "SetPasswords sets the given password for each supplied entity, if possible." + }, + "SetProvisioningState": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/CAASApplicationProvisioningStateArg" + }, + "Result": { + "$ref": "#/definitions/ErrorResult" + } + }, + "description": "SetProvisioningState sets the provisioning state for the application." + }, + "Units": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/CAASUnitsResults" + } + }, + "description": "Units returns all the units for each application specified." + }, + "UpdateApplicationsUnits": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/UpdateApplicationUnitArgs" + }, + "Result": { + "$ref": "#/definitions/UpdateApplicationUnitResults" + } + }, + "description": "UpdateApplicationsUnits updates the Juju data model to reflect the given\nunits of the specified application." + }, + "Watch": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/NotifyWatchResults" + } + }, + "description": "Watch starts an NotifyWatcher for each given entity." + }, + "WatchApplications": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/StringsWatchResult" + } + }, + "description": "WatchApplications starts a StringsWatcher to watch applications\ndeployed to this model." + }, + "WatchProvisioningInfo": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/NotifyWatchResults" + } + }, + "description": "WatchProvisioningInfo provides a watcher for changes that affect the\ninformation returned by ProvisioningInfo. This is useful for ensuring the\nlatest application stated is ensured." + }, + "WatchUnits": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/StringsWatchResults" + } + }, + "description": "WatchUnits starts a StringsWatcher to watch changes to the\nlifecycle states of units for the specified applications in\nthis model." + } + }, + "definitions": { + "ApplicationUnitInfo": { + "type": "object", + "properties": { + "provider-id": { + "type": "string" + }, + "unit-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "provider-id", + "unit-tag" + ] + }, + "ApplicationUnitParams": { + "type": "object", + "properties": { + "address": { + "type": "string" + }, + "data": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "filesystem-info": { + "type": "array", + "items": { + "$ref": "#/definitions/KubernetesFilesystemInfo" + } + }, + "info": { + "type": "string" + }, + "ports": { + "type": "array", + "items": { + "type": "string" + } + }, + "provider-id": { + "type": "string" + }, + "stateful": { + "type": "boolean" + }, + "status": { + "type": "string" + }, + "unit-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "provider-id", + "unit-tag", + "address", + "ports", + "status", + "info" + ] + }, + "Base": { + "type": "object", + "properties": { + "channel": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "channel" + ] + }, + "CAASApplicationOCIResourceResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "$ref": "#/definitions/CAASApplicationOCIResources" + } + }, + "additionalProperties": false + }, + "CAASApplicationOCIResourceResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/CAASApplicationOCIResourceResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "CAASApplicationOCIResources": { + "type": "object", + "properties": { + "images": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/DockerImageInfo" + } + } + } + }, + "additionalProperties": false, + "required": [ + "images" + ] + }, + "CAASApplicationProvisionerConfig": { + "type": "object", + "properties": { + "unmanaged-applications": { + "$ref": "#/definitions/Entities" + } + }, + "additionalProperties": false + }, + "CAASApplicationProvisionerConfigResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "provisioner-config": { + "$ref": "#/definitions/CAASApplicationProvisionerConfig" + } + }, + "additionalProperties": false + }, + "CAASApplicationProvisioningInfo": { + "type": "object", + "properties": { + "api-addresses": { + "type": "array", + "items": { + "type": "string" + } + }, + "base": { + "$ref": "#/definitions/Base" + }, + "ca-cert": { + "type": "string" + }, + "charm-modified-version": { + "type": "integer" + }, + "charm-url": { + "type": "string" + }, + "constraints": { + "$ref": "#/definitions/Value" + }, + "devices": { + "type": "array", + "items": { + "$ref": "#/definitions/KubernetesDeviceParams" + } + }, + "error": { + "$ref": "#/definitions/Error" + }, + "filesystems": { + "type": "array", + "items": { + "$ref": "#/definitions/KubernetesFilesystemParams" + } + }, + "image-repo": { + "$ref": "#/definitions/DockerImageInfo" + }, + "scale": { + "type": "integer" + }, + "tags": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "trust": { + "type": "boolean" + }, + "version": { + "$ref": "#/definitions/Number" + }, + "volumes": { + "type": "array", + "items": { + "$ref": "#/definitions/KubernetesVolumeParams" + } + } + }, + "additionalProperties": false, + "required": [ + "version", + "api-addresses", + "ca-cert", + "constraints" + ] + }, + "CAASApplicationProvisioningInfoResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/CAASApplicationProvisioningInfo" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "CAASApplicationProvisioningState": { + "type": "object", + "properties": { + "scale-target": { + "type": "integer" + }, + "scaling": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "scaling", + "scale-target" + ] + }, + "CAASApplicationProvisioningStateArg": { + "type": "object", + "properties": { + "application": { + "$ref": "#/definitions/Entity" + }, + "provisioning-state": { + "$ref": "#/definitions/CAASApplicationProvisioningState" + } + }, + "additionalProperties": false, + "required": [ + "application", + "provisioning-state" + ] + }, + "CAASApplicationProvisioningStateResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "provisioning-state": { + "$ref": "#/definitions/CAASApplicationProvisioningState" + } + }, + "additionalProperties": false + }, + "CAASUnitInfo": { + "type": "object", + "properties": { + "tag": { + "type": "string" + }, + "unit-status": { + "$ref": "#/definitions/UnitStatus" + } + }, + "additionalProperties": false, + "required": [ + "tag" + ] + }, + "CAASUnitsResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "units": { + "type": "array", + "items": { + "$ref": "#/definitions/CAASUnitInfo" + } + } + }, + "additionalProperties": false + }, + "CAASUnitsResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/CAASUnitsResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "Charm": { + "type": "object", + "properties": { + "actions": { + "$ref": "#/definitions/CharmActions" + }, + "config": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmOption" + } + } + }, + "lxd-profile": { + "$ref": "#/definitions/CharmLXDProfile" + }, + "manifest": { + "$ref": "#/definitions/CharmManifest" + }, + "meta": { + "$ref": "#/definitions/CharmMeta" + }, + "metrics": { + "$ref": "#/definitions/CharmMetrics" + }, + "revision": { + "type": "integer" + }, + "url": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "revision", + "url", + "config" + ] + }, + "CharmActionSpec": { + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "params": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + } + }, + "additionalProperties": false, + "required": [ + "description", + "params" + ] + }, + "CharmActions": { + "type": "object", + "properties": { + "specs": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmActionSpec" + } + } + } + }, + "additionalProperties": false + }, + "CharmBase": { + "type": "object", + "properties": { + "architectures": { + "type": "array", + "items": { + "type": "string" + } + }, + "channel": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "additionalProperties": false + }, + "CharmContainer": { + "type": "object", + "properties": { + "mounts": { + "type": "array", + "items": { + "$ref": "#/definitions/CharmMount" + } + }, + "resource": { + "type": "string" + } + }, + "additionalProperties": false + }, + "CharmDeployment": { + "type": "object", + "properties": { + "min-version": { + "type": "string" + }, + "mode": { + "type": "string" + }, + "service": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "type", + "mode", + "service", + "min-version" + ] + }, + "CharmDevice": { + "type": "object", + "properties": { + "CountMax": { + "type": "integer" + }, + "CountMin": { + "type": "integer" + }, + "Description": { + "type": "string" + }, + "Name": { + "type": "string" + }, + "Type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "Name", + "Description", + "Type", + "CountMin", + "CountMax" + ] + }, + "CharmLXDProfile": { + "type": "object", + "properties": { + "config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "description": { + "type": "string" + }, + "devices": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + } + } + } + }, + "additionalProperties": false, + "required": [ + "config", + "description", + "devices" + ] + }, + "CharmManifest": { + "type": "object", + "properties": { + "bases": { + "type": "array", + "items": { + "$ref": "#/definitions/CharmBase" + } + } + }, + "additionalProperties": false + }, + "CharmMeta": { + "type": "object", + "properties": { + "assumes-expr": { + "$ref": "#/definitions/ExpressionTree" + }, + "categories": { + "type": "array", + "items": { + "type": "string" + } + }, + "containers": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmContainer" + } + } + }, + "deployment": { + "$ref": "#/definitions/CharmDeployment" + }, + "description": { + "type": "string" + }, + "devices": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmDevice" + } + } + }, + "extra-bindings": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "min-juju-version": { + "type": "string" + }, + "name": { + "type": "string" + }, + "payload-classes": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmPayloadClass" + } + } + }, + "peers": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmRelation" + } + } + }, + "provides": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmRelation" + } + } + }, + "requires": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmRelation" + } + } + }, + "resources": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmResourceMeta" + } + } + }, + "series": { + "type": "array", + "items": { + "type": "string" + } + }, + "storage": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmStorage" + } + } + }, + "subordinate": { + "type": "boolean" + }, + "summary": { + "type": "string" + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "terms": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "name", + "summary", + "description", + "subordinate" + ] + }, + "CharmMetric": { + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "type", + "description" + ] + }, + "CharmMetrics": { + "type": "object", + "properties": { + "metrics": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmMetric" + } + } + }, + "plan": { + "$ref": "#/definitions/CharmPlan" + } + }, + "additionalProperties": false, + "required": [ + "metrics", + "plan" + ] + }, + "CharmMount": { + "type": "object", + "properties": { + "location": { + "type": "string" + }, + "storage": { + "type": "string" + } + }, + "additionalProperties": false + }, + "CharmOption": { + "type": "object", + "properties": { + "default": { + "type": "object", + "additionalProperties": true + }, + "description": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "type" + ] + }, + "CharmPayloadClass": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "type" + ] + }, + "CharmPlan": { + "type": "object", + "properties": { + "required": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "required" + ] + }, + "CharmRelation": { + "type": "object", + "properties": { + "interface": { + "type": "string" + }, + "limit": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "optional": { + "type": "boolean" + }, + "role": { + "type": "string" + }, + "scope": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "role", + "interface", + "optional", + "limit", + "scope" + ] + }, + "CharmResourceMeta": { + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "type", + "path", + "description" + ] + }, + "CharmStorage": { + "type": "object", + "properties": { + "count-max": { + "type": "integer" + }, + "count-min": { + "type": "integer" + }, + "description": { + "type": "string" + }, + "location": { + "type": "string" + }, + "minimum-size": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "properties": { + "type": "array", + "items": { + "type": "string" + } + }, + "read-only": { + "type": "boolean" + }, + "shared": { + "type": "boolean" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "description", + "type", + "shared", + "read-only", + "count-min", + "count-max", + "minimum-size" + ] + }, + "CharmURL": { + "type": "object", + "properties": { + "url": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "url" + ] + }, + "DestroyUnitInfo": { + "type": "object", + "properties": { + "destroyed-storage": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } + }, + "detached-storage": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } + } + }, + "additionalProperties": false + }, + "DestroyUnitParams": { + "type": "object", + "properties": { + "destroy-storage": { + "type": "boolean" + }, + "dry-run": { + "type": "boolean" + }, + "force": { + "type": "boolean" + }, + "max-wait": { + "type": "integer" + }, + "unit-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "unit-tag" + ] + }, + "DestroyUnitResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "info": { + "$ref": "#/definitions/DestroyUnitInfo" + } + }, + "additionalProperties": false + }, + "DestroyUnitResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/DestroyUnitResult" + } + } + }, + "additionalProperties": false + }, + "DestroyUnitsParams": { + "type": "object", + "properties": { + "units": { + "type": "array", + "items": { + "$ref": "#/definitions/DestroyUnitParams" + } + } + }, + "additionalProperties": false, + "required": [ + "units" + ] + }, + "DetailedStatus": { + "type": "object", + "properties": { + "data": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "err": { + "$ref": "#/definitions/Error" + }, + "info": { + "type": "string" + }, + "kind": { + "type": "string" + }, + "life": { + "type": "string" + }, + "since": { + "type": "string", + "format": "date-time" + }, + "status": { + "type": "string" + }, + "version": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "status", + "info", + "data", + "since", + "kind", + "version", + "life" + ] + }, + "DockerImageInfo": { + "type": "object", + "properties": { + "auth": { + "type": "string" + }, + "email": { + "type": "string" + }, + "identitytoken": { + "type": "string" + }, + "image-name": { + "type": "string" + }, + "password": { + "type": "string" + }, + "registrytoken": { + "type": "string" + }, + "repository": { + "type": "string" + }, + "serveraddress": { + "type": "string" + }, + "username": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "image-name" + ] + }, + "Entities": { + "type": "object", + "properties": { + "entities": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } + } + }, + "additionalProperties": false, + "required": [ + "entities" + ] + }, + "Entity": { + "type": "object", + "properties": { + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag" + ] + }, + "EntityPassword": { + "type": "object", + "properties": { + "password": { + "type": "string" + }, + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag", + "password" + ] + }, + "EntityPasswords": { + "type": "object", + "properties": { + "changes": { + "type": "array", + "items": { + "$ref": "#/definitions/EntityPassword" + } + } + }, + "additionalProperties": false, + "required": [ + "changes" + ] + }, + "EntityStatus": { + "type": "object", + "properties": { + "data": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "info": { + "type": "string" + }, + "since": { + "type": "string", + "format": "date-time" + }, + "status": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "status", + "info", + "since" + ] + }, + "EntityStatusArgs": { + "type": "object", + "properties": { + "data": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "info": { + "type": "string" + }, + "status": { + "type": "string" + }, + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag", + "status", + "info", + "data" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ErrorResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "ErrorResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "ExpressionTree": { + "type": "object", + "properties": { + "Expression": { + "type": "object", + "additionalProperties": true + } + }, + "additionalProperties": false, + "required": [ + "Expression" + ] + }, + "KubernetesDeviceParams": { + "type": "object", + "properties": { + "Attributes": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "Count": { + "type": "integer" + }, + "Type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "Type", + "Count", + "Attributes" + ] + }, + "KubernetesFilesystemAttachmentParams": { + "type": "object", + "properties": { + "mount-point": { + "type": "string" + }, + "provider": { + "type": "string" + }, + "read-only": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "provider" + ] + }, + "KubernetesFilesystemInfo": { + "type": "object", + "properties": { + "data": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "filesystem-id": { + "type": "string" + }, + "info": { + "type": "string" + }, + "mount-point": { + "type": "string" + }, + "pool": { + "type": "string" + }, + "read-only": { + "type": "boolean" + }, + "size": { + "type": "integer" + }, + "status": { + "type": "string" + }, + "storagename": { + "type": "string" + }, + "volume": { + "$ref": "#/definitions/KubernetesVolumeInfo" + } + }, + "additionalProperties": false, + "required": [ + "storagename", + "pool", + "size", + "filesystem-id", + "status", + "info", + "volume" + ] + }, + "KubernetesFilesystemParams": { + "type": "object", + "properties": { + "attachment": { + "$ref": "#/definitions/KubernetesFilesystemAttachmentParams" + }, + "attributes": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "provider": { + "type": "string" + }, + "size": { + "type": "integer" + }, + "storagename": { + "type": "string" + }, + "tags": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + } + }, + "additionalProperties": false, + "required": [ + "storagename", + "size", + "provider" + ] + }, + "KubernetesVolumeAttachmentParams": { + "type": "object", + "properties": { + "provider": { + "type": "string" + }, + "read-only": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "provider" + ] + }, + "KubernetesVolumeInfo": { + "type": "object", + "properties": { + "data": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "info": { + "type": "string" + }, + "persistent": { + "type": "boolean" + }, + "pool": { + "type": "string" + }, + "size": { + "type": "integer" + }, + "status": { + "type": "string" + }, + "volume-id": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "volume-id", + "size", + "persistent", + "status", + "info" + ] + }, + "KubernetesVolumeParams": { + "type": "object", + "properties": { + "attachment": { + "$ref": "#/definitions/KubernetesVolumeAttachmentParams" + }, + "attributes": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "provider": { + "type": "string" + }, + "size": { + "type": "integer" + }, + "storagename": { + "type": "string" + }, + "tags": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + } + }, + "additionalProperties": false, + "required": [ + "storagename", + "size", + "provider" + ] + }, + "LifeResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "life": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "life" + ] + }, + "LifeResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/LifeResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "NotifyWatchResult": { + "type": "object", + "properties": { + "NotifyWatcherId": { + "type": "string" + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false, + "required": [ + "NotifyWatcherId" + ] + }, + "NotifyWatchResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/NotifyWatchResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "Number": { + "type": "object", + "properties": { + "Build": { + "type": "integer" + }, + "Major": { + "type": "integer" + }, + "Minor": { + "type": "integer" + }, + "Patch": { + "type": "integer" + }, + "Tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "Major", + "Minor", + "Tag", + "Patch", + "Build" + ] + }, + "SetStatus": { + "type": "object", + "properties": { + "entities": { + "type": "array", + "items": { + "$ref": "#/definitions/EntityStatusArgs" + } + } + }, + "additionalProperties": false, + "required": [ + "entities" + ] + }, + "StringsWatchResult": { + "type": "object", + "properties": { + "changes": { + "type": "array", + "items": { + "type": "string" + } + }, + "error": { + "$ref": "#/definitions/Error" + }, + "watcher-id": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "watcher-id" + ] + }, + "StringsWatchResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/StringsWatchResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "UnitStatus": { + "type": "object", + "properties": { + "address": { + "type": "string" + }, + "agent-status": { + "$ref": "#/definitions/DetailedStatus" + }, + "charm": { + "type": "string" + }, + "leader": { + "type": "boolean" + }, + "machine": { + "type": "string" + }, + "opened-ports": { + "type": "array", + "items": { + "type": "string" + } + }, + "provider-id": { + "type": "string" + }, + "public-address": { + "type": "string" + }, + "subordinates": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/UnitStatus" + } + } + }, + "workload-status": { + "$ref": "#/definitions/DetailedStatus" + }, + "workload-version": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "agent-status", + "workload-status", + "workload-version", + "machine", + "opened-ports", + "public-address", + "charm", + "subordinates" + ] + }, + "UpdateApplicationUnitArgs": { + "type": "object", + "properties": { + "args": { + "type": "array", + "items": { + "$ref": "#/definitions/UpdateApplicationUnits" + } + } + }, + "additionalProperties": false, + "required": [ + "args" + ] + }, + "UpdateApplicationUnitResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "info": { + "$ref": "#/definitions/UpdateApplicationUnitsInfo" + } + }, + "additionalProperties": false + }, + "UpdateApplicationUnitResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/UpdateApplicationUnitResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "UpdateApplicationUnits": { + "type": "object", + "properties": { + "application-tag": { + "type": "string" + }, + "generation": { + "type": "integer" + }, + "scale": { + "type": "integer" + }, + "status": { + "$ref": "#/definitions/EntityStatus" + }, + "units": { + "type": "array", + "items": { + "$ref": "#/definitions/ApplicationUnitParams" + } + } + }, + "additionalProperties": false, + "required": [ + "application-tag", + "units" + ] + }, + "UpdateApplicationUnitsInfo": { + "type": "object", + "properties": { + "units": { + "type": "array", + "items": { + "$ref": "#/definitions/ApplicationUnitInfo" + } + } + }, + "additionalProperties": false, + "required": [ + "units" + ] + }, + "Value": { + "type": "object", + "properties": { + "allocate-public-ip": { + "type": "boolean" + }, + "arch": { + "type": "string" + }, + "container": { + "type": "string" + }, + "cores": { + "type": "integer" + }, + "cpu-power": { + "type": "integer" + }, + "instance-role": { + "type": "string" + }, + "instance-type": { + "type": "string" + }, + "mem": { + "type": "integer" + }, + "root-disk": { + "type": "integer" + }, + "root-disk-source": { + "type": "string" + }, + "spaces": { + "type": "array", + "items": { + "type": "string" + } + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "virt-type": { + "type": "string" + }, + "zones": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + } + } + } + }, + { + "Name": "CAASFirewaller", + "Description": "", + "Version": 1, + "AvailableTo": [ + "controller-machine-agent" + ], + "Schema": { + "type": "object", + "properties": { + "ApplicationCharmInfo": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entity" + }, + "Result": { + "$ref": "#/definitions/Charm" + } + }, + "description": "ApplicationCharmInfo returns information about an application's charm." + }, + "ApplicationsConfig": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ApplicationGetConfigResults" + } + }, + "description": "ApplicationsConfig returns the config for the specified applications." + }, + "CharmInfo": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/CharmURL" + }, + "Result": { + "$ref": "#/definitions/Charm" + } + }, + "description": "CharmInfo returns information about the requested charm." + }, + "IsExposed": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/BoolResults" + } + }, + "description": "IsExposed returns whether the specified applications are exposed." + }, + "Life": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/LifeResults" + } + }, + "description": "Life returns the life status of every supplied entity, where available." + }, + "Watch": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/NotifyWatchResults" + } + }, + "description": "Watch starts an NotifyWatcher for each given entity." + }, + "WatchApplications": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/StringsWatchResult" + } + }, + "description": "WatchApplications starts a StringsWatcher to watch applications\ndeployed to this model." + } + }, + "definitions": { + "ApplicationGetConfigResults": { + "type": "object", + "properties": { + "Results": { + "type": "array", + "items": { + "$ref": "#/definitions/ConfigResult" + } + } + }, + "additionalProperties": false, + "required": [ + "Results" + ] + }, + "BoolResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "result" + ] + }, + "BoolResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/BoolResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "Charm": { + "type": "object", + "properties": { + "actions": { + "$ref": "#/definitions/CharmActions" + }, + "config": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmOption" + } + } + }, + "lxd-profile": { + "$ref": "#/definitions/CharmLXDProfile" + }, + "manifest": { + "$ref": "#/definitions/CharmManifest" + }, + "meta": { + "$ref": "#/definitions/CharmMeta" + }, + "metrics": { + "$ref": "#/definitions/CharmMetrics" + }, + "revision": { + "type": "integer" + }, + "url": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "revision", + "url", + "config" + ] + }, + "CharmActionSpec": { + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "params": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + } + }, + "additionalProperties": false, + "required": [ + "description", + "params" + ] + }, + "CharmActions": { + "type": "object", + "properties": { + "specs": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmActionSpec" + } + } + } + }, + "additionalProperties": false + }, + "CharmBase": { + "type": "object", + "properties": { + "architectures": { + "type": "array", + "items": { + "type": "string" + } + }, + "channel": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "additionalProperties": false + }, + "CharmContainer": { + "type": "object", + "properties": { + "mounts": { + "type": "array", + "items": { + "$ref": "#/definitions/CharmMount" + } + }, + "resource": { + "type": "string" + } + }, + "additionalProperties": false + }, + "CharmDeployment": { + "type": "object", + "properties": { + "min-version": { + "type": "string" + }, + "mode": { + "type": "string" + }, + "service": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "type", + "mode", + "service", + "min-version" + ] + }, + "CharmDevice": { + "type": "object", + "properties": { + "CountMax": { + "type": "integer" + }, + "CountMin": { + "type": "integer" + }, + "Description": { + "type": "string" + }, + "Name": { + "type": "string" + }, + "Type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "Name", + "Description", + "Type", + "CountMin", + "CountMax" + ] + }, + "CharmLXDProfile": { + "type": "object", + "properties": { + "config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "description": { + "type": "string" + }, + "devices": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + } + } + } + }, + "additionalProperties": false, + "required": [ + "config", + "description", + "devices" + ] + }, + "CharmManifest": { + "type": "object", + "properties": { + "bases": { + "type": "array", + "items": { + "$ref": "#/definitions/CharmBase" + } + } + }, + "additionalProperties": false + }, + "CharmMeta": { + "type": "object", + "properties": { + "assumes-expr": { + "$ref": "#/definitions/ExpressionTree" + }, + "categories": { + "type": "array", + "items": { + "type": "string" + } + }, + "containers": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmContainer" + } + } + }, + "deployment": { + "$ref": "#/definitions/CharmDeployment" + }, + "description": { + "type": "string" + }, + "devices": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmDevice" + } + } + }, + "extra-bindings": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "min-juju-version": { + "type": "string" + }, + "name": { + "type": "string" + }, + "payload-classes": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmPayloadClass" + } + } + }, + "peers": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmRelation" + } + } + }, + "provides": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmRelation" + } + } + }, + "requires": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmRelation" + } + } + }, + "resources": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmResourceMeta" + } + } + }, + "series": { + "type": "array", + "items": { + "type": "string" + } + }, + "storage": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmStorage" + } + } + }, + "subordinate": { + "type": "boolean" + }, + "summary": { + "type": "string" + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "terms": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "name", + "summary", + "description", + "subordinate" + ] + }, + "CharmMetric": { + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "type", + "description" + ] + }, + "CharmMetrics": { + "type": "object", + "properties": { + "metrics": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmMetric" + } + } + }, + "plan": { + "$ref": "#/definitions/CharmPlan" + } + }, + "additionalProperties": false, + "required": [ + "metrics", + "plan" + ] + }, + "CharmMount": { + "type": "object", + "properties": { + "location": { + "type": "string" + }, + "storage": { + "type": "string" + } + }, + "additionalProperties": false + }, + "CharmOption": { + "type": "object", + "properties": { + "default": { + "type": "object", + "additionalProperties": true + }, + "description": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "type" + ] + }, + "CharmPayloadClass": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "type" + ] + }, + "CharmPlan": { + "type": "object", + "properties": { + "required": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "required" + ] + }, + "CharmRelation": { + "type": "object", + "properties": { + "interface": { + "type": "string" + }, + "limit": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "optional": { + "type": "boolean" + }, + "role": { + "type": "string" + }, + "scope": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "role", + "interface", + "optional", + "limit", + "scope" + ] + }, + "CharmResourceMeta": { + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "type", + "path", + "description" + ] + }, + "CharmStorage": { + "type": "object", + "properties": { + "count-max": { + "type": "integer" + }, + "count-min": { + "type": "integer" + }, + "description": { + "type": "string" + }, + "location": { + "type": "string" + }, + "minimum-size": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "properties": { + "type": "array", + "items": { + "type": "string" + } + }, + "read-only": { + "type": "boolean" + }, + "shared": { + "type": "boolean" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "description", + "type", + "shared", + "read-only", + "count-min", + "count-max", + "minimum-size" + ] + }, + "CharmURL": { + "type": "object", + "properties": { + "url": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "url" + ] + }, + "ConfigResult": { + "type": "object", + "properties": { + "config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false, + "required": [ + "config" + ] + }, + "Entities": { + "type": "object", + "properties": { + "entities": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } + } + }, + "additionalProperties": false, + "required": [ + "entities" + ] + }, + "Entity": { + "type": "object", + "properties": { + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ExpressionTree": { + "type": "object", + "properties": { + "Expression": { + "type": "object", + "additionalProperties": true + } + }, + "additionalProperties": false, + "required": [ + "Expression" + ] + }, + "LifeResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "life": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "life" + ] + }, + "LifeResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/LifeResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "NotifyWatchResult": { + "type": "object", + "properties": { + "NotifyWatcherId": { + "type": "string" + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false, + "required": [ + "NotifyWatcherId" + ] + }, + "NotifyWatchResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/NotifyWatchResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "StringsWatchResult": { + "type": "object", + "properties": { + "changes": { + "type": "array", + "items": { + "type": "string" + } + }, + "error": { + "$ref": "#/definitions/Error" + }, + "watcher-id": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "watcher-id" + ] + } + } + } + }, + { + "Name": "CAASFirewallerSidecar", + "Description": "FacadeSidecar provides access to the CAASFirewaller API facade for sidecar applications.", + "Version": 1, + "AvailableTo": [ + "controller-machine-agent" + ], + "Schema": { + "type": "object", + "properties": { + "ApplicationCharmInfo": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entity" + }, + "Result": { + "$ref": "#/definitions/Charm" + } + }, + "description": "ApplicationCharmInfo returns information about an application's charm." + }, + "ApplicationsConfig": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ApplicationGetConfigResults" + } + }, + "description": "ApplicationsConfig returns the config for the specified applications." + }, + "CharmInfo": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/CharmURL" + }, + "Result": { + "$ref": "#/definitions/Charm" + } + }, + "description": "CharmInfo returns information about the requested charm." + }, + "GetOpenedPorts": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entity" + }, + "Result": { + "$ref": "#/definitions/ApplicationOpenedPortsResults" + } + }, + "description": "GetOpenedPorts returns all the opened ports for each given application tag." + }, + "IsExposed": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/BoolResults" + } + }, + "description": "IsExposed returns whether the specified applications are exposed." + }, + "Life": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/LifeResults" + } + }, + "description": "Life returns the life status of every supplied entity, where available." + }, + "Watch": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/NotifyWatchResults" + } + }, + "description": "Watch starts an NotifyWatcher for each given entity." + }, + "WatchApplications": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/StringsWatchResult" + } + }, + "description": "WatchApplications starts a StringsWatcher to watch applications\ndeployed to this model." + }, + "WatchOpenedPorts": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/StringsWatchResults" + } + }, + "description": "WatchOpenedPorts returns a new StringsWatcher for each given\nmodel tag." + } + }, + "definitions": { + "ApplicationGetConfigResults": { + "type": "object", + "properties": { + "Results": { + "type": "array", + "items": { + "$ref": "#/definitions/ConfigResult" + } + } + }, + "additionalProperties": false, + "required": [ + "Results" + ] + }, + "ApplicationOpenedPorts": { + "type": "object", + "properties": { + "endpoint": { + "type": "string" + }, + "port-ranges": { + "type": "array", + "items": { + "$ref": "#/definitions/PortRange" + } + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "port-ranges" + ] + }, + "ApplicationOpenedPortsResult": { + "type": "object", + "properties": { + "application-port-ranges": { + "type": "array", + "items": { + "$ref": "#/definitions/ApplicationOpenedPorts" + } + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false, + "required": [ + "application-port-ranges" + ] + }, + "ApplicationOpenedPortsResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ApplicationOpenedPortsResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "BoolResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "result" + ] + }, + "BoolResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/BoolResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "Charm": { + "type": "object", + "properties": { + "actions": { + "$ref": "#/definitions/CharmActions" + }, + "config": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmOption" + } + } + }, + "lxd-profile": { + "$ref": "#/definitions/CharmLXDProfile" + }, + "manifest": { + "$ref": "#/definitions/CharmManifest" + }, + "meta": { + "$ref": "#/definitions/CharmMeta" + }, + "metrics": { + "$ref": "#/definitions/CharmMetrics" + }, + "revision": { + "type": "integer" + }, + "url": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "revision", + "url", + "config" + ] + }, + "CharmActionSpec": { + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "params": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + } + }, + "additionalProperties": false, + "required": [ + "description", + "params" + ] + }, + "CharmActions": { + "type": "object", + "properties": { + "specs": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmActionSpec" + } + } + } + }, + "additionalProperties": false + }, + "CharmBase": { + "type": "object", + "properties": { + "architectures": { + "type": "array", + "items": { + "type": "string" + } + }, + "channel": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "additionalProperties": false + }, + "CharmContainer": { + "type": "object", + "properties": { + "mounts": { + "type": "array", + "items": { + "$ref": "#/definitions/CharmMount" + } + }, + "resource": { + "type": "string" + } + }, + "additionalProperties": false + }, + "CharmDeployment": { + "type": "object", + "properties": { + "min-version": { + "type": "string" + }, + "mode": { + "type": "string" + }, + "service": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "type", + "mode", + "service", + "min-version" + ] + }, + "CharmDevice": { + "type": "object", + "properties": { + "CountMax": { + "type": "integer" + }, + "CountMin": { + "type": "integer" + }, + "Description": { + "type": "string" + }, + "Name": { + "type": "string" + }, + "Type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "Name", + "Description", + "Type", + "CountMin", + "CountMax" + ] + }, + "CharmLXDProfile": { + "type": "object", + "properties": { + "config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "description": { + "type": "string" + }, + "devices": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + } + } + } + }, + "additionalProperties": false, + "required": [ + "config", + "description", + "devices" + ] + }, + "CharmManifest": { + "type": "object", + "properties": { + "bases": { + "type": "array", + "items": { + "$ref": "#/definitions/CharmBase" + } + } + }, + "additionalProperties": false + }, + "CharmMeta": { + "type": "object", + "properties": { + "assumes-expr": { + "$ref": "#/definitions/ExpressionTree" + }, + "categories": { + "type": "array", + "items": { + "type": "string" + } + }, + "containers": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmContainer" + } + } + }, + "deployment": { + "$ref": "#/definitions/CharmDeployment" + }, + "description": { + "type": "string" + }, + "devices": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmDevice" + } + } + }, + "extra-bindings": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "min-juju-version": { + "type": "string" + }, + "name": { + "type": "string" + }, + "payload-classes": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmPayloadClass" + } + } + }, + "peers": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmRelation" + } + } + }, + "provides": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmRelation" + } + } + }, + "requires": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmRelation" + } + } + }, + "resources": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmResourceMeta" + } + } + }, + "series": { + "type": "array", + "items": { + "type": "string" + } + }, + "storage": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmStorage" + } + } + }, + "subordinate": { + "type": "boolean" + }, + "summary": { + "type": "string" + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "terms": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "name", + "summary", + "description", + "subordinate" + ] + }, + "CharmMetric": { + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "type", + "description" + ] + }, + "CharmMetrics": { + "type": "object", + "properties": { + "metrics": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmMetric" + } + } + }, + "plan": { + "$ref": "#/definitions/CharmPlan" + } + }, + "additionalProperties": false, + "required": [ + "metrics", + "plan" + ] + }, + "CharmMount": { + "type": "object", + "properties": { + "location": { + "type": "string" + }, + "storage": { + "type": "string" + } + }, + "additionalProperties": false + }, + "CharmOption": { + "type": "object", + "properties": { + "default": { + "type": "object", + "additionalProperties": true + }, + "description": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "type" + ] + }, + "CharmPayloadClass": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "type" + ] + }, + "CharmPlan": { + "type": "object", + "properties": { + "required": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "required" + ] + }, + "CharmRelation": { + "type": "object", + "properties": { + "interface": { + "type": "string" + }, + "limit": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "optional": { + "type": "boolean" + }, + "role": { + "type": "string" + }, + "scope": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "role", + "interface", + "optional", + "limit", + "scope" + ] + }, + "CharmResourceMeta": { + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "type", + "path", + "description" + ] + }, + "CharmStorage": { + "type": "object", + "properties": { + "count-max": { + "type": "integer" + }, + "count-min": { + "type": "integer" + }, + "description": { + "type": "string" + }, + "location": { + "type": "string" + }, + "minimum-size": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "properties": { + "type": "array", + "items": { + "type": "string" + } + }, + "read-only": { + "type": "boolean" + }, + "shared": { + "type": "boolean" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "description", + "type", + "shared", + "read-only", + "count-min", + "count-max", + "minimum-size" + ] + }, + "CharmURL": { + "type": "object", + "properties": { + "url": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "url" + ] + }, + "ConfigResult": { + "type": "object", + "properties": { + "config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false, + "required": [ + "config" + ] + }, + "Entities": { + "type": "object", + "properties": { + "entities": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } + } + }, + "additionalProperties": false, + "required": [ + "entities" + ] + }, + "Entity": { + "type": "object", + "properties": { + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ExpressionTree": { + "type": "object", + "properties": { + "Expression": { + "type": "object", + "additionalProperties": true + } + }, + "additionalProperties": false, + "required": [ + "Expression" + ] + }, + "LifeResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "life": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "life" + ] + }, + "LifeResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/LifeResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "NotifyWatchResult": { + "type": "object", + "properties": { + "NotifyWatcherId": { + "type": "string" + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false, + "required": [ + "NotifyWatcherId" + ] + }, + "NotifyWatchResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/NotifyWatchResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "PortRange": { + "type": "object", + "properties": { + "from-port": { + "type": "integer" + }, + "protocol": { + "type": "string" + }, + "to-port": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "from-port", + "to-port", + "protocol" + ] + }, + "StringsWatchResult": { + "type": "object", + "properties": { + "changes": { + "type": "array", + "items": { + "type": "string" + } + }, + "error": { + "$ref": "#/definitions/Error" + }, + "watcher-id": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "watcher-id" + ] + }, + "StringsWatchResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/StringsWatchResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + } + } + } + }, + { + "Name": "CAASModelConfigManager", + "Description": "Facade allows model config manager clients to watch controller config changes and fetch controller config.", + "Version": 1, + "AvailableTo": [ + "controller-machine-agent" + ], + "Schema": { + "type": "object", + "properties": { + "ControllerConfig": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/ControllerConfigResult" + } + } + }, + "WatchControllerConfig": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/NotifyWatchResult" + } + } + } + }, + "definitions": { + "ControllerConfigResult": { + "type": "object", + "properties": { + "config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + } + }, + "additionalProperties": false, + "required": [ + "config" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "NotifyWatchResult": { + "type": "object", + "properties": { + "NotifyWatcherId": { + "type": "string" + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false, + "required": [ + "NotifyWatcherId" + ] + } + } + } + }, + { + "Name": "CAASModelOperator", + "Description": "API represents the controller model operator facade.", + "Version": 1, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "APIAddresses": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/StringsResult" + } + }, + "description": "APIAddresses returns the list of addresses used to connect to the API." + }, + "APIHostPorts": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/APIHostPortsResult" + } + }, + "description": "APIHostPorts returns the API server addresses." + }, + "ModelOperatorProvisioningInfo": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/ModelOperatorInfo" + } + }, + "description": "ModelOperatorProvisioningInfo returns the information needed for provisioning\na new model operator into a caas cluster." + }, + "ModelUUID": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/StringResult" + } + }, + "description": "ModelUUID returns the model UUID that this facade is used to operate.\nIt is implemented here directly as a result of removing it from\nembedded APIAddresser *without* bumping the facade version.\nIt should be blanked when this facade version is next incremented." + }, + "SetPasswords": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/EntityPasswords" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "SetPasswords sets the given password for each supplied entity, if possible." + }, + "WatchAPIHostPorts": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/NotifyWatchResult" + } + }, + "description": "WatchAPIHostPorts watches the API server addresses." + }, + "WatchModelOperatorProvisioningInfo": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/NotifyWatchResult" + } + }, + "description": "WatchModelOperatorProvisioningInfo provides a watcher for changes that affect the\ninformation returned by ModelOperatorProvisioningInfo." + } + }, + "definitions": { + "APIHostPortsResult": { + "type": "object", + "properties": { + "servers": { + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/definitions/HostPort" + } + } + } + }, + "additionalProperties": false, + "required": [ + "servers" + ] + }, + "Address": { + "type": "object", + "properties": { + "cidr": { + "type": "string" + }, + "config-type": { + "type": "string" + }, + "is-secondary": { + "type": "boolean" + }, + "scope": { + "type": "string" + }, + "space-id": { + "type": "string" + }, + "space-name": { + "type": "string" + }, + "type": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "value", + "type", + "scope" + ] + }, + "DockerImageInfo": { + "type": "object", + "properties": { + "auth": { + "type": "string" + }, + "email": { + "type": "string" + }, + "identitytoken": { + "type": "string" + }, + "image-name": { + "type": "string" + }, + "password": { + "type": "string" + }, + "registrytoken": { + "type": "string" + }, + "repository": { + "type": "string" + }, + "serveraddress": { + "type": "string" + }, + "username": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "image-name" + ] + }, + "EntityPassword": { + "type": "object", + "properties": { + "password": { + "type": "string" + }, + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag", + "password" + ] + }, + "EntityPasswords": { + "type": "object", + "properties": { + "changes": { + "type": "array", + "items": { + "$ref": "#/definitions/EntityPassword" + } + } + }, + "additionalProperties": false, + "required": [ + "changes" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ErrorResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "ErrorResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "HostPort": { + "type": "object", + "properties": { + "Address": { + "$ref": "#/definitions/Address" + }, + "cidr": { + "type": "string" + }, + "config-type": { + "type": "string" + }, + "is-secondary": { + "type": "boolean" + }, + "port": { + "type": "integer" + }, + "scope": { + "type": "string" + }, + "space-id": { + "type": "string" + }, + "space-name": { + "type": "string" + }, + "type": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "value", + "type", + "scope", + "Address", + "port" + ] + }, + "ModelOperatorInfo": { + "type": "object", + "properties": { + "api-addresses": { + "type": "array", + "items": { + "type": "string" + } + }, + "image-details": { + "$ref": "#/definitions/DockerImageInfo" + }, + "version": { + "$ref": "#/definitions/Number" + } + }, + "additionalProperties": false, + "required": [ + "api-addresses", + "image-details", + "version" + ] + }, + "NotifyWatchResult": { + "type": "object", + "properties": { + "NotifyWatcherId": { + "type": "string" + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false, + "required": [ + "NotifyWatcherId" + ] + }, + "Number": { + "type": "object", + "properties": { + "Build": { + "type": "integer" + }, + "Major": { + "type": "integer" + }, + "Minor": { + "type": "integer" + }, + "Patch": { + "type": "integer" + }, + "Tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "Major", + "Minor", + "Tag", + "Patch", + "Build" + ] + }, + "StringResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "result" + ] + }, + "StringsResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + } + } + } + }, + { + "Name": "CAASOperator", + "Description": "Facade is the CAAS operator API facade.", + "Version": 1, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "APIAddresses": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/StringsResult" + } + }, + "description": "APIAddresses returns the list of addresses used to connect to the API." + }, + "APIHostPorts": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/APIHostPortsResult" + } + }, + "description": "APIHostPorts returns the API server addresses." + }, + "Charm": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ApplicationCharmResults" + } + }, + "description": "Charm returns the charm info for all given applications." + }, + "CurrentModel": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/ModelResult" + } + }, + "description": "CurrentModel returns the name and UUID for the current juju model." + }, + "Life": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/LifeResults" + } + }, + "description": "Life returns the life status of every supplied entity, where available." + }, + "ModelUUID": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/StringResult" + } + }, + "description": "ModelUUID returns the model UUID that this facade is used to operate.\nIt is implemented here directly as a result of removing it from\nembedded APIAddresser *without* bumping the facade version.\nIt should be blanked when this facade version is next incremented." + }, + "Remove": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "Remove removes every given entity from state, calling EnsureDead\nfirst, then Remove. It will fail if the entity is not present." + }, + "SetPodSpec": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/SetPodSpecParams" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "SetPodSpec sets the container specs for a set of applications.\nTODO(juju3) - remove" + }, + "SetStatus": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/SetStatus" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "SetStatus sets the status of each given entity." + }, + "SetTools": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/EntitiesVersion" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "SetTools updates the recorded tools version for the agents." + }, + "Watch": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/NotifyWatchResults" + } + }, + "description": "Watch starts an NotifyWatcher for each given entity." + }, + "WatchAPIHostPorts": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/NotifyWatchResult" + } + }, + "description": "WatchAPIHostPorts watches the API server addresses." + }, + "WatchContainerStart": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/WatchContainerStartArgs" + }, + "Result": { + "$ref": "#/definitions/StringsWatchResults" + } + }, + "description": "WatchContainerStart starts a StringWatcher to watch for container start events\non the CAAS api for a specific application and container." + }, + "WatchUnits": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/StringsWatchResults" + } + }, + "description": "WatchUnits starts a StringsWatcher to watch changes to the\nlifecycle states of units for the specified applications in\nthis model." + } + }, + "definitions": { + "APIHostPortsResult": { + "type": "object", + "properties": { + "servers": { + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/definitions/HostPort" + } + } + } + }, + "additionalProperties": false, + "required": [ + "servers" + ] + }, + "Address": { + "type": "object", + "properties": { + "cidr": { + "type": "string" + }, + "config-type": { + "type": "string" + }, + "is-secondary": { + "type": "boolean" + }, + "scope": { + "type": "string" + }, + "space-id": { + "type": "string" + }, + "space-name": { + "type": "string" + }, + "type": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "value", + "type", + "scope" + ] + }, + "ApplicationCharm": { + "type": "object", + "properties": { + "charm-modified-version": { + "type": "integer" + }, + "deployment-mode": { + "type": "string" + }, + "force-upgrade": { + "type": "boolean" + }, + "sha256": { + "type": "string" + }, + "url": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "url", + "sha256", + "charm-modified-version" + ] + }, + "ApplicationCharmResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "$ref": "#/definitions/ApplicationCharm" + } + }, + "additionalProperties": false + }, + "ApplicationCharmResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ApplicationCharmResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "Binary": { + "type": "object", + "properties": { + "Arch": { + "type": "string" + }, + "Build": { + "type": "integer" + }, + "Major": { + "type": "integer" + }, + "Minor": { + "type": "integer" + }, + "Number": { + "$ref": "#/definitions/Number" + }, + "Patch": { + "type": "integer" + }, + "Release": { + "type": "string" + }, + "Tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "Major", + "Minor", + "Tag", + "Patch", + "Build", + "Number", + "Release", + "Arch" + ] + }, + "Entities": { + "type": "object", + "properties": { + "entities": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } + } + }, + "additionalProperties": false, + "required": [ + "entities" + ] + }, + "EntitiesVersion": { + "type": "object", + "properties": { + "agent-tools": { + "type": "array", + "items": { + "$ref": "#/definitions/EntityVersion" + } + } + }, + "additionalProperties": false, + "required": [ + "agent-tools" + ] + }, + "Entity": { + "type": "object", + "properties": { + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag" + ] + }, + "EntityStatusArgs": { + "type": "object", + "properties": { + "data": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "info": { + "type": "string" + }, + "status": { + "type": "string" + }, + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag", + "status", + "info", + "data" + ] + }, + "EntityString": { + "type": "object", + "properties": { + "tag": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag", + "value" + ] + }, + "EntityVersion": { + "type": "object", + "properties": { + "tag": { + "type": "string" + }, + "tools": { + "$ref": "#/definitions/Version" + } + }, + "additionalProperties": false, + "required": [ + "tag", + "tools" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ErrorResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "ErrorResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "HostPort": { + "type": "object", + "properties": { + "Address": { + "$ref": "#/definitions/Address" + }, + "cidr": { + "type": "string" + }, + "config-type": { + "type": "string" + }, + "is-secondary": { + "type": "boolean" + }, + "port": { + "type": "integer" + }, + "scope": { + "type": "string" + }, + "space-id": { + "type": "string" + }, + "space-name": { + "type": "string" + }, + "type": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "value", + "type", + "scope", + "Address", + "port" + ] + }, + "LifeResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "life": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "life" + ] + }, + "LifeResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/LifeResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "ModelResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "name": { + "type": "string" + }, + "type": { + "type": "string" + }, + "uuid": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "uuid", + "type" + ] + }, + "NotifyWatchResult": { + "type": "object", + "properties": { + "NotifyWatcherId": { + "type": "string" + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false, + "required": [ + "NotifyWatcherId" + ] + }, + "NotifyWatchResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/NotifyWatchResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "Number": { + "type": "object", + "properties": { + "Build": { + "type": "integer" + }, + "Major": { + "type": "integer" + }, + "Minor": { + "type": "integer" + }, + "Patch": { + "type": "integer" + }, + "Tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "Major", + "Minor", + "Tag", + "Patch", + "Build" + ] + }, + "SetPodSpecParams": { + "type": "object", + "properties": { + "specs": { + "type": "array", + "items": { + "$ref": "#/definitions/EntityString" + } + } + }, + "additionalProperties": false, + "required": [ + "specs" + ] + }, + "SetStatus": { + "type": "object", + "properties": { + "entities": { + "type": "array", + "items": { + "$ref": "#/definitions/EntityStatusArgs" + } + } + }, + "additionalProperties": false, + "required": [ + "entities" + ] + }, + "StringResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "result" + ] + }, + "StringsResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "StringsWatchResult": { + "type": "object", + "properties": { + "changes": { + "type": "array", + "items": { + "type": "string" + } + }, + "error": { + "$ref": "#/definitions/Error" + }, + "watcher-id": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "watcher-id" + ] + }, + "StringsWatchResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/StringsWatchResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "Version": { + "type": "object", + "properties": { + "version": { + "$ref": "#/definitions/Binary" + } + }, + "additionalProperties": false, + "required": [ + "version" + ] + }, + "WatchContainerStartArg": { + "type": "object", + "properties": { + "container": { + "type": "string" + }, + "entity": { + "$ref": "#/definitions/Entity" + } + }, + "additionalProperties": false, + "required": [ + "entity" + ] + }, + "WatchContainerStartArgs": { + "type": "object", + "properties": { + "args": { + "type": "array", + "items": { + "$ref": "#/definitions/WatchContainerStartArg" + } + } + }, + "additionalProperties": false, + "required": [ + "args" + ] + } + } + } + }, + { + "Name": "CAASOperatorProvisioner", + "Description": "", + "Version": 1, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "APIAddresses": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/StringsResult" + } + }, + "description": "APIAddresses returns the list of addresses used to connect to the API." + }, + "APIHostPorts": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/APIHostPortsResult" + } + }, + "description": "APIHostPorts returns the API server addresses." + }, + "ApplicationCharmInfo": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entity" + }, + "Result": { + "$ref": "#/definitions/Charm" + } + }, + "description": "ApplicationCharmInfo returns information about an application's charm." + }, + "CharmInfo": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/CharmURL" + }, + "Result": { + "$ref": "#/definitions/Charm" + } + }, + "description": "CharmInfo returns information about the requested charm." + }, + "IssueOperatorCertificate": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/IssueOperatorCertificateResults" + } + }, + "description": "IssueOperatorCertificate issues an x509 certificate for use by the specified application operator." + }, + "Life": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/LifeResults" + } + }, + "description": "Life returns the life status of every supplied entity, where available." + }, + "ModelUUID": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/StringResult" + } + }, + "description": "ModelUUID returns the model UUID that this facade is used to operate.\nIt is implemented here directly as a result of removing it from\nembedded APIAddresser *without* bumping the facade version.\nIt should be blanked when this facade version is next incremented." + }, + "OperatorProvisioningInfo": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/OperatorProvisioningInfoResults" + } + }, + "description": "OperatorProvisioningInfo returns the info needed to provision an operator." + }, + "SetPasswords": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/EntityPasswords" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "SetPasswords sets the given password for each supplied entity, if possible." + }, + "WatchAPIHostPorts": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/NotifyWatchResult" + } + }, + "description": "WatchAPIHostPorts watches the API server addresses." + }, + "WatchApplications": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/StringsWatchResult" + } + }, + "description": "WatchApplications starts a StringsWatcher to watch applications\ndeployed to this model." + } + }, + "definitions": { + "APIHostPortsResult": { + "type": "object", + "properties": { + "servers": { + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/definitions/HostPort" + } + } + } + }, + "additionalProperties": false, + "required": [ + "servers" + ] + }, + "Address": { + "type": "object", + "properties": { + "cidr": { + "type": "string" + }, + "config-type": { + "type": "string" + }, + "is-secondary": { + "type": "boolean" + }, + "scope": { + "type": "string" + }, + "space-id": { + "type": "string" + }, + "space-name": { + "type": "string" + }, + "type": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "value", + "type", + "scope" + ] + }, + "Charm": { + "type": "object", + "properties": { + "actions": { + "$ref": "#/definitions/CharmActions" + }, + "config": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmOption" + } + } + }, + "lxd-profile": { + "$ref": "#/definitions/CharmLXDProfile" + }, + "manifest": { + "$ref": "#/definitions/CharmManifest" + }, + "meta": { + "$ref": "#/definitions/CharmMeta" + }, + "metrics": { + "$ref": "#/definitions/CharmMetrics" + }, + "revision": { + "type": "integer" + }, + "url": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "revision", + "url", + "config" + ] + }, + "CharmActionSpec": { + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "params": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + } + }, + "additionalProperties": false, + "required": [ + "description", + "params" + ] + }, + "CharmActions": { + "type": "object", + "properties": { + "specs": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmActionSpec" + } + } + } + }, + "additionalProperties": false + }, + "CharmBase": { + "type": "object", + "properties": { + "architectures": { + "type": "array", + "items": { + "type": "string" + } + }, + "channel": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "additionalProperties": false + }, + "CharmContainer": { + "type": "object", + "properties": { + "mounts": { + "type": "array", + "items": { + "$ref": "#/definitions/CharmMount" + } + }, + "resource": { + "type": "string" + } + }, + "additionalProperties": false + }, + "CharmDeployment": { + "type": "object", + "properties": { + "min-version": { + "type": "string" + }, + "mode": { + "type": "string" + }, + "service": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "type", + "mode", + "service", + "min-version" + ] + }, + "CharmDevice": { + "type": "object", + "properties": { + "CountMax": { + "type": "integer" + }, + "CountMin": { + "type": "integer" + }, + "Description": { + "type": "string" + }, + "Name": { + "type": "string" + }, + "Type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "Name", + "Description", + "Type", + "CountMin", + "CountMax" + ] + }, + "CharmLXDProfile": { + "type": "object", + "properties": { + "config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "description": { + "type": "string" + }, + "devices": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + } + } + } + }, + "additionalProperties": false, + "required": [ + "config", + "description", + "devices" + ] + }, + "CharmManifest": { + "type": "object", + "properties": { + "bases": { + "type": "array", + "items": { + "$ref": "#/definitions/CharmBase" + } + } + }, + "additionalProperties": false + }, + "CharmMeta": { + "type": "object", + "properties": { + "assumes-expr": { + "$ref": "#/definitions/ExpressionTree" + }, + "categories": { + "type": "array", + "items": { + "type": "string" + } + }, + "containers": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmContainer" + } + } + }, + "deployment": { + "$ref": "#/definitions/CharmDeployment" + }, + "description": { + "type": "string" + }, + "devices": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmDevice" + } + } + }, + "extra-bindings": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "min-juju-version": { + "type": "string" + }, + "name": { + "type": "string" + }, + "payload-classes": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmPayloadClass" + } + } + }, + "peers": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmRelation" + } + } + }, + "provides": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmRelation" + } + } + }, + "requires": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmRelation" + } + } + }, + "resources": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmResourceMeta" + } + } + }, + "series": { + "type": "array", + "items": { + "type": "string" + } + }, + "storage": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmStorage" + } + } + }, + "subordinate": { + "type": "boolean" + }, + "summary": { + "type": "string" + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "terms": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "name", + "summary", + "description", + "subordinate" + ] + }, + "CharmMetric": { + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "type", + "description" + ] + }, + "CharmMetrics": { + "type": "object", + "properties": { + "metrics": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmMetric" + } + } + }, + "plan": { + "$ref": "#/definitions/CharmPlan" + } + }, + "additionalProperties": false, + "required": [ + "metrics", + "plan" + ] + }, + "CharmMount": { + "type": "object", + "properties": { + "location": { + "type": "string" + }, + "storage": { + "type": "string" + } + }, + "additionalProperties": false + }, + "CharmOption": { + "type": "object", + "properties": { + "default": { + "type": "object", + "additionalProperties": true + }, + "description": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "type" + ] + }, + "CharmPayloadClass": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "type" + ] + }, + "CharmPlan": { + "type": "object", + "properties": { + "required": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "required" + ] + }, + "CharmRelation": { + "type": "object", + "properties": { + "interface": { + "type": "string" + }, + "limit": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "optional": { + "type": "boolean" + }, + "role": { + "type": "string" + }, + "scope": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "role", + "interface", + "optional", + "limit", + "scope" + ] + }, + "CharmResourceMeta": { + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "type", + "path", + "description" + ] + }, + "CharmStorage": { + "type": "object", + "properties": { + "count-max": { + "type": "integer" + }, + "count-min": { + "type": "integer" + }, + "description": { + "type": "string" + }, + "location": { + "type": "string" + }, + "minimum-size": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "properties": { + "type": "array", + "items": { + "type": "string" + } + }, + "read-only": { + "type": "boolean" + }, + "shared": { + "type": "boolean" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "description", + "type", + "shared", + "read-only", + "count-min", + "count-max", + "minimum-size" + ] + }, + "CharmURL": { + "type": "object", + "properties": { + "url": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "url" + ] + }, + "DockerImageInfo": { + "type": "object", + "properties": { + "auth": { + "type": "string" + }, + "email": { + "type": "string" + }, + "identitytoken": { + "type": "string" + }, + "image-name": { + "type": "string" + }, + "password": { + "type": "string" + }, + "registrytoken": { + "type": "string" + }, + "repository": { + "type": "string" + }, + "serveraddress": { + "type": "string" + }, + "username": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "image-name" + ] + }, + "Entities": { + "type": "object", + "properties": { + "entities": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } + } + }, + "additionalProperties": false, + "required": [ + "entities" + ] + }, + "Entity": { + "type": "object", + "properties": { + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag" + ] + }, + "EntityPassword": { + "type": "object", + "properties": { + "password": { + "type": "string" + }, + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag", + "password" + ] + }, + "EntityPasswords": { + "type": "object", + "properties": { + "changes": { + "type": "array", + "items": { + "$ref": "#/definitions/EntityPassword" + } + } + }, + "additionalProperties": false, + "required": [ + "changes" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ErrorResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "ErrorResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "ExpressionTree": { + "type": "object", + "properties": { + "Expression": { + "type": "object", + "additionalProperties": true + } + }, + "additionalProperties": false, + "required": [ + "Expression" + ] + }, + "HostPort": { + "type": "object", + "properties": { + "Address": { + "$ref": "#/definitions/Address" + }, + "cidr": { + "type": "string" + }, + "config-type": { + "type": "string" + }, + "is-secondary": { + "type": "boolean" + }, + "port": { + "type": "integer" + }, + "scope": { + "type": "string" + }, + "space-id": { + "type": "string" + }, + "space-name": { + "type": "string" + }, + "type": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "value", + "type", + "scope", + "Address", + "port" + ] + }, + "IssueOperatorCertificateResult": { + "type": "object", + "properties": { + "ca-cert": { + "type": "string" + }, + "cert": { + "type": "string" + }, + "error": { + "$ref": "#/definitions/Error" + }, + "private-key": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "ca-cert", + "cert", + "private-key" + ] + }, + "IssueOperatorCertificateResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/IssueOperatorCertificateResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "KubernetesFilesystemAttachmentParams": { + "type": "object", + "properties": { + "mount-point": { + "type": "string" + }, + "provider": { + "type": "string" + }, + "read-only": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "provider" + ] + }, + "KubernetesFilesystemParams": { + "type": "object", + "properties": { + "attachment": { + "$ref": "#/definitions/KubernetesFilesystemAttachmentParams" + }, + "attributes": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "provider": { + "type": "string" + }, + "size": { + "type": "integer" + }, + "storagename": { + "type": "string" + }, + "tags": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + } + }, + "additionalProperties": false, + "required": [ + "storagename", + "size", + "provider" + ] + }, + "LifeResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "life": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "life" + ] + }, + "LifeResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/LifeResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "NotifyWatchResult": { + "type": "object", + "properties": { + "NotifyWatcherId": { + "type": "string" + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false, + "required": [ + "NotifyWatcherId" + ] + }, + "Number": { + "type": "object", + "properties": { + "Build": { + "type": "integer" + }, + "Major": { + "type": "integer" + }, + "Minor": { + "type": "integer" + }, + "Patch": { + "type": "integer" + }, + "Tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "Major", + "Minor", + "Tag", + "Patch", + "Build" + ] + }, + "OperatorProvisioningInfo": { + "type": "object", + "properties": { + "api-addresses": { + "type": "array", + "items": { + "type": "string" + } + }, + "base-image-details": { + "$ref": "#/definitions/DockerImageInfo" + }, + "charm-storage": { + "$ref": "#/definitions/KubernetesFilesystemParams" + }, + "error": { + "$ref": "#/definitions/Error" + }, + "image-details": { + "$ref": "#/definitions/DockerImageInfo" + }, + "tags": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "version": { + "$ref": "#/definitions/Number" + } + }, + "additionalProperties": false, + "required": [ + "image-details", + "base-image-details", + "version", + "api-addresses" + ] + }, + "OperatorProvisioningInfoResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/OperatorProvisioningInfo" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "StringResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "result" + ] + }, + "StringsResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "StringsWatchResult": { + "type": "object", + "properties": { + "changes": { + "type": "array", + "items": { + "type": "string" + } + }, + "error": { + "$ref": "#/definitions/Error" + }, + "watcher-id": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "watcher-id" + ] + } + } + } + }, + { + "Name": "CAASOperatorUpgrader", + "Description": "", + "Version": 1, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "UpgradeOperator": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/KubernetesUpgradeArg" + }, + "Result": { + "$ref": "#/definitions/ErrorResult" + } + }, + "description": "UpgradeOperator upgrades the operator for the specified agents." + } + }, + "definitions": { + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ErrorResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "KubernetesUpgradeArg": { + "type": "object", + "properties": { + "agent-tag": { + "type": "string" + }, + "version": { + "$ref": "#/definitions/Number" + } + }, + "additionalProperties": false, + "required": [ + "agent-tag", + "version" + ] + }, + "Number": { + "type": "object", + "properties": { + "Build": { + "type": "integer" + }, + "Major": { + "type": "integer" + }, + "Minor": { + "type": "integer" + }, + "Patch": { + "type": "integer" + }, + "Tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "Major", + "Minor", + "Tag", + "Patch", + "Build" + ] + } + } + } + }, + { + "Name": "CAASUnitProvisioner", + "Description": "", + "Version": 2, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "ApplicationCharmInfo": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entity" + }, + "Result": { + "$ref": "#/definitions/Charm" + } + }, + "description": "ApplicationCharmInfo returns information about an application's charm." + }, + "ApplicationsConfig": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ApplicationGetConfigResults" + } + }, + "description": "ApplicationsConfig returns the config for the specified applications." + }, + "ApplicationsScale": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/IntResults" + } + }, + "description": "ApplicationsScale returns the scaling info for specified applications in this model." + }, + "ApplicationsTrust": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/BoolResults" + } + }, + "description": "ApplicationsTrust returns the trust status for specified applications in this model." + }, + "CharmInfo": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/CharmURL" + }, + "Result": { + "$ref": "#/definitions/Charm" + } + }, + "description": "CharmInfo returns information about the requested charm." + }, + "ClearApplicationsResources": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "ClearApplicationsResources clears the flags which indicate\napplications still have resources in the cluster." + }, + "DeploymentMode": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/StringResults" + } + }, + "description": "DeploymentMode returns the deployment mode of the given applications' charms." + }, + "Life": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/LifeResults" + } + }, + "description": "Life returns the life status of every supplied entity, where available." + }, + "ProvisioningInfo": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/KubernetesProvisioningInfoResults" + } + }, + "description": "ProvisioningInfo returns the provisioning info for specified applications in this model." + }, + "SetOperatorStatus": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/SetStatus" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "SetOperatorStatus updates the operator status for each given application." + }, + "UpdateApplicationsService": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/UpdateApplicationServiceArgs" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "UpdateApplicationsService updates the Juju data model to reflect the given\nservice details of the specified application." + }, + "UpdateApplicationsUnits": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/UpdateApplicationUnitArgs" + }, + "Result": { + "$ref": "#/definitions/UpdateApplicationUnitResults" + } + }, + "description": "UpdateApplicationsUnits updates the Juju data model to reflect the given\nunits of the specified application." + }, + "Watch": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/NotifyWatchResults" + } + }, + "description": "Watch starts a NotifyWatcher for each entity given." + }, + "WatchApplications": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/StringsWatchResult" + } + }, + "description": "WatchApplications starts a StringsWatcher to watch applications\ndeployed to this model." + }, + "WatchApplicationsScale": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/NotifyWatchResults" + } + }, + "description": "WatchApplicationsScale starts a NotifyWatcher to watch changes\nto the applications' scale." + }, + "WatchApplicationsTrustHash": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/StringsWatchResults" + } + }, + "description": "WatchApplicationsTrustHash starts a StringsWatcher to watch changes\nto the applications' trust status." + }, + "WatchPodSpec": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/NotifyWatchResults" + } + }, + "description": "WatchPodSpec starts a NotifyWatcher to watch changes to the\npod spec for specified units in this model." + } + }, + "definitions": { + "Address": { + "type": "object", + "properties": { + "cidr": { + "type": "string" + }, + "config-type": { + "type": "string" + }, + "is-secondary": { + "type": "boolean" + }, + "scope": { + "type": "string" + }, + "space-id": { + "type": "string" + }, + "space-name": { + "type": "string" + }, + "type": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "value", + "type", + "scope" + ] + }, + "ApplicationGetConfigResults": { + "type": "object", + "properties": { + "Results": { + "type": "array", + "items": { + "$ref": "#/definitions/ConfigResult" + } + } + }, + "additionalProperties": false, + "required": [ + "Results" + ] + }, + "ApplicationUnitInfo": { + "type": "object", + "properties": { + "provider-id": { + "type": "string" + }, + "unit-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "provider-id", + "unit-tag" + ] + }, + "ApplicationUnitParams": { + "type": "object", + "properties": { + "address": { + "type": "string" + }, + "data": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "filesystem-info": { + "type": "array", + "items": { + "$ref": "#/definitions/KubernetesFilesystemInfo" + } + }, + "info": { + "type": "string" + }, + "ports": { + "type": "array", + "items": { + "type": "string" + } + }, + "provider-id": { + "type": "string" + }, + "stateful": { + "type": "boolean" + }, + "status": { + "type": "string" + }, + "unit-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "provider-id", + "unit-tag", + "address", + "ports", + "status", + "info" + ] + }, + "BoolResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "result" + ] + }, + "BoolResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/BoolResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "Charm": { + "type": "object", + "properties": { + "actions": { + "$ref": "#/definitions/CharmActions" + }, + "config": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmOption" + } + } + }, + "lxd-profile": { + "$ref": "#/definitions/CharmLXDProfile" + }, + "manifest": { + "$ref": "#/definitions/CharmManifest" + }, + "meta": { + "$ref": "#/definitions/CharmMeta" + }, + "metrics": { + "$ref": "#/definitions/CharmMetrics" + }, + "revision": { + "type": "integer" + }, + "url": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "revision", + "url", + "config" + ] + }, + "CharmActionSpec": { + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "params": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + } + }, + "additionalProperties": false, + "required": [ + "description", + "params" + ] + }, + "CharmActions": { + "type": "object", + "properties": { + "specs": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmActionSpec" + } + } + } + }, + "additionalProperties": false + }, + "CharmBase": { + "type": "object", + "properties": { + "architectures": { + "type": "array", + "items": { + "type": "string" + } + }, + "channel": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "additionalProperties": false + }, + "CharmContainer": { + "type": "object", + "properties": { + "mounts": { + "type": "array", + "items": { + "$ref": "#/definitions/CharmMount" + } + }, + "resource": { + "type": "string" + } + }, + "additionalProperties": false + }, + "CharmDeployment": { + "type": "object", + "properties": { + "min-version": { + "type": "string" + }, + "mode": { + "type": "string" + }, + "service": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "type", + "mode", + "service", + "min-version" + ] + }, + "CharmDevice": { + "type": "object", + "properties": { + "CountMax": { + "type": "integer" + }, + "CountMin": { + "type": "integer" + }, + "Description": { + "type": "string" + }, + "Name": { + "type": "string" + }, + "Type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "Name", + "Description", + "Type", + "CountMin", + "CountMax" + ] + }, + "CharmLXDProfile": { + "type": "object", + "properties": { + "config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "description": { + "type": "string" + }, + "devices": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + } + } + } + }, + "additionalProperties": false, + "required": [ + "config", + "description", + "devices" + ] + }, + "CharmManifest": { + "type": "object", + "properties": { + "bases": { + "type": "array", + "items": { + "$ref": "#/definitions/CharmBase" + } + } + }, + "additionalProperties": false + }, + "CharmMeta": { + "type": "object", + "properties": { + "assumes-expr": { + "$ref": "#/definitions/ExpressionTree" + }, + "categories": { + "type": "array", + "items": { + "type": "string" + } + }, + "containers": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmContainer" + } + } + }, + "deployment": { + "$ref": "#/definitions/CharmDeployment" + }, + "description": { + "type": "string" + }, + "devices": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmDevice" + } + } + }, + "extra-bindings": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "min-juju-version": { + "type": "string" + }, + "name": { + "type": "string" + }, + "payload-classes": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmPayloadClass" + } + } + }, + "peers": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmRelation" + } + } + }, + "provides": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmRelation" + } + } + }, + "requires": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmRelation" + } + } + }, + "resources": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmResourceMeta" + } + } + }, + "series": { + "type": "array", + "items": { + "type": "string" + } + }, + "storage": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmStorage" + } + } + }, + "subordinate": { + "type": "boolean" + }, + "summary": { + "type": "string" + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "terms": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "name", + "summary", + "description", + "subordinate" + ] + }, + "CharmMetric": { + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "type", + "description" + ] + }, + "CharmMetrics": { + "type": "object", + "properties": { + "metrics": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmMetric" + } + } + }, + "plan": { + "$ref": "#/definitions/CharmPlan" + } + }, + "additionalProperties": false, + "required": [ + "metrics", + "plan" + ] + }, + "CharmMount": { + "type": "object", + "properties": { + "location": { + "type": "string" + }, + "storage": { + "type": "string" + } + }, + "additionalProperties": false + }, + "CharmOption": { + "type": "object", + "properties": { + "default": { + "type": "object", + "additionalProperties": true + }, + "description": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "type" + ] + }, + "CharmPayloadClass": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "type" + ] + }, + "CharmPlan": { + "type": "object", + "properties": { + "required": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "required" + ] + }, + "CharmRelation": { + "type": "object", + "properties": { + "interface": { + "type": "string" + }, + "limit": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "optional": { + "type": "boolean" + }, + "role": { + "type": "string" + }, + "scope": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "role", + "interface", + "optional", + "limit", + "scope" + ] + }, + "CharmResourceMeta": { + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "type", + "path", + "description" + ] + }, + "CharmStorage": { + "type": "object", + "properties": { + "count-max": { + "type": "integer" + }, + "count-min": { + "type": "integer" + }, + "description": { + "type": "string" + }, + "location": { + "type": "string" + }, + "minimum-size": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "properties": { + "type": "array", + "items": { + "type": "string" + } + }, + "read-only": { + "type": "boolean" + }, + "shared": { + "type": "boolean" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "description", + "type", + "shared", + "read-only", + "count-min", + "count-max", + "minimum-size" + ] + }, + "CharmURL": { + "type": "object", + "properties": { + "url": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "url" + ] + }, + "ConfigResult": { + "type": "object", + "properties": { + "config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false, + "required": [ + "config" + ] + }, + "DockerImageInfo": { + "type": "object", + "properties": { + "auth": { + "type": "string" + }, + "email": { + "type": "string" + }, + "identitytoken": { + "type": "string" + }, + "image-name": { + "type": "string" + }, + "password": { + "type": "string" + }, + "registrytoken": { + "type": "string" + }, + "repository": { + "type": "string" + }, + "serveraddress": { + "type": "string" + }, + "username": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "image-name" + ] + }, + "Entities": { + "type": "object", + "properties": { + "entities": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } + } + }, + "additionalProperties": false, + "required": [ + "entities" + ] + }, + "Entity": { + "type": "object", + "properties": { + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag" + ] + }, + "EntityStatus": { + "type": "object", + "properties": { + "data": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "info": { + "type": "string" + }, + "since": { + "type": "string", + "format": "date-time" + }, + "status": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "status", + "info", + "since" + ] + }, + "EntityStatusArgs": { + "type": "object", + "properties": { + "data": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "info": { + "type": "string" + }, + "status": { + "type": "string" + }, + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag", + "status", + "info", + "data" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ErrorResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "ErrorResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "ExpressionTree": { + "type": "object", + "properties": { + "Expression": { + "type": "object", + "additionalProperties": true + } + }, + "additionalProperties": false, + "required": [ + "Expression" + ] + }, + "IntResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "result" + ] + }, + "IntResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/IntResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "KubernetesDeploymentInfo": { + "type": "object", + "properties": { + "deployment-type": { + "type": "string" + }, + "service-type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "deployment-type", + "service-type" + ] + }, + "KubernetesDeviceParams": { + "type": "object", + "properties": { + "Attributes": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "Count": { + "type": "integer" + }, + "Type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "Type", + "Count", + "Attributes" + ] + }, + "KubernetesFilesystemAttachmentParams": { + "type": "object", + "properties": { + "mount-point": { + "type": "string" + }, + "provider": { + "type": "string" + }, + "read-only": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "provider" + ] + }, + "KubernetesFilesystemInfo": { + "type": "object", + "properties": { + "data": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "filesystem-id": { + "type": "string" + }, + "info": { + "type": "string" + }, + "mount-point": { + "type": "string" + }, + "pool": { + "type": "string" + }, + "read-only": { + "type": "boolean" + }, + "size": { + "type": "integer" + }, + "status": { + "type": "string" + }, + "storagename": { + "type": "string" + }, + "volume": { + "$ref": "#/definitions/KubernetesVolumeInfo" + } + }, + "additionalProperties": false, + "required": [ + "storagename", + "pool", + "size", + "filesystem-id", + "status", + "info", + "volume" + ] + }, + "KubernetesFilesystemParams": { + "type": "object", + "properties": { + "attachment": { + "$ref": "#/definitions/KubernetesFilesystemAttachmentParams" + }, + "attributes": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "provider": { + "type": "string" + }, + "size": { + "type": "integer" + }, + "storagename": { + "type": "string" + }, + "tags": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + } + }, + "additionalProperties": false, + "required": [ + "storagename", + "size", + "provider" + ] + }, + "KubernetesProvisioningInfo": { + "type": "object", + "properties": { + "charm-modified-version": { + "type": "integer" + }, + "constraints": { + "$ref": "#/definitions/Value" + }, + "deployment-info": { + "$ref": "#/definitions/KubernetesDeploymentInfo" + }, + "devices": { + "type": "array", + "items": { + "$ref": "#/definitions/KubernetesDeviceParams" + } + }, + "filesystems": { + "type": "array", + "items": { + "$ref": "#/definitions/KubernetesFilesystemParams" + } + }, + "image-repo": { + "$ref": "#/definitions/DockerImageInfo" + }, + "pod-spec": { + "type": "string" + }, + "raw-k8s-spec": { + "type": "string" + }, + "tags": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "volumes": { + "type": "array", + "items": { + "$ref": "#/definitions/KubernetesVolumeParams" + } + } + }, + "additionalProperties": false, + "required": [ + "pod-spec", + "constraints" + ] + }, + "KubernetesProvisioningInfoResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "$ref": "#/definitions/KubernetesProvisioningInfo" + } + }, + "additionalProperties": false, + "required": [ + "result" + ] + }, + "KubernetesProvisioningInfoResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/KubernetesProvisioningInfoResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "KubernetesVolumeAttachmentParams": { + "type": "object", + "properties": { + "provider": { + "type": "string" + }, + "read-only": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "provider" + ] + }, + "KubernetesVolumeInfo": { + "type": "object", + "properties": { + "data": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "info": { + "type": "string" + }, + "persistent": { + "type": "boolean" + }, + "pool": { + "type": "string" + }, + "size": { + "type": "integer" + }, + "status": { + "type": "string" + }, + "volume-id": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "volume-id", + "size", + "persistent", + "status", + "info" + ] + }, + "KubernetesVolumeParams": { + "type": "object", + "properties": { + "attachment": { + "$ref": "#/definitions/KubernetesVolumeAttachmentParams" + }, + "attributes": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "provider": { + "type": "string" + }, + "size": { + "type": "integer" + }, + "storagename": { + "type": "string" + }, + "tags": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + } + }, + "additionalProperties": false, + "required": [ + "storagename", + "size", + "provider" + ] + }, + "LifeResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "life": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "life" + ] + }, + "LifeResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/LifeResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "NotifyWatchResult": { + "type": "object", + "properties": { + "NotifyWatcherId": { + "type": "string" + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false, + "required": [ + "NotifyWatcherId" + ] + }, + "NotifyWatchResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/NotifyWatchResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "SetStatus": { + "type": "object", + "properties": { + "entities": { + "type": "array", + "items": { + "$ref": "#/definitions/EntityStatusArgs" + } + } + }, + "additionalProperties": false, + "required": [ + "entities" + ] + }, + "StringResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "result" + ] + }, + "StringResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/StringResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "StringsWatchResult": { + "type": "object", + "properties": { + "changes": { + "type": "array", + "items": { + "type": "string" + } + }, + "error": { + "$ref": "#/definitions/Error" + }, + "watcher-id": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "watcher-id" + ] + }, + "StringsWatchResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/StringsWatchResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "UpdateApplicationServiceArg": { + "type": "object", + "properties": { + "addresses": { + "type": "array", + "items": { + "$ref": "#/definitions/Address" + } + }, + "application-tag": { + "type": "string" + }, + "generation": { + "type": "integer" + }, + "provider-id": { + "type": "string" + }, + "scale": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "application-tag", + "provider-id", + "addresses" + ] + }, + "UpdateApplicationServiceArgs": { + "type": "object", + "properties": { + "args": { + "type": "array", + "items": { + "$ref": "#/definitions/UpdateApplicationServiceArg" + } + } + }, + "additionalProperties": false, + "required": [ + "args" + ] + }, + "UpdateApplicationUnitArgs": { + "type": "object", + "properties": { + "args": { + "type": "array", + "items": { + "$ref": "#/definitions/UpdateApplicationUnits" + } + } + }, + "additionalProperties": false, + "required": [ + "args" + ] + }, + "UpdateApplicationUnitResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "info": { + "$ref": "#/definitions/UpdateApplicationUnitsInfo" + } + }, + "additionalProperties": false + }, + "UpdateApplicationUnitResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/UpdateApplicationUnitResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "UpdateApplicationUnits": { + "type": "object", + "properties": { + "application-tag": { + "type": "string" + }, + "generation": { + "type": "integer" + }, + "scale": { + "type": "integer" + }, + "status": { + "$ref": "#/definitions/EntityStatus" + }, + "units": { + "type": "array", + "items": { + "$ref": "#/definitions/ApplicationUnitParams" + } + } + }, + "additionalProperties": false, + "required": [ + "application-tag", + "units" + ] + }, + "UpdateApplicationUnitsInfo": { + "type": "object", + "properties": { + "units": { + "type": "array", + "items": { + "$ref": "#/definitions/ApplicationUnitInfo" + } + } + }, + "additionalProperties": false, + "required": [ + "units" + ] + }, + "Value": { + "type": "object", + "properties": { + "allocate-public-ip": { + "type": "boolean" + }, + "arch": { + "type": "string" + }, + "container": { + "type": "string" + }, + "cores": { + "type": "integer" + }, + "cpu-power": { + "type": "integer" + }, + "instance-role": { + "type": "string" + }, + "instance-type": { + "type": "string" + }, + "mem": { + "type": "integer" + }, + "root-disk": { + "type": "integer" + }, + "root-disk-source": { + "type": "string" + }, + "spaces": { + "type": "array", + "items": { + "type": "string" + } + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "virt-type": { + "type": "string" + }, + "zones": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + } + } + } + }, + { + "Name": "CharmDownloader", + "Description": "CharmDownloaderAPI implements an API for watching the charms collection for\nany entries that have not been yet downloaded to the blobstore and for\ntriggering their download.", + "Version": 1, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "DownloadApplicationCharms": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "DownloadApplicationCharms iterates the list of provided applications and\ndownloads any referenced charms that have not yet been persisted to the\nblob store." + }, + "WatchApplicationsWithPendingCharms": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/StringsWatchResult" + } + }, + "description": "WatchApplicationsWithPendingCharms registers and returns a watcher instance\nthat reports the ID of applications that reference a charm which has not yet\nbeen downloaded." + } + }, + "definitions": { + "Entities": { + "type": "object", + "properties": { + "entities": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } + } + }, + "additionalProperties": false, + "required": [ + "entities" + ] + }, + "Entity": { + "type": "object", + "properties": { + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ErrorResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "ErrorResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "StringsWatchResult": { + "type": "object", + "properties": { + "changes": { + "type": "array", + "items": { + "type": "string" + } + }, + "error": { + "$ref": "#/definitions/Error" + }, + "watcher-id": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "watcher-id" + ] + } + } + } + }, + { + "Name": "CharmRevisionUpdater", + "Description": "CharmRevisionUpdaterAPI implements the CharmRevisionUpdater interface and is the concrete\nimplementation of the api end point.", + "Version": 2, + "AvailableTo": [ + "controller-machine-agent" + ], + "Schema": { + "type": "object", + "properties": { + "UpdateLatestRevisions": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/ErrorResult" + } + }, + "description": "UpdateLatestRevisions retrieves the latest revision information from the charm store for all deployed charms\nand records this information in state." + } + }, + "definitions": { + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ErrorResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + } + } + } + }, + { + "Name": "Charms", + "Description": "APIv6 provides the Charms API facade for version 6.\nIt removes the AddCharmWithAuthorization function, as\nwe no longer support macaroons.", + "Version": 6, + "AvailableTo": [ + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "AddCharm": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/AddCharmWithOrigin" + }, + "Result": { + "$ref": "#/definitions/CharmOriginResult" + } + }, + "description": "AddCharm adds the given charm URL (which must include revision) to the\nenvironment, if it does not exist yet. Local charms are not supported,\nonly charm store and charm hub URLs. See also AddLocalCharm()." + }, + "CharmInfo": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/CharmURL" + }, + "Result": { + "$ref": "#/definitions/Charm" + } + }, + "description": "CharmInfo returns information about the requested charm." + }, + "CheckCharmPlacement": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ApplicationCharmPlacements" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "CheckCharmPlacement checks if a charm is allowed to be placed with in a\ngiven application." + }, + "GetDownloadInfos": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/CharmURLAndOrigins" + }, + "Result": { + "$ref": "#/definitions/DownloadInfoResults" + } + }, + "description": "GetDownloadInfos attempts to get the bundle corresponding to the charm url\nand origin." + }, + "IsMetered": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/CharmURL" + }, + "Result": { + "$ref": "#/definitions/IsMeteredResult" + } + }, + "description": "IsMetered returns whether or not the charm is metered." + }, + "List": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/CharmsList" + }, + "Result": { + "$ref": "#/definitions/CharmsListResult" + } + }, + "description": "List returns a list of charm URLs currently in the state.\nIf supplied parameter contains any names, the result will\nbe filtered to return only the charms with supplied names." + }, + "ListCharmResources": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/CharmURLAndOrigins" + }, + "Result": { + "$ref": "#/definitions/CharmResourcesResults" + } + }, + "description": "ListCharmResources returns a series of resources for a given charm." + }, + "ResolveCharms": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ResolveCharmsWithChannel" + }, + "Result": { + "$ref": "#/definitions/ResolveCharmWithChannelResults" + } + }, + "description": "ResolveCharms resolves the given charm URLs with an optionally specified\npreferred channel. Channel provided via CharmOrigin." + } + }, + "definitions": { + "AddCharmWithOrigin": { + "type": "object", + "properties": { + "charm-origin": { + "$ref": "#/definitions/CharmOrigin" + }, + "force": { + "type": "boolean" + }, + "url": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "url", + "charm-origin", + "force" + ] + }, + "ApplicationCharmPlacement": { + "type": "object", + "properties": { + "application": { + "type": "string" + }, + "charm-url": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "application", + "charm-url" + ] + }, + "ApplicationCharmPlacements": { + "type": "object", + "properties": { + "placements": { + "type": "array", + "items": { + "$ref": "#/definitions/ApplicationCharmPlacement" + } + } + }, + "additionalProperties": false, + "required": [ + "placements" + ] + }, + "Base": { + "type": "object", + "properties": { + "channel": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "channel" + ] + }, + "Charm": { + "type": "object", + "properties": { + "actions": { + "$ref": "#/definitions/CharmActions" + }, + "config": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmOption" + } + } + }, + "lxd-profile": { + "$ref": "#/definitions/CharmLXDProfile" + }, + "manifest": { + "$ref": "#/definitions/CharmManifest" + }, + "meta": { + "$ref": "#/definitions/CharmMeta" + }, + "metrics": { + "$ref": "#/definitions/CharmMetrics" + }, + "revision": { + "type": "integer" + }, + "url": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "revision", + "url", + "config" + ] + }, + "CharmActionSpec": { + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "params": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + } + }, + "additionalProperties": false, + "required": [ + "description", + "params" + ] + }, + "CharmActions": { + "type": "object", + "properties": { + "specs": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmActionSpec" + } + } + } + }, + "additionalProperties": false + }, + "CharmBase": { + "type": "object", + "properties": { + "architectures": { + "type": "array", + "items": { + "type": "string" + } + }, + "channel": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "additionalProperties": false + }, + "CharmContainer": { + "type": "object", + "properties": { + "mounts": { + "type": "array", + "items": { + "$ref": "#/definitions/CharmMount" + } + }, + "resource": { + "type": "string" + } + }, + "additionalProperties": false + }, + "CharmDeployment": { + "type": "object", + "properties": { + "min-version": { + "type": "string" + }, + "mode": { + "type": "string" + }, + "service": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "type", + "mode", + "service", + "min-version" + ] + }, + "CharmDevice": { + "type": "object", + "properties": { + "CountMax": { + "type": "integer" + }, + "CountMin": { + "type": "integer" + }, + "Description": { + "type": "string" + }, + "Name": { + "type": "string" + }, + "Type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "Name", + "Description", + "Type", + "CountMin", + "CountMax" + ] + }, + "CharmLXDProfile": { + "type": "object", + "properties": { + "config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "description": { + "type": "string" + }, + "devices": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + } + } + } + }, + "additionalProperties": false, + "required": [ + "config", + "description", + "devices" + ] + }, + "CharmManifest": { + "type": "object", + "properties": { + "bases": { + "type": "array", + "items": { + "$ref": "#/definitions/CharmBase" + } + } + }, + "additionalProperties": false + }, + "CharmMeta": { + "type": "object", + "properties": { + "assumes-expr": { + "$ref": "#/definitions/ExpressionTree" + }, + "categories": { + "type": "array", + "items": { + "type": "string" + } + }, + "containers": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmContainer" + } + } + }, + "deployment": { + "$ref": "#/definitions/CharmDeployment" + }, + "description": { + "type": "string" + }, + "devices": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmDevice" + } + } + }, + "extra-bindings": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "min-juju-version": { + "type": "string" + }, + "name": { + "type": "string" + }, + "payload-classes": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmPayloadClass" + } + } + }, + "peers": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmRelation" + } + } + }, + "provides": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmRelation" + } + } + }, + "requires": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmRelation" + } + } + }, + "resources": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmResourceMeta" + } + } + }, + "series": { + "type": "array", + "items": { + "type": "string" + } + }, + "storage": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmStorage" + } + } + }, + "subordinate": { + "type": "boolean" + }, + "summary": { + "type": "string" + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "terms": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "name", + "summary", + "description", + "subordinate" + ] + }, + "CharmMetric": { + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "type", + "description" + ] + }, + "CharmMetrics": { + "type": "object", + "properties": { + "metrics": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmMetric" + } + } + }, + "plan": { + "$ref": "#/definitions/CharmPlan" + } + }, + "additionalProperties": false, + "required": [ + "metrics", + "plan" + ] + }, + "CharmMount": { + "type": "object", + "properties": { + "location": { + "type": "string" + }, + "storage": { + "type": "string" + } + }, + "additionalProperties": false + }, + "CharmOption": { + "type": "object", + "properties": { + "default": { + "type": "object", + "additionalProperties": true + }, + "description": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "type" + ] + }, + "CharmOrigin": { + "type": "object", + "properties": { + "architecture": { + "type": "string" + }, + "base": { + "$ref": "#/definitions/Base" + }, + "branch": { + "type": "string" + }, + "hash": { + "type": "string" + }, + "id": { + "type": "string" + }, + "instance-key": { + "type": "string" + }, + "revision": { + "type": "integer" + }, + "risk": { + "type": "string" + }, + "source": { + "type": "string" + }, + "track": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "source", + "type", + "id" + ] + }, + "CharmOriginResult": { + "type": "object", + "properties": { + "charm-origin": { + "$ref": "#/definitions/CharmOrigin" + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false, + "required": [ + "charm-origin" + ] + }, + "CharmPayloadClass": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "type" + ] + }, + "CharmPlan": { + "type": "object", + "properties": { + "required": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "required" + ] + }, + "CharmRelation": { + "type": "object", + "properties": { + "interface": { + "type": "string" + }, + "limit": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "optional": { + "type": "boolean" + }, + "role": { + "type": "string" + }, + "scope": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "role", + "interface", + "optional", + "limit", + "scope" + ] + }, + "CharmResource": { + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "fingerprint": { + "type": "array", + "items": { + "type": "integer" + } + }, + "name": { + "type": "string" + }, + "origin": { + "type": "string" + }, + "path": { + "type": "string" + }, + "revision": { + "type": "integer" + }, + "size": { + "type": "integer" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "type", + "path", + "origin", + "revision", + "fingerprint", + "size" + ] + }, + "CharmResourceMeta": { + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "type", + "path", + "description" + ] + }, + "CharmResourceResult": { + "type": "object", + "properties": { + "CharmResource": { + "$ref": "#/definitions/CharmResource" + }, + "ErrorResult": { + "$ref": "#/definitions/ErrorResult" + }, + "description": { + "type": "string" + }, + "error": { + "$ref": "#/definitions/Error" + }, + "fingerprint": { + "type": "array", + "items": { + "type": "integer" + } + }, + "name": { + "type": "string" + }, + "origin": { + "type": "string" + }, + "path": { + "type": "string" + }, + "revision": { + "type": "integer" + }, + "size": { + "type": "integer" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "ErrorResult", + "name", + "type", + "path", + "origin", + "revision", + "fingerprint", + "size", + "CharmResource" + ] + }, + "CharmResourcesResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/definitions/CharmResourceResult" + } + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "CharmStorage": { + "type": "object", + "properties": { + "count-max": { + "type": "integer" + }, + "count-min": { + "type": "integer" + }, + "description": { + "type": "string" + }, + "location": { + "type": "string" + }, + "minimum-size": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "properties": { + "type": "array", + "items": { + "type": "string" + } + }, + "read-only": { + "type": "boolean" + }, + "shared": { + "type": "boolean" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "description", + "type", + "shared", + "read-only", + "count-min", + "count-max", + "minimum-size" + ] + }, + "CharmURL": { + "type": "object", + "properties": { + "url": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "url" + ] + }, + "CharmURLAndOrigin": { + "type": "object", + "properties": { + "charm-origin": { + "$ref": "#/definitions/CharmOrigin" + }, + "charm-url": { + "type": "string" + }, + "macaroon": { + "$ref": "#/definitions/Macaroon" + } + }, + "additionalProperties": false, + "required": [ + "charm-url", + "charm-origin" + ] + }, + "CharmURLAndOrigins": { + "type": "object", + "properties": { + "entities": { + "type": "array", + "items": { + "$ref": "#/definitions/CharmURLAndOrigin" + } + } + }, + "additionalProperties": false, + "required": [ + "entities" + ] + }, + "CharmsList": { + "type": "object", + "properties": { + "names": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "names" + ] + }, + "CharmsListResult": { + "type": "object", + "properties": { + "charm-urls": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "charm-urls" + ] + }, + "DownloadInfoResult": { + "type": "object", + "properties": { + "charm-origin": { + "$ref": "#/definitions/CharmOrigin" + }, + "url": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "url", + "charm-origin" + ] + }, + "DownloadInfoResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/DownloadInfoResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ErrorResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "ErrorResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "ExpressionTree": { + "type": "object", + "properties": { + "Expression": { + "type": "object", + "additionalProperties": true + } + }, + "additionalProperties": false, + "required": [ + "Expression" + ] + }, + "IsMeteredResult": { + "type": "object", + "properties": { + "metered": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "metered" + ] + }, + "Macaroon": { + "type": "object", + "additionalProperties": false + }, + "ResolveCharmWithChannel": { + "type": "object", + "properties": { + "charm-origin": { + "$ref": "#/definitions/CharmOrigin" + }, + "reference": { + "type": "string" + }, + "switch-charm": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "reference", + "charm-origin" + ] + }, + "ResolveCharmWithChannelResult": { + "type": "object", + "properties": { + "charm-origin": { + "$ref": "#/definitions/CharmOrigin" + }, + "error": { + "$ref": "#/definitions/Error" + }, + "supported-series": { + "type": "array", + "items": { + "type": "string" + } + }, + "url": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "url", + "charm-origin", + "supported-series" + ] + }, + "ResolveCharmWithChannelResults": { + "type": "object", + "properties": { + "Results": { + "type": "array", + "items": { + "$ref": "#/definitions/ResolveCharmWithChannelResult" + } + } + }, + "additionalProperties": false, + "required": [ + "Results" + ] + }, + "ResolveCharmsWithChannel": { + "type": "object", + "properties": { + "macaroon": { + "$ref": "#/definitions/Macaroon" + }, + "resolve": { + "type": "array", + "items": { + "$ref": "#/definitions/ResolveCharmWithChannel" + } + } + }, + "additionalProperties": false, + "required": [ + "resolve" + ] + } + } + } + }, + { + "Name": "Cleaner", + "Description": "CleanerAPI implements the API used by the cleaner worker.", + "Version": 2, + "AvailableTo": [ + "controller-machine-agent" + ], + "Schema": { + "type": "object", + "properties": { + "Cleanup": { + "type": "object", + "description": "Cleanup triggers a state cleanup" + }, + "WatchCleanups": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/NotifyWatchResult" + } + }, + "description": "WatchCleanups watches for cleanups to be performed in state." + } + }, + "definitions": { + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "NotifyWatchResult": { + "type": "object", + "properties": { + "NotifyWatcherId": { + "type": "string" + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false, + "required": [ + "NotifyWatcherId" + ] + } + } + } + }, + { + "Name": "Client", + "Description": "Client serves client-specific API methods.", + "Version": 6, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "FindTools": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/FindToolsParams" + }, + "Result": { + "$ref": "#/definitions/FindToolsResult" + } + }, + "description": "FindTools returns a List containing all tools matching the given parameters.\nTODO(juju 3.1) - remove, used by 2.9 client only" + }, + "FullStatus": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/StatusParams" + }, + "Result": { + "$ref": "#/definitions/FullStatus" + } + }, + "description": "FullStatus gives the information needed for juju status over the api" + }, + "StatusHistory": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/StatusHistoryRequests" + }, + "Result": { + "$ref": "#/definitions/StatusHistoryResults" + } + }, + "description": "StatusHistory returns a slice of past statuses for several entities." + }, + "WatchAll": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/AllWatcherId" + } + }, + "description": "WatchAll initiates a watcher for entities in the connected model." + } + }, + "definitions": { + "AllWatcherId": { + "type": "object", + "properties": { + "watcher-id": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "watcher-id" + ] + }, + "ApplicationOfferStatus": { + "type": "object", + "properties": { + "active-connected-count": { + "type": "integer" + }, + "application-name": { + "type": "string" + }, + "charm": { + "type": "string" + }, + "endpoints": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/RemoteEndpoint" + } + } + }, + "err": { + "$ref": "#/definitions/Error" + }, + "offer-name": { + "type": "string" + }, + "total-connected-count": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "offer-name", + "application-name", + "charm", + "endpoints", + "active-connected-count", + "total-connected-count" + ] + }, + "ApplicationStatus": { + "type": "object", + "properties": { + "base": { + "$ref": "#/definitions/Base" + }, + "can-upgrade-to": { + "type": "string" + }, + "charm": { + "type": "string" + }, + "charm-channel": { + "type": "string" + }, + "charm-profile": { + "type": "string" + }, + "charm-version": { + "type": "string" + }, + "endpoint-bindings": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "err": { + "$ref": "#/definitions/Error" + }, + "exposed": { + "type": "boolean" + }, + "exposed-endpoints": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/ExposedEndpoint" + } + } + }, + "int": { + "type": "integer" + }, + "life": { + "type": "string" + }, + "meter-statuses": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/MeterStatus" + } + } + }, + "provider-id": { + "type": "string" + }, + "public-address": { + "type": "string" + }, + "relations": { + "type": "object", + "patternProperties": { + ".*": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "status": { + "$ref": "#/definitions/DetailedStatus" + }, + "subordinate-to": { + "type": "array", + "items": { + "type": "string" + } + }, + "units": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/UnitStatus" + } + } + }, + "workload-version": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "charm", + "charm-version", + "charm-profile", + "base", + "exposed", + "life", + "relations", + "can-upgrade-to", + "subordinate-to", + "units", + "meter-statuses", + "status", + "workload-version", + "endpoint-bindings", + "public-address" + ] + }, + "Base": { + "type": "object", + "properties": { + "channel": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "channel" + ] + }, + "Binary": { + "type": "object", + "properties": { + "Arch": { + "type": "string" + }, + "Build": { + "type": "integer" + }, + "Major": { + "type": "integer" + }, + "Minor": { + "type": "integer" + }, + "Number": { + "$ref": "#/definitions/Number" + }, + "Patch": { + "type": "integer" + }, + "Release": { + "type": "string" + }, + "Tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "Major", + "Minor", + "Tag", + "Patch", + "Build", + "Number", + "Release", + "Arch" + ] + }, + "BranchStatus": { + "type": "object", + "properties": { + "assigned-units": { + "type": "object", + "patternProperties": { + ".*": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "created": { + "type": "integer" + }, + "created-by": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "assigned-units", + "created", + "created-by" + ] + }, + "DetailedStatus": { + "type": "object", + "properties": { + "data": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "err": { + "$ref": "#/definitions/Error" + }, + "info": { + "type": "string" + }, + "kind": { + "type": "string" + }, + "life": { + "type": "string" + }, + "since": { + "type": "string", + "format": "date-time" + }, + "status": { + "type": "string" + }, + "version": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "status", + "info", + "data", + "since", + "kind", + "version", + "life" + ] + }, + "EndpointStatus": { + "type": "object", + "properties": { + "application": { + "type": "string" + }, + "name": { + "type": "string" + }, + "role": { + "type": "string" + }, + "subordinate": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "application", + "name", + "role", + "subordinate" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ExposedEndpoint": { + "type": "object", + "properties": { + "expose-to-cidrs": { + "type": "array", + "items": { + "type": "string" + } + }, + "expose-to-spaces": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "FindToolsParams": { + "type": "object", + "properties": { + "agentstream": { + "type": "string" + }, + "arch": { + "type": "string" + }, + "major": { + "type": "integer" + }, + "number": { + "$ref": "#/definitions/Number" + }, + "os-type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "number", + "major", + "arch", + "os-type", + "agentstream" + ] + }, + "FindToolsResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "list": { + "type": "array", + "items": { + "$ref": "#/definitions/Tools" + } + } + }, + "additionalProperties": false, + "required": [ + "list" + ] + }, + "FullStatus": { + "type": "object", + "properties": { + "applications": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/ApplicationStatus" + } + } + }, + "branches": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/BranchStatus" + } + } + }, + "controller-timestamp": { + "type": "string", + "format": "date-time" + }, + "machines": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/MachineStatus" + } + } + }, + "model": { + "$ref": "#/definitions/ModelStatusInfo" + }, + "offers": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/ApplicationOfferStatus" + } + } + }, + "relations": { + "type": "array", + "items": { + "$ref": "#/definitions/RelationStatus" + } + }, + "remote-applications": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/RemoteApplicationStatus" + } + } + } + }, + "additionalProperties": false, + "required": [ + "model", + "machines", + "applications", + "remote-applications", + "offers", + "relations", + "controller-timestamp", + "branches" + ] + }, + "History": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "statuses": { + "type": "array", + "items": { + "$ref": "#/definitions/DetailedStatus" + } + } + }, + "additionalProperties": false, + "required": [ + "statuses" + ] + }, + "LXDProfile": { + "type": "object", + "properties": { + "config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "description": { + "type": "string" + }, + "devices": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + } + } + } + }, + "additionalProperties": false, + "required": [ + "config", + "description", + "devices" + ] + }, + "MachineStatus": { + "type": "object", + "properties": { + "agent-status": { + "$ref": "#/definitions/DetailedStatus" + }, + "base": { + "$ref": "#/definitions/Base" + }, + "constraints": { + "type": "string" + }, + "containers": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/MachineStatus" + } + } + }, + "display-name": { + "type": "string" + }, + "dns-name": { + "type": "string" + }, + "hardware": { + "type": "string" + }, + "has-vote": { + "type": "boolean" + }, + "hostname": { + "type": "string" + }, + "id": { + "type": "string" + }, + "instance-id": { + "type": "string" + }, + "instance-status": { + "$ref": "#/definitions/DetailedStatus" + }, + "ip-addresses": { + "type": "array", + "items": { + "type": "string" + } + }, + "jobs": { + "type": "array", + "items": { + "type": "string" + } + }, + "lxd-profiles": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/LXDProfile" + } + } + }, + "modification-status": { + "$ref": "#/definitions/DetailedStatus" + }, + "network-interfaces": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/NetworkInterface" + } + } + }, + "primary-controller-machine": { + "type": "boolean" + }, + "wants-vote": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "agent-status", + "instance-status", + "modification-status", + "dns-name", + "instance-id", + "display-name", + "base", + "id", + "containers", + "constraints", + "hardware", + "jobs", + "has-vote", + "wants-vote" + ] + }, + "MeterStatus": { + "type": "object", + "properties": { + "color": { + "type": "string" + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "color", + "message" + ] + }, + "ModelStatusInfo": { + "type": "object", + "properties": { + "available-version": { + "type": "string" + }, + "cloud-tag": { + "type": "string" + }, + "meter-status": { + "$ref": "#/definitions/MeterStatus" + }, + "model-status": { + "$ref": "#/definitions/DetailedStatus" + }, + "name": { + "type": "string" + }, + "region": { + "type": "string" + }, + "sla": { + "type": "string" + }, + "type": { + "type": "string" + }, + "version": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "type", + "cloud-tag", + "version", + "available-version", + "model-status", + "meter-status", + "sla" + ] + }, + "NetworkInterface": { + "type": "object", + "properties": { + "dns-nameservers": { + "type": "array", + "items": { + "type": "string" + } + }, + "gateway": { + "type": "string" + }, + "ip-addresses": { + "type": "array", + "items": { + "type": "string" + } + }, + "is-up": { + "type": "boolean" + }, + "mac-address": { + "type": "string" + }, + "space": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "ip-addresses", + "mac-address", + "is-up" + ] + }, + "Number": { + "type": "object", + "properties": { + "Build": { + "type": "integer" + }, + "Major": { + "type": "integer" + }, + "Minor": { + "type": "integer" + }, + "Patch": { + "type": "integer" + }, + "Tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "Major", + "Minor", + "Tag", + "Patch", + "Build" + ] + }, + "RelationStatus": { + "type": "object", + "properties": { + "endpoints": { + "type": "array", + "items": { + "$ref": "#/definitions/EndpointStatus" + } + }, + "id": { + "type": "integer" + }, + "interface": { + "type": "string" + }, + "key": { + "type": "string" + }, + "scope": { + "type": "string" + }, + "status": { + "$ref": "#/definitions/DetailedStatus" + } + }, + "additionalProperties": false, + "required": [ + "id", + "key", + "interface", + "scope", + "endpoints", + "status" + ] + }, + "RemoteApplicationStatus": { + "type": "object", + "properties": { + "endpoints": { + "type": "array", + "items": { + "$ref": "#/definitions/RemoteEndpoint" + } + }, + "err": { + "$ref": "#/definitions/Error" + }, + "life": { + "type": "string" + }, + "offer-name": { + "type": "string" + }, + "offer-url": { + "type": "string" + }, + "relations": { + "type": "object", + "patternProperties": { + ".*": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "status": { + "$ref": "#/definitions/DetailedStatus" + } + }, + "additionalProperties": false, + "required": [ + "offer-url", + "offer-name", + "endpoints", + "life", + "relations", + "status" + ] + }, + "RemoteEndpoint": { + "type": "object", + "properties": { + "interface": { + "type": "string" + }, + "limit": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "role": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "role", + "interface", + "limit" + ] + }, + "StatusHistoryFilter": { + "type": "object", + "properties": { + "date": { + "type": "string", + "format": "date-time" + }, + "delta": { + "type": "integer" + }, + "exclude": { + "type": "array", + "items": { + "type": "string" + } + }, + "size": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "size", + "date", + "delta", + "exclude" + ] + }, + "StatusHistoryRequest": { + "type": "object", + "properties": { + "filter": { + "$ref": "#/definitions/StatusHistoryFilter" + }, + "historyKind": { + "type": "string" + }, + "size": { + "type": "integer" + }, + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "historyKind", + "size", + "filter", + "tag" + ] + }, + "StatusHistoryRequests": { + "type": "object", + "properties": { + "requests": { + "type": "array", + "items": { + "$ref": "#/definitions/StatusHistoryRequest" + } + } + }, + "additionalProperties": false, + "required": [ + "requests" + ] + }, + "StatusHistoryResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "history": { + "$ref": "#/definitions/History" + } + }, + "additionalProperties": false, + "required": [ + "history" + ] + }, + "StatusHistoryResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/StatusHistoryResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "StatusParams": { + "type": "object", + "properties": { + "patterns": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "patterns" + ] + }, + "Tools": { + "type": "object", + "properties": { + "sha256": { + "type": "string" + }, + "size": { + "type": "integer" + }, + "url": { + "type": "string" + }, + "version": { + "$ref": "#/definitions/Binary" + } + }, + "additionalProperties": false, + "required": [ + "version", + "url", + "size" + ] + }, + "UnitStatus": { + "type": "object", + "properties": { + "address": { + "type": "string" + }, + "agent-status": { + "$ref": "#/definitions/DetailedStatus" + }, + "charm": { + "type": "string" + }, + "leader": { + "type": "boolean" + }, + "machine": { + "type": "string" + }, + "opened-ports": { + "type": "array", + "items": { + "type": "string" + } + }, + "provider-id": { + "type": "string" + }, + "public-address": { + "type": "string" + }, + "subordinates": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/UnitStatus" + } + } + }, + "workload-status": { + "$ref": "#/definitions/DetailedStatus" + }, + "workload-version": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "agent-status", + "workload-status", + "workload-version", + "machine", + "opened-ports", + "public-address", + "charm", + "subordinates" + ] + } + } + } + }, + { + "Name": "Cloud", + "Description": "CloudAPI implements the cloud interface and is the concrete implementation\nof the api end point.", + "Version": 7, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "controller-user" + ], + "Schema": { + "type": "object", + "properties": { + "AddCloud": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/AddCloudArgs" + } + }, + "description": "AddCloud adds a new cloud, different from the one managed by the controller." + }, + "AddCredentials": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/TaggedCredentials" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "AddCredentials adds new credentials.\nIn contrast to UpdateCredentials() below, the new credentials can be\nfor a cloud that the controller does not manage (this is required\nfor CAAS models)" + }, + "CheckCredentialsModels": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/TaggedCredentials" + }, + "Result": { + "$ref": "#/definitions/UpdateCredentialResults" + } + }, + "description": "CheckCredentialsModels validates supplied cloud credentials' content against\nmodels that currently use these credentials.\nIf there are any models that are using a credential and these models or their\ncloud instances are not going to be accessible with corresponding credential,\nthere will be detailed validation errors per model.\nThere's no Juju API client which uses this, but JAAS does," + }, + "Cloud": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/CloudResults" + } + }, + "description": "Cloud returns the cloud definitions for the specified clouds." + }, + "CloudInfo": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/CloudInfoResults" + } + }, + "description": "CloudInfo returns information about the specified clouds." + }, + "Clouds": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/CloudsResult" + } + }, + "description": "Clouds returns the definitions of all clouds supported by the controller\nthat the logged in user can see." + }, + "Credential": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/CloudCredentialResults" + } + }, + "description": "Credential returns the specified cloud credential for each tag, minus secrets." + }, + "CredentialContents": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/CloudCredentialArgs" + }, + "Result": { + "$ref": "#/definitions/CredentialContentResults" + } + }, + "description": "CredentialContents returns the specified cloud credentials,\nincluding the secrets if requested.\nIf no specific credential name/cloud was passed in, all credentials for this user\nare returned.\nOnly credential owner can see its contents as well as what models use it.\nController admin has no special superpowers here and is treated the same as all other users." + }, + "InstanceTypes": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/CloudInstanceTypesConstraints" + }, + "Result": { + "$ref": "#/definitions/InstanceTypesResults" + } + }, + "description": "InstanceTypes returns instance type information for the cloud and region\nin which the current model is deployed." + }, + "ListCloudInfo": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ListCloudsRequest" + }, + "Result": { + "$ref": "#/definitions/ListCloudInfoResults" + } + }, + "description": "ListCloudInfo returns clouds that the specified user has access to.\nController admins (superuser) can list clouds for any user.\nOther users can only ask about their own clouds." + }, + "ModifyCloudAccess": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ModifyCloudAccessRequest" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "ModifyCloudAccess changes the model access granted to users." + }, + "RemoveClouds": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "RemoveClouds removes the specified clouds from the controller.\nIf a cloud is in use (has models deployed to it), the removal will fail." + }, + "RevokeCredentialsCheckModels": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/RevokeCredentialArgs" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "RevokeCredentialsCheckModels revokes a set of cloud credentials.\nIf the credentials are used by any of the models, the credential deletion will be aborted.\nIf credential-in-use needs to be revoked nonetheless, this method allows the use of force." + }, + "UpdateCloud": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/UpdateCloudArgs" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "UpdateCloud updates an existing cloud that the controller knows about." + }, + "UpdateCredentialsCheckModels": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/UpdateCredentialArgs" + }, + "Result": { + "$ref": "#/definitions/UpdateCredentialResults" + } + }, + "description": "UpdateCredentialsCheckModels updates a set of cloud credentials' content.\nIf there are any models that are using a credential and these models\nare not going to be visible with updated credential content,\nthere will be detailed validation errors per model. Such model errors are returned\nseparately and do not contribute to the overall method error status.\nController admins can 'force' an update of the credential\nregardless of whether it is deemed valid or not." + }, + "UserCredentials": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/UserClouds" + }, + "Result": { + "$ref": "#/definitions/StringsResults" + } + }, + "description": "UserCredentials returns the cloud credentials for a set of users." + } + }, + "definitions": { + "AddCloudArgs": { + "type": "object", + "properties": { + "cloud": { + "$ref": "#/definitions/Cloud" + }, + "force": { + "type": "boolean" + }, + "name": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "cloud", + "name" + ] + }, + "Cloud": { + "type": "object", + "properties": { + "auth-types": { + "type": "array", + "items": { + "type": "string" + } + }, + "ca-certificates": { + "type": "array", + "items": { + "type": "string" + } + }, + "config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "endpoint": { + "type": "string" + }, + "host-cloud-region": { + "type": "string" + }, + "identity-endpoint": { + "type": "string" + }, + "is-controller-cloud": { + "type": "boolean" + }, + "region-config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + } + } + }, + "regions": { + "type": "array", + "items": { + "$ref": "#/definitions/CloudRegion" + } + }, + "skip-tls-verify": { + "type": "boolean" + }, + "storage-endpoint": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "type" + ] + }, + "CloudCredential": { + "type": "object", + "properties": { + "attrs": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "auth-type": { + "type": "string" + }, + "redacted": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "auth-type" + ] + }, + "CloudCredentialArg": { + "type": "object", + "properties": { + "cloud-name": { + "type": "string" + }, + "credential-name": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "cloud-name", + "credential-name" + ] + }, + "CloudCredentialArgs": { + "type": "object", + "properties": { + "credentials": { + "type": "array", + "items": { + "$ref": "#/definitions/CloudCredentialArg" + } + }, + "include-secrets": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "include-secrets" + ] + }, + "CloudCredentialResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "$ref": "#/definitions/CloudCredential" + } + }, + "additionalProperties": false + }, + "CloudCredentialResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/CloudCredentialResult" + } + } + }, + "additionalProperties": false + }, + "CloudDetails": { + "type": "object", + "properties": { + "auth-types": { + "type": "array", + "items": { + "type": "string" + } + }, + "endpoint": { + "type": "string" + }, + "identity-endpoint": { + "type": "string" + }, + "regions": { + "type": "array", + "items": { + "$ref": "#/definitions/CloudRegion" + } + }, + "storage-endpoint": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "type" + ] + }, + "CloudInfo": { + "type": "object", + "properties": { + "CloudDetails": { + "$ref": "#/definitions/CloudDetails" + }, + "users": { + "type": "array", + "items": { + "$ref": "#/definitions/CloudUserInfo" + } + } + }, + "additionalProperties": false, + "required": [ + "CloudDetails", + "users" + ] + }, + "CloudInfoResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "$ref": "#/definitions/CloudInfo" + } + }, + "additionalProperties": false + }, + "CloudInfoResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/CloudInfoResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "CloudInstanceTypesConstraint": { + "type": "object", + "properties": { + "cloud-tag": { + "type": "string" + }, + "constraints": { + "$ref": "#/definitions/Value" + }, + "region": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "cloud-tag", + "region" + ] + }, + "CloudInstanceTypesConstraints": { + "type": "object", + "properties": { + "constraints": { + "type": "array", + "items": { + "$ref": "#/definitions/CloudInstanceTypesConstraint" + } + } + }, + "additionalProperties": false, + "required": [ + "constraints" + ] + }, + "CloudRegion": { + "type": "object", + "properties": { + "endpoint": { + "type": "string" + }, + "identity-endpoint": { + "type": "string" + }, + "name": { + "type": "string" + }, + "storage-endpoint": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name" + ] + }, + "CloudResult": { + "type": "object", + "properties": { + "cloud": { + "$ref": "#/definitions/Cloud" + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "CloudResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/CloudResult" + } + } + }, + "additionalProperties": false + }, + "CloudUserInfo": { + "type": "object", + "properties": { + "access": { + "type": "string" + }, + "display-name": { + "type": "string" + }, + "user": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "user", + "display-name", + "access" + ] + }, + "CloudsResult": { + "type": "object", + "properties": { + "clouds": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/Cloud" + } + } + } + }, + "additionalProperties": false + }, + "ControllerCredentialInfo": { + "type": "object", + "properties": { + "content": { + "$ref": "#/definitions/CredentialContent" + }, + "models": { + "type": "array", + "items": { + "$ref": "#/definitions/ModelAccess" + } + } + }, + "additionalProperties": false + }, + "CredentialContent": { + "type": "object", + "properties": { + "attrs": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "auth-type": { + "type": "string" + }, + "cloud": { + "type": "string" + }, + "name": { + "type": "string" + }, + "valid": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "name", + "cloud", + "auth-type" + ] + }, + "CredentialContentResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "$ref": "#/definitions/ControllerCredentialInfo" + } + }, + "additionalProperties": false + }, + "CredentialContentResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/CredentialContentResult" + } + } + }, + "additionalProperties": false + }, + "Entities": { + "type": "object", + "properties": { + "entities": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } + } + }, + "additionalProperties": false, + "required": [ + "entities" + ] + }, + "Entity": { + "type": "object", + "properties": { + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ErrorResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "ErrorResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "InstanceType": { + "type": "object", + "properties": { + "arches": { + "type": "array", + "items": { + "type": "string" + } + }, + "cost": { + "type": "integer" + }, + "cpu-cores": { + "type": "integer" + }, + "memory": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "root-disk": { + "type": "integer" + }, + "virt-type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "arches", + "cpu-cores", + "memory" + ] + }, + "InstanceTypesResult": { + "type": "object", + "properties": { + "cost-currency": { + "type": "string" + }, + "cost-divisor": { + "type": "integer" + }, + "cost-unit": { + "type": "string" + }, + "error": { + "$ref": "#/definitions/Error" + }, + "instance-types": { + "type": "array", + "items": { + "$ref": "#/definitions/InstanceType" + } + } + }, + "additionalProperties": false + }, + "InstanceTypesResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/InstanceTypesResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "ListCloudInfo": { + "type": "object", + "properties": { + "CloudDetails": { + "$ref": "#/definitions/CloudDetails" + }, + "user-access": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "CloudDetails", + "user-access" + ] + }, + "ListCloudInfoResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "$ref": "#/definitions/ListCloudInfo" + } + }, + "additionalProperties": false + }, + "ListCloudInfoResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ListCloudInfoResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "ListCloudsRequest": { + "type": "object", + "properties": { + "all": { + "type": "boolean" + }, + "user-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "user-tag" + ] + }, + "ModelAccess": { + "type": "object", + "properties": { + "access": { + "type": "string" + }, + "model": { + "type": "string" + } + }, + "additionalProperties": false + }, + "ModifyCloudAccess": { + "type": "object", + "properties": { + "access": { + "type": "string" + }, + "action": { + "type": "string" + }, + "cloud-tag": { + "type": "string" + }, + "user-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "user-tag", + "cloud-tag", + "action", + "access" + ] + }, + "ModifyCloudAccessRequest": { + "type": "object", + "properties": { + "changes": { + "type": "array", + "items": { + "$ref": "#/definitions/ModifyCloudAccess" + } + } + }, + "additionalProperties": false, + "required": [ + "changes" + ] + }, + "RevokeCredentialArg": { + "type": "object", + "properties": { + "force": { + "type": "boolean" + }, + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag", + "force" + ] + }, + "RevokeCredentialArgs": { + "type": "object", + "properties": { + "credentials": { + "type": "array", + "items": { + "$ref": "#/definitions/RevokeCredentialArg" + } + } + }, + "additionalProperties": false, + "required": [ + "credentials" + ] + }, + "StringsResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "StringsResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/StringsResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "TaggedCredential": { + "type": "object", + "properties": { + "credential": { + "$ref": "#/definitions/CloudCredential" + }, + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag", + "credential" + ] + }, + "TaggedCredentials": { + "type": "object", + "properties": { + "credentials": { + "type": "array", + "items": { + "$ref": "#/definitions/TaggedCredential" + } + } + }, + "additionalProperties": false + }, + "UpdateCloudArgs": { + "type": "object", + "properties": { + "clouds": { + "type": "array", + "items": { + "$ref": "#/definitions/AddCloudArgs" + } + } + }, + "additionalProperties": false, + "required": [ + "clouds" + ] + }, + "UpdateCredentialArgs": { + "type": "object", + "properties": { + "credentials": { + "type": "array", + "items": { + "$ref": "#/definitions/TaggedCredential" + } + }, + "force": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "credentials", + "force" + ] + }, + "UpdateCredentialModelResult": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResult" + } + }, + "name": { + "type": "string" + }, + "uuid": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uuid", + "name" + ] + }, + "UpdateCredentialResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "models": { + "type": "array", + "items": { + "$ref": "#/definitions/UpdateCredentialModelResult" + } + }, + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag" + ] + }, + "UpdateCredentialResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/UpdateCredentialResult" + } + } + }, + "additionalProperties": false + }, + "UserCloud": { + "type": "object", + "properties": { + "cloud-tag": { + "type": "string" + }, + "user-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "user-tag", + "cloud-tag" + ] + }, + "UserClouds": { + "type": "object", + "properties": { + "user-clouds": { + "type": "array", + "items": { + "$ref": "#/definitions/UserCloud" + } + } + }, + "additionalProperties": false + }, + "Value": { + "type": "object", + "properties": { + "allocate-public-ip": { + "type": "boolean" + }, + "arch": { + "type": "string" + }, + "container": { + "type": "string" + }, + "cores": { + "type": "integer" + }, + "cpu-power": { + "type": "integer" + }, + "instance-role": { + "type": "string" + }, + "instance-type": { + "type": "string" + }, + "mem": { + "type": "integer" + }, + "root-disk": { + "type": "integer" + }, + "root-disk-source": { + "type": "string" + }, + "spaces": { + "type": "array", + "items": { + "type": "string" + } + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "virt-type": { + "type": "string" + }, + "zones": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + } + } + } + }, + { + "Name": "Controller", + "Description": "ControllerAPI provides the Controller API.", + "Version": 11, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "controller-user" + ], + "Schema": { + "type": "object", + "properties": { + "AllModels": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/UserModelList" + } + }, + "description": "AllModels allows controller administrators to get the list of all the\nmodels in the controller." + }, + "CloudSpec": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/CloudSpecResults" + } + }, + "description": "CloudSpec returns the model's cloud spec." + }, + "ConfigSet": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ControllerConfigSet" + } + }, + "description": "ConfigSet changes the value of specified controller configuration\nsettings. Only some settings can be changed after bootstrap.\nSettings that aren't specified in the params are left unchanged." + }, + "ControllerAPIInfoForModels": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ControllerAPIInfoResults" + } + }, + "description": "ControllerAPIInfoForModels returns the controller api connection details for the specified models." + }, + "ControllerConfig": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/ControllerConfigResult" + } + }, + "description": "ControllerConfig returns the controller's configuration." + }, + "ControllerVersion": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/ControllerVersionResults" + } + }, + "description": "ControllerVersion returns the version information associated with this\ncontroller binary.\n\nNOTE: the implementation intentionally does not check for SuperuserAccess\nas the Version is known even to users with login access." + }, + "DashboardConnectionInfo": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/DashboardConnectionInfo" + } + }, + "description": "DashboardConnectionInfo returns the connection information for a client to\nconnect to the Juju Dashboard including any proxying information." + }, + "DestroyController": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/DestroyControllerArgs" + } + }, + "description": "DestroyController destroys the controller.\n\nIf the args specify the destruction of the models, this method will\nattempt to do so. Otherwise, if the controller has any non-empty,\nnon-Dead hosted models, then an error with the code\nparams.CodeHasHostedModels will be transmitted." + }, + "GetCloudSpec": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ModelTag" + }, + "Result": { + "$ref": "#/definitions/CloudSpecResult" + } + }, + "description": "GetCloudSpec constructs the CloudSpec for a validated and authorized model." + }, + "GetControllerAccess": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/UserAccessResults" + } + }, + "description": "GetControllerAccess returns the level of access the specified users\nhave on the controller." + }, + "HostedModelConfigs": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/HostedModelConfigsResults" + } + }, + "description": "HostedModelConfigs returns all the information that the client needs in\norder to connect directly with the host model's provider and destroy it\ndirectly." + }, + "IdentityProviderURL": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/StringResult" + } + }, + "description": "IdentityProviderURL returns the URL of the configured external identity\nprovider for this controller or an empty string if no external identity\nprovider has been configured when the controller was bootstrapped.\n\nNOTE: the implementation intentionally does not check for SuperuserAccess\nas the URL is known even to users with login access." + }, + "InitiateMigration": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/InitiateMigrationArgs" + }, + "Result": { + "$ref": "#/definitions/InitiateMigrationResults" + } + }, + "description": "InitiateMigration attempts to begin the migration of one or\nmore models to other controllers." + }, + "ListBlockedModels": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/ModelBlockInfoList" + } + }, + "description": "ListBlockedModels returns a list of all models on the controller\nwhich have a block in place. The resulting slice is sorted by model\nname, then owner. Callers must be controller administrators to retrieve the\nlist." + }, + "ModelConfig": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/ModelConfigResults" + } + }, + "description": "ModelConfig returns the model config for the controller\nmodel. For information on the current model, use\nclient.ModelGet" + }, + "ModelStatus": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ModelStatusResults" + } + }, + "description": "ModelStatus returns a summary of the model." + }, + "ModifyControllerAccess": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ModifyControllerAccessRequest" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "ModifyControllerAccess changes the model access granted to users." + }, + "MongoVersion": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/StringResult" + } + }, + "description": "MongoVersion allows the introspection of the mongo version per controller" + }, + "RemoveBlocks": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/RemoveBlocksArgs" + } + }, + "description": "RemoveBlocks removes all the blocks in the controller." + }, + "WatchAllModelSummaries": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/SummaryWatcherID" + } + }, + "description": "WatchAllModelSummaries starts watching the summary updates from the cache.\nThis method is superuser access only, and watches all models in the\ncontroller." + }, + "WatchAllModels": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/AllWatcherId" + } + }, + "description": "WatchAllModels starts watching events for all models in the\ncontroller. The returned AllWatcherId should be used with Next on the\nAllModelWatcher endpoint to receive deltas." + }, + "WatchCloudSpecsChanges": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/NotifyWatchResults" + } + }, + "description": "WatchCloudSpecsChanges returns a watcher for cloud spec changes." + }, + "WatchModelSummaries": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/SummaryWatcherID" + } + }, + "description": "WatchModelSummaries starts watching the summary updates from the cache.\nOnly models that the user has access to are returned." + } + }, + "definitions": { + "AllWatcherId": { + "type": "object", + "properties": { + "watcher-id": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "watcher-id" + ] + }, + "CloudCredential": { + "type": "object", + "properties": { + "attrs": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "auth-type": { + "type": "string" + }, + "redacted": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "auth-type" + ] + }, + "CloudSpec": { + "type": "object", + "properties": { + "cacertificates": { + "type": "array", + "items": { + "type": "string" + } + }, + "credential": { + "$ref": "#/definitions/CloudCredential" + }, + "endpoint": { + "type": "string" + }, + "identity-endpoint": { + "type": "string" + }, + "is-controller-cloud": { + "type": "boolean" + }, + "name": { + "type": "string" + }, + "region": { + "type": "string" + }, + "skip-tls-verify": { + "type": "boolean" + }, + "storage-endpoint": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "type", + "name" + ] + }, + "CloudSpecResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "$ref": "#/definitions/CloudSpec" + } + }, + "additionalProperties": false + }, + "CloudSpecResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/CloudSpecResult" + } + } + }, + "additionalProperties": false + }, + "ConfigValue": { + "type": "object", + "properties": { + "source": { + "type": "string" + }, + "value": { + "type": "object", + "additionalProperties": true + } + }, + "additionalProperties": false, + "required": [ + "value", + "source" + ] + }, + "ControllerAPIInfoResult": { + "type": "object", + "properties": { + "addresses": { + "type": "array", + "items": { + "type": "string" + } + }, + "cacert": { + "type": "string" + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false, + "required": [ + "addresses", + "cacert" + ] + }, + "ControllerAPIInfoResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ControllerAPIInfoResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "ControllerConfigResult": { + "type": "object", + "properties": { + "config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + } + }, + "additionalProperties": false, + "required": [ + "config" + ] + }, + "ControllerConfigSet": { + "type": "object", + "properties": { + "config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + } + }, + "additionalProperties": false, + "required": [ + "config" + ] + }, + "ControllerVersionResults": { + "type": "object", + "properties": { + "git-commit": { + "type": "string" + }, + "version": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "version", + "git-commit" + ] + }, + "DashboardConnectionInfo": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "proxy-connection": { + "$ref": "#/definitions/Proxy" + }, + "ssh-connection": { + "$ref": "#/definitions/DashboardConnectionSSHTunnel" + } + }, + "additionalProperties": false, + "required": [ + "proxy-connection", + "ssh-connection" + ] + }, + "DashboardConnectionSSHTunnel": { + "type": "object", + "properties": { + "entity": { + "type": "string" + }, + "host": { + "type": "string" + }, + "model": { + "type": "string" + }, + "port": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "host", + "port" + ] + }, + "DestroyControllerArgs": { + "type": "object", + "properties": { + "destroy-models": { + "type": "boolean" + }, + "destroy-storage": { + "type": "boolean" + }, + "force": { + "type": "boolean" + }, + "max-wait": { + "type": "integer" + }, + "model-timeout": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "destroy-models" + ] + }, + "Entities": { + "type": "object", + "properties": { + "entities": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } + } + }, + "additionalProperties": false, + "required": [ + "entities" + ] + }, + "Entity": { + "type": "object", + "properties": { + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ErrorResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "ErrorResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "HostedModelConfig": { + "type": "object", + "properties": { + "cloud-spec": { + "$ref": "#/definitions/CloudSpec" + }, + "config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "error": { + "$ref": "#/definitions/Error" + }, + "name": { + "type": "string" + }, + "owner": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "owner" + ] + }, + "HostedModelConfigsResults": { + "type": "object", + "properties": { + "models": { + "type": "array", + "items": { + "$ref": "#/definitions/HostedModelConfig" + } + } + }, + "additionalProperties": false, + "required": [ + "models" + ] + }, + "InitiateMigrationArgs": { + "type": "object", + "properties": { + "specs": { + "type": "array", + "items": { + "$ref": "#/definitions/MigrationSpec" + } + } + }, + "additionalProperties": false, + "required": [ + "specs" + ] + }, + "InitiateMigrationResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "migration-id": { + "type": "string" + }, + "model-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "model-tag", + "migration-id" + ] + }, + "InitiateMigrationResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/InitiateMigrationResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "MachineHardware": { + "type": "object", + "properties": { + "arch": { + "type": "string" + }, + "availability-zone": { + "type": "string" + }, + "cores": { + "type": "integer" + }, + "cpu-power": { + "type": "integer" + }, + "mem": { + "type": "integer" + }, + "root-disk": { + "type": "integer" + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "virt-type": { + "type": "string" + } + }, + "additionalProperties": false + }, + "MigrationSpec": { + "type": "object", + "properties": { + "model-tag": { + "type": "string" + }, + "target-info": { + "$ref": "#/definitions/MigrationTargetInfo" + } + }, + "additionalProperties": false, + "required": [ + "model-tag", + "target-info" + ] + }, + "MigrationTargetInfo": { + "type": "object", + "properties": { + "addrs": { + "type": "array", + "items": { + "type": "string" + } + }, + "auth-tag": { + "type": "string" + }, + "ca-cert": { + "type": "string" + }, + "controller-alias": { + "type": "string" + }, + "controller-tag": { + "type": "string" + }, + "macaroons": { + "type": "string" + }, + "password": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "controller-tag", + "addrs", + "ca-cert", + "auth-tag" + ] + }, + "Model": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "owner-tag": { + "type": "string" + }, + "type": { + "type": "string" + }, + "uuid": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "uuid", + "type", + "owner-tag" + ] + }, + "ModelApplicationInfo": { + "type": "object", + "properties": { + "name": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name" + ] + }, + "ModelBlockInfo": { + "type": "object", + "properties": { + "blocks": { + "type": "array", + "items": { + "type": "string" + } + }, + "model-uuid": { + "type": "string" + }, + "name": { + "type": "string" + }, + "owner-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "model-uuid", + "owner-tag", + "blocks" + ] + }, + "ModelBlockInfoList": { + "type": "object", + "properties": { + "models": { + "type": "array", + "items": { + "$ref": "#/definitions/ModelBlockInfo" + } + } + }, + "additionalProperties": false + }, + "ModelConfigResults": { + "type": "object", + "properties": { + "config": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/ConfigValue" + } + } + } + }, + "additionalProperties": false, + "required": [ + "config" + ] + }, + "ModelFilesystemInfo": { + "type": "object", + "properties": { + "detachable": { + "type": "boolean" + }, + "id": { + "type": "string" + }, + "message": { + "type": "string" + }, + "provider-id": { + "type": "string" + }, + "status": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "id" + ] + }, + "ModelMachineInfo": { + "type": "object", + "properties": { + "display-name": { + "type": "string" + }, + "ha-primary": { + "type": "boolean" + }, + "hardware": { + "$ref": "#/definitions/MachineHardware" + }, + "has-vote": { + "type": "boolean" + }, + "id": { + "type": "string" + }, + "instance-id": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "string" + }, + "wants-vote": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "id" + ] + }, + "ModelStatus": { + "type": "object", + "properties": { + "application-count": { + "type": "integer" + }, + "applications": { + "type": "array", + "items": { + "$ref": "#/definitions/ModelApplicationInfo" + } + }, + "error": { + "$ref": "#/definitions/Error" + }, + "filesystems": { + "type": "array", + "items": { + "$ref": "#/definitions/ModelFilesystemInfo" + } + }, + "hosted-machine-count": { + "type": "integer" + }, + "life": { + "type": "string" + }, + "machines": { + "type": "array", + "items": { + "$ref": "#/definitions/ModelMachineInfo" + } + }, + "model-tag": { + "type": "string" + }, + "owner-tag": { + "type": "string" + }, + "type": { + "type": "string" + }, + "unit-count": { + "type": "integer" + }, + "volumes": { + "type": "array", + "items": { + "$ref": "#/definitions/ModelVolumeInfo" + } + } + }, + "additionalProperties": false, + "required": [ + "model-tag", + "life", + "type", + "hosted-machine-count", + "application-count", + "unit-count", + "owner-tag" + ] + }, + "ModelStatusResults": { + "type": "object", + "properties": { + "models": { + "type": "array", + "items": { + "$ref": "#/definitions/ModelStatus" + } + } + }, + "additionalProperties": false, + "required": [ + "models" + ] + }, + "ModelTag": { + "type": "object", + "additionalProperties": false + }, + "ModelVolumeInfo": { + "type": "object", + "properties": { + "detachable": { + "type": "boolean" + }, + "id": { + "type": "string" + }, + "message": { + "type": "string" + }, + "provider-id": { + "type": "string" + }, + "status": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "id" + ] + }, + "ModifyControllerAccess": { + "type": "object", + "properties": { + "access": { + "type": "string" + }, + "action": { + "type": "string" + }, + "user-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "user-tag", + "action", + "access" + ] + }, + "ModifyControllerAccessRequest": { + "type": "object", + "properties": { + "changes": { + "type": "array", + "items": { + "$ref": "#/definitions/ModifyControllerAccess" + } + } + }, + "additionalProperties": false, + "required": [ + "changes" + ] + }, + "NotifyWatchResult": { + "type": "object", + "properties": { + "NotifyWatcherId": { + "type": "string" + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false, + "required": [ + "NotifyWatcherId" + ] + }, + "NotifyWatchResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/NotifyWatchResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "Proxy": { + "type": "object", + "properties": { + "config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "config", + "type" + ] + }, + "RemoveBlocksArgs": { + "type": "object", + "properties": { + "all": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "all" + ] + }, + "StringResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "result" + ] + }, + "SummaryWatcherID": { + "type": "object", + "properties": { + "watcher-id": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "watcher-id" + ] + }, + "UserAccess": { + "type": "object", + "properties": { + "access": { + "type": "string" + }, + "user-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "user-tag", + "access" + ] + }, + "UserAccessResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "$ref": "#/definitions/UserAccess" + } + }, + "additionalProperties": false + }, + "UserAccessResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/UserAccessResult" + } + } + }, + "additionalProperties": false + }, + "UserModel": { + "type": "object", + "properties": { + "last-connection": { + "type": "string", + "format": "date-time" + }, + "model": { + "$ref": "#/definitions/Model" + } + }, + "additionalProperties": false, + "required": [ + "model", + "last-connection" + ] + }, + "UserModelList": { + "type": "object", + "properties": { + "user-models": { + "type": "array", + "items": { + "$ref": "#/definitions/UserModel" + } + } + }, + "additionalProperties": false, + "required": [ + "user-models" + ] + } + } + } + }, + { + "Name": "CredentialManager", + "Description": "", + "Version": 1, + "AvailableTo": [ + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "InvalidateModelCredential": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/InvalidateCredentialArg" + }, + "Result": { + "$ref": "#/definitions/ErrorResult" + } + }, + "description": "InvalidateModelCredential marks the cloud credential for this model as invalid." + } + }, + "definitions": { + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ErrorResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "InvalidateCredentialArg": { + "type": "object", + "properties": { + "reason": { + "type": "string" + } + }, + "additionalProperties": false + } + } + } + }, + { + "Name": "CredentialValidator", + "Description": "", + "Version": 2, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "InvalidateModelCredential": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/InvalidateCredentialArg" + }, + "Result": { + "$ref": "#/definitions/ErrorResult" + } + }, + "description": "InvalidateModelCredential marks the cloud credential for this model as invalid." + }, + "ModelCredential": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/ModelCredential" + } + }, + "description": "ModelCredential returns cloud credential information for a model." + }, + "WatchCredential": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entity" + }, + "Result": { + "$ref": "#/definitions/NotifyWatchResult" + } + }, + "description": "WatchCredential returns a NotifyWatcher that observes\nchanges to a given cloud credential." + }, + "WatchModelCredential": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/NotifyWatchResult" + } + }, + "description": "WatchModelCredential returns a NotifyWatcher that watches what cloud credential a model uses." + } + }, + "definitions": { + "Entity": { + "type": "object", + "properties": { + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ErrorResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "InvalidateCredentialArg": { + "type": "object", + "properties": { + "reason": { + "type": "string" + } + }, + "additionalProperties": false + }, + "ModelCredential": { + "type": "object", + "properties": { + "credential-tag": { + "type": "string" + }, + "exists": { + "type": "boolean" + }, + "model-tag": { + "type": "string" + }, + "valid": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "model-tag", + "credential-tag" + ] + }, + "NotifyWatchResult": { + "type": "object", + "properties": { + "NotifyWatcherId": { + "type": "string" + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false, + "required": [ + "NotifyWatcherId" + ] + } + } + } + }, + { + "Name": "CrossController", + "Description": "CrossControllerAPI provides access to the CrossModelRelations API facade.", + "Version": 1, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "controller-user" + ], + "Schema": { + "type": "object", + "properties": { + "ControllerInfo": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/ControllerAPIInfoResults" + } + }, + "description": "ControllerInfo returns the API info for the controller." + }, + "WatchControllerInfo": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/NotifyWatchResults" + } + }, + "description": "WatchControllerInfo creates a watcher that notifies when the API info\nfor the controller changes." + } + }, + "definitions": { + "ControllerAPIInfoResult": { + "type": "object", + "properties": { + "addresses": { + "type": "array", + "items": { + "type": "string" + } + }, + "cacert": { + "type": "string" + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false, + "required": [ + "addresses", + "cacert" + ] + }, + "ControllerAPIInfoResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ControllerAPIInfoResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "NotifyWatchResult": { + "type": "object", + "properties": { + "NotifyWatcherId": { + "type": "string" + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false, + "required": [ + "NotifyWatcherId" + ] + }, + "NotifyWatchResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/NotifyWatchResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + } + } + } + }, + { + "Name": "CrossModelRelations", + "Description": "CrossModelRelationsAPI provides access to the CrossModelRelations API facade.", + "Version": 2, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "PublishIngressNetworkChanges": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/IngressNetworksChanges" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "PublishIngressNetworkChanges publishes changes to the required\ningress addresses to the model hosting the offer in the relation." + }, + "PublishRelationChanges": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/RemoteRelationsChanges" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "PublishRelationChanges publishes relation changes to the\nmodel hosting the remote application involved in the relation." + }, + "RegisterRemoteRelations": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/RegisterRemoteRelationArgs" + }, + "Result": { + "$ref": "#/definitions/RegisterRemoteRelationResults" + } + }, + "description": "RegisterRemoteRelations sets up the model to participate\nin the specified relations. This operation is idempotent." + }, + "WatchConsumedSecretsChanges": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/WatchRemoteSecretChangesArgs" + }, + "Result": { + "$ref": "#/definitions/SecretRevisionWatchResults" + } + }, + "description": "WatchConsumedSecretsChanges returns a watcher which notifies of changes to any secrets\nfor the specified remote consumers." + }, + "WatchEgressAddressesForRelations": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/RemoteEntityArgs" + }, + "Result": { + "$ref": "#/definitions/StringsWatchResults" + } + }, + "description": "WatchEgressAddressesForRelations creates a watcher that notifies when addresses, from which\nconnections will originate for the relation, change.\nEach event contains the entire set of addresses which are required for ingress for the relation." + }, + "WatchOfferStatus": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/OfferArgs" + }, + "Result": { + "$ref": "#/definitions/OfferStatusWatchResults" + } + }, + "description": "WatchOfferStatus starts an OfferStatusWatcher for\nwatching the status of an offer." + }, + "WatchRelationChanges": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/RemoteEntityArgs" + }, + "Result": { + "$ref": "#/definitions/RemoteRelationWatchResults" + } + }, + "description": "WatchRelationChanges starts a RemoteRelationChangesWatcher for each\nspecified relation, returning the watcher IDs and initial values,\nor an error if the remote relations couldn't be watched." + }, + "WatchRelationsSuspendedStatus": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/RemoteEntityArgs" + }, + "Result": { + "$ref": "#/definitions/RelationStatusWatchResults" + } + }, + "description": "WatchRelationsSuspendedStatus starts a RelationStatusWatcher for\nwatching the life and suspended status of a relation." + } + }, + "definitions": { + "EntityStatus": { + "type": "object", + "properties": { + "data": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "info": { + "type": "string" + }, + "since": { + "type": "string", + "format": "date-time" + }, + "status": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "status", + "info", + "since" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ErrorResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "ErrorResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "IngressNetworksChangeEvent": { + "type": "object", + "properties": { + "bakery-version": { + "type": "integer" + }, + "ingress-required": { + "type": "boolean" + }, + "macaroons": { + "type": "array", + "items": { + "$ref": "#/definitions/Macaroon" + } + }, + "networks": { + "type": "array", + "items": { + "type": "string" + } + }, + "relation-token": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "relation-token", + "ingress-required" + ] + }, + "IngressNetworksChanges": { + "type": "object", + "properties": { + "changes": { + "type": "array", + "items": { + "$ref": "#/definitions/IngressNetworksChangeEvent" + } + } + }, + "additionalProperties": false + }, + "Macaroon": { + "type": "object", + "additionalProperties": false + }, + "OfferArg": { + "type": "object", + "properties": { + "bakery-version": { + "type": "integer" + }, + "macaroons": { + "type": "array", + "items": { + "$ref": "#/definitions/Macaroon" + } + }, + "offer-uuid": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "offer-uuid" + ] + }, + "OfferArgs": { + "type": "object", + "properties": { + "args": { + "type": "array", + "items": { + "$ref": "#/definitions/OfferArg" + } + } + }, + "additionalProperties": false, + "required": [ + "args" + ] + }, + "OfferStatusChange": { + "type": "object", + "properties": { + "offer-name": { + "type": "string" + }, + "status": { + "$ref": "#/definitions/EntityStatus" + } + }, + "additionalProperties": false, + "required": [ + "offer-name", + "status" + ] + }, + "OfferStatusWatchResult": { + "type": "object", + "properties": { + "changes": { + "type": "array", + "items": { + "$ref": "#/definitions/OfferStatusChange" + } + }, + "error": { + "$ref": "#/definitions/Error" + }, + "watcher-id": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "watcher-id", + "changes" + ] + }, + "OfferStatusWatchResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/OfferStatusWatchResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "RegisterRemoteRelationArg": { + "type": "object", + "properties": { + "application-token": { + "type": "string" + }, + "bakery-version": { + "type": "integer" + }, + "consume-version": { + "type": "integer" + }, + "local-endpoint-name": { + "type": "string" + }, + "macaroons": { + "type": "array", + "items": { + "$ref": "#/definitions/Macaroon" + } + }, + "offer-uuid": { + "type": "string" + }, + "relation-token": { + "type": "string" + }, + "remote-endpoint": { + "$ref": "#/definitions/RemoteEndpoint" + }, + "remote-space": { + "$ref": "#/definitions/RemoteSpace" + }, + "source-model-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "application-token", + "source-model-tag", + "relation-token", + "remote-endpoint", + "remote-space", + "offer-uuid", + "local-endpoint-name" + ] + }, + "RegisterRemoteRelationArgs": { + "type": "object", + "properties": { + "relations": { + "type": "array", + "items": { + "$ref": "#/definitions/RegisterRemoteRelationArg" + } + } + }, + "additionalProperties": false, + "required": [ + "relations" + ] + }, + "RegisterRemoteRelationResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "$ref": "#/definitions/RemoteRelationDetails" + } + }, + "additionalProperties": false + }, + "RegisterRemoteRelationResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/RegisterRemoteRelationResult" + } + } + }, + "additionalProperties": false + }, + "RelationLifeSuspendedStatusChange": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "life": { + "type": "string" + }, + "suspended": { + "type": "boolean" + }, + "suspended-reason": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "key", + "life", + "suspended", + "suspended-reason" + ] + }, + "RelationLifeSuspendedStatusWatchResult": { + "type": "object", + "properties": { + "changes": { + "type": "array", + "items": { + "$ref": "#/definitions/RelationLifeSuspendedStatusChange" + } + }, + "error": { + "$ref": "#/definitions/Error" + }, + "watcher-id": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "watcher-id", + "changes" + ] + }, + "RelationStatusWatchResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/RelationLifeSuspendedStatusWatchResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "RemoteEndpoint": { + "type": "object", + "properties": { + "interface": { + "type": "string" + }, + "limit": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "role": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "role", + "interface", + "limit" + ] + }, + "RemoteEntityArg": { + "type": "object", + "properties": { + "bakery-version": { + "type": "integer" + }, + "macaroons": { + "type": "array", + "items": { + "$ref": "#/definitions/Macaroon" + } + }, + "relation-token": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "relation-token" + ] + }, + "RemoteEntityArgs": { + "type": "object", + "properties": { + "args": { + "type": "array", + "items": { + "$ref": "#/definitions/RemoteEntityArg" + } + } + }, + "additionalProperties": false, + "required": [ + "args" + ] + }, + "RemoteRelationChangeEvent": { + "type": "object", + "properties": { + "application-settings": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "application-token": { + "type": "string" + }, + "bakery-version": { + "type": "integer" + }, + "changed-units": { + "type": "array", + "items": { + "$ref": "#/definitions/RemoteRelationUnitChange" + } + }, + "departed-units": { + "type": "array", + "items": { + "type": "integer" + } + }, + "force-cleanup": { + "type": "boolean" + }, + "life": { + "type": "string" + }, + "macaroons": { + "type": "array", + "items": { + "$ref": "#/definitions/Macaroon" + } + }, + "relation-token": { + "type": "string" + }, + "suspended": { + "type": "boolean" + }, + "suspended-reason": { + "type": "string" + }, + "unit-count": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "relation-token", + "application-token", + "life", + "unit-count" + ] + }, + "RemoteRelationDetails": { + "type": "object", + "properties": { + "bakery-version": { + "type": "integer" + }, + "macaroon": { + "$ref": "#/definitions/Macaroon" + }, + "relation-token": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "relation-token" + ] + }, + "RemoteRelationUnitChange": { + "type": "object", + "properties": { + "settings": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "unit-id": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "unit-id" + ] + }, + "RemoteRelationWatchResult": { + "type": "object", + "properties": { + "changes": { + "$ref": "#/definitions/RemoteRelationChangeEvent" + }, + "error": { + "$ref": "#/definitions/Error" + }, + "watcher-id": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "watcher-id", + "changes" + ] + }, + "RemoteRelationWatchResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/RemoteRelationWatchResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "RemoteRelationsChanges": { + "type": "object", + "properties": { + "changes": { + "type": "array", + "items": { + "$ref": "#/definitions/RemoteRelationChangeEvent" + } + } + }, + "additionalProperties": false + }, + "RemoteSpace": { + "type": "object", + "properties": { + "cloud-type": { + "type": "string" + }, + "name": { + "type": "string" + }, + "provider-attributes": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "provider-id": { + "type": "string" + }, + "subnets": { + "type": "array", + "items": { + "$ref": "#/definitions/Subnet" + } + } + }, + "additionalProperties": false, + "required": [ + "cloud-type", + "name", + "provider-id", + "provider-attributes", + "subnets" + ] + }, + "SecretRevisionChange": { + "type": "object", + "properties": { + "revision": { + "type": "integer" + }, + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri", + "revision" + ] + }, + "SecretRevisionWatchResult": { + "type": "object", + "properties": { + "changes": { + "type": "array", + "items": { + "$ref": "#/definitions/SecretRevisionChange" + } + }, + "error": { + "$ref": "#/definitions/Error" + }, + "watcher-id": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "watcher-id", + "changes" + ] + }, + "SecretRevisionWatchResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/SecretRevisionWatchResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "StringsWatchResult": { + "type": "object", + "properties": { + "changes": { + "type": "array", + "items": { + "type": "string" + } + }, + "error": { + "$ref": "#/definitions/Error" + }, + "watcher-id": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "watcher-id" + ] + }, + "StringsWatchResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/StringsWatchResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "Subnet": { + "type": "object", + "properties": { + "cidr": { + "type": "string" + }, + "life": { + "type": "string" + }, + "provider-id": { + "type": "string" + }, + "provider-network-id": { + "type": "string" + }, + "provider-space-id": { + "type": "string" + }, + "space-tag": { + "type": "string" + }, + "status": { + "type": "string" + }, + "vlan-tag": { + "type": "integer" + }, + "zones": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "cidr", + "vlan-tag", + "life", + "space-tag", + "zones" + ] + }, + "WatchRemoteSecretChangesArg": { + "type": "object", + "properties": { + "application-token": { + "type": "string" + }, + "bakery-version": { + "type": "integer" + }, + "macaroons": { + "type": "array", + "items": { + "$ref": "#/definitions/Macaroon" + } + }, + "relation-token": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "application-token", + "relation-token" + ] + }, + "WatchRemoteSecretChangesArgs": { + "type": "object", + "properties": { + "relations": { + "type": "array", + "items": { + "$ref": "#/definitions/WatchRemoteSecretChangesArg" + } + } + }, + "additionalProperties": false, + "required": [ + "relations" + ] + } + } + } + }, + { + "Name": "CrossModelSecrets", + "Description": "CrossModelSecretsAPI provides access to the CrossModelSecrets API facade.", + "Version": 1, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "GetSecretAccessScope": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/GetRemoteSecretAccessArgs" + }, + "Result": { + "$ref": "#/definitions/StringResults" + } + }, + "description": "GetSecretAccessScope returns the tokens for the access scope of the specified secrets and consumers." + }, + "GetSecretContentInfo": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/GetRemoteSecretContentArgs" + }, + "Result": { + "$ref": "#/definitions/SecretContentResults" + } + }, + "description": "GetSecretContentInfo returns the secret values for the specified secrets." + } + }, + "definitions": { + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "GetRemoteSecretAccessArg": { + "type": "object", + "properties": { + "application-token": { + "type": "string" + }, + "unit-id": { + "type": "integer" + }, + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "application-token", + "unit-id", + "uri" + ] + }, + "GetRemoteSecretAccessArgs": { + "type": "object", + "properties": { + "relations": { + "type": "array", + "items": { + "$ref": "#/definitions/GetRemoteSecretAccessArg" + } + } + }, + "additionalProperties": false, + "required": [ + "relations" + ] + }, + "GetRemoteSecretContentArg": { + "type": "object", + "properties": { + "application-token": { + "type": "string" + }, + "bakery-version": { + "type": "integer" + }, + "macaroons": { + "type": "array", + "items": { + "$ref": "#/definitions/Macaroon" + } + }, + "peek": { + "type": "boolean" + }, + "refresh": { + "type": "boolean" + }, + "revision": { + "type": "integer" + }, + "source-controller-uuid": { + "type": "string" + }, + "unit-id": { + "type": "integer" + }, + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "source-controller-uuid", + "application-token", + "unit-id", + "uri" + ] + }, + "GetRemoteSecretContentArgs": { + "type": "object", + "properties": { + "relations": { + "type": "array", + "items": { + "$ref": "#/definitions/GetRemoteSecretContentArg" + } + } + }, + "additionalProperties": false, + "required": [ + "relations" + ] + }, + "Macaroon": { + "type": "object", + "additionalProperties": false + }, + "SecretBackendConfig": { + "type": "object", + "properties": { + "params": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "type" + ] + }, + "SecretBackendConfigResult": { + "type": "object", + "properties": { + "config": { + "$ref": "#/definitions/SecretBackendConfig" + }, + "draining": { + "type": "boolean" + }, + "model-controller": { + "type": "string" + }, + "model-name": { + "type": "string" + }, + "model-uuid": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "model-controller", + "model-uuid", + "model-name", + "draining" + ] + }, + "SecretContentParams": { + "type": "object", + "properties": { + "data": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "value-ref": { + "$ref": "#/definitions/SecretValueRef" + } + }, + "additionalProperties": false + }, + "SecretContentResult": { + "type": "object", + "properties": { + "backend-config": { + "$ref": "#/definitions/SecretBackendConfigResult" + }, + "content": { + "$ref": "#/definitions/SecretContentParams" + }, + "error": { + "$ref": "#/definitions/Error" + }, + "latest-revision": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "content" + ] + }, + "SecretContentResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/SecretContentResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "SecretValueRef": { + "type": "object", + "properties": { + "backend-id": { + "type": "string" + }, + "revision-id": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "backend-id", + "revision-id" + ] + }, + "StringResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "result" + ] + }, + "StringResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/StringResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + } + } + } + }, + { + "Name": "Deployer", + "Description": "DeployerAPI provides access to the Deployer API facade.", + "Version": 1, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent" + ], + "Schema": { + "type": "object", + "properties": { + "APIAddresses": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/StringsResult" + } + }, + "description": "APIAddresses returns the list of addresses used to connect to the API." + }, + "APIHostPorts": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/APIHostPortsResult" + } + }, + "description": "APIHostPorts returns the API server addresses." + }, + "ConnectionInfo": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/DeployerConnectionValues" + } + }, + "description": "ConnectionInfo returns all the address information that the\ndeployer task needs in one call." + }, + "Life": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/LifeResults" + } + }, + "description": "Life returns the life status of every supplied entity, where available." + }, + "ModelUUID": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/StringResult" + } + }, + "description": "ModelUUID returns the model UUID that this facade is deploying into.\nIt is implemented here directly as a result of removing it from\nembedded APIAddresser *without* bumping the facade version.\nIt should be blanked when this facade version is next incremented." + }, + "Remove": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "Remove removes every given entity from state, calling EnsureDead\nfirst, then Remove. It will fail if the entity is not present." + }, + "SetPasswords": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/EntityPasswords" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "SetPasswords sets the given password for each supplied entity, if possible." + }, + "SetStatus": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/SetStatus" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "SetStatus sets the status of the specified entities." + }, + "WatchAPIHostPorts": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/NotifyWatchResult" + } + }, + "description": "WatchAPIHostPorts watches the API server addresses." + }, + "WatchUnits": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/StringsWatchResults" + } + }, + "description": "WatchUnits starts a StringsWatcher to watch all units belonging to\nto any entity (machine or service) passed in args." + } + }, + "definitions": { + "APIHostPortsResult": { + "type": "object", + "properties": { + "servers": { + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/definitions/HostPort" + } + } + } + }, + "additionalProperties": false, + "required": [ + "servers" + ] + }, + "Address": { + "type": "object", + "properties": { + "cidr": { + "type": "string" + }, + "config-type": { + "type": "string" + }, + "is-secondary": { + "type": "boolean" + }, + "scope": { + "type": "string" + }, + "space-id": { + "type": "string" + }, + "space-name": { + "type": "string" + }, + "type": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "value", + "type", + "scope" + ] + }, + "DeployerConnectionValues": { + "type": "object", + "properties": { + "api-addresses": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "api-addresses" + ] + }, + "Entities": { + "type": "object", + "properties": { + "entities": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } + } + }, + "additionalProperties": false, + "required": [ + "entities" + ] + }, + "Entity": { + "type": "object", + "properties": { + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag" + ] + }, + "EntityPassword": { + "type": "object", + "properties": { + "password": { + "type": "string" + }, + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag", + "password" + ] + }, + "EntityPasswords": { + "type": "object", + "properties": { + "changes": { + "type": "array", + "items": { + "$ref": "#/definitions/EntityPassword" + } + } + }, + "additionalProperties": false, + "required": [ + "changes" + ] + }, + "EntityStatusArgs": { + "type": "object", + "properties": { + "data": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "info": { + "type": "string" + }, + "status": { + "type": "string" + }, + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag", + "status", + "info", + "data" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ErrorResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "ErrorResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "HostPort": { + "type": "object", + "properties": { + "Address": { + "$ref": "#/definitions/Address" + }, + "cidr": { + "type": "string" + }, + "config-type": { + "type": "string" + }, + "is-secondary": { + "type": "boolean" + }, + "port": { + "type": "integer" + }, + "scope": { + "type": "string" + }, + "space-id": { + "type": "string" + }, + "space-name": { + "type": "string" + }, + "type": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "value", + "type", + "scope", + "Address", + "port" + ] + }, + "LifeResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "life": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "life" + ] + }, + "LifeResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/LifeResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "NotifyWatchResult": { + "type": "object", + "properties": { + "NotifyWatcherId": { + "type": "string" + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false, + "required": [ + "NotifyWatcherId" + ] + }, + "SetStatus": { + "type": "object", + "properties": { + "entities": { + "type": "array", + "items": { + "$ref": "#/definitions/EntityStatusArgs" + } + } + }, + "additionalProperties": false, + "required": [ + "entities" + ] + }, + "StringResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "result" + ] + }, + "StringsResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "StringsWatchResult": { + "type": "object", + "properties": { + "changes": { + "type": "array", + "items": { + "type": "string" + } + }, + "error": { + "$ref": "#/definitions/Error" + }, + "watcher-id": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "watcher-id" + ] + }, + "StringsWatchResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/StringsWatchResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + } + } + } + }, + { + "Name": "DiskManager", + "Description": "DiskManagerAPI provides access to the DiskManager API facade.", + "Version": 2, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent" + ], + "Schema": { + "type": "object", + "properties": { + "SetMachineBlockDevices": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/SetMachineBlockDevices" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + } + } + }, + "definitions": { + "BlockDevice": { + "type": "object", + "properties": { + "BusAddress": { + "type": "string" + }, + "DeviceLinks": { + "type": "array", + "items": { + "type": "string" + } + }, + "DeviceName": { + "type": "string" + }, + "FilesystemType": { + "type": "string" + }, + "HardwareId": { + "type": "string" + }, + "InUse": { + "type": "boolean" + }, + "Label": { + "type": "string" + }, + "MountPoint": { + "type": "string" + }, + "SerialId": { + "type": "string" + }, + "Size": { + "type": "integer" + }, + "UUID": { + "type": "string" + }, + "WWN": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "DeviceName", + "DeviceLinks", + "Label", + "UUID", + "HardwareId", + "WWN", + "BusAddress", + "Size", + "FilesystemType", + "InUse", + "MountPoint", + "SerialId" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ErrorResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "ErrorResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "MachineBlockDevices": { + "type": "object", + "properties": { + "block-devices": { + "type": "array", + "items": { + "$ref": "#/definitions/BlockDevice" + } + }, + "machine": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "machine" + ] + }, + "SetMachineBlockDevices": { + "type": "object", + "properties": { + "machine-block-devices": { + "type": "array", + "items": { + "$ref": "#/definitions/MachineBlockDevices" + } + } + }, + "additionalProperties": false, + "required": [ + "machine-block-devices" + ] + } + } + } + }, + { + "Name": "EntityWatcher", + "Description": "srvEntitiesWatcher defines the API for methods on a state.StringsWatcher.\nEach client has its own current set of watchers, stored in resources.\nsrvEntitiesWatcher notifies about changes for all entities of a given kind,\nsending the changes as a list of strings, which could be transformed\nfrom state entity ids to their corresponding entity tags.", + "Version": 2, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "Next": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/EntitiesWatchResult" + } + }, + "description": "Next returns when a change has occurred to an entity of the\ncollection being watched since the most recent call to Next\nor the Watch call that created the srvEntitiesWatcher." + }, + "Stop": { + "type": "object", + "description": "Stop stops the watcher." + } + }, + "definitions": { + "EntitiesWatchResult": { + "type": "object", + "properties": { + "changes": { + "type": "array", + "items": { + "type": "string" + } + }, + "error": { + "$ref": "#/definitions/Error" + }, + "watcher-id": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "watcher-id" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + } + } + } + }, + { + "Name": "EnvironUpgrader", + "Description": "", + "Version": 1, + "AvailableTo": [ + "controller-machine-agent" + ], + "Schema": { + "type": "object", + "properties": { + "ModelEnvironVersion": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/IntResults" + } + }, + "description": "ModelEnvironVersion returns the current version of the environ corresponding\nto each specified model." + }, + "ModelTargetEnvironVersion": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/IntResults" + } + }, + "description": "ModelTargetEnvironVersion returns the target version of the environ\ncorresponding to each specified model. The target version is the\nenviron provider's version." + }, + "SetModelEnvironVersion": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/SetModelEnvironVersions" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "SetModelEnvironVersion sets the current version of the environ corresponding\nto each specified model." + }, + "SetModelStatus": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/SetStatus" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "SetModelStatus sets the status of each given model." + }, + "WatchModelEnvironVersion": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/NotifyWatchResults" + } + }, + "description": "WatchModelEnvironVersion watches for changes to the environ version of the\nspecified models.\n\nNOTE(axw) this is currently implemented in terms of state.Model.Watch, so\nthe client may be notified of changes unrelated to the environ version." + } + }, + "definitions": { + "Entities": { + "type": "object", + "properties": { + "entities": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } + } + }, + "additionalProperties": false, + "required": [ + "entities" + ] + }, + "Entity": { + "type": "object", + "properties": { + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag" + ] + }, + "EntityStatusArgs": { + "type": "object", + "properties": { + "data": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "info": { + "type": "string" + }, + "status": { + "type": "string" + }, + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag", + "status", + "info", + "data" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ErrorResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "ErrorResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "IntResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "result" + ] + }, + "IntResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/IntResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "NotifyWatchResult": { + "type": "object", + "properties": { + "NotifyWatcherId": { + "type": "string" + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false, + "required": [ + "NotifyWatcherId" + ] + }, + "NotifyWatchResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/NotifyWatchResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "SetModelEnvironVersion": { + "type": "object", + "properties": { + "model-tag": { + "type": "string" + }, + "version": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "model-tag", + "version" + ] + }, + "SetModelEnvironVersions": { + "type": "object", + "properties": { + "models": { + "type": "array", + "items": { + "$ref": "#/definitions/SetModelEnvironVersion" + } + } + }, + "additionalProperties": false + }, + "SetStatus": { + "type": "object", + "properties": { + "entities": { + "type": "array", + "items": { + "$ref": "#/definitions/EntityStatusArgs" + } + } + }, + "additionalProperties": false, + "required": [ + "entities" + ] + } + } + } + }, + { + "Name": "ExternalControllerUpdater", + "Description": "ExternalControllerUpdaterAPI provides access to the CrossModelRelations API facade.", + "Version": 1, + "AvailableTo": [ + "controller-machine-agent" + ], + "Schema": { + "type": "object", + "properties": { + "ExternalControllerInfo": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ExternalControllerInfoResults" + } + }, + "description": "ExternalControllerInfo returns the info for the specified external controllers." + }, + "SetExternalControllerInfo": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/SetExternalControllersInfoParams" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "SetExternalControllerInfo saves the info for the specified external controllers." + }, + "WatchExternalControllers": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/StringsWatchResults" + } + }, + "description": "WatchExternalControllers watches for the addition and removal of external\ncontroller records to the local controller's database." + } + }, + "definitions": { + "Entities": { + "type": "object", + "properties": { + "entities": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } + } + }, + "additionalProperties": false, + "required": [ + "entities" + ] + }, + "Entity": { + "type": "object", + "properties": { + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ErrorResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "ErrorResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "ExternalControllerInfo": { + "type": "object", + "properties": { + "addrs": { + "type": "array", + "items": { + "type": "string" + } + }, + "ca-cert": { + "type": "string" + }, + "controller-alias": { + "type": "string" + }, + "controller-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "controller-tag", + "controller-alias", + "addrs", + "ca-cert" + ] + }, + "ExternalControllerInfoResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "$ref": "#/definitions/ExternalControllerInfo" + } + }, + "additionalProperties": false, + "required": [ + "result", + "error" + ] + }, + "ExternalControllerInfoResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ExternalControllerInfoResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "SetExternalControllerInfoParams": { + "type": "object", + "properties": { + "info": { + "$ref": "#/definitions/ExternalControllerInfo" + } + }, + "additionalProperties": false, + "required": [ + "info" + ] + }, + "SetExternalControllersInfoParams": { + "type": "object", + "properties": { + "controllers": { + "type": "array", + "items": { + "$ref": "#/definitions/SetExternalControllerInfoParams" + } + } + }, + "additionalProperties": false, + "required": [ + "controllers" + ] + }, + "StringsWatchResult": { + "type": "object", + "properties": { + "changes": { + "type": "array", + "items": { + "type": "string" + } + }, + "error": { + "$ref": "#/definitions/Error" + }, + "watcher-id": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "watcher-id" + ] + }, + "StringsWatchResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/StringsWatchResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + } + } + } + }, + { + "Name": "FanConfigurer", + "Description": "", + "Version": 1, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "FanConfig": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/FanConfigResult" + } + }, + "description": "FanConfig returns current FAN configuration." + }, + "WatchForFanConfigChanges": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/NotifyWatchResult" + } + }, + "description": "WatchForFanConfigChanges returns a NotifyWatcher that observes\nchanges to the FAN configuration.\nso we use the regular error return.\nTODO(wpk) 2017-09-21 We should use Model directly, and watch only for FanConfig changes." + } + }, + "definitions": { + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "FanConfigEntry": { + "type": "object", + "properties": { + "overlay": { + "type": "string" + }, + "underlay": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "underlay", + "overlay" + ] + }, + "FanConfigResult": { + "type": "object", + "properties": { + "fans": { + "type": "array", + "items": { + "$ref": "#/definitions/FanConfigEntry" + } + } + }, + "additionalProperties": false, + "required": [ + "fans" + ] + }, + "NotifyWatchResult": { + "type": "object", + "properties": { + "NotifyWatcherId": { + "type": "string" + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false, + "required": [ + "NotifyWatcherId" + ] + } + } + } + }, + { + "Name": "FilesystemAttachmentsWatcher", + "Description": "srvMachineStorageIdsWatcher defines the API wrapping a state.StringsWatcher\nwatching machine/storage attachments. This watcher notifies about storage\nentities (volumes/filesystems) being attached to and detached from machines.\n\nTODO(axw) state needs a new watcher, this is a bt of a hack. State watchers\ncould do with some deduplication of logic, and I don't want to add to that\nspaghetti right now.", + "Version": 2, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "Next": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/MachineStorageIdsWatchResult" + } + }, + "description": "Next returns when a change has occurred to an entity of the\ncollection being watched since the most recent call to Next\nor the Watch call that created the srvMachineStorageIdsWatcher." + }, + "Stop": { + "type": "object", + "description": "Stop stops the watcher." + } + }, + "definitions": { + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "MachineStorageId": { + "type": "object", + "properties": { + "attachment-tag": { + "type": "string" + }, + "machine-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "machine-tag", + "attachment-tag" + ] + }, + "MachineStorageIdsWatchResult": { + "type": "object", + "properties": { + "changes": { + "type": "array", + "items": { + "$ref": "#/definitions/MachineStorageId" + } + }, + "error": { + "$ref": "#/definitions/Error" + }, + "watcher-id": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "watcher-id", + "changes" + ] + } + } + } + }, + { + "Name": "FirewallRules", + "Description": "API provides the firewallrules facade APIs for v1.", + "Version": 1, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "ListFirewallRules": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/ListFirewallRulesResults" + } + }, + "description": "ListFirewallRules returns all the firewall rules." + }, + "SetFirewallRules": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/FirewallRuleArgs" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "SetFirewallRules creates or updates the specified firewall rules." + } + }, + "definitions": { + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ErrorResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "ErrorResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "FirewallRule": { + "type": "object", + "properties": { + "known-service": { + "type": "string" + }, + "whitelist-cidrs": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "known-service" + ] + }, + "FirewallRuleArgs": { + "type": "object", + "properties": { + "args": { + "type": "array", + "items": { + "$ref": "#/definitions/FirewallRule" + } + } + }, + "additionalProperties": false, + "required": [ + "args" + ] + }, + "ListFirewallRulesResults": { + "type": "object", + "properties": { + "Rules": { + "type": "array", + "items": { + "$ref": "#/definitions/FirewallRule" + } + } + }, + "additionalProperties": false, + "required": [ + "Rules" + ] + } + } + } + }, + { + "Name": "Firewaller", + "Description": "FirewallerAPI provides access to the Firewaller API facade.", + "Version": 7, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "AreManuallyProvisioned": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/BoolResults" + } + }, + "description": "AreManuallyProvisioned returns whether each given entity is\nmanually provisioned or not. Only machine tags are accepted." + }, + "CloudSpec": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/CloudSpecResults" + } + }, + "description": "CloudSpec returns the model's cloud spec." + }, + "ControllerAPIInfoForModels": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ControllerAPIInfoResults" + } + }, + "description": "ControllerAPIInfoForModels returns the controller api connection details for the specified models." + }, + "ControllerConfig": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/ControllerConfigResult" + } + }, + "description": "ControllerConfig returns the controller's configuration." + }, + "FirewallRules": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/KnownServiceArgs" + }, + "Result": { + "$ref": "#/definitions/ListFirewallRulesResults" + } + }, + "description": "FirewallRules returns the firewall rules for the specified well known service types." + }, + "GetAssignedMachine": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/StringResults" + } + }, + "description": "GetAssignedMachine returns the assigned machine tag (if any) for\neach given unit." + }, + "GetCloudSpec": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ModelTag" + }, + "Result": { + "$ref": "#/definitions/CloudSpecResult" + } + }, + "description": "GetCloudSpec constructs the CloudSpec for a validated and authorized model." + }, + "GetExposeInfo": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ExposeInfoResults" + } + }, + "description": "GetExposeInfo returns the expose flag and per-endpoint expose settings\nfor the specified applications." + }, + "InstanceId": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/StringResults" + } + }, + "description": "InstanceId returns the provider specific instance id for each given\nmachine or an CodeNotProvisioned error, if not set." + }, + "Life": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/LifeResults" + } + }, + "description": "Life returns the life status of every supplied entity, where available." + }, + "MacaroonForRelations": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/MacaroonResults" + } + }, + "description": "MacaroonForRelations returns the macaroon for the specified relations." + }, + "ModelConfig": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/ModelConfigResult" + } + }, + "description": "ModelConfig returns the current model's configuration." + }, + "OpenedMachinePortRanges": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/OpenMachinePortRangesResults" + } + }, + "description": "OpenedMachinePortRanges returns a list of the opened port ranges for the\nspecified machines where each result is broken down by unit. The list of\nopened ports for each unit is further grouped by endpoint name and includes\nthe subnet CIDRs that belong to the space that each endpoint is bound to." + }, + "SetRelationsStatus": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/SetStatus" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "SetRelationsStatus sets the status for the specified relations." + }, + "SpaceInfos": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/SpaceInfosParams" + }, + "Result": { + "$ref": "#/definitions/SpaceInfos" + } + }, + "description": "SpaceInfos returns a comprehensive representation of either all spaces or\na filtered subset of the known spaces and their associated subnet details." + }, + "Watch": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/NotifyWatchResults" + } + }, + "description": "Watch starts an NotifyWatcher for each given entity." + }, + "WatchCloudSpecsChanges": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/NotifyWatchResults" + } + }, + "description": "WatchCloudSpecsChanges returns a watcher for cloud spec changes." + }, + "WatchEgressAddressesForRelations": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/StringsWatchResults" + } + }, + "description": "WatchEgressAddressesForRelations creates a watcher that notifies when addresses, from which\nconnections will originate for the relation, change.\nEach event contains the entire set of addresses which are required for ingress for the relation." + }, + "WatchForModelConfigChanges": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/NotifyWatchResult" + } + }, + "description": "WatchForModelConfigChanges returns a NotifyWatcher that observes\nchanges to the model configuration.\nNote that although the NotifyWatchResult contains an Error field,\nit's not used because we are only returning a single watcher,\nso we use the regular error return." + }, + "WatchIngressAddressesForRelations": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/StringsWatchResults" + } + }, + "description": "WatchIngressAddressesForRelations creates a watcher that returns the ingress networks\nthat have been recorded against the specified relations." + }, + "WatchModelMachineStartTimes": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/StringsWatchResult" + } + }, + "description": "WatchModelMachineStartTimes watches the non-container machines in the model\nfor changes to the Life or AgentStartTime fields and reports them as a batch." + }, + "WatchModelMachines": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/StringsWatchResult" + } + }, + "description": "WatchModelMachines returns a StringsWatcher that notifies of\nchanges to the life cycles of the top level machines in the current\nmodel." + }, + "WatchOpenedPorts": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/StringsWatchResults" + } + }, + "description": "WatchOpenedPorts returns a new StringsWatcher for each given\nmodel tag." + }, + "WatchSubnets": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/StringsWatchResult" + } + }, + "description": "WatchSubnets returns a new StringsWatcher that watches the specified\nsubnet tags or all tags if no entities are specified." + }, + "WatchUnits": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/StringsWatchResults" + } + }, + "description": "WatchUnits starts a StringsWatcher to watch all units belonging to\nto any entity (machine or service) passed in args." + } + }, + "definitions": { + "BoolResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "result" + ] + }, + "BoolResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/BoolResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "CloudCredential": { + "type": "object", + "properties": { + "attrs": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "auth-type": { + "type": "string" + }, + "redacted": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "auth-type" + ] + }, + "CloudSpec": { + "type": "object", + "properties": { + "cacertificates": { + "type": "array", + "items": { + "type": "string" + } + }, + "credential": { + "$ref": "#/definitions/CloudCredential" + }, + "endpoint": { + "type": "string" + }, + "identity-endpoint": { + "type": "string" + }, + "is-controller-cloud": { + "type": "boolean" + }, + "name": { + "type": "string" + }, + "region": { + "type": "string" + }, + "skip-tls-verify": { + "type": "boolean" + }, + "storage-endpoint": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "type", + "name" + ] + }, + "CloudSpecResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "$ref": "#/definitions/CloudSpec" + } + }, + "additionalProperties": false + }, + "CloudSpecResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/CloudSpecResult" + } + } + }, + "additionalProperties": false + }, + "ControllerAPIInfoResult": { + "type": "object", + "properties": { + "addresses": { + "type": "array", + "items": { + "type": "string" + } + }, + "cacert": { + "type": "string" + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false, + "required": [ + "addresses", + "cacert" + ] + }, + "ControllerAPIInfoResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ControllerAPIInfoResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "ControllerConfigResult": { + "type": "object", + "properties": { + "config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + } + }, + "additionalProperties": false, + "required": [ + "config" + ] + }, + "Entities": { + "type": "object", + "properties": { + "entities": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } + } + }, + "additionalProperties": false, + "required": [ + "entities" + ] + }, + "Entity": { + "type": "object", + "properties": { + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag" + ] + }, + "EntityStatusArgs": { + "type": "object", + "properties": { + "data": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "info": { + "type": "string" + }, + "status": { + "type": "string" + }, + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag", + "status", + "info", + "data" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ErrorResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "ErrorResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "ExposeInfoResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "exposed": { + "type": "boolean" + }, + "exposed-endpoints": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/ExposedEndpoint" + } + } + } + }, + "additionalProperties": false + }, + "ExposeInfoResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ExposeInfoResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "ExposedEndpoint": { + "type": "object", + "properties": { + "expose-to-cidrs": { + "type": "array", + "items": { + "type": "string" + } + }, + "expose-to-spaces": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "FanConfigEntry": { + "type": "object", + "properties": { + "overlay": { + "type": "string" + }, + "underlay": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "underlay", + "overlay" + ] + }, + "FirewallRule": { + "type": "object", + "properties": { + "known-service": { + "type": "string" + }, + "whitelist-cidrs": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "known-service" + ] + }, + "KnownServiceArgs": { + "type": "object", + "properties": { + "known-services": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "known-services" + ] + }, + "LifeResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "life": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "life" + ] + }, + "LifeResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/LifeResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "ListFirewallRulesResults": { + "type": "object", + "properties": { + "Rules": { + "type": "array", + "items": { + "$ref": "#/definitions/FirewallRule" + } + } + }, + "additionalProperties": false, + "required": [ + "Rules" + ] + }, + "Macaroon": { + "type": "object", + "additionalProperties": false + }, + "MacaroonResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "$ref": "#/definitions/Macaroon" + } + }, + "additionalProperties": false + }, + "MacaroonResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/MacaroonResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "ModelConfigResult": { + "type": "object", + "properties": { + "config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + } + }, + "additionalProperties": false, + "required": [ + "config" + ] + }, + "ModelTag": { + "type": "object", + "additionalProperties": false + }, + "NotifyWatchResult": { + "type": "object", + "properties": { + "NotifyWatcherId": { + "type": "string" + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false, + "required": [ + "NotifyWatcherId" + ] + }, + "NotifyWatchResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/NotifyWatchResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "OpenMachinePortRangesResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "unit-port-ranges": { + "type": "object", + "patternProperties": { + ".*": { + "type": "array", + "items": { + "$ref": "#/definitions/OpenUnitPortRanges" + } + } + } + } + }, + "additionalProperties": false, + "required": [ + "unit-port-ranges" + ] + }, + "OpenMachinePortRangesResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/OpenMachinePortRangesResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "OpenUnitPortRanges": { + "type": "object", + "properties": { + "endpoint": { + "type": "string" + }, + "port-ranges": { + "type": "array", + "items": { + "$ref": "#/definitions/PortRange" + } + }, + "subnet-cidrs": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "port-ranges", + "subnet-cidrs" + ] + }, + "PortRange": { + "type": "object", + "properties": { + "from-port": { + "type": "integer" + }, + "protocol": { + "type": "string" + }, + "to-port": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "from-port", + "to-port", + "protocol" + ] + }, + "SetStatus": { + "type": "object", + "properties": { + "entities": { + "type": "array", + "items": { + "$ref": "#/definitions/EntityStatusArgs" + } + } + }, + "additionalProperties": false, + "required": [ + "entities" + ] + }, + "SpaceInfo": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "provider-id": { + "type": "string" + }, + "subnets": { + "type": "array", + "items": { + "$ref": "#/definitions/SubnetV3" + } + } + }, + "additionalProperties": false, + "required": [ + "id", + "name" + ] + }, + "SpaceInfos": { + "type": "object", + "properties": { + "space-infos": { + "type": "array", + "items": { + "$ref": "#/definitions/SpaceInfo" + } + } + }, + "additionalProperties": false + }, + "SpaceInfosParams": { + "type": "object", + "properties": { + "space-ids": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "StringResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "result" + ] + }, + "StringResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/StringResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "StringsWatchResult": { + "type": "object", + "properties": { + "changes": { + "type": "array", + "items": { + "type": "string" + } + }, + "error": { + "$ref": "#/definitions/Error" + }, + "watcher-id": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "watcher-id" + ] + }, + "StringsWatchResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/StringsWatchResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "Subnet": { + "type": "object", + "properties": { + "cidr": { + "type": "string" + }, + "life": { + "type": "string" + }, + "provider-id": { + "type": "string" + }, + "provider-network-id": { + "type": "string" + }, + "provider-space-id": { + "type": "string" + }, + "space-tag": { + "type": "string" + }, + "status": { + "type": "string" + }, + "vlan-tag": { + "type": "integer" + }, + "zones": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "cidr", + "vlan-tag", + "life", + "space-tag", + "zones" + ] + }, + "SubnetV2": { + "type": "object", + "properties": { + "Subnet": { + "$ref": "#/definitions/Subnet" + }, + "cidr": { + "type": "string" + }, + "id": { + "type": "string" + }, + "life": { + "type": "string" + }, + "provider-id": { + "type": "string" + }, + "provider-network-id": { + "type": "string" + }, + "provider-space-id": { + "type": "string" + }, + "space-tag": { + "type": "string" + }, + "status": { + "type": "string" + }, + "vlan-tag": { + "type": "integer" + }, + "zones": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "cidr", + "vlan-tag", + "life", + "space-tag", + "zones", + "Subnet" + ] + }, + "SubnetV3": { + "type": "object", + "properties": { + "Subnet": { + "$ref": "#/definitions/Subnet" + }, + "SubnetV2": { + "$ref": "#/definitions/SubnetV2" + }, + "cidr": { + "type": "string" + }, + "fan-info": { + "$ref": "#/definitions/FanConfigEntry" + }, + "id": { + "type": "string" + }, + "is-public": { + "type": "boolean" + }, + "life": { + "type": "string" + }, + "provider-id": { + "type": "string" + }, + "provider-network-id": { + "type": "string" + }, + "provider-space-id": { + "type": "string" + }, + "space-id": { + "type": "string" + }, + "space-tag": { + "type": "string" + }, + "status": { + "type": "string" + }, + "vlan-tag": { + "type": "integer" + }, + "zones": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "cidr", + "vlan-tag", + "life", + "space-tag", + "zones", + "Subnet", + "SubnetV2", + "space-id" + ] + } + } + } + }, + { + "Name": "HighAvailability", + "Description": "HighAvailabilityAPI implements the HighAvailability interface and is the concrete\nimplementation of the api end point.", + "Version": 2, + "AvailableTo": [ + "controller-user", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "EnableHA": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ControllersSpecs" + }, + "Result": { + "$ref": "#/definitions/ControllersChangeResults" + } + }, + "description": "EnableHA adds controller machines as necessary to ensure the\ncontroller has the number of machines specified." + } + }, + "definitions": { + "ControllersChangeResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "$ref": "#/definitions/ControllersChanges" + } + }, + "additionalProperties": false, + "required": [ + "result" + ] + }, + "ControllersChangeResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ControllersChangeResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "ControllersChanges": { + "type": "object", + "properties": { + "added": { + "type": "array", + "items": { + "type": "string" + } + }, + "converted": { + "type": "array", + "items": { + "type": "string" + } + }, + "maintained": { + "type": "array", + "items": { + "type": "string" + } + }, + "removed": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "ControllersSpec": { + "type": "object", + "properties": { + "constraints": { + "$ref": "#/definitions/Value" + }, + "num-controllers": { + "type": "integer" + }, + "placement": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "num-controllers" + ] + }, + "ControllersSpecs": { + "type": "object", + "properties": { + "specs": { + "type": "array", + "items": { + "$ref": "#/definitions/ControllersSpec" + } + } + }, + "additionalProperties": false, + "required": [ + "specs" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "Value": { + "type": "object", + "properties": { + "allocate-public-ip": { + "type": "boolean" + }, + "arch": { + "type": "string" + }, + "container": { + "type": "string" + }, + "cores": { + "type": "integer" + }, + "cpu-power": { + "type": "integer" + }, + "instance-role": { + "type": "string" + }, + "instance-type": { + "type": "string" + }, + "mem": { + "type": "integer" + }, + "root-disk": { + "type": "integer" + }, + "root-disk-source": { + "type": "string" + }, + "spaces": { + "type": "array", + "items": { + "type": "string" + } + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "virt-type": { + "type": "string" + }, + "zones": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + } + } + } + }, + { + "Name": "HostKeyReporter", + "Description": "Facade implements the API required by the hostkeyreporter worker.", + "Version": 1, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "ReportKeys": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/SSHHostKeySet" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "ReportKeys sets the SSH host keys for one or more entities." + } + }, + "definitions": { + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ErrorResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "ErrorResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "SSHHostKeySet": { + "type": "object", + "properties": { + "entity-keys": { + "type": "array", + "items": { + "$ref": "#/definitions/SSHHostKeys" + } + } + }, + "additionalProperties": false, + "required": [ + "entity-keys" + ] + }, + "SSHHostKeys": { + "type": "object", + "properties": { + "public-keys": { + "type": "array", + "items": { + "type": "string" + } + }, + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag", + "public-keys" + ] + } + } + } + }, + { + "Name": "ImageMetadata", + "Description": "API is a dummy struct for compatibility.", + "Version": 3, + "AvailableTo": [ + "controller-machine-agent" + ], + "Schema": { + "type": "object", + "properties": { + "UpdateFromPublishedImages": { + "type": "object", + "description": "UpdateFromPublishedImages is now a no-op.\nIt is retained for compatibility." + } + } + } + }, + { + "Name": "ImageMetadataManager", + "Description": "API is the concrete implementation of the api end point\nfor loud image metadata manipulations.", + "Version": 1, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "Delete": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/MetadataImageIds" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "Delete deletes cloud image metadata for given image ids.\nIt supports bulk calls." + }, + "List": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ImageMetadataFilter" + }, + "Result": { + "$ref": "#/definitions/ListCloudImageMetadataResult" + } + }, + "description": "List returns all found cloud image metadata that satisfy\ngiven filter.\nReturned list contains metadata ordered by priority." + }, + "Save": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/MetadataSaveParams" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "Save stores given cloud image metadata.\nIt supports bulk calls." + } + }, + "definitions": { + "CloudImageMetadata": { + "type": "object", + "properties": { + "arch": { + "type": "string" + }, + "image-id": { + "type": "string" + }, + "priority": { + "type": "integer" + }, + "region": { + "type": "string" + }, + "root-storage-size": { + "type": "integer" + }, + "root-storage-type": { + "type": "string" + }, + "source": { + "type": "string" + }, + "stream": { + "type": "string" + }, + "version": { + "type": "string" + }, + "virt-type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "image-id", + "region", + "version", + "arch", + "source", + "priority" + ] + }, + "CloudImageMetadataList": { + "type": "object", + "properties": { + "metadata": { + "type": "array", + "items": { + "$ref": "#/definitions/CloudImageMetadata" + } + } + }, + "additionalProperties": false + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ErrorResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "ErrorResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "ImageMetadataFilter": { + "type": "object", + "properties": { + "arches": { + "type": "array", + "items": { + "type": "string" + } + }, + "region": { + "type": "string" + }, + "root-storage-type": { + "type": "string" + }, + "stream": { + "type": "string" + }, + "versions": { + "type": "array", + "items": { + "type": "string" + } + }, + "virt-type": { + "type": "string" + } + }, + "additionalProperties": false + }, + "ListCloudImageMetadataResult": { + "type": "object", + "properties": { + "result": { + "type": "array", + "items": { + "$ref": "#/definitions/CloudImageMetadata" + } + } + }, + "additionalProperties": false, + "required": [ + "result" + ] + }, + "MetadataImageIds": { + "type": "object", + "properties": { + "image-ids": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "image-ids" + ] + }, + "MetadataSaveParams": { + "type": "object", + "properties": { + "metadata": { + "type": "array", + "items": { + "$ref": "#/definitions/CloudImageMetadataList" + } + } + }, + "additionalProperties": false + } + } + } + }, + { + "Name": "InstanceMutater", + "Description": "", + "Version": 3, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent" + ], + "Schema": { + "type": "object", + "properties": { + "CharmProfilingInfo": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entity" + }, + "Result": { + "$ref": "#/definitions/CharmProfilingInfoResult" + } + }, + "description": "CharmProfilingInfo returns info to update lxd profiles on the machine. If\nthe machine is not provisioned, no profile change info will be returned,\nnor will an error." + }, + "ContainerType": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entity" + }, + "Result": { + "$ref": "#/definitions/ContainerTypeResult" + } + }, + "description": "ContainerType returns the container type of a machine." + }, + "Life": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/LifeResults" + } + }, + "description": "Life returns the life status of every supplied entity, where available." + }, + "SetCharmProfiles": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/SetProfileArgs" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "SetCharmProfiles records the given slice of charm profile names." + }, + "SetModificationStatus": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/SetStatus" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "SetModificationStatus updates the instance whilst changes are occurring. This\nis different from SetStatus and SetInstanceStatus, by the fact this holds\ninformation about the ongoing changes that are happening to instances.\nConsider LXD Profile updates that can modify a instance, but may not cause\nthe instance to be placed into a error state. This modification status\nserves the purpose of highlighting that to the operator.\nOnly machine tags are accepted." + }, + "WatchContainers": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entity" + }, + "Result": { + "$ref": "#/definitions/StringsWatchResult" + } + }, + "description": "WatchContainers starts a watcher to track Containers on a given\nmachine." + }, + "WatchLXDProfileVerificationNeeded": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/NotifyWatchResults" + } + }, + "description": "WatchLXDProfileVerificationNeeded starts a watcher to track Applications with\nLXD Profiles." + }, + "WatchMachines": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/StringsWatchResult" + } + }, + "description": "WatchMachines starts a watcher to track machines.\nWatchMachines does not consume the initial event of the watch response, as\nthat returns the initial set of machines that are currently available." + }, + "WatchModelMachines": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/StringsWatchResult" + } + }, + "description": "WatchModelMachines starts a watcher to track machines, but not containers.\nWatchModelMachines does not consume the initial event of the watch response, as\nthat returns the initial set of machines that are currently available." + } + }, + "definitions": { + "CharmLXDProfile": { + "type": "object", + "properties": { + "config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "description": { + "type": "string" + }, + "devices": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + } + } + } + }, + "additionalProperties": false, + "required": [ + "config", + "description", + "devices" + ] + }, + "CharmProfilingInfoResult": { + "type": "object", + "properties": { + "current-profiles": { + "type": "array", + "items": { + "type": "string" + } + }, + "error": { + "$ref": "#/definitions/Error" + }, + "instance-id": { + "type": "string" + }, + "model-name": { + "type": "string" + }, + "profile-changes": { + "type": "array", + "items": { + "$ref": "#/definitions/ProfileInfoResult" + } + } + }, + "additionalProperties": false, + "required": [ + "instance-id", + "model-name", + "profile-changes", + "current-profiles", + "error" + ] + }, + "ContainerTypeResult": { + "type": "object", + "properties": { + "container-type": { + "type": "string" + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false, + "required": [ + "container-type", + "error" + ] + }, + "Entities": { + "type": "object", + "properties": { + "entities": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } + } + }, + "additionalProperties": false, + "required": [ + "entities" + ] + }, + "Entity": { + "type": "object", + "properties": { + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag" + ] + }, + "EntityStatusArgs": { + "type": "object", + "properties": { + "data": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "info": { + "type": "string" + }, + "status": { + "type": "string" + }, + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag", + "status", + "info", + "data" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ErrorResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "ErrorResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "LifeResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "life": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "life" + ] + }, + "LifeResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/LifeResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "NotifyWatchResult": { + "type": "object", + "properties": { + "NotifyWatcherId": { + "type": "string" + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false, + "required": [ + "NotifyWatcherId" + ] + }, + "NotifyWatchResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/NotifyWatchResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "ProfileInfoResult": { + "type": "object", + "properties": { + "application-name": { + "type": "string" + }, + "error": { + "$ref": "#/definitions/Error" + }, + "profile": { + "$ref": "#/definitions/CharmLXDProfile" + }, + "revision": { + "type": "integer" + } + }, + "additionalProperties": false + }, + "SetProfileArg": { + "type": "object", + "properties": { + "entity": { + "$ref": "#/definitions/Entity" + }, + "profiles": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "entity", + "profiles" + ] + }, + "SetProfileArgs": { + "type": "object", + "properties": { + "args": { + "type": "array", + "items": { + "$ref": "#/definitions/SetProfileArg" + } + } + }, + "additionalProperties": false, + "required": [ + "args" + ] + }, + "SetStatus": { + "type": "object", + "properties": { + "entities": { + "type": "array", + "items": { + "$ref": "#/definitions/EntityStatusArgs" + } + } + }, + "additionalProperties": false, + "required": [ + "entities" + ] + }, + "StringsWatchResult": { + "type": "object", + "properties": { + "changes": { + "type": "array", + "items": { + "type": "string" + } + }, + "error": { + "$ref": "#/definitions/Error" + }, + "watcher-id": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "watcher-id" + ] + } + } + } + }, + { + "Name": "InstancePoller", + "Description": "InstancePollerAPI provides access to the InstancePoller API facade.", + "Version": 4, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "AreManuallyProvisioned": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/BoolResults" + } + }, + "description": "AreManuallyProvisioned returns whether each given entity is\nmanually provisioned or not. Only machine tags are accepted." + }, + "InstanceId": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/StringResults" + } + }, + "description": "InstanceId returns the provider specific instance id for each given\nmachine or an CodeNotProvisioned error, if not set." + }, + "InstanceStatus": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/StatusResults" + } + }, + "description": "InstanceStatus returns the instance status for each given entity.\nOnly machine tags are accepted." + }, + "Life": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/LifeResults" + } + }, + "description": "Life returns the life status of every supplied entity, where available." + }, + "ModelConfig": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/ModelConfigResult" + } + }, + "description": "ModelConfig returns the current model's configuration." + }, + "ProviderAddresses": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/MachineAddressesResults" + } + }, + "description": "ProviderAddresses returns the list of all known provider addresses\nfor each given entity. Only machine tags are accepted." + }, + "SetInstanceStatus": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/SetStatus" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "SetInstanceStatus updates the instance status for each given entity.\nOnly machine tags are accepted." + }, + "SetProviderAddresses": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/SetMachinesAddresses" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "SetProviderAddresses updates the list of known provider addresses\nfor each given entity. Only machine tags are accepted." + }, + "SetProviderNetworkConfig": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/SetProviderNetworkConfig" + }, + "Result": { + "$ref": "#/definitions/SetProviderNetworkConfigResults" + } + }, + "description": "SetProviderNetworkConfig updates the provider addresses for one or more\nmachines.\n\nWhat's more, if the client request includes provider-specific IDs (e.g.\nnetwork, subnet or address IDs), this method will also iterate any present\nlink layer devices (and their addresses) and merge in any missing\nprovider-specific information." + }, + "Status": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/StatusResults" + } + }, + "description": "Status returns the status of each given entity." + }, + "WatchForModelConfigChanges": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/NotifyWatchResult" + } + }, + "description": "WatchForModelConfigChanges returns a NotifyWatcher that observes\nchanges to the model configuration.\nNote that although the NotifyWatchResult contains an Error field,\nit's not used because we are only returning a single watcher,\nso we use the regular error return." + }, + "WatchModelMachineStartTimes": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/StringsWatchResult" + } + }, + "description": "WatchModelMachineStartTimes watches the non-container machines in the model\nfor changes to the Life or AgentStartTime fields and reports them as a batch." + }, + "WatchModelMachines": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/StringsWatchResult" + } + }, + "description": "WatchModelMachines returns a StringsWatcher that notifies of\nchanges to the life cycles of the top level machines in the current\nmodel." + } + }, + "definitions": { + "Address": { + "type": "object", + "properties": { + "cidr": { + "type": "string" + }, + "config-type": { + "type": "string" + }, + "is-secondary": { + "type": "boolean" + }, + "scope": { + "type": "string" + }, + "space-id": { + "type": "string" + }, + "space-name": { + "type": "string" + }, + "type": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "value", + "type", + "scope" + ] + }, + "BoolResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "result" + ] + }, + "BoolResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/BoolResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "Entities": { + "type": "object", + "properties": { + "entities": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } + } + }, + "additionalProperties": false, + "required": [ + "entities" + ] + }, + "Entity": { + "type": "object", + "properties": { + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag" + ] + }, + "EntityStatusArgs": { + "type": "object", + "properties": { + "data": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "info": { + "type": "string" + }, + "status": { + "type": "string" + }, + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag", + "status", + "info", + "data" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ErrorResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "ErrorResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "LifeResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "life": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "life" + ] + }, + "LifeResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/LifeResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "MachineAddresses": { + "type": "object", + "properties": { + "addresses": { + "type": "array", + "items": { + "$ref": "#/definitions/Address" + } + }, + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag", + "addresses" + ] + }, + "MachineAddressesResult": { + "type": "object", + "properties": { + "addresses": { + "type": "array", + "items": { + "$ref": "#/definitions/Address" + } + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false, + "required": [ + "addresses" + ] + }, + "MachineAddressesResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/MachineAddressesResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "ModelConfigResult": { + "type": "object", + "properties": { + "config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + } + }, + "additionalProperties": false, + "required": [ + "config" + ] + }, + "NetworkConfig": { + "type": "object", + "properties": { + "address": { + "type": "string" + }, + "addresses": { + "type": "array", + "items": { + "$ref": "#/definitions/Address" + } + }, + "cidr": { + "type": "string" + }, + "config-type": { + "type": "string" + }, + "device-index": { + "type": "integer" + }, + "disabled": { + "type": "boolean" + }, + "dns-search-domains": { + "type": "array", + "items": { + "type": "string" + } + }, + "dns-servers": { + "type": "array", + "items": { + "type": "string" + } + }, + "gateway-address": { + "type": "string" + }, + "interface-name": { + "type": "string" + }, + "interface-type": { + "type": "string" + }, + "is-default-gateway": { + "type": "boolean" + }, + "mac-address": { + "type": "string" + }, + "mtu": { + "type": "integer" + }, + "no-auto-start": { + "type": "boolean" + }, + "origin": { + "type": "string" + }, + "parent-interface-name": { + "type": "string" + }, + "provider-address-id": { + "type": "string" + }, + "provider-id": { + "type": "string" + }, + "provider-network-id": { + "type": "string" + }, + "provider-space-id": { + "type": "string" + }, + "provider-subnet-id": { + "type": "string" + }, + "provider-vlan-id": { + "type": "string" + }, + "routes": { + "type": "array", + "items": { + "$ref": "#/definitions/NetworkRoute" + } + }, + "shadow-addresses": { + "type": "array", + "items": { + "$ref": "#/definitions/Address" + } + }, + "virtual-port-type": { + "type": "string" + }, + "vlan-tag": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "device-index", + "mac-address", + "cidr", + "mtu", + "provider-id", + "provider-network-id", + "provider-subnet-id", + "provider-space-id", + "provider-address-id", + "provider-vlan-id", + "vlan-tag", + "interface-name", + "parent-interface-name", + "interface-type", + "disabled" + ] + }, + "NetworkRoute": { + "type": "object", + "properties": { + "destination-cidr": { + "type": "string" + }, + "gateway-ip": { + "type": "string" + }, + "metric": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "destination-cidr", + "gateway-ip", + "metric" + ] + }, + "NotifyWatchResult": { + "type": "object", + "properties": { + "NotifyWatcherId": { + "type": "string" + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false, + "required": [ + "NotifyWatcherId" + ] + }, + "ProviderNetworkConfig": { + "type": "object", + "properties": { + "config": { + "type": "array", + "items": { + "$ref": "#/definitions/NetworkConfig" + } + }, + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag", + "config" + ] + }, + "SetMachinesAddresses": { + "type": "object", + "properties": { + "machine-addresses": { + "type": "array", + "items": { + "$ref": "#/definitions/MachineAddresses" + } + } + }, + "additionalProperties": false, + "required": [ + "machine-addresses" + ] + }, + "SetProviderNetworkConfig": { + "type": "object", + "properties": { + "args": { + "type": "array", + "items": { + "$ref": "#/definitions/ProviderNetworkConfig" + } + } + }, + "additionalProperties": false, + "required": [ + "args" + ] + }, + "SetProviderNetworkConfigResult": { + "type": "object", + "properties": { + "addresses": { + "type": "array", + "items": { + "$ref": "#/definitions/Address" + } + }, + "error": { + "$ref": "#/definitions/Error" + }, + "modified": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "addresses", + "modified" + ] + }, + "SetProviderNetworkConfigResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/SetProviderNetworkConfigResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "SetStatus": { + "type": "object", + "properties": { + "entities": { + "type": "array", + "items": { + "$ref": "#/definitions/EntityStatusArgs" + } + } + }, + "additionalProperties": false, + "required": [ + "entities" + ] + }, + "StatusResult": { + "type": "object", + "properties": { + "data": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "error": { + "$ref": "#/definitions/Error" + }, + "id": { + "type": "string" + }, + "info": { + "type": "string" + }, + "life": { + "type": "string" + }, + "since": { + "type": "string", + "format": "date-time" + }, + "status": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "id", + "life", + "status", + "info", + "data", + "since" + ] + }, + "StatusResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/StatusResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "StringResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "result" + ] + }, + "StringResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/StringResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "StringsWatchResult": { + "type": "object", + "properties": { + "changes": { + "type": "array", + "items": { + "type": "string" + } + }, + "error": { + "$ref": "#/definitions/Error" + }, + "watcher-id": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "watcher-id" + ] + } + } + } + }, + { + "Name": "KeyManager", + "Description": "KeyManagerAPI provides api endpoints for manipulating ssh keys", + "Version": 1, + "AvailableTo": [ + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "AddKeys": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ModifyUserSSHKeys" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "AddKeys adds new authorised ssh keys for the specified user." + }, + "DeleteKeys": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ModifyUserSSHKeys" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "DeleteKeys deletes the authorised ssh keys for the specified user." + }, + "ImportKeys": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ModifyUserSSHKeys" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "ImportKeys imports new authorised ssh keys from the specified key ids for the specified user." + }, + "ListKeys": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ListSSHKeys" + }, + "Result": { + "$ref": "#/definitions/StringsResults" + } + }, + "description": "ListKeys returns the authorised ssh keys for the specified users." + } + }, + "definitions": { + "Entities": { + "type": "object", + "properties": { + "entities": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } + } + }, + "additionalProperties": false, + "required": [ + "entities" + ] + }, + "Entity": { + "type": "object", + "properties": { + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ErrorResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "ErrorResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "ListSSHKeys": { + "type": "object", + "properties": { + "entities": { + "$ref": "#/definitions/Entities" + }, + "mode": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "entities", + "mode" + ] + }, + "ModifyUserSSHKeys": { + "type": "object", + "properties": { + "ssh-keys": { + "type": "array", + "items": { + "type": "string" + } + }, + "user": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "user", + "ssh-keys" + ] + }, + "StringsResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "StringsResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/StringsResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + } + } + } + }, + { + "Name": "KeyUpdater", + "Description": "KeyUpdaterAPI implements the KeyUpdater interface and is the concrete\nimplementation of the api end point.", + "Version": 1, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent" + ], + "Schema": { + "type": "object", + "properties": { + "AuthorisedKeys": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/StringsResults" + } + }, + "description": "AuthorisedKeys reports the authorised ssh keys for the specified machines.\nThe current implementation relies on global authorised keys being stored in the model config.\nThis will change as new user management and authorisation functionality is added." + }, + "WatchAuthorisedKeys": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/NotifyWatchResults" + } + }, + "description": "WatchAuthorisedKeys starts a watcher to track changes to the authorised ssh keys\nfor the specified machines.\nThe current implementation relies on global authorised keys being stored in the model config.\nThis will change as new user management and authorisation functionality is added." + } + }, + "definitions": { + "Entities": { + "type": "object", + "properties": { + "entities": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } + } + }, + "additionalProperties": false, + "required": [ + "entities" + ] + }, + "Entity": { + "type": "object", + "properties": { + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "NotifyWatchResult": { + "type": "object", + "properties": { + "NotifyWatcherId": { + "type": "string" + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false, + "required": [ + "NotifyWatcherId" + ] + }, + "NotifyWatchResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/NotifyWatchResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "StringsResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "StringsResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/StringsResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + } + } + } + }, + { + "Name": "LeadershipService", + "Description": "LeadershipService implements a variant of leadership.Claimer for consumption\nover the API.", + "Version": 2, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "BlockUntilLeadershipReleased": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ApplicationTag" + }, + "Result": { + "$ref": "#/definitions/ErrorResult" + } + }, + "description": "BlockUntilLeadershipReleased blocks the caller until leadership is\nreleased for the given service." + }, + "ClaimLeadership": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ClaimLeadershipBulkParams" + }, + "Result": { + "$ref": "#/definitions/ClaimLeadershipBulkResults" + } + }, + "description": "ClaimLeadership makes a leadership claim with the given parameters." + } + }, + "definitions": { + "ApplicationTag": { + "type": "object", + "properties": { + "Name": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "Name" + ] + }, + "ClaimLeadershipBulkParams": { + "type": "object", + "properties": { + "params": { + "type": "array", + "items": { + "$ref": "#/definitions/ClaimLeadershipParams" + } + } + }, + "additionalProperties": false, + "required": [ + "params" + ] + }, + "ClaimLeadershipBulkResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "ClaimLeadershipParams": { + "type": "object", + "properties": { + "application-tag": { + "type": "string" + }, + "duration": { + "type": "number" + }, + "unit-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "application-tag", + "unit-tag", + "duration" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ErrorResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + } + } + } + }, + { + "Name": "LifeFlag", + "Description": "", + "Version": 1, + "AvailableTo": [ + "controller-machine-agent" + ], + "Schema": { + "type": "object", + "properties": { + "Life": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/LifeResults" + } + }, + "description": "Life returns the life status of every supplied entity, where available." + }, + "Watch": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/NotifyWatchResults" + } + }, + "description": "Watch starts an NotifyWatcher for each given entity." + } + }, + "definitions": { + "Entities": { + "type": "object", + "properties": { + "entities": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } + } + }, + "additionalProperties": false, + "required": [ + "entities" + ] + }, + "Entity": { + "type": "object", + "properties": { + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "LifeResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "life": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "life" + ] + }, + "LifeResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/LifeResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "NotifyWatchResult": { + "type": "object", + "properties": { + "NotifyWatcherId": { + "type": "string" + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false, + "required": [ + "NotifyWatcherId" + ] + }, + "NotifyWatchResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/NotifyWatchResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + } + } + } + }, + { + "Name": "LogForwarding", + "Description": "LogForwardingAPI is the concrete implementation of the api end point.", + "Version": 1, + "AvailableTo": [ + "controller-machine-agent" + ], + "Schema": { + "type": "object", + "properties": { + "GetLastSent": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/LogForwardingGetLastSentParams" + }, + "Result": { + "$ref": "#/definitions/LogForwardingGetLastSentResults" + } + }, + "description": "GetLastSent is a bulk call that gets the log forwarding \"last sent\"\nrecord ID for each requested target." + }, + "SetLastSent": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/LogForwardingSetLastSentParams" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "SetLastSent is a bulk call that sets the log forwarding \"last sent\"\nrecord ID for each requested target." + } + }, + "definitions": { + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ErrorResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "ErrorResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "LogForwardingGetLastSentParams": { + "type": "object", + "properties": { + "ids": { + "type": "array", + "items": { + "$ref": "#/definitions/LogForwardingID" + } + } + }, + "additionalProperties": false, + "required": [ + "ids" + ] + }, + "LogForwardingGetLastSentResult": { + "type": "object", + "properties": { + "err": { + "$ref": "#/definitions/Error" + }, + "record-id": { + "type": "integer" + }, + "record-timestamp": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "record-id", + "record-timestamp", + "err" + ] + }, + "LogForwardingGetLastSentResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/LogForwardingGetLastSentResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "LogForwardingID": { + "type": "object", + "properties": { + "model": { + "type": "string" + }, + "sink": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "model", + "sink" + ] + }, + "LogForwardingSetLastSentParam": { + "type": "object", + "properties": { + "LogForwardingID": { + "$ref": "#/definitions/LogForwardingID" + }, + "model": { + "type": "string" + }, + "record-id": { + "type": "integer" + }, + "record-timestamp": { + "type": "integer" + }, + "sink": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "model", + "sink", + "LogForwardingID", + "record-id", + "record-timestamp" + ] + }, + "LogForwardingSetLastSentParams": { + "type": "object", + "properties": { + "params": { + "type": "array", + "items": { + "$ref": "#/definitions/LogForwardingSetLastSentParam" + } + } + }, + "additionalProperties": false, + "required": [ + "params" + ] + } + } + } + }, + { + "Name": "Logger", + "Description": "LoggerAPI implements the Logger interface and is the concrete\nimplementation of the api end point.", + "Version": 1, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "LoggingConfig": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/StringResults" + } + }, + "description": "LoggingConfig reports the logging configuration for the agents specified." + }, + "WatchLoggingConfig": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/NotifyWatchResults" + } + }, + "description": "WatchLoggingConfig starts a watcher to track changes to the logging config\nfor the agents specified.. Unfortunately the current infrastructure makes\nwatching parts of the config non-trivial, so currently any change to the\nconfig will cause the watcher to notify the client." + } + }, + "definitions": { + "Entities": { + "type": "object", + "properties": { + "entities": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } + } + }, + "additionalProperties": false, + "required": [ + "entities" + ] + }, + "Entity": { + "type": "object", + "properties": { + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "NotifyWatchResult": { + "type": "object", + "properties": { + "NotifyWatcherId": { + "type": "string" + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false, + "required": [ + "NotifyWatcherId" + ] + }, + "NotifyWatchResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/NotifyWatchResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "StringResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "result" + ] + }, + "StringResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/StringResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + } + } + } + }, + { + "Name": "MachineActions", + "Description": "Facade implements the machineactions interface and is the concrete\nimplementation of the api end point.", + "Version": 1, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent" + ], + "Schema": { + "type": "object", + "properties": { + "Actions": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ActionResults" + } + }, + "description": "Actions returns the Actions by Tags passed and ensures that the machine asking\nfor them is the machine that has the actions" + }, + "BeginActions": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "BeginActions marks the actions represented by the passed in Tags as running." + }, + "FinishActions": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ActionExecutionResults" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "FinishActions saves the result of a completed Action" + }, + "RunningActions": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ActionsByReceivers" + } + }, + "description": "RunningActions lists the actions running for the entities passed in.\nIf we end up needing more than ListRunning at some point we could follow/abstract\nwhat's done in the client actions package." + }, + "WatchActionNotifications": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/StringsWatchResults" + } + }, + "description": "WatchActionNotifications returns a StringsWatcher for observing\nincoming action calls to a machine." + } + }, + "definitions": { + "Action": { + "type": "object", + "properties": { + "execution-group": { + "type": "string" + }, + "name": { + "type": "string" + }, + "parallel": { + "type": "boolean" + }, + "parameters": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "receiver": { + "type": "string" + }, + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag", + "receiver", + "name" + ] + }, + "ActionExecutionResult": { + "type": "object", + "properties": { + "action-tag": { + "type": "string" + }, + "message": { + "type": "string" + }, + "results": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "status": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "action-tag", + "status" + ] + }, + "ActionExecutionResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ActionExecutionResult" + } + } + }, + "additionalProperties": false + }, + "ActionMessage": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + } + }, + "additionalProperties": false, + "required": [ + "timestamp", + "message" + ] + }, + "ActionResult": { + "type": "object", + "properties": { + "action": { + "$ref": "#/definitions/Action" + }, + "completed": { + "type": "string", + "format": "date-time" + }, + "enqueued": { + "type": "string", + "format": "date-time" + }, + "error": { + "$ref": "#/definitions/Error" + }, + "log": { + "type": "array", + "items": { + "$ref": "#/definitions/ActionMessage" + } + }, + "message": { + "type": "string" + }, + "output": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "started": { + "type": "string", + "format": "date-time" + }, + "status": { + "type": "string" + } + }, + "additionalProperties": false + }, + "ActionResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ActionResult" + } + } + }, + "additionalProperties": false + }, + "ActionsByReceiver": { + "type": "object", + "properties": { + "actions": { + "type": "array", + "items": { + "$ref": "#/definitions/ActionResult" + } + }, + "error": { + "$ref": "#/definitions/Error" + }, + "receiver": { + "type": "string" + } + }, + "additionalProperties": false + }, + "ActionsByReceivers": { + "type": "object", + "properties": { + "actions": { + "type": "array", + "items": { + "$ref": "#/definitions/ActionsByReceiver" + } + } + }, + "additionalProperties": false + }, + "Entities": { + "type": "object", + "properties": { + "entities": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } + } + }, + "additionalProperties": false, + "required": [ + "entities" + ] + }, + "Entity": { + "type": "object", + "properties": { + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ErrorResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "ErrorResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "StringsWatchResult": { + "type": "object", + "properties": { + "changes": { + "type": "array", + "items": { + "type": "string" + } + }, + "error": { + "$ref": "#/definitions/Error" + }, + "watcher-id": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "watcher-id" + ] + }, + "StringsWatchResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/StringsWatchResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + } + } + } + }, + { + "Name": "MachineManager", + "Description": "MachineManagerAPI provides access to the MachineManager API facade.", + "Version": 10, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "AddMachines": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/AddMachines" + }, + "Result": { + "$ref": "#/definitions/AddMachinesResults" + } + }, + "description": "AddMachines adds new machines with the supplied parameters.\nThe args will contain Base info." + }, + "DestroyMachineWithParams": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/DestroyMachinesParams" + }, + "Result": { + "$ref": "#/definitions/DestroyMachineResults" + } + }, + "description": "DestroyMachineWithParams removes a set of machines from the model." + }, + "GetUpgradeSeriesMessages": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/UpgradeSeriesNotificationParams" + }, + "Result": { + "$ref": "#/definitions/StringsResults" + } + }, + "description": "GetUpgradeSeriesMessages returns all new messages associated with upgrade\nseries events. Messages that have already been retrieved once are not\nreturned by this method." + }, + "InstanceTypes": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ModelInstanceTypesConstraints" + }, + "Result": { + "$ref": "#/definitions/InstanceTypesResults" + } + }, + "description": "InstanceTypes returns instance type information for the cloud and region\nin which the current model is deployed." + }, + "ProvisioningScript": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ProvisioningScriptParams" + }, + "Result": { + "$ref": "#/definitions/ProvisioningScriptResult" + } + }, + "description": "ProvisioningScript returns a shell script that, when run,\nprovisions a machine agent on the machine executing the script." + }, + "RetryProvisioning": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/RetryProvisioningArgs" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "RetryProvisioning marks a provisioning error as transient on the machines." + }, + "UpgradeSeriesComplete": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/UpdateChannelArg" + }, + "Result": { + "$ref": "#/definitions/ErrorResult" + } + }, + "description": "UpgradeSeriesComplete marks a machine as having completed a managed series\nupgrade." + }, + "UpgradeSeriesPrepare": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/UpdateChannelArg" + }, + "Result": { + "$ref": "#/definitions/ErrorResult" + } + }, + "description": "UpgradeSeriesPrepare prepares a machine for a OS series upgrade." + }, + "UpgradeSeriesValidate": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/UpdateChannelArgs" + }, + "Result": { + "$ref": "#/definitions/UpgradeSeriesUnitsResults" + } + }, + "description": "UpgradeSeriesValidate validates that the incoming arguments correspond to a\nvalid series upgrade for the target machine.\nIf they do, a list of the machine's current units is returned for use in\nsoliciting user confirmation of the command." + }, + "WatchUpgradeSeriesNotifications": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/NotifyWatchResults" + } + }, + "description": "WatchUpgradeSeriesNotifications returns a watcher that fires on upgrade\nseries events." + } + }, + "definitions": { + "AddMachineParams": { + "type": "object", + "properties": { + "addresses": { + "type": "array", + "items": { + "$ref": "#/definitions/Address" + } + }, + "base": { + "$ref": "#/definitions/Base" + }, + "constraints": { + "$ref": "#/definitions/Value" + }, + "container-type": { + "type": "string" + }, + "disks": { + "type": "array", + "items": { + "$ref": "#/definitions/Constraints" + } + }, + "hardware-characteristics": { + "$ref": "#/definitions/HardwareCharacteristics" + }, + "instance-id": { + "type": "string" + }, + "jobs": { + "type": "array", + "items": { + "type": "string" + } + }, + "nonce": { + "type": "string" + }, + "parent-id": { + "type": "string" + }, + "placement": { + "$ref": "#/definitions/Placement" + } + }, + "additionalProperties": false, + "required": [ + "constraints", + "jobs", + "parent-id", + "container-type", + "instance-id", + "nonce", + "hardware-characteristics", + "addresses" + ] + }, + "AddMachines": { + "type": "object", + "properties": { + "params": { + "type": "array", + "items": { + "$ref": "#/definitions/AddMachineParams" + } + } + }, + "additionalProperties": false, + "required": [ + "params" + ] + }, + "AddMachinesResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "machine": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "machine" + ] + }, + "AddMachinesResults": { + "type": "object", + "properties": { + "machines": { + "type": "array", + "items": { + "$ref": "#/definitions/AddMachinesResult" + } + } + }, + "additionalProperties": false, + "required": [ + "machines" + ] + }, + "Address": { + "type": "object", + "properties": { + "cidr": { + "type": "string" + }, + "config-type": { + "type": "string" + }, + "is-secondary": { + "type": "boolean" + }, + "scope": { + "type": "string" + }, + "space-id": { + "type": "string" + }, + "space-name": { + "type": "string" + }, + "type": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "value", + "type", + "scope" + ] + }, + "Base": { + "type": "object", + "properties": { + "channel": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "channel" + ] + }, + "Constraints": { + "type": "object", + "properties": { + "Count": { + "type": "integer" + }, + "Pool": { + "type": "string" + }, + "Size": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "Pool", + "Size", + "Count" + ] + }, + "DestroyMachineInfo": { + "type": "object", + "properties": { + "destroyed-containers": { + "type": "array", + "items": { + "$ref": "#/definitions/DestroyMachineResult" + } + }, + "destroyed-storage": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } + }, + "destroyed-units": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } + }, + "detached-storage": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } + }, + "machine-id": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "machine-id" + ] + }, + "DestroyMachineResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "info": { + "$ref": "#/definitions/DestroyMachineInfo" + } + }, + "additionalProperties": false + }, + "DestroyMachineResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/DestroyMachineResult" + } + } + }, + "additionalProperties": false + }, + "DestroyMachinesParams": { + "type": "object", + "properties": { + "dry-run": { + "type": "boolean" + }, + "force": { + "type": "boolean" + }, + "keep": { + "type": "boolean" + }, + "machine-tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "max-wait": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "machine-tags" + ] + }, + "Entities": { + "type": "object", + "properties": { + "entities": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } + } + }, + "additionalProperties": false, + "required": [ + "entities" + ] + }, + "Entity": { + "type": "object", + "properties": { + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ErrorResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "ErrorResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "HardwareCharacteristics": { + "type": "object", + "properties": { + "arch": { + "type": "string" + }, + "availability-zone": { + "type": "string" + }, + "cpu-cores": { + "type": "integer" + }, + "cpu-power": { + "type": "integer" + }, + "mem": { + "type": "integer" + }, + "root-disk": { + "type": "integer" + }, + "root-disk-source": { + "type": "string" + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "virt-type": { + "type": "string" + } + }, + "additionalProperties": false + }, + "InstanceType": { + "type": "object", + "properties": { + "arches": { + "type": "array", + "items": { + "type": "string" + } + }, + "cost": { + "type": "integer" + }, + "cpu-cores": { + "type": "integer" + }, + "memory": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "root-disk": { + "type": "integer" + }, + "virt-type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "arches", + "cpu-cores", + "memory" + ] + }, + "InstanceTypesResult": { + "type": "object", + "properties": { + "cost-currency": { + "type": "string" + }, + "cost-divisor": { + "type": "integer" + }, + "cost-unit": { + "type": "string" + }, + "error": { + "$ref": "#/definitions/Error" + }, + "instance-types": { + "type": "array", + "items": { + "$ref": "#/definitions/InstanceType" + } + } + }, + "additionalProperties": false + }, + "InstanceTypesResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/InstanceTypesResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "ModelInstanceTypesConstraint": { + "type": "object", + "properties": { + "value": { + "$ref": "#/definitions/Value" + } + }, + "additionalProperties": false + }, + "ModelInstanceTypesConstraints": { + "type": "object", + "properties": { + "constraints": { + "type": "array", + "items": { + "$ref": "#/definitions/ModelInstanceTypesConstraint" + } + } + }, + "additionalProperties": false, + "required": [ + "constraints" + ] + }, + "NotifyWatchResult": { + "type": "object", + "properties": { + "NotifyWatcherId": { + "type": "string" + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false, + "required": [ + "NotifyWatcherId" + ] + }, + "NotifyWatchResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/NotifyWatchResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "Placement": { + "type": "object", + "properties": { + "directive": { + "type": "string" + }, + "scope": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "scope", + "directive" + ] + }, + "ProvisioningScriptParams": { + "type": "object", + "properties": { + "data-dir": { + "type": "string" + }, + "disable-package-commands": { + "type": "boolean" + }, + "machine-id": { + "type": "string" + }, + "nonce": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "machine-id", + "nonce", + "data-dir", + "disable-package-commands" + ] + }, + "ProvisioningScriptResult": { + "type": "object", + "properties": { + "script": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "script" + ] + }, + "RetryProvisioningArgs": { + "type": "object", + "properties": { + "all": { + "type": "boolean" + }, + "machines": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "all" + ] + }, + "StringsResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "StringsResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/StringsResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "UpdateChannelArg": { + "type": "object", + "properties": { + "channel": { + "type": "string" + }, + "force": { + "type": "boolean" + }, + "tag": { + "$ref": "#/definitions/Entity" + } + }, + "additionalProperties": false, + "required": [ + "tag", + "force", + "channel" + ] + }, + "UpdateChannelArgs": { + "type": "object", + "properties": { + "args": { + "type": "array", + "items": { + "$ref": "#/definitions/UpdateChannelArg" + } + } + }, + "additionalProperties": false, + "required": [ + "args" + ] + }, + "UpgradeSeriesNotificationParam": { + "type": "object", + "properties": { + "entity": { + "$ref": "#/definitions/Entity" + }, + "watcher-id": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "entity", + "watcher-id" + ] + }, + "UpgradeSeriesNotificationParams": { + "type": "object", + "properties": { + "params": { + "type": "array", + "items": { + "$ref": "#/definitions/UpgradeSeriesNotificationParam" + } + } + }, + "additionalProperties": false, + "required": [ + "params" + ] + }, + "UpgradeSeriesUnitsResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "unit-names": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "unit-names" + ] + }, + "UpgradeSeriesUnitsResults": { + "type": "object", + "properties": { + "Results": { + "type": "array", + "items": { + "$ref": "#/definitions/UpgradeSeriesUnitsResult" + } + } + }, + "additionalProperties": false, + "required": [ + "Results" + ] + }, + "Value": { + "type": "object", + "properties": { + "allocate-public-ip": { + "type": "boolean" + }, + "arch": { + "type": "string" + }, + "container": { + "type": "string" + }, + "cores": { + "type": "integer" + }, + "cpu-power": { + "type": "integer" + }, + "instance-role": { + "type": "string" + }, + "instance-type": { + "type": "string" + }, + "mem": { + "type": "integer" + }, + "root-disk": { + "type": "integer" + }, + "root-disk-source": { + "type": "string" + }, + "spaces": { + "type": "array", + "items": { + "type": "string" + } + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "virt-type": { + "type": "string" + }, + "zones": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + } + } + } + }, + { + "Name": "MachineUndertaker", + "Description": "API implements the API facade used by the machine undertaker.", + "Version": 1, + "AvailableTo": [ + "controller-machine-agent" + ], + "Schema": { + "type": "object", + "properties": { + "AllMachineRemovals": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/EntitiesResults" + } + }, + "description": "AllMachineRemovals returns tags for all of the machines that have\nbeen marked for removal in the requested model." + }, + "CompleteMachineRemovals": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + } + }, + "description": "CompleteMachineRemovals removes the specified machines from the\nmodel database. It should only be called once any provider-level\ncleanup has been done for those machines." + }, + "GetMachineProviderInterfaceInfo": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ProviderInterfaceInfoResults" + } + }, + "description": "GetMachineProviderInterfaceInfo returns the provider details for\nall network interfaces attached to the machines requested." + }, + "WatchMachineRemovals": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/NotifyWatchResults" + } + }, + "description": "WatchMachineRemovals returns a watcher that will signal each time a\nmachine is marked for removal." + } + }, + "definitions": { + "Entities": { + "type": "object", + "properties": { + "entities": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } + } + }, + "additionalProperties": false, + "required": [ + "entities" + ] + }, + "EntitiesResult": { + "type": "object", + "properties": { + "entities": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false, + "required": [ + "entities" + ] + }, + "EntitiesResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/EntitiesResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "Entity": { + "type": "object", + "properties": { + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "NotifyWatchResult": { + "type": "object", + "properties": { + "NotifyWatcherId": { + "type": "string" + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false, + "required": [ + "NotifyWatcherId" + ] + }, + "NotifyWatchResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/NotifyWatchResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "ProviderInterfaceInfo": { + "type": "object", + "properties": { + "interface-name": { + "type": "string" + }, + "mac-address": { + "type": "string" + }, + "provider-id": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "interface-name", + "mac-address", + "provider-id" + ] + }, + "ProviderInterfaceInfoResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "interfaces": { + "type": "array", + "items": { + "$ref": "#/definitions/ProviderInterfaceInfo" + } + }, + "machine-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "machine-tag", + "interfaces" + ] + }, + "ProviderInterfaceInfoResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ProviderInterfaceInfoResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + } + } + } + }, + { + "Name": "Machiner", + "Description": "MachinerAPI implements the API used by the machiner worker.", + "Version": 5, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "APIAddresses": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/StringsResult" + } + }, + "description": "APIAddresses returns the list of addresses used to connect to the API." + }, + "APIHostPorts": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/APIHostPortsResult" + } + }, + "description": "APIHostPorts returns the API server addresses." + }, + "EnsureDead": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "EnsureDead calls EnsureDead on each given entity from state. It\nwill fail if the entity is not present. If it's Alive, nothing will\nhappen (see state/EnsureDead() for units or machines)." + }, + "Jobs": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/JobsResults" + } + }, + "description": "Jobs returns the jobs assigned to the given entities." + }, + "Life": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/LifeResults" + } + }, + "description": "Life returns the life status of every supplied entity, where available." + }, + "RecordAgentStartInformation": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/RecordAgentStartInformationArgs" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "RecordAgentStartInformation syncs the machine model with information\nreported by a machine agent when it starts." + }, + "RecordAgentStartTime": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "RecordAgentStartTime updates the agent start time field in the machine doc." + }, + "SetMachineAddresses": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/SetMachinesAddresses" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + } + }, + "SetObservedNetworkConfig": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/SetMachineNetworkConfig" + } + }, + "description": "SetObservedNetworkConfig reads the network config for the machine\nidentified by the input args.\nThis config is merged with the new network config supplied in the\nsame args and updated if it has changed." + }, + "SetStatus": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/SetStatus" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "SetStatus sets the status of each given entity." + }, + "Watch": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/NotifyWatchResults" + } + }, + "description": "Watch starts an NotifyWatcher for each given entity." + }, + "WatchAPIHostPorts": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/NotifyWatchResult" + } + }, + "description": "WatchAPIHostPorts watches the API server addresses." + } + }, + "definitions": { + "APIHostPortsResult": { + "type": "object", + "properties": { + "servers": { + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/definitions/HostPort" + } + } + } + }, + "additionalProperties": false, + "required": [ + "servers" + ] + }, + "Address": { + "type": "object", + "properties": { + "cidr": { + "type": "string" + }, + "config-type": { + "type": "string" + }, + "is-secondary": { + "type": "boolean" + }, + "scope": { + "type": "string" + }, + "space-id": { + "type": "string" + }, + "space-name": { + "type": "string" + }, + "type": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "value", + "type", + "scope" + ] + }, + "Entities": { + "type": "object", + "properties": { + "entities": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } + } + }, + "additionalProperties": false, + "required": [ + "entities" + ] + }, + "Entity": { + "type": "object", + "properties": { + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag" + ] + }, + "EntityStatusArgs": { + "type": "object", + "properties": { + "data": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "info": { + "type": "string" + }, + "status": { + "type": "string" + }, + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag", + "status", + "info", + "data" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ErrorResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "ErrorResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "HostPort": { + "type": "object", + "properties": { + "Address": { + "$ref": "#/definitions/Address" + }, + "cidr": { + "type": "string" + }, + "config-type": { + "type": "string" + }, + "is-secondary": { + "type": "boolean" + }, + "port": { + "type": "integer" + }, + "scope": { + "type": "string" + }, + "space-id": { + "type": "string" + }, + "space-name": { + "type": "string" + }, + "type": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "value", + "type", + "scope", + "Address", + "port" + ] + }, + "JobsResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "jobs": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "jobs" + ] + }, + "JobsResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/JobsResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "LifeResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "life": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "life" + ] + }, + "LifeResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/LifeResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "MachineAddresses": { + "type": "object", + "properties": { + "addresses": { + "type": "array", + "items": { + "$ref": "#/definitions/Address" + } + }, + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag", + "addresses" + ] + }, + "NetworkConfig": { + "type": "object", + "properties": { + "address": { + "type": "string" + }, + "addresses": { + "type": "array", + "items": { + "$ref": "#/definitions/Address" + } + }, + "cidr": { + "type": "string" + }, + "config-type": { + "type": "string" + }, + "device-index": { + "type": "integer" + }, + "disabled": { + "type": "boolean" + }, + "dns-search-domains": { + "type": "array", + "items": { + "type": "string" + } + }, + "dns-servers": { + "type": "array", + "items": { + "type": "string" + } + }, + "gateway-address": { + "type": "string" + }, + "interface-name": { + "type": "string" + }, + "interface-type": { + "type": "string" + }, + "is-default-gateway": { + "type": "boolean" + }, + "mac-address": { + "type": "string" + }, + "mtu": { + "type": "integer" + }, + "no-auto-start": { + "type": "boolean" + }, + "origin": { + "type": "string" + }, + "parent-interface-name": { + "type": "string" + }, + "provider-address-id": { + "type": "string" + }, + "provider-id": { + "type": "string" + }, + "provider-network-id": { + "type": "string" + }, + "provider-space-id": { + "type": "string" + }, + "provider-subnet-id": { + "type": "string" + }, + "provider-vlan-id": { + "type": "string" + }, + "routes": { + "type": "array", + "items": { + "$ref": "#/definitions/NetworkRoute" + } + }, + "shadow-addresses": { + "type": "array", + "items": { + "$ref": "#/definitions/Address" + } + }, + "virtual-port-type": { + "type": "string" + }, + "vlan-tag": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "device-index", + "mac-address", + "cidr", + "mtu", + "provider-id", + "provider-network-id", + "provider-subnet-id", + "provider-space-id", + "provider-address-id", + "provider-vlan-id", + "vlan-tag", + "interface-name", + "parent-interface-name", + "interface-type", + "disabled" + ] + }, + "NetworkRoute": { + "type": "object", + "properties": { + "destination-cidr": { + "type": "string" + }, + "gateway-ip": { + "type": "string" + }, + "metric": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "destination-cidr", + "gateway-ip", + "metric" + ] + }, + "NotifyWatchResult": { + "type": "object", + "properties": { + "NotifyWatcherId": { + "type": "string" + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false, + "required": [ + "NotifyWatcherId" + ] + }, + "NotifyWatchResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/NotifyWatchResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "RecordAgentStartInformationArg": { + "type": "object", + "properties": { + "hostname": { + "type": "string" + }, + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag" + ] + }, + "RecordAgentStartInformationArgs": { + "type": "object", + "properties": { + "args": { + "type": "array", + "items": { + "$ref": "#/definitions/RecordAgentStartInformationArg" + } + } + }, + "additionalProperties": false, + "required": [ + "args" + ] + }, + "SetMachineNetworkConfig": { + "type": "object", + "properties": { + "config": { + "type": "array", + "items": { + "$ref": "#/definitions/NetworkConfig" + } + }, + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag", + "config" + ] + }, + "SetMachinesAddresses": { + "type": "object", + "properties": { + "machine-addresses": { + "type": "array", + "items": { + "$ref": "#/definitions/MachineAddresses" + } + } + }, + "additionalProperties": false, + "required": [ + "machine-addresses" + ] + }, + "SetStatus": { + "type": "object", + "properties": { + "entities": { + "type": "array", + "items": { + "$ref": "#/definitions/EntityStatusArgs" + } + } + }, + "additionalProperties": false, + "required": [ + "entities" + ] + }, + "StringsResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + } + } + } + }, + { + "Name": "MeterStatus", + "Description": "MeterStatusAPI implements the MeterStatus interface and is the concrete\nimplementation of the API endpoint. Additionally, it embeds\ncommon.UnitStateAPI to allow meter status workers to access their\ncontroller-backed internal state.", + "Version": 2, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "GetMeterStatus": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/MeterStatusResults" + } + }, + "description": "GetMeterStatus returns meter status information for each unit." + }, + "SetState": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/SetUnitStateArgs" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "SetState sets the state persisted by the charm running in this unit\nand the state internal to the uniter for this unit." + }, + "State": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/UnitStateResults" + } + }, + "description": "State returns the state persisted by the charm running in this unit\nand the state internal to the uniter for this unit." + }, + "WatchMeterStatus": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/NotifyWatchResults" + } + }, + "description": "WatchMeterStatus returns a NotifyWatcher for observing changes\nto each unit's meter status." + } + }, + "definitions": { + "Entities": { + "type": "object", + "properties": { + "entities": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } + } + }, + "additionalProperties": false, + "required": [ + "entities" + ] + }, + "Entity": { + "type": "object", + "properties": { + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ErrorResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "ErrorResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "MeterStatusResult": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "error": { + "$ref": "#/definitions/Error" + }, + "info": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "code", + "info" + ] + }, + "MeterStatusResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/MeterStatusResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "NotifyWatchResult": { + "type": "object", + "properties": { + "NotifyWatcherId": { + "type": "string" + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false, + "required": [ + "NotifyWatcherId" + ] + }, + "NotifyWatchResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/NotifyWatchResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "SetUnitStateArg": { + "type": "object", + "properties": { + "charm-state": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "meter-status-state": { + "type": "string" + }, + "relation-state": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "secret-state": { + "type": "string" + }, + "storage-state": { + "type": "string" + }, + "tag": { + "type": "string" + }, + "uniter-state": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag" + ] + }, + "SetUnitStateArgs": { + "type": "object", + "properties": { + "args": { + "type": "array", + "items": { + "$ref": "#/definitions/SetUnitStateArg" + } + } + }, + "additionalProperties": false, + "required": [ + "args" + ] + }, + "UnitStateResult": { + "type": "object", + "properties": { + "charm-state": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "error": { + "$ref": "#/definitions/Error" + }, + "meter-status-state": { + "type": "string" + }, + "relation-state": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "secret-state": { + "type": "string" + }, + "storage-state": { + "type": "string" + }, + "uniter-state": { + "type": "string" + } + }, + "additionalProperties": false + }, + "UnitStateResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/UnitStateResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + } + } + } + }, + { + "Name": "MetricsAdder", + "Description": "MetricsAdderAPI implements the metrics adder interface and is the concrete\nimplementation of the API end point.", + "Version": 2, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent" + ], + "Schema": { + "type": "object", + "properties": { + "AddMetricBatches": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/MetricBatchParams" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "AddMetricBatches implements the MetricsAdder interface." + } + }, + "definitions": { + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ErrorResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "ErrorResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "Metric": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "labels": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "time": { + "type": "string", + "format": "date-time" + }, + "value": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "key", + "value", + "time" + ] + }, + "MetricBatch": { + "type": "object", + "properties": { + "charm-url": { + "type": "string" + }, + "created": { + "type": "string", + "format": "date-time" + }, + "metrics": { + "type": "array", + "items": { + "$ref": "#/definitions/Metric" + } + }, + "uuid": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uuid", + "charm-url", + "created", + "metrics" + ] + }, + "MetricBatchParam": { + "type": "object", + "properties": { + "batch": { + "$ref": "#/definitions/MetricBatch" + }, + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag", + "batch" + ] + }, + "MetricBatchParams": { + "type": "object", + "properties": { + "batches": { + "type": "array", + "items": { + "$ref": "#/definitions/MetricBatchParam" + } + } + }, + "additionalProperties": false, + "required": [ + "batches" + ] + } + } + } + }, + { + "Name": "MetricsDebug", + "Description": "MetricsDebugAPI implements the metricsdebug interface and is the concrete\nimplementation of the api end point.", + "Version": 2, + "AvailableTo": [ + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "GetMetrics": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/MetricResults" + } + }, + "description": "GetMetrics returns all metrics stored by the state server." + }, + "SetMeterStatus": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/MeterStatusParams" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "SetMeterStatus sets meter statuses for entities." + } + }, + "definitions": { + "Entities": { + "type": "object", + "properties": { + "entities": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } + } + }, + "additionalProperties": false, + "required": [ + "entities" + ] + }, + "Entity": { + "type": "object", + "properties": { + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag" + ] + }, + "EntityMetrics": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "metrics": { + "type": "array", + "items": { + "$ref": "#/definitions/MetricResult" + } + } + }, + "additionalProperties": false + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ErrorResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "ErrorResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "MeterStatusParam": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "string" + }, + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag", + "code" + ] + }, + "MeterStatusParams": { + "type": "object", + "properties": { + "statues": { + "type": "array", + "items": { + "$ref": "#/definitions/MeterStatusParam" + } + } + }, + "additionalProperties": false, + "required": [ + "statues" + ] + }, + "MetricResult": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "labels": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "time": { + "type": "string", + "format": "date-time" + }, + "unit": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "time", + "key", + "value", + "unit", + "labels" + ] + }, + "MetricResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/EntityMetrics" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + } + } + } + }, + { + "Name": "MetricsManager", + "Description": "MetricsManagerAPI implements the metrics manager interface and is the concrete\nimplementation of the api end point.", + "Version": 1, + "AvailableTo": [ + "controller-machine-agent" + ], + "Schema": { + "type": "object", + "properties": { + "AddJujuMachineMetrics": { + "type": "object", + "description": "AddJujuMachineMetrics adds a metric that counts the number of\nnon-container machines in the current model." + }, + "CleanupOldMetrics": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "CleanupOldMetrics removes old metrics from the collection.\nThe single arg params is expected to contain and model uuid.\nEven though the call will delete all metrics across models\nit serves to validate that the connection has access to at least one model." + }, + "SendMetrics": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "SendMetrics will send any unsent metrics onto the metric collection service." + } + }, + "definitions": { + "Entities": { + "type": "object", + "properties": { + "entities": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } + } + }, + "additionalProperties": false, + "required": [ + "entities" + ] + }, + "Entity": { + "type": "object", + "properties": { + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ErrorResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "ErrorResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + } + } + } + }, + { + "Name": "MigrationFlag", + "Description": "Facade lets clients watch and get models' migration phases.", + "Version": 1, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "Phase": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/PhaseResults" + } + }, + "description": "Phase returns the current migration phase or an error for every\nsupplied entity." + }, + "Watch": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/NotifyWatchResults" + } + }, + "description": "Watch returns an id for use with the NotifyWatcher facade, or an\nerror, for every supplied entity." + } + }, + "definitions": { + "Entities": { + "type": "object", + "properties": { + "entities": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } + } + }, + "additionalProperties": false, + "required": [ + "entities" + ] + }, + "Entity": { + "type": "object", + "properties": { + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "NotifyWatchResult": { + "type": "object", + "properties": { + "NotifyWatcherId": { + "type": "string" + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false, + "required": [ + "NotifyWatcherId" + ] + }, + "NotifyWatchResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/NotifyWatchResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "PhaseResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "phase": { + "type": "string" + } + }, + "additionalProperties": false + }, + "PhaseResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/PhaseResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + } + } + } + }, + { + "Name": "MigrationMaster", + "Description": "API implements the API required for the model migration\nmaster worker.", + "Version": 3, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "Export": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/SerializedModel" + } + }, + "description": "Export serializes the model associated with the API connection." + }, + "MigrationStatus": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/MasterMigrationStatus" + } + }, + "description": "MigrationStatus returns the details and progress of the latest\nmodel migration." + }, + "MinionReportTimeout": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/StringResult" + } + }, + "description": "MinionReportTimeout returns the configuration value for this controller that\nindicates how long the migration master worker should wait for minions to\nreported on phases of a migration." + }, + "MinionReports": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/MinionReports" + } + }, + "description": "MinionReports returns details of the reports made by migration\nminions to the controller for the current migration phase." + }, + "ModelInfo": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/MigrationModelInfo" + } + }, + "description": "ModelInfo returns essential information about the model to be\nmigrated." + }, + "Prechecks": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/PrechecksArgs" + } + }, + "description": "Prechecks performs pre-migration checks on the model and\n(source) controller." + }, + "ProcessRelations": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ProcessRelations" + } + }, + "description": "ProcessRelations processes any relations that need updating after an export.\nThis should help fix any remoteApplications that have been migrated." + }, + "Reap": { + "type": "object", + "description": "Reap removes all documents for the model associated with the API\nconnection." + }, + "SetPhase": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/SetMigrationPhaseArgs" + } + }, + "description": "SetPhase sets the phase of the active model migration. The provided\nphase must be a valid phase value, for example QUIESCE\" or\n\"ABORT\". See the core/migration package for the complete list." + }, + "SetStatusMessage": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/SetMigrationStatusMessageArgs" + } + }, + "description": "SetStatusMessage sets a human readable status message containing\ninformation about the migration's progress. This will be shown in\nstatus output shown to the end user." + }, + "SourceControllerInfo": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/MigrationSourceInfo" + } + }, + "description": "SourceControllerInfo returns the details required to connect to\nthe source controller for model migration." + }, + "Watch": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/NotifyWatchResult" + } + }, + "description": "Watch starts watching for an active migration for the model\nassociated with the API connection. The returned id should be used\nwith the NotifyWatcher facade to receive events." + }, + "WatchMinionReports": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/NotifyWatchResult" + } + }, + "description": "WatchMinionReports sets up a watcher which reports when a report\nfor a migration minion has arrived." + } + }, + "definitions": { + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "MasterMigrationStatus": { + "type": "object", + "properties": { + "migration-id": { + "type": "string" + }, + "phase": { + "type": "string" + }, + "phase-changed-time": { + "type": "string", + "format": "date-time" + }, + "spec": { + "$ref": "#/definitions/MigrationSpec" + } + }, + "additionalProperties": false, + "required": [ + "spec", + "migration-id", + "phase", + "phase-changed-time" + ] + }, + "MigrationModelInfo": { + "type": "object", + "properties": { + "agent-version": { + "$ref": "#/definitions/Number" + }, + "controller-agent-version": { + "$ref": "#/definitions/Number" + }, + "facade-versions": { + "type": "object", + "patternProperties": { + ".*": { + "type": "array", + "items": { + "type": "integer" + } + } + } + }, + "name": { + "type": "string" + }, + "owner-tag": { + "type": "string" + }, + "uuid": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uuid", + "name", + "owner-tag", + "agent-version", + "controller-agent-version" + ] + }, + "MigrationSourceInfo": { + "type": "object", + "properties": { + "addrs": { + "type": "array", + "items": { + "type": "string" + } + }, + "ca-cert": { + "type": "string" + }, + "controller-alias": { + "type": "string" + }, + "controller-tag": { + "type": "string" + }, + "local-related-models": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "local-related-models", + "controller-tag", + "addrs", + "ca-cert" + ] + }, + "MigrationSpec": { + "type": "object", + "properties": { + "model-tag": { + "type": "string" + }, + "target-info": { + "$ref": "#/definitions/MigrationTargetInfo" + } + }, + "additionalProperties": false, + "required": [ + "model-tag", + "target-info" + ] + }, + "MigrationTargetInfo": { + "type": "object", + "properties": { + "addrs": { + "type": "array", + "items": { + "type": "string" + } + }, + "auth-tag": { + "type": "string" + }, + "ca-cert": { + "type": "string" + }, + "controller-alias": { + "type": "string" + }, + "controller-tag": { + "type": "string" + }, + "macaroons": { + "type": "string" + }, + "password": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "controller-tag", + "addrs", + "ca-cert", + "auth-tag" + ] + }, + "MinionReports": { + "type": "object", + "properties": { + "failed": { + "type": "array", + "items": { + "type": "string" + } + }, + "migration-id": { + "type": "string" + }, + "phase": { + "type": "string" + }, + "success-count": { + "type": "integer" + }, + "unknown-count": { + "type": "integer" + }, + "unknown-sample": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "migration-id", + "phase", + "success-count", + "unknown-count", + "unknown-sample", + "failed" + ] + }, + "NotifyWatchResult": { + "type": "object", + "properties": { + "NotifyWatcherId": { + "type": "string" + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false, + "required": [ + "NotifyWatcherId" + ] + }, + "Number": { + "type": "object", + "properties": { + "Build": { + "type": "integer" + }, + "Major": { + "type": "integer" + }, + "Minor": { + "type": "integer" + }, + "Patch": { + "type": "integer" + }, + "Tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "Major", + "Minor", + "Tag", + "Patch", + "Build" + ] + }, + "PrechecksArgs": { + "type": "object", + "properties": { + "target-controller-version": { + "$ref": "#/definitions/Number" + } + }, + "additionalProperties": false, + "required": [ + "target-controller-version" + ] + }, + "ProcessRelations": { + "type": "object", + "properties": { + "controller-alias": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "controller-alias" + ] + }, + "SerializedModel": { + "type": "object", + "properties": { + "bytes": { + "type": "array", + "items": { + "type": "integer" + } + }, + "charms": { + "type": "array", + "items": { + "type": "string" + } + }, + "resources": { + "type": "array", + "items": { + "$ref": "#/definitions/SerializedModelResource" + } + }, + "tools": { + "type": "array", + "items": { + "$ref": "#/definitions/SerializedModelTools" + } + } + }, + "additionalProperties": false, + "required": [ + "bytes", + "charms", + "tools", + "resources" + ] + }, + "SerializedModelResource": { + "type": "object", + "properties": { + "application": { + "type": "string" + }, + "application-revision": { + "$ref": "#/definitions/SerializedModelResourceRevision" + }, + "charmstore-revision": { + "$ref": "#/definitions/SerializedModelResourceRevision" + }, + "name": { + "type": "string" + }, + "unit-revisions": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/SerializedModelResourceRevision" + } + } + } + }, + "additionalProperties": false, + "required": [ + "application", + "name", + "application-revision", + "charmstore-revision", + "unit-revisions" + ] + }, + "SerializedModelResourceRevision": { + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "fingerprint": { + "type": "string" + }, + "origin": { + "type": "string" + }, + "path": { + "type": "string" + }, + "revision": { + "type": "integer" + }, + "size": { + "type": "integer" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "type": { + "type": "string" + }, + "username": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "revision", + "type", + "path", + "description", + "origin", + "fingerprint", + "size", + "timestamp" + ] + }, + "SerializedModelTools": { + "type": "object", + "properties": { + "uri": { + "type": "string" + }, + "version": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "version", + "uri" + ] + }, + "SetMigrationPhaseArgs": { + "type": "object", + "properties": { + "phase": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "phase" + ] + }, + "SetMigrationStatusMessageArgs": { + "type": "object", + "properties": { + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message" + ] + }, + "StringResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "result" + ] + } + } + } + }, + { + "Name": "MigrationMinion", + "Description": "API implements the API required for the model migration\nmaster worker.", + "Version": 1, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "Report": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/MinionReport" + } + }, + "description": "Report allows a migration minion to submit whether it succeeded or\nfailed for a specific migration phase." + }, + "Watch": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/NotifyWatchResult" + } + }, + "description": "Watch starts watching for status updates for a migration attempt\nfor the model. It will report when a migration starts and when its\nstatus changes (including when it finishes). An initial event will\nbe fired if there has ever been a migration attempt for the model.\n\nThe MigrationStatusWatcher facade must be used to receive events\nfrom the watcher." + } + }, + "definitions": { + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "MinionReport": { + "type": "object", + "properties": { + "migration-id": { + "type": "string" + }, + "phase": { + "type": "string" + }, + "success": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "migration-id", + "phase", + "success" + ] + }, + "NotifyWatchResult": { + "type": "object", + "properties": { + "NotifyWatcherId": { + "type": "string" + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false, + "required": [ + "NotifyWatcherId" + ] + } + } + } + }, + { + "Name": "MigrationStatusWatcher", + "Description": "", + "Version": 1, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "Next": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/MigrationStatus" + } + }, + "description": "Next returns when the status for a model migration for the\nassociated model changes. The current details for the active\nmigration are returned." + }, + "Stop": { + "type": "object", + "description": "Stop stops the watcher." + } + }, + "definitions": { + "MigrationStatus": { + "type": "object", + "properties": { + "attempt": { + "type": "integer" + }, + "migration-id": { + "type": "string" + }, + "phase": { + "type": "string" + }, + "source-api-addrs": { + "type": "array", + "items": { + "type": "string" + } + }, + "source-ca-cert": { + "type": "string" + }, + "target-api-addrs": { + "type": "array", + "items": { + "type": "string" + } + }, + "target-ca-cert": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "migration-id", + "attempt", + "phase", + "source-api-addrs", + "source-ca-cert", + "target-api-addrs", + "target-ca-cert" + ] + } + } + } + }, + { + "Name": "MigrationTarget", + "Description": "API implements the API required for the model migration\nmaster worker when communicating with the target controller.", + "Version": 3, + "AvailableTo": [ + "controller-user" + ], + "Schema": { + "type": "object", + "properties": { + "Abort": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ModelArgs" + } + }, + "description": "Abort removes the specified model from the database. It is an error to\nattempt to Abort a model that has a migration mode other than importing." + }, + "Activate": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ActivateModelArgs" + } + }, + "description": "Activate sets the migration mode of the model to \"none\", meaning it\nis ready for use. It is an error to attempt to Abort a model that\nhas a migration mode other than importing. It also adds any required\nexternal controller records for those controllers hosting offers used\nby the model." + }, + "AdoptResources": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/AdoptResourcesArgs" + } + }, + "description": "AdoptResources asks the cloud provider to update the controller\ntags for a model's resources. This prevents the resources from\nbeing destroyed if the source controller is destroyed after the\nmodel is migrated away." + }, + "CACert": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/BytesResult" + } + }, + "description": "CACert returns the certificate used to validate the state connection." + }, + "CheckMachines": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ModelArgs" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "CheckMachines compares the machines in state with the ones reported\nby the provider and reports any discrepancies." + }, + "Import": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/SerializedModel" + } + }, + "description": "Import takes a serialized Juju model, deserializes it, and\nrecreates it in the receiving controller." + }, + "LatestLogTime": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ModelArgs" + }, + "Result": { + "type": "string", + "format": "date-time" + } + }, + "description": "LatestLogTime returns the time of the most recent log record\nreceived by the logtransfer endpoint. This can be used as the start\npoint for streaming logs from the source if the transfer was\ninterrupted.\n\nFor performance reasons, not every time is tracked, so if the\ntarget controller died during the transfer the latest log time\nmight be up to 2 minutes earlier. If the transfer was interrupted\nin some other way (like the source controller going away or a\nnetwork partition) the time will be up-to-date.\n\nLog messages are assumed to be sent in time order (which is how\ndebug-log emits them). If that isn't the case then this mechanism\ncan't be used to avoid duplicates when logtransfer is restarted.\n\nReturns the zero time if no logs have been transferred." + }, + "Prechecks": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/MigrationModelInfo" + } + }, + "description": "Prechecks ensure that the target controller is ready to accept a\nmodel migration." + } + }, + "definitions": { + "ActivateModelArgs": { + "type": "object", + "properties": { + "controller-alias": { + "type": "string" + }, + "controller-tag": { + "type": "string" + }, + "cross-model-uuids": { + "type": "array", + "items": { + "type": "string" + } + }, + "model-tag": { + "type": "string" + }, + "source-api-addrs": { + "type": "array", + "items": { + "type": "string" + } + }, + "source-ca-cert": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "model-tag", + "controller-tag", + "source-api-addrs", + "source-ca-cert", + "cross-model-uuids" + ] + }, + "AdoptResourcesArgs": { + "type": "object", + "properties": { + "model-tag": { + "type": "string" + }, + "source-controller-version": { + "$ref": "#/definitions/Number" + } + }, + "additionalProperties": false, + "required": [ + "model-tag", + "source-controller-version" + ] + }, + "BytesResult": { + "type": "object", + "properties": { + "result": { + "type": "array", + "items": { + "type": "integer" + } + } + }, + "additionalProperties": false, + "required": [ + "result" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ErrorResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "ErrorResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "MigrationModelInfo": { + "type": "object", + "properties": { + "agent-version": { + "$ref": "#/definitions/Number" + }, + "controller-agent-version": { + "$ref": "#/definitions/Number" + }, + "facade-versions": { + "type": "object", + "patternProperties": { + ".*": { + "type": "array", + "items": { + "type": "integer" + } + } + } + }, + "name": { + "type": "string" + }, + "owner-tag": { + "type": "string" + }, + "uuid": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uuid", + "name", + "owner-tag", + "agent-version", + "controller-agent-version" + ] + }, + "ModelArgs": { + "type": "object", + "properties": { + "model-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "model-tag" + ] + }, + "Number": { + "type": "object", + "properties": { + "Build": { + "type": "integer" + }, + "Major": { + "type": "integer" + }, + "Minor": { + "type": "integer" + }, + "Patch": { + "type": "integer" + }, + "Tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "Major", + "Minor", + "Tag", + "Patch", + "Build" + ] + }, + "SerializedModel": { + "type": "object", + "properties": { + "bytes": { + "type": "array", + "items": { + "type": "integer" + } + }, + "charms": { + "type": "array", + "items": { + "type": "string" + } + }, + "resources": { + "type": "array", + "items": { + "$ref": "#/definitions/SerializedModelResource" + } + }, + "tools": { + "type": "array", + "items": { + "$ref": "#/definitions/SerializedModelTools" + } + } + }, + "additionalProperties": false, + "required": [ + "bytes", + "charms", + "tools", + "resources" + ] + }, + "SerializedModelResource": { + "type": "object", + "properties": { + "application": { + "type": "string" + }, + "application-revision": { + "$ref": "#/definitions/SerializedModelResourceRevision" + }, + "charmstore-revision": { + "$ref": "#/definitions/SerializedModelResourceRevision" + }, + "name": { + "type": "string" + }, + "unit-revisions": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/SerializedModelResourceRevision" + } + } + } + }, + "additionalProperties": false, + "required": [ + "application", + "name", + "application-revision", + "charmstore-revision", + "unit-revisions" + ] + }, + "SerializedModelResourceRevision": { + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "fingerprint": { + "type": "string" + }, + "origin": { + "type": "string" + }, + "path": { + "type": "string" + }, + "revision": { + "type": "integer" + }, + "size": { + "type": "integer" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "type": { + "type": "string" + }, + "username": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "revision", + "type", + "path", + "description", + "origin", + "fingerprint", + "size", + "timestamp" + ] + }, + "SerializedModelTools": { + "type": "object", + "properties": { + "uri": { + "type": "string" + }, + "version": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "version", + "uri" + ] + } + } + } + }, + { + "Name": "ModelConfig", + "Description": "ModelConfigAPIV3 is currently the latest.", + "Version": 3, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "controller-user", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "GetModelConstraints": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/GetConstraintsResults" + } + }, + "description": "GetModelConstraints returns the constraints for the model." + }, + "ModelGet": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/ModelConfigResults" + } + }, + "description": "ModelGet implements the server-side part of the\nmodel-config CLI command." + }, + "ModelSet": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ModelSet" + } + }, + "description": "ModelSet implements the server-side part of the\nset-model-config CLI command." + }, + "ModelUnset": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ModelUnset" + } + }, + "description": "ModelUnset implements the server-side part of the\nset-model-config CLI command." + }, + "SLALevel": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/StringResult" + } + }, + "description": "SLALevel returns the current sla level for the model." + }, + "Sequences": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/ModelSequencesResult" + } + }, + "description": "Sequences returns the model's sequence names and next values." + }, + "SetModelConstraints": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/SetConstraints" + } + }, + "description": "SetModelConstraints sets the constraints for the model." + }, + "SetSLALevel": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ModelSLA" + } + }, + "description": "SetSLALevel sets the sla level on the model." + } + }, + "definitions": { + "ConfigValue": { + "type": "object", + "properties": { + "source": { + "type": "string" + }, + "value": { + "type": "object", + "additionalProperties": true + } + }, + "additionalProperties": false, + "required": [ + "value", + "source" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "GetConstraintsResults": { + "type": "object", + "properties": { + "constraints": { + "$ref": "#/definitions/Value" + } + }, + "additionalProperties": false, + "required": [ + "constraints" + ] + }, + "ModelConfigResults": { + "type": "object", + "properties": { + "config": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/ConfigValue" + } + } + } + }, + "additionalProperties": false, + "required": [ + "config" + ] + }, + "ModelSLA": { + "type": "object", + "properties": { + "ModelSLAInfo": { + "$ref": "#/definitions/ModelSLAInfo" + }, + "creds": { + "type": "array", + "items": { + "type": "integer" + } + }, + "level": { + "type": "string" + }, + "owner": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "level", + "owner", + "ModelSLAInfo", + "creds" + ] + }, + "ModelSLAInfo": { + "type": "object", + "properties": { + "level": { + "type": "string" + }, + "owner": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "level", + "owner" + ] + }, + "ModelSequencesResult": { + "type": "object", + "properties": { + "sequences": { + "type": "object", + "patternProperties": { + ".*": { + "type": "integer" + } + } + } + }, + "additionalProperties": false, + "required": [ + "sequences" + ] + }, + "ModelSet": { + "type": "object", + "properties": { + "config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + } + }, + "additionalProperties": false, + "required": [ + "config" + ] + }, + "ModelUnset": { + "type": "object", + "properties": { + "keys": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "keys" + ] + }, + "SetConstraints": { + "type": "object", + "properties": { + "application": { + "type": "string" + }, + "constraints": { + "$ref": "#/definitions/Value" + } + }, + "additionalProperties": false, + "required": [ + "application", + "constraints" + ] + }, + "StringResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "result" + ] + }, + "Value": { + "type": "object", + "properties": { + "allocate-public-ip": { + "type": "boolean" + }, + "arch": { + "type": "string" + }, + "container": { + "type": "string" + }, + "cores": { + "type": "integer" + }, + "cpu-power": { + "type": "integer" + }, + "instance-role": { + "type": "string" + }, + "instance-type": { + "type": "string" + }, + "mem": { + "type": "integer" + }, + "root-disk": { + "type": "integer" + }, + "root-disk-source": { + "type": "string" + }, + "spaces": { + "type": "array", + "items": { + "type": "string" + } + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "virt-type": { + "type": "string" + }, + "zones": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + } + } + } + }, + { + "Name": "ModelGeneration", + "Description": "API is the concrete implementation of the API endpoint.", + "Version": 4, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "AbortBranch": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/BranchArg" + }, + "Result": { + "$ref": "#/definitions/ErrorResult" + } + }, + "description": "AbortBranch aborts the input branch, marking it complete. However no\nchanges are made applicable to the whole model. No units may be assigned\nto the branch when aborting." + }, + "AddBranch": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/BranchArg" + }, + "Result": { + "$ref": "#/definitions/ErrorResult" + } + }, + "description": "AddBranch adds a new branch with the input name to the model." + }, + "BranchInfo": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/BranchInfoArgs" + }, + "Result": { + "$ref": "#/definitions/BranchResults" + } + }, + "description": "BranchInfo will return details of branch identified by the input argument,\nincluding units on the branch and the configuration disjoint with the\nmaster generation.\nAn error is returned if no in-flight branch matching in input is found." + }, + "CommitBranch": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/BranchArg" + }, + "Result": { + "$ref": "#/definitions/IntResult" + } + }, + "description": "CommitBranch commits the input branch, making its changes applicable to\nthe whole model and marking it complete." + }, + "HasActiveBranch": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/BranchArg" + }, + "Result": { + "$ref": "#/definitions/BoolResult" + } + }, + "description": "HasActiveBranch returns a true result if the input model has an \"in-flight\"\nbranch matching the input name." + }, + "ListCommits": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/BranchResults" + } + }, + "description": "ListCommits will return the commits, hence only branches with generation_id higher than 0" + }, + "ShowCommit": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/GenerationId" + }, + "Result": { + "$ref": "#/definitions/GenerationResult" + } + }, + "description": "ShowCommit will return details a commit given by its generationId\nAn error is returned if either no branch can be found corresponding to the generation id.\nOr the generation id given is below 1." + }, + "TrackBranch": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/BranchTrackArg" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "TrackBranch marks the input units and/or applications as tracking the input\nbranch, causing them to realise changes made under that branch." + } + }, + "definitions": { + "BoolResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "result" + ] + }, + "BranchArg": { + "type": "object", + "properties": { + "branch": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "branch" + ] + }, + "BranchInfoArgs": { + "type": "object", + "properties": { + "branches": { + "type": "array", + "items": { + "type": "string" + } + }, + "detailed": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "branches", + "detailed" + ] + }, + "BranchResults": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "generations": { + "type": "array", + "items": { + "$ref": "#/definitions/Generation" + } + } + }, + "additionalProperties": false, + "required": [ + "generations" + ] + }, + "BranchTrackArg": { + "type": "object", + "properties": { + "branch": { + "type": "string" + }, + "entities": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } + }, + "num-units": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "branch", + "entities" + ] + }, + "Entity": { + "type": "object", + "properties": { + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ErrorResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "ErrorResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "Generation": { + "type": "object", + "properties": { + "applications": { + "type": "array", + "items": { + "$ref": "#/definitions/GenerationApplication" + } + }, + "branch": { + "type": "string" + }, + "completed": { + "type": "integer" + }, + "completed-by": { + "type": "string" + }, + "created": { + "type": "integer" + }, + "created-by": { + "type": "string" + }, + "generation-id": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "branch", + "created", + "created-by", + "applications" + ] + }, + "GenerationApplication": { + "type": "object", + "properties": { + "application": { + "type": "string" + }, + "config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "pending": { + "type": "array", + "items": { + "type": "string" + } + }, + "progress": { + "type": "string" + }, + "tracking": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "application", + "progress", + "config" + ] + }, + "GenerationId": { + "type": "object", + "properties": { + "generation-id": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "generation-id" + ] + }, + "GenerationResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "generation": { + "$ref": "#/definitions/Generation" + } + }, + "additionalProperties": false, + "required": [ + "generation" + ] + }, + "IntResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "result" + ] + } + } + } + }, + { + "Name": "ModelManager", + "Description": "ModelManagerAPI implements the model manager interface and is\nthe concrete implementation of the api end point.", + "Version": 9, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "controller-user" + ], + "Schema": { + "type": "object", + "properties": { + "ChangeModelCredential": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ChangeModelCredentialsParams" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "ChangeModelCredential changes cloud credential reference for models.\nThese new cloud credentials must already exist on the controller." + }, + "CreateModel": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ModelCreateArgs" + }, + "Result": { + "$ref": "#/definitions/ModelInfo" + } + }, + "description": "CreateModel creates a new model using the account and\nmodel config specified in the args." + }, + "DestroyModels": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/DestroyModelsParams" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "DestroyModels will try to destroy the specified models.\nIf there is a block on destruction, this method will return an error.\nFrom ModelManager v7 onwards, DestroyModels gains 'force' and 'max-wait' parameters." + }, + "DumpModels": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/DumpModelRequest" + }, + "Result": { + "$ref": "#/definitions/StringResults" + } + }, + "description": "DumpModels will export the models into the database agnostic\nrepresentation. The user needs to either be a controller admin, or have\nadmin privileges on the model itself." + }, + "DumpModelsDB": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/MapResults" + } + }, + "description": "DumpModelsDB will gather all documents from all model collections\nfor the specified model. The map result contains a map of collection\nnames to lists of documents represented as maps." + }, + "ListModelSummaries": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ModelSummariesRequest" + }, + "Result": { + "$ref": "#/definitions/ModelSummaryResults" + } + }, + "description": "ListModelSummaries returns models that the specified user\nhas access to in the current server. Controller admins (superuser)\ncan list models for any user. Other users\ncan only ask about their own models." + }, + "ListModels": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entity" + }, + "Result": { + "$ref": "#/definitions/UserModelList" + } + }, + "description": "ListModels returns the models that the specified user\nhas access to in the current server. Controller admins (superuser)\ncan list models for any user. Other users\ncan only ask about their own models." + }, + "ModelDefaultsForClouds": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ModelDefaultsResults" + } + }, + "description": "ModelDefaultsForClouds returns the default config values for the specified\nclouds." + }, + "ModelInfo": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ModelInfoResults" + } + }, + "description": "ModelInfo returns information about the specified models." + }, + "ModelStatus": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ModelStatusResults" + } + }, + "description": "ModelStatus returns a summary of the model." + }, + "ModifyModelAccess": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ModifyModelAccessRequest" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "ModifyModelAccess changes the model access granted to users." + }, + "SetModelDefaults": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/SetModelDefaults" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "SetModelDefaults writes new values for the specified default model settings." + }, + "UnsetModelDefaults": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/UnsetModelDefaults" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "UnsetModelDefaults removes the specified default model settings." + } + }, + "definitions": { + "ChangeModelCredentialParams": { + "type": "object", + "properties": { + "credential-tag": { + "type": "string" + }, + "model-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "model-tag", + "credential-tag" + ] + }, + "ChangeModelCredentialsParams": { + "type": "object", + "properties": { + "model-credentials": { + "type": "array", + "items": { + "$ref": "#/definitions/ChangeModelCredentialParams" + } + } + }, + "additionalProperties": false, + "required": [ + "model-credentials" + ] + }, + "DestroyModelParams": { + "type": "object", + "properties": { + "destroy-storage": { + "type": "boolean" + }, + "force": { + "type": "boolean" + }, + "max-wait": { + "type": "integer" + }, + "model-tag": { + "type": "string" + }, + "timeout": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "model-tag" + ] + }, + "DestroyModelsParams": { + "type": "object", + "properties": { + "models": { + "type": "array", + "items": { + "$ref": "#/definitions/DestroyModelParams" + } + } + }, + "additionalProperties": false, + "required": [ + "models" + ] + }, + "DumpModelRequest": { + "type": "object", + "properties": { + "entities": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } + }, + "simplified": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "entities", + "simplified" + ] + }, + "Entities": { + "type": "object", + "properties": { + "entities": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } + } + }, + "additionalProperties": false, + "required": [ + "entities" + ] + }, + "Entity": { + "type": "object", + "properties": { + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag" + ] + }, + "EntityStatus": { + "type": "object", + "properties": { + "data": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "info": { + "type": "string" + }, + "since": { + "type": "string", + "format": "date-time" + }, + "status": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "status", + "info", + "since" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ErrorResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "ErrorResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "MachineHardware": { + "type": "object", + "properties": { + "arch": { + "type": "string" + }, + "availability-zone": { + "type": "string" + }, + "cores": { + "type": "integer" + }, + "cpu-power": { + "type": "integer" + }, + "mem": { + "type": "integer" + }, + "root-disk": { + "type": "integer" + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "virt-type": { + "type": "string" + } + }, + "additionalProperties": false + }, + "MapResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + } + }, + "additionalProperties": false, + "required": [ + "result" + ] + }, + "MapResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/MapResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "Model": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "owner-tag": { + "type": "string" + }, + "type": { + "type": "string" + }, + "uuid": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "uuid", + "type", + "owner-tag" + ] + }, + "ModelApplicationInfo": { + "type": "object", + "properties": { + "name": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name" + ] + }, + "ModelCreateArgs": { + "type": "object", + "properties": { + "cloud-tag": { + "type": "string" + }, + "config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "credential": { + "type": "string" + }, + "name": { + "type": "string" + }, + "owner-tag": { + "type": "string" + }, + "region": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "owner-tag" + ] + }, + "ModelDefaultValues": { + "type": "object", + "properties": { + "cloud-region": { + "type": "string" + }, + "cloud-tag": { + "type": "string" + }, + "config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + } + }, + "additionalProperties": false, + "required": [ + "config" + ] + }, + "ModelDefaults": { + "type": "object", + "properties": { + "controller": { + "type": "object", + "additionalProperties": true + }, + "default": { + "type": "object", + "additionalProperties": true + }, + "regions": { + "type": "array", + "items": { + "$ref": "#/definitions/RegionDefaults" + } + } + }, + "additionalProperties": false + }, + "ModelDefaultsResult": { + "type": "object", + "properties": { + "config": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/ModelDefaults" + } + } + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false, + "required": [ + "config" + ] + }, + "ModelDefaultsResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ModelDefaultsResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "ModelEntityCount": { + "type": "object", + "properties": { + "count": { + "type": "integer" + }, + "entity": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "entity", + "count" + ] + }, + "ModelFilesystemInfo": { + "type": "object", + "properties": { + "detachable": { + "type": "boolean" + }, + "id": { + "type": "string" + }, + "message": { + "type": "string" + }, + "provider-id": { + "type": "string" + }, + "status": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "id" + ] + }, + "ModelInfo": { + "type": "object", + "properties": { + "agent-version": { + "$ref": "#/definitions/Number" + }, + "cloud-credential-tag": { + "type": "string" + }, + "cloud-credential-validity": { + "type": "boolean" + }, + "cloud-region": { + "type": "string" + }, + "cloud-tag": { + "type": "string" + }, + "controller-uuid": { + "type": "string" + }, + "default-base": { + "type": "string" + }, + "default-series": { + "type": "string" + }, + "is-controller": { + "type": "boolean" + }, + "life": { + "type": "string" + }, + "machines": { + "type": "array", + "items": { + "$ref": "#/definitions/ModelMachineInfo" + } + }, + "migration": { + "$ref": "#/definitions/ModelMigrationStatus" + }, + "name": { + "type": "string" + }, + "owner-tag": { + "type": "string" + }, + "provider-type": { + "type": "string" + }, + "secret-backends": { + "type": "array", + "items": { + "$ref": "#/definitions/SecretBackendResult" + } + }, + "sla": { + "$ref": "#/definitions/ModelSLAInfo" + }, + "status": { + "$ref": "#/definitions/EntityStatus" + }, + "supported-features": { + "type": "array", + "items": { + "$ref": "#/definitions/SupportedFeature" + } + }, + "type": { + "type": "string" + }, + "users": { + "type": "array", + "items": { + "$ref": "#/definitions/ModelUserInfo" + } + }, + "uuid": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "type", + "uuid", + "controller-uuid", + "is-controller", + "cloud-tag", + "owner-tag", + "life", + "users", + "machines", + "secret-backends", + "sla", + "agent-version" + ] + }, + "ModelInfoResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "$ref": "#/definitions/ModelInfo" + } + }, + "additionalProperties": false + }, + "ModelInfoResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ModelInfoResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "ModelMachineInfo": { + "type": "object", + "properties": { + "display-name": { + "type": "string" + }, + "ha-primary": { + "type": "boolean" + }, + "hardware": { + "$ref": "#/definitions/MachineHardware" + }, + "has-vote": { + "type": "boolean" + }, + "id": { + "type": "string" + }, + "instance-id": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "string" + }, + "wants-vote": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "id" + ] + }, + "ModelMigrationStatus": { + "type": "object", + "properties": { + "end": { + "type": "string", + "format": "date-time" + }, + "start": { + "type": "string", + "format": "date-time" + }, + "status": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "status", + "start" + ] + }, + "ModelSLAInfo": { + "type": "object", + "properties": { + "level": { + "type": "string" + }, + "owner": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "level", + "owner" + ] + }, + "ModelStatus": { + "type": "object", + "properties": { + "application-count": { + "type": "integer" + }, + "applications": { + "type": "array", + "items": { + "$ref": "#/definitions/ModelApplicationInfo" + } + }, + "error": { + "$ref": "#/definitions/Error" + }, + "filesystems": { + "type": "array", + "items": { + "$ref": "#/definitions/ModelFilesystemInfo" + } + }, + "hosted-machine-count": { + "type": "integer" + }, + "life": { + "type": "string" + }, + "machines": { + "type": "array", + "items": { + "$ref": "#/definitions/ModelMachineInfo" + } + }, + "model-tag": { + "type": "string" + }, + "owner-tag": { + "type": "string" + }, + "type": { + "type": "string" + }, + "unit-count": { + "type": "integer" + }, + "volumes": { + "type": "array", + "items": { + "$ref": "#/definitions/ModelVolumeInfo" + } + } + }, + "additionalProperties": false, + "required": [ + "model-tag", + "life", + "type", + "hosted-machine-count", + "application-count", + "unit-count", + "owner-tag" + ] + }, + "ModelStatusResults": { + "type": "object", + "properties": { + "models": { + "type": "array", + "items": { + "$ref": "#/definitions/ModelStatus" + } + } + }, + "additionalProperties": false, + "required": [ + "models" + ] + }, + "ModelSummariesRequest": { + "type": "object", + "properties": { + "all": { + "type": "boolean" + }, + "user-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "user-tag" + ] + }, + "ModelSummary": { + "type": "object", + "properties": { + "agent-version": { + "$ref": "#/definitions/Number" + }, + "cloud-credential-tag": { + "type": "string" + }, + "cloud-region": { + "type": "string" + }, + "cloud-tag": { + "type": "string" + }, + "controller-uuid": { + "type": "string" + }, + "counts": { + "type": "array", + "items": { + "$ref": "#/definitions/ModelEntityCount" + } + }, + "default-series": { + "type": "string" + }, + "is-controller": { + "type": "boolean" + }, + "last-connection": { + "type": "string", + "format": "date-time" + }, + "life": { + "type": "string" + }, + "migration": { + "$ref": "#/definitions/ModelMigrationStatus" + }, + "name": { + "type": "string" + }, + "owner-tag": { + "type": "string" + }, + "provider-type": { + "type": "string" + }, + "sla": { + "$ref": "#/definitions/ModelSLAInfo" + }, + "status": { + "$ref": "#/definitions/EntityStatus" + }, + "type": { + "type": "string" + }, + "user-access": { + "type": "string" + }, + "uuid": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "uuid", + "type", + "controller-uuid", + "is-controller", + "cloud-tag", + "owner-tag", + "life", + "user-access", + "last-connection", + "counts", + "sla", + "agent-version" + ] + }, + "ModelSummaryResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "$ref": "#/definitions/ModelSummary" + } + }, + "additionalProperties": false + }, + "ModelSummaryResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ModelSummaryResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "ModelUnsetKeys": { + "type": "object", + "properties": { + "cloud-region": { + "type": "string" + }, + "cloud-tag": { + "type": "string" + }, + "keys": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "keys" + ] + }, + "ModelUserInfo": { + "type": "object", + "properties": { + "access": { + "type": "string" + }, + "display-name": { + "type": "string" + }, + "last-connection": { + "type": "string", + "format": "date-time" + }, + "model-tag": { + "type": "string" + }, + "user": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "model-tag", + "user", + "display-name", + "last-connection", + "access" + ] + }, + "ModelVolumeInfo": { + "type": "object", + "properties": { + "detachable": { + "type": "boolean" + }, + "id": { + "type": "string" + }, + "message": { + "type": "string" + }, + "provider-id": { + "type": "string" + }, + "status": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "id" + ] + }, + "ModifyModelAccess": { + "type": "object", + "properties": { + "access": { + "type": "string" + }, + "action": { + "type": "string" + }, + "model-tag": { + "type": "string" + }, + "user-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "user-tag", + "action", + "access", + "model-tag" + ] + }, + "ModifyModelAccessRequest": { + "type": "object", + "properties": { + "changes": { + "type": "array", + "items": { + "$ref": "#/definitions/ModifyModelAccess" + } + } + }, + "additionalProperties": false, + "required": [ + "changes" + ] + }, + "Number": { + "type": "object", + "properties": { + "Build": { + "type": "integer" + }, + "Major": { + "type": "integer" + }, + "Minor": { + "type": "integer" + }, + "Patch": { + "type": "integer" + }, + "Tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "Major", + "Minor", + "Tag", + "Patch", + "Build" + ] + }, + "RegionDefaults": { + "type": "object", + "properties": { + "region-name": { + "type": "string" + }, + "value": { + "type": "object", + "additionalProperties": true + } + }, + "additionalProperties": false, + "required": [ + "region-name", + "value" + ] + }, + "SecretBackend": { + "type": "object", + "properties": { + "backend-type": { + "type": "string" + }, + "config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "name": { + "type": "string" + }, + "token-rotate-interval": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "name", + "backend-type", + "config" + ] + }, + "SecretBackendResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "id": { + "type": "string" + }, + "message": { + "type": "string" + }, + "num-secrets": { + "type": "integer" + }, + "result": { + "$ref": "#/definitions/SecretBackend" + }, + "status": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "result", + "id", + "num-secrets", + "status" + ] + }, + "SetModelDefaults": { + "type": "object", + "properties": { + "config": { + "type": "array", + "items": { + "$ref": "#/definitions/ModelDefaultValues" + } + } + }, + "additionalProperties": false, + "required": [ + "config" + ] + }, + "StringResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "result" + ] + }, + "StringResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/StringResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "SupportedFeature": { + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "name": { + "type": "string" + }, + "version": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "description" + ] + }, + "UnsetModelDefaults": { + "type": "object", + "properties": { + "keys": { + "type": "array", + "items": { + "$ref": "#/definitions/ModelUnsetKeys" + } + } + }, + "additionalProperties": false, + "required": [ + "keys" + ] + }, + "UserModel": { + "type": "object", + "properties": { + "last-connection": { + "type": "string", + "format": "date-time" + }, + "model": { + "$ref": "#/definitions/Model" + } + }, + "additionalProperties": false, + "required": [ + "model", + "last-connection" + ] + }, + "UserModelList": { + "type": "object", + "properties": { + "user-models": { + "type": "array", + "items": { + "$ref": "#/definitions/UserModel" + } + } + }, + "additionalProperties": false, + "required": [ + "user-models" + ] + } + } + } + }, + { + "Name": "ModelSummaryWatcher", + "Description": "SrvModelSummaryWatcher defines the API methods on a ModelSummaryWatcher.", + "Version": 1, + "AvailableTo": [ + "controller-user" + ], + "Schema": { + "type": "object", + "properties": { + "Next": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/SummaryWatcherNextResults" + } + }, + "description": "Next will return the current state of everything on the first call\nand subsequent calls will return just those model summaries that have\nchanged." + }, + "Stop": { + "type": "object", + "description": "Stop stops the watcher." + } + }, + "definitions": { + "ModelAbstract": { + "type": "object", + "properties": { + "admins": { + "type": "array", + "items": { + "type": "string" + } + }, + "annotations": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "cloud": { + "type": "string" + }, + "controller": { + "type": "string" + }, + "credential": { + "type": "string" + }, + "messages": { + "type": "array", + "items": { + "$ref": "#/definitions/ModelSummaryMessage" + } + }, + "name": { + "type": "string" + }, + "region": { + "type": "string" + }, + "removed": { + "type": "boolean" + }, + "size": { + "$ref": "#/definitions/ModelSummarySize" + }, + "status": { + "type": "string" + }, + "uuid": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uuid" + ] + }, + "ModelSummaryMessage": { + "type": "object", + "properties": { + "agent": { + "type": "string" + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "agent", + "message" + ] + }, + "ModelSummarySize": { + "type": "object", + "properties": { + "applications": { + "type": "integer" + }, + "containers": { + "type": "integer" + }, + "machines": { + "type": "integer" + }, + "relations": { + "type": "integer" + }, + "units": { + "type": "integer" + } + }, + "additionalProperties": false + }, + "SummaryWatcherNextResults": { + "type": "object", + "properties": { + "models": { + "type": "array", + "items": { + "$ref": "#/definitions/ModelAbstract" + } + } + }, + "additionalProperties": false, + "required": [ + "models" + ] + } + } + } + }, + { + "Name": "ModelUpgrader", + "Description": "ModelUpgraderAPI implements the model upgrader interface and is\nthe concrete implementation of the api end point.", + "Version": 1, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "controller-user" + ], + "Schema": { + "type": "object", + "properties": { + "AbortModelUpgrade": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ModelParam" + } + }, + "description": "AbortModelUpgrade aborts and archives the model upgrade\nsynchronisation record, if any." + }, + "UpgradeModel": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/UpgradeModelParams" + }, + "Result": { + "$ref": "#/definitions/UpgradeModelResult" + } + }, + "description": "UpgradeModel upgrades a model." + } + }, + "definitions": { + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ModelParam": { + "type": "object", + "properties": { + "model-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "model-tag" + ] + }, + "Number": { + "type": "object", + "properties": { + "Build": { + "type": "integer" + }, + "Major": { + "type": "integer" + }, + "Minor": { + "type": "integer" + }, + "Patch": { + "type": "integer" + }, + "Tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "Major", + "Minor", + "Tag", + "Patch", + "Build" + ] + }, + "UpgradeModelParams": { + "type": "object", + "properties": { + "agent-stream": { + "type": "string" + }, + "dry-run": { + "type": "boolean" + }, + "ignore-agent-versions": { + "type": "boolean" + }, + "model-tag": { + "type": "string" + }, + "target-version": { + "$ref": "#/definitions/Number" + } + }, + "additionalProperties": false, + "required": [ + "model-tag", + "target-version" + ] + }, + "UpgradeModelResult": { + "type": "object", + "properties": { + "chosen-version": { + "$ref": "#/definitions/Number" + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false, + "required": [ + "chosen-version" + ] + } + } + } + }, + { + "Name": "NotifyWatcher", + "Description": "srvNotifyWatcher defines the API access to methods on a NotifyWatcher.\nEach client has its own current set of watchers, stored in resources.", + "Version": 1, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "controller-user", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "Next": { + "type": "object", + "description": "Next returns when a change has occurred to the\nentity being watched since the most recent call to Next\nor the Watch call that created the NotifyWatcher." + }, + "Stop": { + "type": "object", + "description": "Stop stops the watcher." + } + } + } + }, + { + "Name": "OfferStatusWatcher", + "Description": "srvOfferStatusWatcher defines the API wrapping a crossmodelrelations.OfferStatusWatcher.", + "Version": 1, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "Next": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/OfferStatusWatchResult" + } + }, + "description": "Next returns when a change has occurred to an entity of the\ncollection being watched since the most recent call to Next\nor the Watch call that created the srvOfferStatusWatcher." + }, + "Stop": { + "type": "object", + "description": "Stop stops the watcher." + } + }, + "definitions": { + "EntityStatus": { + "type": "object", + "properties": { + "data": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "info": { + "type": "string" + }, + "since": { + "type": "string", + "format": "date-time" + }, + "status": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "status", + "info", + "since" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "OfferStatusChange": { + "type": "object", + "properties": { + "offer-name": { + "type": "string" + }, + "status": { + "$ref": "#/definitions/EntityStatus" + } + }, + "additionalProperties": false, + "required": [ + "offer-name", + "status" + ] + }, + "OfferStatusWatchResult": { + "type": "object", + "properties": { + "changes": { + "type": "array", + "items": { + "$ref": "#/definitions/OfferStatusChange" + } + }, + "error": { + "$ref": "#/definitions/Error" + }, + "watcher-id": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "watcher-id", + "changes" + ] + } + } + } + }, + { + "Name": "Payloads", + "Description": "API serves payload-specific API methods.", + "Version": 1, + "AvailableTo": [ + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "List": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/PayloadListArgs" + }, + "Result": { + "$ref": "#/definitions/PayloadListResults" + } + }, + "description": "List builds the list of payloads being tracked for\nthe given unit and IDs. If no IDs are provided then all tracked\npayloads for the unit are returned." + } + }, + "definitions": { + "Payload": { + "type": "object", + "properties": { + "class": { + "type": "string" + }, + "id": { + "type": "string" + }, + "labels": { + "type": "array", + "items": { + "type": "string" + } + }, + "machine": { + "type": "string" + }, + "status": { + "type": "string" + }, + "type": { + "type": "string" + }, + "unit": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "class", + "type", + "id", + "status", + "labels", + "unit", + "machine" + ] + }, + "PayloadListArgs": { + "type": "object", + "properties": { + "patterns": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "patterns" + ] + }, + "PayloadListResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/Payload" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + } + } + } + }, + { + "Name": "PayloadsHookContext", + "Description": "UnitFacade serves payload-specific API methods.", + "Version": 1, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "List": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/PayloadResults" + } + }, + "description": "List builds the list of payload being tracked for\nthe given unit and IDs. If no IDs are provided then all tracked\npayloads for the unit are returned." + }, + "LookUp": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/LookUpPayloadArgs" + }, + "Result": { + "$ref": "#/definitions/PayloadResults" + } + }, + "description": "LookUp identifies the payload with the provided name and raw ID." + }, + "SetStatus": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/SetPayloadStatusArgs" + }, + "Result": { + "$ref": "#/definitions/PayloadResults" + } + }, + "description": "SetStatus sets the raw status of a payload." + }, + "Track": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/TrackPayloadArgs" + }, + "Result": { + "$ref": "#/definitions/PayloadResults" + } + }, + "description": "Track stores a payload to be tracked in state." + }, + "Untrack": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/PayloadResults" + } + }, + "description": "Untrack marks the identified payload as no longer being tracked." + } + }, + "definitions": { + "Entities": { + "type": "object", + "properties": { + "entities": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } + } + }, + "additionalProperties": false, + "required": [ + "entities" + ] + }, + "Entity": { + "type": "object", + "properties": { + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "LookUpPayloadArg": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "id" + ] + }, + "LookUpPayloadArgs": { + "type": "object", + "properties": { + "args": { + "type": "array", + "items": { + "$ref": "#/definitions/LookUpPayloadArg" + } + } + }, + "additionalProperties": false, + "required": [ + "args" + ] + }, + "Payload": { + "type": "object", + "properties": { + "class": { + "type": "string" + }, + "id": { + "type": "string" + }, + "labels": { + "type": "array", + "items": { + "type": "string" + } + }, + "machine": { + "type": "string" + }, + "status": { + "type": "string" + }, + "type": { + "type": "string" + }, + "unit": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "class", + "type", + "id", + "status", + "labels", + "unit", + "machine" + ] + }, + "PayloadResult": { + "type": "object", + "properties": { + "Entity": { + "$ref": "#/definitions/Entity" + }, + "error": { + "$ref": "#/definitions/Error" + }, + "not-found": { + "type": "boolean" + }, + "payload": { + "$ref": "#/definitions/Payload" + }, + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag", + "Entity", + "payload", + "not-found" + ] + }, + "PayloadResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/PayloadResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "SetPayloadStatusArg": { + "type": "object", + "properties": { + "Entity": { + "$ref": "#/definitions/Entity" + }, + "status": { + "type": "string" + }, + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag", + "Entity", + "status" + ] + }, + "SetPayloadStatusArgs": { + "type": "object", + "properties": { + "args": { + "type": "array", + "items": { + "$ref": "#/definitions/SetPayloadStatusArg" + } + } + }, + "additionalProperties": false, + "required": [ + "args" + ] + }, + "TrackPayloadArgs": { + "type": "object", + "properties": { + "payloads": { + "type": "array", + "items": { + "$ref": "#/definitions/Payload" + } + } + }, + "additionalProperties": false, + "required": [ + "payloads" + ] + } + } + } + }, + { + "Name": "Pinger", + "Description": "pinger describes a resource that can be pinged and stopped.", + "Version": 1, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "controller-user", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "Ping": { + "type": "object" + }, + "Stop": { + "type": "object" + } + } + } + }, + { + "Name": "Provisioner", + "Description": "ProvisionerAPIV11 provides v10 of the provisioner facade.\nIt relies on agent-set origin when calling SetHostMachineNetworkConfig.", + "Version": 11, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent" + ], + "Schema": { + "type": "object", + "properties": { + "APIAddresses": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/StringsResult" + } + }, + "description": "APIAddresses returns the list of addresses used to connect to the API." + }, + "APIHostPorts": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/APIHostPortsResult" + } + }, + "description": "APIHostPorts returns the API server addresses." + }, + "AvailabilityZone": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/StringResults" + } + }, + "description": "AvailabilityZone returns a provider-specific availability zone for each given machine entity" + }, + "CACert": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/BytesResult" + } + }, + "description": "CACert returns the certificate used to validate the state connection." + }, + "Constraints": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ConstraintsResults" + } + }, + "description": "Constraints returns the constraints for each given machine entity." + }, + "ContainerConfig": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/ContainerConfig" + } + }, + "description": "ContainerConfig returns information from the model config that is\nneeded for container cloud-init." + }, + "ContainerManagerConfig": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ContainerManagerConfigParams" + }, + "Result": { + "$ref": "#/definitions/ContainerManagerConfig" + } + }, + "description": "ContainerManagerConfig returns information from the model config that is\nneeded for configuring the container manager." + }, + "ControllerAPIInfoForModels": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ControllerAPIInfoResults" + } + }, + "description": "ControllerAPIInfoForModels returns the controller api connection details for the specified models." + }, + "ControllerConfig": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/ControllerConfigResult" + } + }, + "description": "ControllerConfig returns the controller's configuration." + }, + "DistributionGroup": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/DistributionGroupResults" + } + }, + "description": "DistributionGroup returns, for each given machine entity,\na slice of instance.Ids that belong to the same distribution\ngroup as that machine. This information may be used to\ndistribute instances for high availability." + }, + "DistributionGroupByMachineId": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/StringsResults" + } + }, + "description": "DistributionGroupByMachineId returns, for each given machine entity,\na slice of machine.Ids that belong to the same distribution\ngroup as that machine. This information may be used to\ndistribute instances for high availability." + }, + "EnsureDead": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "EnsureDead calls EnsureDead on each given entity from state. It\nwill fail if the entity is not present. If it's Alive, nothing will\nhappen (see state/EnsureDead() for units or machines)." + }, + "FindTools": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/FindToolsParams" + }, + "Result": { + "$ref": "#/definitions/FindToolsResult" + } + }, + "description": "FindTools returns a List containing all tools matching the given parameters." + }, + "GetContainerInterfaceInfo": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/MachineNetworkConfigResults" + } + }, + "description": "GetContainerInterfaceInfo returns information to configure networking for a\ncontainer. It accepts container tags as arguments." + }, + "GetContainerProfileInfo": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ContainerProfileResults" + } + }, + "description": "GetContainerProfileInfo returns information to configure a lxd profile(s) for a\ncontainer based on the charms deployed to the container. It accepts container\ntags as arguments. Unlike machineLXDProfileNames which has the environ\nwrite the lxd profiles and returns the names of profiles already written." + }, + "HostChangesForContainers": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/HostNetworkChangeResults" + } + }, + "description": "HostChangesForContainers returns the set of changes that need to be done\nto the host machine to prepare it for the containers to be created.\nPass in a list of the containers that you want the changes for." + }, + "InstanceId": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/StringResults" + } + }, + "description": "InstanceId returns the provider specific instance id for each given\nmachine or an CodeNotProvisioned error, if not set." + }, + "InstanceStatus": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/StatusResults" + } + }, + "description": "InstanceStatus returns the instance status for each given entity.\nOnly machine tags are accepted." + }, + "KeepInstance": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/BoolResults" + } + }, + "description": "KeepInstance returns the keep-instance value for each given machine entity." + }, + "Life": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/LifeResults" + } + }, + "description": "Life returns the life status of every supplied entity, where available." + }, + "MachinesWithTransientErrors": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/StatusResults" + } + }, + "description": "MachinesWithTransientErrors returns status data for machines with provisioning\nerrors which are transient." + }, + "MarkMachinesForRemoval": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "MarkMachinesForRemoval indicates that the specified machines are\nready to have any provider-level resources cleaned up and then be\nremoved." + }, + "ModelConfig": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/ModelConfigResult" + } + }, + "description": "ModelConfig returns the current model's configuration." + }, + "ModelUUID": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/StringResult" + } + }, + "description": "ModelUUID returns the model UUID that the current connection is for." + }, + "PrepareContainerInterfaceInfo": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/MachineNetworkConfigResults" + } + }, + "description": "PrepareContainerInterfaceInfo allocates an address and returns information to\nconfigure networking for a container. It accepts container tags as arguments." + }, + "ProvisioningInfo": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ProvisioningInfoResults" + } + }, + "description": "ProvisioningInfo returns the provisioning information for each given machine entity.\nIt supports all positive space constraints." + }, + "ReleaseContainerAddresses": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "ReleaseContainerAddresses finds addresses allocated to a container and marks\nthem as Dead, to be released and removed. It accepts container tags as\narguments." + }, + "Remove": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "Remove removes every given entity from state, calling EnsureDead\nfirst, then Remove. It will fail if the entity is not present." + }, + "SetCharmProfiles": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/SetProfileArgs" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "SetCharmProfiles records the given slice of charm profile names." + }, + "SetHostMachineNetworkConfig": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/SetMachineNetworkConfig" + } + } + }, + "SetInstanceInfo": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/InstancesInfo" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "SetInstanceInfo sets the provider specific machine id, nonce,\nmetadata and network info for each given machine. Once set, the\ninstance id cannot be changed." + }, + "SetInstanceStatus": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/SetStatus" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "SetInstanceStatus updates the instance status for each given\nentity. Only machine tags are accepted." + }, + "SetModificationStatus": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/SetStatus" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "SetModificationStatus updates the instance whilst changes are occurring. This\nis different from SetStatus and SetInstanceStatus, by the fact this holds\ninformation about the ongoing changes that are happening to instances.\nConsider LXD Profile updates that can modify a instance, but may not cause\nthe instance to be placed into a error state. This modification status\nserves the purpose of highlighting that to the operator.\nOnly machine tags are accepted." + }, + "SetObservedNetworkConfig": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/SetMachineNetworkConfig" + } + }, + "description": "SetObservedNetworkConfig reads the network config for the machine\nidentified by the input args.\nThis config is merged with the new network config supplied in the\nsame args and updated if it has changed." + }, + "SetPasswords": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/EntityPasswords" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "SetPasswords sets the given password for each supplied entity, if possible." + }, + "SetStatus": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/SetStatus" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "SetStatus sets the status of each given entity." + }, + "SetSupportedContainers": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/MachineContainersParams" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "SetSupportedContainers updates the list of containers supported by the machines passed in args." + }, + "Status": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/StatusResults" + } + }, + "description": "Status returns the status of each given entity." + }, + "SupportedContainers": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/MachineContainerResults" + } + }, + "description": "SupportedContainers returns the list of containers supported by the machines passed in args." + }, + "Tools": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ToolsResults" + } + }, + "description": "Tools finds the tools necessary for the given agents." + }, + "WatchAPIHostPorts": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/NotifyWatchResult" + } + }, + "description": "WatchAPIHostPorts watches the API server addresses." + }, + "WatchAllContainers": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/WatchContainers" + }, + "Result": { + "$ref": "#/definitions/StringsWatchResults" + } + }, + "description": "WatchAllContainers starts a StringsWatcher to watch all containers deployed to\nany machine passed in args." + }, + "WatchContainers": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/WatchContainers" + }, + "Result": { + "$ref": "#/definitions/StringsWatchResults" + } + }, + "description": "WatchContainers starts a StringsWatcher to watch containers deployed to\nany machine passed in args." + }, + "WatchForModelConfigChanges": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/NotifyWatchResult" + } + }, + "description": "WatchForModelConfigChanges returns a NotifyWatcher that observes\nchanges to the model configuration.\nNote that although the NotifyWatchResult contains an Error field,\nit's not used because we are only returning a single watcher,\nso we use the regular error return." + }, + "WatchMachineErrorRetry": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/NotifyWatchResult" + } + }, + "description": "WatchMachineErrorRetry returns a NotifyWatcher that notifies when\nthe provisioner should retry provisioning machines with transient errors." + }, + "WatchModelMachineStartTimes": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/StringsWatchResult" + } + }, + "description": "WatchModelMachineStartTimes watches the non-container machines in the model\nfor changes to the Life or AgentStartTime fields and reports them as a batch." + }, + "WatchModelMachines": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/StringsWatchResult" + } + }, + "description": "WatchModelMachines returns a StringsWatcher that notifies of\nchanges to the life cycles of the top level machines in the current\nmodel." + } + }, + "definitions": { + "APIHostPortsResult": { + "type": "object", + "properties": { + "servers": { + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/definitions/HostPort" + } + } + } + }, + "additionalProperties": false, + "required": [ + "servers" + ] + }, + "Address": { + "type": "object", + "properties": { + "cidr": { + "type": "string" + }, + "config-type": { + "type": "string" + }, + "is-secondary": { + "type": "boolean" + }, + "scope": { + "type": "string" + }, + "space-id": { + "type": "string" + }, + "space-name": { + "type": "string" + }, + "type": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "value", + "type", + "scope" + ] + }, + "Base": { + "type": "object", + "properties": { + "channel": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "channel" + ] + }, + "Binary": { + "type": "object", + "properties": { + "Arch": { + "type": "string" + }, + "Build": { + "type": "integer" + }, + "Major": { + "type": "integer" + }, + "Minor": { + "type": "integer" + }, + "Number": { + "$ref": "#/definitions/Number" + }, + "Patch": { + "type": "integer" + }, + "Release": { + "type": "string" + }, + "Tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "Major", + "Minor", + "Tag", + "Patch", + "Build", + "Number", + "Release", + "Arch" + ] + }, + "BoolResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "result" + ] + }, + "BoolResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/BoolResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "BytesResult": { + "type": "object", + "properties": { + "result": { + "type": "array", + "items": { + "type": "integer" + } + } + }, + "additionalProperties": false, + "required": [ + "result" + ] + }, + "CharmLXDProfile": { + "type": "object", + "properties": { + "config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "description": { + "type": "string" + }, + "devices": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + } + } + } + }, + "additionalProperties": false, + "required": [ + "config", + "description", + "devices" + ] + }, + "CloudImageMetadata": { + "type": "object", + "properties": { + "arch": { + "type": "string" + }, + "image-id": { + "type": "string" + }, + "priority": { + "type": "integer" + }, + "region": { + "type": "string" + }, + "root-storage-size": { + "type": "integer" + }, + "root-storage-type": { + "type": "string" + }, + "source": { + "type": "string" + }, + "stream": { + "type": "string" + }, + "version": { + "type": "string" + }, + "virt-type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "image-id", + "region", + "version", + "arch", + "source", + "priority" + ] + }, + "ConstraintsResult": { + "type": "object", + "properties": { + "constraints": { + "$ref": "#/definitions/Value" + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false, + "required": [ + "constraints" + ] + }, + "ConstraintsResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ConstraintsResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "ContainerConfig": { + "type": "object", + "properties": { + "UpdateBehavior": { + "$ref": "#/definitions/UpdateBehavior" + }, + "apt-mirror": { + "type": "string" + }, + "apt-proxy": { + "$ref": "#/definitions/Settings" + }, + "authorized-keys": { + "type": "string" + }, + "cloudinit-userdata": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "container-inherit-properties": { + "type": "string" + }, + "juju-proxy": { + "$ref": "#/definitions/Settings" + }, + "legacy-proxy": { + "$ref": "#/definitions/Settings" + }, + "provider-type": { + "type": "string" + }, + "snap-proxy": { + "$ref": "#/definitions/Settings" + }, + "snap-store-assertions": { + "type": "string" + }, + "snap-store-proxy-id": { + "type": "string" + }, + "snap-store-proxy-url": { + "type": "string" + }, + "ssl-hostname-verification": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "provider-type", + "authorized-keys", + "ssl-hostname-verification", + "legacy-proxy", + "juju-proxy", + "apt-proxy", + "snap-proxy", + "snap-store-assertions", + "snap-store-proxy-id", + "snap-store-proxy-url", + "UpdateBehavior" + ] + }, + "ContainerLXDProfile": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "profile": { + "$ref": "#/definitions/CharmLXDProfile" + } + }, + "additionalProperties": false, + "required": [ + "profile", + "name" + ] + }, + "ContainerManagerConfig": { + "type": "object", + "properties": { + "config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + } + }, + "additionalProperties": false, + "required": [ + "config" + ] + }, + "ContainerManagerConfigParams": { + "type": "object", + "properties": { + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "type" + ] + }, + "ContainerProfileResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "lxd-profiles": { + "type": "array", + "items": { + "$ref": "#/definitions/ContainerLXDProfile" + } + } + }, + "additionalProperties": false + }, + "ContainerProfileResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ContainerProfileResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "ControllerAPIInfoResult": { + "type": "object", + "properties": { + "addresses": { + "type": "array", + "items": { + "type": "string" + } + }, + "cacert": { + "type": "string" + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false, + "required": [ + "addresses", + "cacert" + ] + }, + "ControllerAPIInfoResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ControllerAPIInfoResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "ControllerConfigResult": { + "type": "object", + "properties": { + "config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + } + }, + "additionalProperties": false, + "required": [ + "config" + ] + }, + "DeviceBridgeInfo": { + "type": "object", + "properties": { + "bridge-name": { + "type": "string" + }, + "host-device-name": { + "type": "string" + }, + "mac-address": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "host-device-name", + "bridge-name", + "mac-address" + ] + }, + "DistributionGroupResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "result" + ] + }, + "DistributionGroupResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/DistributionGroupResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "Entities": { + "type": "object", + "properties": { + "entities": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } + } + }, + "additionalProperties": false, + "required": [ + "entities" + ] + }, + "Entity": { + "type": "object", + "properties": { + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag" + ] + }, + "EntityPassword": { + "type": "object", + "properties": { + "password": { + "type": "string" + }, + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag", + "password" + ] + }, + "EntityPasswords": { + "type": "object", + "properties": { + "changes": { + "type": "array", + "items": { + "$ref": "#/definitions/EntityPassword" + } + } + }, + "additionalProperties": false, + "required": [ + "changes" + ] + }, + "EntityStatusArgs": { + "type": "object", + "properties": { + "data": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "info": { + "type": "string" + }, + "status": { + "type": "string" + }, + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag", + "status", + "info", + "data" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ErrorResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "ErrorResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "FindToolsParams": { + "type": "object", + "properties": { + "agentstream": { + "type": "string" + }, + "arch": { + "type": "string" + }, + "major": { + "type": "integer" + }, + "number": { + "$ref": "#/definitions/Number" + }, + "os-type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "number", + "major", + "arch", + "os-type", + "agentstream" + ] + }, + "FindToolsResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "list": { + "type": "array", + "items": { + "$ref": "#/definitions/Tools" + } + } + }, + "additionalProperties": false, + "required": [ + "list" + ] + }, + "HardwareCharacteristics": { + "type": "object", + "properties": { + "arch": { + "type": "string" + }, + "availability-zone": { + "type": "string" + }, + "cpu-cores": { + "type": "integer" + }, + "cpu-power": { + "type": "integer" + }, + "mem": { + "type": "integer" + }, + "root-disk": { + "type": "integer" + }, + "root-disk-source": { + "type": "string" + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "virt-type": { + "type": "string" + } + }, + "additionalProperties": false + }, + "HostNetworkChange": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "new-bridges": { + "type": "array", + "items": { + "$ref": "#/definitions/DeviceBridgeInfo" + } + }, + "reconfigure-delay": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "new-bridges", + "reconfigure-delay" + ] + }, + "HostNetworkChangeResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/HostNetworkChange" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "HostPort": { + "type": "object", + "properties": { + "Address": { + "$ref": "#/definitions/Address" + }, + "cidr": { + "type": "string" + }, + "config-type": { + "type": "string" + }, + "is-secondary": { + "type": "boolean" + }, + "port": { + "type": "integer" + }, + "scope": { + "type": "string" + }, + "space-id": { + "type": "string" + }, + "space-name": { + "type": "string" + }, + "type": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "value", + "type", + "scope", + "Address", + "port" + ] + }, + "InstanceInfo": { + "type": "object", + "properties": { + "characteristics": { + "$ref": "#/definitions/HardwareCharacteristics" + }, + "charm-profiles": { + "type": "array", + "items": { + "type": "string" + } + }, + "display-name": { + "type": "string" + }, + "instance-id": { + "type": "string" + }, + "network-config": { + "type": "array", + "items": { + "$ref": "#/definitions/NetworkConfig" + } + }, + "nonce": { + "type": "string" + }, + "tag": { + "type": "string" + }, + "volume-attachments": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/VolumeAttachmentInfo" + } + } + }, + "volumes": { + "type": "array", + "items": { + "$ref": "#/definitions/Volume" + } + } + }, + "additionalProperties": false, + "required": [ + "tag", + "instance-id", + "display-name", + "nonce", + "characteristics", + "volumes", + "volume-attachments", + "network-config", + "charm-profiles" + ] + }, + "InstancesInfo": { + "type": "object", + "properties": { + "machines": { + "type": "array", + "items": { + "$ref": "#/definitions/InstanceInfo" + } + } + }, + "additionalProperties": false, + "required": [ + "machines" + ] + }, + "LifeResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "life": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "life" + ] + }, + "LifeResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/LifeResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "MachineContainerResult": { + "type": "object", + "properties": { + "container-types": { + "type": "array", + "items": { + "type": "string" + } + }, + "determined": { + "type": "boolean" + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false, + "required": [ + "container-types", + "determined" + ] + }, + "MachineContainerResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/MachineContainerResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "MachineContainers": { + "type": "object", + "properties": { + "container-types": { + "type": "array", + "items": { + "type": "string" + } + }, + "machine-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "machine-tag", + "container-types" + ] + }, + "MachineContainersParams": { + "type": "object", + "properties": { + "params": { + "type": "array", + "items": { + "$ref": "#/definitions/MachineContainers" + } + } + }, + "additionalProperties": false, + "required": [ + "params" + ] + }, + "MachineNetworkConfigResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "info": { + "type": "array", + "items": { + "$ref": "#/definitions/NetworkConfig" + } + } + }, + "additionalProperties": false, + "required": [ + "info" + ] + }, + "MachineNetworkConfigResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/MachineNetworkConfigResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "ModelConfigResult": { + "type": "object", + "properties": { + "config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + } + }, + "additionalProperties": false, + "required": [ + "config" + ] + }, + "NetworkConfig": { + "type": "object", + "properties": { + "address": { + "type": "string" + }, + "addresses": { + "type": "array", + "items": { + "$ref": "#/definitions/Address" + } + }, + "cidr": { + "type": "string" + }, + "config-type": { + "type": "string" + }, + "device-index": { + "type": "integer" + }, + "disabled": { + "type": "boolean" + }, + "dns-search-domains": { + "type": "array", + "items": { + "type": "string" + } + }, + "dns-servers": { + "type": "array", + "items": { + "type": "string" + } + }, + "gateway-address": { + "type": "string" + }, + "interface-name": { + "type": "string" + }, + "interface-type": { + "type": "string" + }, + "is-default-gateway": { + "type": "boolean" + }, + "mac-address": { + "type": "string" + }, + "mtu": { + "type": "integer" + }, + "no-auto-start": { + "type": "boolean" + }, + "origin": { + "type": "string" + }, + "parent-interface-name": { + "type": "string" + }, + "provider-address-id": { + "type": "string" + }, + "provider-id": { + "type": "string" + }, + "provider-network-id": { + "type": "string" + }, + "provider-space-id": { + "type": "string" + }, + "provider-subnet-id": { + "type": "string" + }, + "provider-vlan-id": { + "type": "string" + }, + "routes": { + "type": "array", + "items": { + "$ref": "#/definitions/NetworkRoute" + } + }, + "shadow-addresses": { + "type": "array", + "items": { + "$ref": "#/definitions/Address" + } + }, + "virtual-port-type": { + "type": "string" + }, + "vlan-tag": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "device-index", + "mac-address", + "cidr", + "mtu", + "provider-id", + "provider-network-id", + "provider-subnet-id", + "provider-space-id", + "provider-address-id", + "provider-vlan-id", + "vlan-tag", + "interface-name", + "parent-interface-name", + "interface-type", + "disabled" + ] + }, + "NetworkRoute": { + "type": "object", + "properties": { + "destination-cidr": { + "type": "string" + }, + "gateway-ip": { + "type": "string" + }, + "metric": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "destination-cidr", + "gateway-ip", + "metric" + ] + }, + "NotifyWatchResult": { + "type": "object", + "properties": { + "NotifyWatcherId": { + "type": "string" + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false, + "required": [ + "NotifyWatcherId" + ] + }, + "Number": { + "type": "object", + "properties": { + "Build": { + "type": "integer" + }, + "Major": { + "type": "integer" + }, + "Minor": { + "type": "integer" + }, + "Patch": { + "type": "integer" + }, + "Tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "Major", + "Minor", + "Tag", + "Patch", + "Build" + ] + }, + "ProvisioningInfo": { + "type": "object", + "properties": { + "ProvisioningNetworkTopology": { + "$ref": "#/definitions/ProvisioningNetworkTopology" + }, + "base": { + "$ref": "#/definitions/Base" + }, + "charm-lxd-profiles": { + "type": "array", + "items": { + "type": "string" + } + }, + "cloudinit-userdata": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "constraints": { + "$ref": "#/definitions/Value" + }, + "controller-config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "endpoint-bindings": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "image-metadata": { + "type": "array", + "items": { + "$ref": "#/definitions/CloudImageMetadata" + } + }, + "jobs": { + "type": "array", + "items": { + "type": "string" + } + }, + "placement": { + "type": "string" + }, + "root-disk": { + "$ref": "#/definitions/VolumeParams" + }, + "space-subnets": { + "type": "object", + "patternProperties": { + ".*": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "subnet-zones": { + "type": "object", + "patternProperties": { + ".*": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "tags": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "volume-attachments": { + "type": "array", + "items": { + "$ref": "#/definitions/VolumeAttachmentParams" + } + }, + "volumes": { + "type": "array", + "items": { + "$ref": "#/definitions/VolumeParams" + } + } + }, + "additionalProperties": false, + "required": [ + "constraints", + "base", + "placement", + "jobs", + "subnet-zones", + "space-subnets", + "ProvisioningNetworkTopology" + ] + }, + "ProvisioningInfoResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "$ref": "#/definitions/ProvisioningInfo" + } + }, + "additionalProperties": false, + "required": [ + "result" + ] + }, + "ProvisioningInfoResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ProvisioningInfoResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "ProvisioningNetworkTopology": { + "type": "object", + "properties": { + "space-subnets": { + "type": "object", + "patternProperties": { + ".*": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "subnet-zones": { + "type": "object", + "patternProperties": { + ".*": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + }, + "additionalProperties": false, + "required": [ + "subnet-zones", + "space-subnets" + ] + }, + "SetMachineNetworkConfig": { + "type": "object", + "properties": { + "config": { + "type": "array", + "items": { + "$ref": "#/definitions/NetworkConfig" + } + }, + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag", + "config" + ] + }, + "SetProfileArg": { + "type": "object", + "properties": { + "entity": { + "$ref": "#/definitions/Entity" + }, + "profiles": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "entity", + "profiles" + ] + }, + "SetProfileArgs": { + "type": "object", + "properties": { + "args": { + "type": "array", + "items": { + "$ref": "#/definitions/SetProfileArg" + } + } + }, + "additionalProperties": false, + "required": [ + "args" + ] + }, + "SetStatus": { + "type": "object", + "properties": { + "entities": { + "type": "array", + "items": { + "$ref": "#/definitions/EntityStatusArgs" + } + } + }, + "additionalProperties": false, + "required": [ + "entities" + ] + }, + "Settings": { + "type": "object", + "properties": { + "AutoNoProxy": { + "type": "string" + }, + "Ftp": { + "type": "string" + }, + "Http": { + "type": "string" + }, + "Https": { + "type": "string" + }, + "NoProxy": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "Http", + "Https", + "Ftp", + "NoProxy", + "AutoNoProxy" + ] + }, + "StatusResult": { + "type": "object", + "properties": { + "data": { + "type": "object", + "patternProperties": { ".*": { "type": "object", "additionalProperties": true } } }, - "base": { - "$ref": "#/definitions/Base" + "error": { + "$ref": "#/definitions/Error" + }, + "id": { + "type": "string" + }, + "info": { + "type": "string" + }, + "life": { + "type": "string" + }, + "since": { + "type": "string", + "format": "date-time" + }, + "status": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "id", + "life", + "status", + "info", + "data", + "since" + ] + }, + "StatusResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/StatusResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "StringResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "result" + ] + }, + "StringResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/StringResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "StringsResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "StringsResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/StringsResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "StringsWatchResult": { + "type": "object", + "properties": { + "changes": { + "type": "array", + "items": { + "type": "string" + } + }, + "error": { + "$ref": "#/definitions/Error" + }, + "watcher-id": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "watcher-id" + ] + }, + "StringsWatchResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/StringsWatchResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "Tools": { + "type": "object", + "properties": { + "sha256": { + "type": "string" + }, + "size": { + "type": "integer" + }, + "url": { + "type": "string" + }, + "version": { + "$ref": "#/definitions/Binary" + } + }, + "additionalProperties": false, + "required": [ + "version", + "url", + "size" + ] + }, + "ToolsResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "tools": { + "type": "array", + "items": { + "$ref": "#/definitions/Tools" + } + } + }, + "additionalProperties": false, + "required": [ + "tools" + ] + }, + "ToolsResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ToolsResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "UpdateBehavior": { + "type": "object", + "properties": { + "enable-os-refresh-update": { + "type": "boolean" + }, + "enable-os-upgrade": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "enable-os-refresh-update", + "enable-os-upgrade" + ] + }, + "Value": { + "type": "object", + "properties": { + "allocate-public-ip": { + "type": "boolean" + }, + "arch": { + "type": "string" + }, + "container": { + "type": "string" + }, + "cores": { + "type": "integer" + }, + "cpu-power": { + "type": "integer" }, - "channel": { + "instance-role": { "type": "string" }, - "charm": { + "instance-type": { "type": "string" }, - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } + "mem": { + "type": "integer" + }, + "root-disk": { + "type": "integer" + }, + "root-disk-source": { + "type": "string" + }, + "spaces": { + "type": "array", + "items": { + "type": "string" } }, - "constraints": { - "$ref": "#/definitions/Value" + "tags": { + "type": "array", + "items": { + "type": "string" + } }, - "endpoint-bindings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } + "virt-type": { + "type": "string" + }, + "zones": { + "type": "array", + "items": { + "type": "string" } } }, + "additionalProperties": false + }, + "Volume": { + "type": "object", + "properties": { + "info": { + "$ref": "#/definitions/VolumeInfo" + }, + "volume-tag": { + "type": "string" + } + }, "additionalProperties": false, "required": [ - "application", - "charm", - "config", - "constraints", - "base", - "channel" + "volume-tag", + "info" ] }, - "ApplicationInfoResult": { + "VolumeAttachmentInfo": { "type": "object", "properties": { - "error": { - "$ref": "#/definitions/Error" + "bus-address": { + "type": "string" }, - "result": { - "$ref": "#/definitions/ApplicationResult" + "device-link": { + "type": "string" + }, + "device-name": { + "type": "string" + }, + "plan-info": { + "$ref": "#/definitions/VolumeAttachmentPlanInfo" + }, + "read-only": { + "type": "boolean" } }, "additionalProperties": false }, - "ApplicationInfoResults": { + "VolumeAttachmentParams": { "type": "object", "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ApplicationInfoResult" - } + "instance-id": { + "type": "string" + }, + "machine-tag": { + "type": "string" + }, + "provider": { + "type": "string" + }, + "read-only": { + "type": "boolean" + }, + "volume-id": { + "type": "string" + }, + "volume-tag": { + "type": "string" } }, "additionalProperties": false, "required": [ - "results" + "volume-tag", + "machine-tag", + "provider" ] }, - "ApplicationMergeBindings": { + "VolumeAttachmentPlanInfo": { "type": "object", "properties": { - "application-tag": { - "type": "string" - }, - "bindings": { + "device-attributes": { "type": "object", "patternProperties": { ".*": { @@ -1899,812 +36331,907 @@ } } }, - "force": { + "device-type": { + "type": "string" + } + }, + "additionalProperties": false + }, + "VolumeInfo": { + "type": "object", + "properties": { + "hardware-id": { + "type": "string" + }, + "persistent": { "type": "boolean" + }, + "pool": { + "type": "string" + }, + "size": { + "type": "integer" + }, + "volume-id": { + "type": "string" + }, + "wwn": { + "type": "string" } }, "additionalProperties": false, "required": [ - "application-tag", - "bindings", - "force" + "volume-id", + "size", + "persistent" ] }, - "ApplicationMergeBindingsArgs": { + "VolumeParams": { "type": "object", "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/ApplicationMergeBindings" + "attachment": { + "$ref": "#/definitions/VolumeAttachmentParams" + }, + "attributes": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "provider": { + "type": "string" + }, + "size": { + "type": "integer" + }, + "tags": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } } + }, + "volume-tag": { + "type": "string" } }, "additionalProperties": false, "required": [ - "args" + "volume-tag", + "size", + "provider" ] }, - "ApplicationMetricCredential": { + "WatchContainer": { "type": "object", "properties": { - "application": { + "container-type": { "type": "string" }, - "metrics-credentials": { + "machine-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "machine-tag", + "container-type" + ] + }, + "WatchContainers": { + "type": "object", + "properties": { + "params": { "type": "array", "items": { - "type": "integer" + "$ref": "#/definitions/WatchContainer" } } }, "additionalProperties": false, "required": [ - "application", - "metrics-credentials" + "params" ] + } + } + } + }, + { + "Name": "ProxyUpdater", + "Description": "API provides the ProxyUpdater version 2 facade.", + "Version": 2, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "ProxyConfig": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ProxyConfigResults" + } + }, + "description": "ProxyConfig returns the proxy settings for the current model." }, - "ApplicationMetricCredentials": { + "WatchForProxyConfigAndAPIHostPortChanges": { "type": "object", "properties": { - "creds": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/NotifyWatchResults" + } + }, + "description": "WatchForProxyConfigAndAPIHostPortChanges watches for changes to the proxy and api host port settings." + } + }, + "definitions": { + "Entities": { + "type": "object", + "properties": { + "entities": { "type": "array", "items": { - "$ref": "#/definitions/ApplicationMetricCredential" + "$ref": "#/definitions/Entity" } } }, "additionalProperties": false, "required": [ - "creds" + "entities" ] }, - "ApplicationOfferDetails": { + "Entity": { + "type": "object", + "properties": { + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag" + ] + }, + "Error": { "type": "object", "properties": { - "application-description": { + "code": { "type": "string" }, - "bindings": { + "info": { "type": "object", "patternProperties": { ".*": { - "type": "string" + "type": "object", + "additionalProperties": true } } }, - "endpoints": { - "type": "array", - "items": { - "$ref": "#/definitions/RemoteEndpoint" - } - }, - "offer-name": { - "type": "string" - }, - "offer-url": { - "type": "string" - }, - "offer-uuid": { + "message": { "type": "string" - }, - "source-model-tag": { + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "NotifyWatchResult": { + "type": "object", + "properties": { + "NotifyWatcherId": { "type": "string" }, - "spaces": { - "type": "array", - "items": { - "$ref": "#/definitions/RemoteSpace" - } - }, - "users": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false, + "required": [ + "NotifyWatcherId" + ] + }, + "NotifyWatchResults": { + "type": "object", + "properties": { + "results": { "type": "array", "items": { - "$ref": "#/definitions/OfferUserDetails" + "$ref": "#/definitions/NotifyWatchResult" } } }, "additionalProperties": false, "required": [ - "source-model-tag", - "offer-uuid", - "offer-url", - "offer-name", - "application-description" + "results" ] }, - "ApplicationResult": { + "ProxyConfig": { "type": "object", "properties": { - "base": { - "$ref": "#/definitions/Base" - }, - "channel": { + "ftp": { "type": "string" }, - "charm": { + "http": { "type": "string" }, - "constraints": { - "$ref": "#/definitions/Value" - }, - "endpoint-bindings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "exposed": { - "type": "boolean" - }, - "exposed-endpoints": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/ExposedEndpoint" - } - } - }, - "life": { + "https": { "type": "string" }, - "principal": { - "type": "boolean" - }, - "remote": { - "type": "boolean" - }, - "tag": { + "no-proxy": { "type": "string" } }, "additionalProperties": false, "required": [ - "tag", - "principal", - "exposed", - "remote", - "life" + "http", + "https", + "ftp", + "no-proxy" ] }, - "ApplicationSetCharm": { + "ProxyConfigResult": { "type": "object", "properties": { - "application": { - "type": "string" - }, - "channel": { - "type": "string" - }, - "charm-origin": { - "$ref": "#/definitions/CharmOrigin" - }, - "charm-url": { + "apt-mirror": { "type": "string" }, - "config-settings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "config-settings-yaml": { - "type": "string" + "apt-proxy-settings": { + "$ref": "#/definitions/ProxyConfig" }, - "endpoint-bindings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } + "error": { + "$ref": "#/definitions/Error" }, - "force": { - "type": "boolean" + "juju-proxy-settings": { + "$ref": "#/definitions/ProxyConfig" }, - "force-base": { - "type": "boolean" + "legacy-proxy-settings": { + "$ref": "#/definitions/ProxyConfig" }, - "force-units": { - "type": "boolean" + "snap-proxy-settings": { + "$ref": "#/definitions/ProxyConfig" }, - "generation": { + "snap-store-assertions": { "type": "string" }, - "resource-ids": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } + "snap-store-id": { + "type": "string" }, - "storage-constraints": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/StorageConstraints" - } - } + "snap-store-proxy-url": { + "type": "string" } }, "additionalProperties": false, "required": [ - "application", - "generation", - "charm-url", - "channel", - "force", - "force-units", - "force-base" + "legacy-proxy-settings", + "juju-proxy-settings" ] }, - "ApplicationUnexpose": { + "ProxyConfigResults": { "type": "object", "properties": { - "application": { - "type": "string" - }, - "exposed-endpoints": { + "results": { "type": "array", "items": { - "type": "string" + "$ref": "#/definitions/ProxyConfigResult" } } }, "additionalProperties": false, "required": [ - "application", - "exposed-endpoints" + "results" ] - }, - "ApplicationUnset": { + } + } + } + }, + { + "Name": "RaftLease", + "Description": "", + "Version": 2, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "ApplyLease": { "type": "object", "properties": { - "application": { - "type": "string" + "Params": { + "$ref": "#/definitions/LeaseOperationsV2" }, - "branch": { + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "ApplyLease is a bulk API to allow applying lease operations to a raft\ncontext. If the current controller is not the leader, then a NotLeaderError\nis returned. Information about where they can locate the leader maybe\nsupplied in the error message, but isn't guaranteed.\nIf no information is supplied, it is expected that the client performs their\nown algorithm to locate the leader (roundrobin or listen to the apidetails\ntopic)." + } + }, + "definitions": { + "Error": { + "type": "object", + "properties": { + "code": { "type": "string" }, - "options": { - "type": "array", - "items": { - "type": "string" + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } } + }, + "message": { + "type": "string" } }, "additionalProperties": false, "required": [ - "application", - "branch", - "options" + "message", + "code" ] }, - "ApplicationsDeploy": { + "ErrorResult": { "type": "object", "properties": { - "applications": { - "type": "array", - "items": { - "$ref": "#/definitions/ApplicationDeploy" - } + "error": { + "$ref": "#/definitions/Error" } }, - "additionalProperties": false, - "required": [ - "applications" - ] + "additionalProperties": false }, - "Base": { + "ErrorResults": { "type": "object", "properties": { - "channel": { - "type": "string" - }, - "name": { - "type": "string" + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResult" + } } }, "additionalProperties": false, - "required": [ - "name", - "channel" + "required": [ + "results" ] }, - "CharmOrigin": { + "LeaseOperationCommand": { "type": "object", "properties": { - "architecture": { - "type": "string" - }, - "base": { - "$ref": "#/definitions/Base" + "duration": { + "type": "integer" }, - "branch": { + "holder": { "type": "string" }, - "hash": { + "lease": { "type": "string" }, - "id": { + "model-uuid": { "type": "string" }, - "instance-key": { + "namespace": { "type": "string" }, - "revision": { - "type": "integer" + "new-time": { + "type": "string", + "format": "date-time" }, - "risk": { - "type": "string" + "old-time": { + "type": "string", + "format": "date-time" }, - "source": { + "operation": { "type": "string" }, - "track": { + "pin-entity": { "type": "string" }, - "type": { - "type": "string" + "version": { + "type": "integer" } }, "additionalProperties": false, "required": [ - "source", - "type", - "id" + "version", + "operation" ] }, - "CharmRelation": { + "LeaseOperationsV2": { "type": "object", "properties": { - "interface": { - "type": "string" - }, - "limit": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "optional": { - "type": "boolean" - }, - "role": { - "type": "string" - }, - "scope": { - "type": "string" + "commands": { + "type": "array", + "items": { + "$ref": "#/definitions/LeaseOperationCommand" + } } }, "additionalProperties": false, "required": [ - "name", - "role", - "interface", - "optional", - "limit", - "scope" + "commands" ] - }, - "CharmURLOriginResult": { + } + } + } + }, + { + "Name": "Reboot", + "Description": "RebootAPI provides access to the Upgrader API facade.", + "Version": 2, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent" + ], + "Schema": { + "type": "object", + "properties": { + "ClearReboot": { "type": "object", "properties": { - "charm-origin": { - "$ref": "#/definitions/CharmOrigin" - }, - "error": { - "$ref": "#/definitions/Error" + "Params": { + "$ref": "#/definitions/Entities" }, - "url": { - "type": "string" + "Result": { + "$ref": "#/definitions/ErrorResults" } }, - "additionalProperties": false, - "required": [ - "url", - "charm-origin" - ] + "description": "ClearReboot will clear the reboot flag on provided machines, if it exists." }, - "ConfigResult": { + "GetRebootAction": { "type": "object", "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } + "Params": { + "$ref": "#/definitions/Entities" }, - "error": { - "$ref": "#/definitions/Error" + "Result": { + "$ref": "#/definitions/RebootActionResults" } }, - "additionalProperties": false, - "required": [ - "config" - ] + "description": "GetRebootAction returns the action a machine agent should take.\nIf a reboot flag is set on the machine, then that machine is\nexpected to reboot (params.ShouldReboot).\na reboot flag set on the machine parent or grandparent, will\ncause the machine to shutdown (params.ShouldShutdown).\nIf no reboot flag is set, the machine should do nothing (params.ShouldDoNothing)." }, - "ConfigSet": { + "RequestReboot": { "type": "object", "properties": { - "application": { - "type": "string" - }, - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "config-yaml": { - "type": "string" + "Params": { + "$ref": "#/definitions/Entities" }, - "generation": { - "type": "string" + "Result": { + "$ref": "#/definitions/ErrorResults" } }, - "additionalProperties": false, - "required": [ - "application", - "generation", - "config", - "config-yaml" - ] + "description": "RequestReboot sets the reboot flag on the provided machines" }, - "ConfigSetArgs": { + "WatchForRebootEvent": { "type": "object", "properties": { - "Args": { + "Result": { + "$ref": "#/definitions/NotifyWatchResult" + } + }, + "description": "WatchForRebootEvent starts a watcher to track if there is a new\nreboot request on the machines ID or any of its parents (in case we are a container)." + } + }, + "definitions": { + "Entities": { + "type": "object", + "properties": { + "entities": { "type": "array", "items": { - "$ref": "#/definitions/ConfigSet" + "$ref": "#/definitions/Entity" } } }, "additionalProperties": false, "required": [ - "Args" + "entities" ] }, - "Constraints": { + "Entity": { "type": "object", "properties": { - "Count": { - "type": "integer" - }, - "Pool": { + "tag": { "type": "string" - }, - "Size": { - "type": "integer" } }, "additionalProperties": false, "required": [ - "Pool", - "Size", - "Count" + "tag" ] }, - "ConsumeApplicationArg": { + "Error": { "type": "object", "properties": { - "ApplicationOfferDetails": { - "$ref": "#/definitions/ApplicationOfferDetails" - }, - "application-alias": { - "type": "string" - }, - "application-description": { + "code": { "type": "string" }, - "bindings": { + "info": { "type": "object", "patternProperties": { ".*": { - "type": "string" + "type": "object", + "additionalProperties": true } } }, - "endpoints": { - "type": "array", - "items": { - "$ref": "#/definitions/RemoteEndpoint" - } - }, - "external-controller": { - "$ref": "#/definitions/ExternalControllerInfo" - }, - "macaroon": { - "$ref": "#/definitions/Macaroon" - }, - "offer-name": { - "type": "string" - }, - "offer-url": { - "type": "string" - }, - "offer-uuid": { - "type": "string" - }, - "source-model-tag": { + "message": { "type": "string" - }, - "spaces": { - "type": "array", - "items": { - "$ref": "#/definitions/RemoteSpace" - } - }, - "users": { - "type": "array", - "items": { - "$ref": "#/definitions/OfferUserDetails" - } } }, "additionalProperties": false, "required": [ - "source-model-tag", - "offer-uuid", - "offer-url", - "offer-name", - "application-description", - "ApplicationOfferDetails" + "message", + "code" ] }, - "ConsumeApplicationArgs": { + "ErrorResult": { "type": "object", "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/ConsumeApplicationArg" - } + "error": { + "$ref": "#/definitions/Error" } }, "additionalProperties": false }, - "DestroyApplicationInfo": { + "ErrorResults": { "type": "object", "properties": { - "destroyed-storage": { - "type": "array", - "items": { - "$ref": "#/definitions/Entity" - } - }, - "destroyed-units": { - "type": "array", - "items": { - "$ref": "#/definitions/Entity" - } - }, - "detached-storage": { + "results": { "type": "array", "items": { - "$ref": "#/definitions/Entity" + "$ref": "#/definitions/ErrorResult" } } }, - "additionalProperties": false + "additionalProperties": false, + "required": [ + "results" + ] }, - "DestroyApplicationParams": { + "NotifyWatchResult": { "type": "object", "properties": { - "application-tag": { + "NotifyWatcherId": { "type": "string" }, - "destroy-storage": { - "type": "boolean" - }, - "dry-run": { - "type": "boolean" - }, - "force": { - "type": "boolean" - }, - "max-wait": { - "type": "integer" + "error": { + "$ref": "#/definitions/Error" } }, "additionalProperties": false, "required": [ - "application-tag", - "force" + "NotifyWatcherId" ] }, - "DestroyApplicationResult": { + "RebootActionResult": { "type": "object", "properties": { "error": { "$ref": "#/definitions/Error" }, - "info": { - "$ref": "#/definitions/DestroyApplicationInfo" + "result": { + "type": "string" } }, "additionalProperties": false }, - "DestroyApplicationResults": { + "RebootActionResults": { "type": "object", "properties": { "results": { "type": "array", "items": { - "$ref": "#/definitions/DestroyApplicationResult" + "$ref": "#/definitions/RebootActionResult" } } }, "additionalProperties": false + } + } + } + }, + { + "Name": "RelationStatusWatcher", + "Description": "srvRelationStatusWatcher defines the API wrapping a state.RelationStatusWatcher.", + "Version": 1, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "Next": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/RelationLifeSuspendedStatusWatchResult" + } + }, + "description": "Next returns when a change has occurred to an entity of the\ncollection being watched since the most recent call to Next\nor the Watch call that created the srvRelationStatusWatcher." }, - "DestroyApplicationsParams": { + "Stop": { + "type": "object", + "description": "Stop stops the watcher." + } + }, + "definitions": { + "Error": { "type": "object", "properties": { - "applications": { - "type": "array", - "items": { - "$ref": "#/definitions/DestroyApplicationParams" + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } } + }, + "message": { + "type": "string" } }, "additionalProperties": false, "required": [ - "applications" + "message", + "code" ] }, - "DestroyConsumedApplicationParams": { + "RelationLifeSuspendedStatusChange": { "type": "object", "properties": { - "application-tag": { + "key": { "type": "string" }, - "force": { + "life": { + "type": "string" + }, + "suspended": { "type": "boolean" }, - "max-wait": { - "type": "integer" + "suspended-reason": { + "type": "string" } }, "additionalProperties": false, "required": [ - "application-tag" + "key", + "life", + "suspended", + "suspended-reason" ] }, - "DestroyConsumedApplicationsParams": { + "RelationLifeSuspendedStatusWatchResult": { "type": "object", "properties": { - "applications": { + "changes": { "type": "array", "items": { - "$ref": "#/definitions/DestroyConsumedApplicationParams" + "$ref": "#/definitions/RelationLifeSuspendedStatusChange" } + }, + "error": { + "$ref": "#/definitions/Error" + }, + "watcher-id": { + "type": "string" } }, "additionalProperties": false, "required": [ - "applications" + "watcher-id", + "changes" ] + } + } + } + }, + { + "Name": "RelationUnitsWatcher", + "Description": "srvRelationUnitsWatcher defines the API wrapping a state.RelationUnitsWatcher.\nIt notifies about units entering and leaving the scope of a RelationUnit,\nand changes to the settings of those units known to have entered.", + "Version": 1, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "Next": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/RelationUnitsWatchResult" + } + }, + "description": "Next returns when a change has occurred to an entity of the\ncollection being watched since the most recent call to Next\nor the Watch call that created the srvRelationUnitsWatcher." }, - "DestroyRelation": { + "Stop": { + "type": "object", + "description": "Stop stops the watcher." + } + }, + "definitions": { + "Error": { "type": "object", "properties": { - "endpoints": { - "type": "array", - "items": { - "type": "string" - } - }, - "force": { - "type": "boolean" + "code": { + "type": "string" }, - "max-wait": { - "type": "integer" + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } }, - "relation-id": { - "type": "integer" + "message": { + "type": "string" } }, "additionalProperties": false, "required": [ - "relation-id" + "message", + "code" ] }, - "DestroyUnitInfo": { + "RelationUnitsChange": { "type": "object", "properties": { - "destroyed-storage": { - "type": "array", - "items": { - "$ref": "#/definitions/Entity" + "app-changed": { + "type": "object", + "patternProperties": { + ".*": { + "type": "integer" + } } }, - "detached-storage": { + "changed": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/UnitSettings" + } + } + }, + "departed": { "type": "array", "items": { - "$ref": "#/definitions/Entity" + "type": "string" } } }, - "additionalProperties": false + "additionalProperties": false, + "required": [ + "changed" + ] }, - "DestroyUnitParams": { + "RelationUnitsWatchResult": { "type": "object", "properties": { - "destroy-storage": { - "type": "boolean" - }, - "dry-run": { - "type": "boolean" - }, - "force": { - "type": "boolean" + "changes": { + "$ref": "#/definitions/RelationUnitsChange" }, - "max-wait": { - "type": "integer" + "error": { + "$ref": "#/definitions/Error" }, - "unit-tag": { + "watcher-id": { "type": "string" } }, "additionalProperties": false, "required": [ - "unit-tag" + "watcher-id", + "changes" ] }, - "DestroyUnitResult": { + "UnitSettings": { "type": "object", "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "info": { - "$ref": "#/definitions/DestroyUnitInfo" + "version": { + "type": "integer" } }, - "additionalProperties": false - }, - "DestroyUnitResults": { + "additionalProperties": false, + "required": [ + "version" + ] + } + } + } + }, + { + "Name": "RemoteRelationWatcher", + "Description": "srvRemoteRelationWatcher defines the API wrapping a\nstate.RelationUnitsWatcher but serving the events it emits as\nfully-expanded params.RemoteRelationChangeEvents so they can be\nused across model/controller boundaries.", + "Version": 1, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "Next": { "type": "object", "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/DestroyUnitResult" - } + "Result": { + "$ref": "#/definitions/RemoteRelationWatchResult" } - }, - "additionalProperties": false + } }, - "DestroyUnitsParams": { + "Stop": { + "type": "object", + "description": "Stop stops the watcher." + } + }, + "definitions": { + "Error": { "type": "object", "properties": { - "units": { - "type": "array", - "items": { - "$ref": "#/definitions/DestroyUnitParams" + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } } + }, + "message": { + "type": "string" } }, "additionalProperties": false, "required": [ - "units" + "message", + "code" ] }, - "EndpointRelationData": { + "Macaroon": { + "type": "object", + "additionalProperties": false + }, + "RemoteRelationChangeEvent": { "type": "object", "properties": { - "ApplicationData": { + "application-settings": { "type": "object", "patternProperties": { ".*": { @@ -2713,289 +37240,339 @@ } } }, - "cross-model": { + "application-token": { + "type": "string" + }, + "bakery-version": { + "type": "integer" + }, + "changed-units": { + "type": "array", + "items": { + "$ref": "#/definitions/RemoteRelationUnitChange" + } + }, + "departed-units": { + "type": "array", + "items": { + "type": "integer" + } + }, + "force-cleanup": { "type": "boolean" }, - "endpoint": { + "life": { "type": "string" }, - "related-endpoint": { + "macaroons": { + "type": "array", + "items": { + "$ref": "#/definitions/Macaroon" + } + }, + "relation-token": { "type": "string" }, - "relation-id": { - "type": "integer" + "suspended": { + "type": "boolean" }, - "unit-relation-data": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/RelationData" - } - } + "suspended-reason": { + "type": "string" + }, + "unit-count": { + "type": "integer" } }, "additionalProperties": false, "required": [ - "relation-id", - "endpoint", - "cross-model", - "related-endpoint", - "ApplicationData", - "unit-relation-data" + "relation-token", + "application-token", + "life", + "unit-count" ] }, - "Entities": { + "RemoteRelationUnitChange": { "type": "object", "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/Entity" + "settings": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } } + }, + "unit-id": { + "type": "integer" } }, "additionalProperties": false, "required": [ - "entities" + "unit-id" ] }, - "Entity": { + "RemoteRelationWatchResult": { "type": "object", "properties": { - "tag": { + "changes": { + "$ref": "#/definitions/RemoteRelationChangeEvent" + }, + "error": { + "$ref": "#/definitions/Error" + }, + "watcher-id": { "type": "string" } }, "additionalProperties": false, "required": [ - "tag" + "watcher-id", + "changes" ] + } + } + } + }, + { + "Name": "RemoteRelations", + "Description": "API provides access to the remote relations API facade.", + "Version": 2, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "ConsumeRemoteRelationChanges": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/RemoteRelationsChanges" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "ConsumeRemoteRelationChanges consumes changes to settings originating\nfrom the remote/offering side of relations." }, - "Error": { + "ConsumeRemoteSecretChanges": { "type": "object", "properties": { - "code": { - "type": "string" + "Params": { + "$ref": "#/definitions/LatestSecretRevisionChanges" }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "ConsumeRemoteSecretChanges updates the local model with secret revision changes\noriginating from the remote/offering model." + }, + "ControllerAPIInfoForModels": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" }, - "message": { - "type": "string" + "Result": { + "$ref": "#/definitions/ControllerAPIInfoResults" } }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] + "description": "ControllerAPIInfoForModels returns the controller api connection details for the specified models." }, - "ErrorResult": { + "ControllerConfig": { "type": "object", "properties": { - "error": { - "$ref": "#/definitions/Error" + "Result": { + "$ref": "#/definitions/ControllerConfigResult" } }, - "additionalProperties": false + "description": "ControllerConfig returns the controller's configuration." }, - "ErrorResults": { + "ExportEntities": { "type": "object", "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/TokenResults" } }, - "additionalProperties": false, - "required": [ - "results" - ] + "description": "ExportEntities allocates unique, remote entity IDs for the given entities in the local model." }, - "ExposedEndpoint": { + "GetTokens": { "type": "object", "properties": { - "expose-to-cidrs": { - "type": "array", - "items": { - "type": "string" - } + "Params": { + "$ref": "#/definitions/GetTokenArgs" }, - "expose-to-spaces": { - "type": "array", - "items": { - "type": "string" - } + "Result": { + "$ref": "#/definitions/StringResults" } }, - "additionalProperties": false + "description": "GetTokens returns the token associated with the entities with the given tags for the given models." }, - "ExternalControllerInfo": { + "ImportRemoteEntities": { "type": "object", "properties": { - "addrs": { - "type": "array", - "items": { - "type": "string" - } + "Params": { + "$ref": "#/definitions/RemoteEntityTokenArgs" }, - "ca-cert": { - "type": "string" + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "ImportRemoteEntities adds entities to the remote entities collection with the specified opaque tokens." + }, + "Relations": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" }, - "controller-alias": { - "type": "string" + "Result": { + "$ref": "#/definitions/RemoteRelationResults" + } + }, + "description": "Relations returns information about the cross-model relations with the specified keys\nin the local model." + }, + "RemoteApplications": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" }, - "controller-tag": { - "type": "string" + "Result": { + "$ref": "#/definitions/RemoteApplicationResults" } }, - "additionalProperties": false, - "required": [ - "controller-tag", - "controller-alias", - "addrs", - "ca-cert" - ] + "description": "RemoteApplications returns the current state of the remote applications with\nthe specified names in the local model." }, - "Macaroon": { + "SaveMacaroons": { "type": "object", - "additionalProperties": false + "properties": { + "Params": { + "$ref": "#/definitions/EntityMacaroonArgs" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "SaveMacaroons saves the macaroons for the given entities." }, - "OfferUserDetails": { + "SetRemoteApplicationsStatus": { "type": "object", "properties": { - "access": { - "type": "string" + "Params": { + "$ref": "#/definitions/SetStatus" }, - "display-name": { - "type": "string" + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "SetRemoteApplicationsStatus sets the status for the specified remote applications." + }, + "UpdateControllersForModels": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/UpdateControllersForModelsParams" }, - "user": { - "type": "string" + "Result": { + "$ref": "#/definitions/ErrorResults" } }, - "additionalProperties": false, - "required": [ - "user", - "display-name", - "access" - ] + "description": "UpdateControllersForModels changes the external controller records for the\nassociated model entities. This is used when the remote relations worker gets\nredirected following migration of an offering model." + }, + "WatchLocalRelationChanges": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/RemoteRelationWatchResults" + } + }, + "description": "WatchLocalRelationChanges starts a RemoteRelationWatcher for each\nspecified relation, returning the watcher IDs and initial values,\nor an error if the remote relations couldn't be watched." }, - "Placement": { + "WatchRemoteApplicationRelations": { "type": "object", "properties": { - "directive": { - "type": "string" + "Params": { + "$ref": "#/definitions/Entities" }, - "scope": { - "type": "string" + "Result": { + "$ref": "#/definitions/StringsWatchResults" } }, - "additionalProperties": false, - "required": [ - "scope", - "directive" - ] + "description": "WatchRemoteApplicationRelations starts a StringsWatcher for watching the relations of\neach specified application in the local model, and returns the watcher IDs\nand initial values, or an error if the services' relations could not be\nwatched." }, - "RelationData": { + "WatchRemoteApplications": { "type": "object", "properties": { - "InScope": { - "type": "boolean" - }, - "UnitData": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } + "Result": { + "$ref": "#/definitions/StringsWatchResult" } }, - "additionalProperties": false, - "required": [ - "InScope", - "UnitData" - ] + "description": "WatchRemoteApplications starts a strings watcher that notifies of the addition,\nremoval, and lifecycle changes of remote applications in the model; and\nreturns the watcher ID and initial IDs of remote applications, or an error if\nwatching failed." }, - "RelationSuspendedArg": { + "WatchRemoteRelations": { "type": "object", "properties": { - "message": { - "type": "string" - }, - "relation-id": { - "type": "integer" - }, - "suspended": { - "type": "boolean" + "Result": { + "$ref": "#/definitions/StringsWatchResult" } }, - "additionalProperties": false, - "required": [ - "relation-id", - "message", - "suspended" - ] - }, - "RelationSuspendedArgs": { + "description": "WatchRemoteRelations starts a strings watcher that notifies of the addition,\nremoval, and lifecycle changes of remote relations in the model; and\nreturns the watcher ID and initial IDs of remote relations, or an error if\nwatching failed." + } + }, + "definitions": { + "ControllerAPIInfoResult": { "type": "object", "properties": { - "args": { + "addresses": { "type": "array", "items": { - "$ref": "#/definitions/RelationSuspendedArg" + "type": "string" } + }, + "cacert": { + "type": "string" + }, + "error": { + "$ref": "#/definitions/Error" } }, "additionalProperties": false, "required": [ - "args" + "addresses", + "cacert" ] }, - "RemoteEndpoint": { + "ControllerAPIInfoResults": { "type": "object", "properties": { - "interface": { - "type": "string" - }, - "limit": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "role": { - "type": "string" + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ControllerAPIInfoResult" + } } }, "additionalProperties": false, "required": [ - "name", - "role", - "interface", - "limit" + "results" ] }, - "RemoteSpace": { + "ControllerConfigResult": { "type": "object", "properties": { - "cloud-type": { - "type": "string" - }, - "name": { - "type": "string" - }, - "provider-attributes": { + "config": { "type": "object", "patternProperties": { ".*": { @@ -3003,208 +37580,142 @@ "additionalProperties": true } } - }, - "provider-id": { - "type": "string" - }, - "subnets": { - "type": "array", - "items": { - "$ref": "#/definitions/Subnet" - } } }, "additionalProperties": false, "required": [ - "cloud-type", - "name", - "provider-id", - "provider-attributes", - "subnets" + "config" ] }, - "ScaleApplicationInfo": { + "Entities": { "type": "object", "properties": { - "num-units": { - "type": "integer" + "entities": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } } }, "additionalProperties": false, "required": [ - "num-units" + "entities" ] }, - "ScaleApplicationParams": { + "Entity": { "type": "object", "properties": { - "application-tag": { + "tag": { "type": "string" - }, - "force": { - "type": "boolean" - }, - "scale": { - "type": "integer" - }, - "scale-change": { - "type": "integer" } }, "additionalProperties": false, "required": [ - "application-tag", - "scale", - "force" + "tag" ] }, - "ScaleApplicationResult": { + "EntityMacaroonArg": { "type": "object", "properties": { - "error": { - "$ref": "#/definitions/Error" + "macaroon": { + "$ref": "#/definitions/Macaroon" }, - "info": { - "$ref": "#/definitions/ScaleApplicationInfo" - } - }, - "additionalProperties": false - }, - "ScaleApplicationResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ScaleApplicationResult" - } - } - }, - "additionalProperties": false - }, - "ScaleApplicationsParams": { - "type": "object", - "properties": { - "applications": { - "type": "array", - "items": { - "$ref": "#/definitions/ScaleApplicationParams" - } + "tag": { + "type": "string" } }, "additionalProperties": false, "required": [ - "applications" + "macaroon", + "tag" ] }, - "SetConstraints": { + "EntityMacaroonArgs": { "type": "object", "properties": { - "application": { - "type": "string" - }, - "constraints": { - "$ref": "#/definitions/Value" + "Args": { + "type": "array", + "items": { + "$ref": "#/definitions/EntityMacaroonArg" + } } }, "additionalProperties": false, "required": [ - "application", - "constraints" + "Args" ] }, - "StorageConstraints": { + "EntityStatusArgs": { "type": "object", "properties": { - "count": { - "type": "integer" + "data": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } }, - "pool": { + "info": { "type": "string" }, - "size": { - "type": "integer" - } - }, - "additionalProperties": false - }, - "StringResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" + "status": { + "type": "string" }, - "result": { + "tag": { "type": "string" } }, "additionalProperties": false, "required": [ - "result" + "tag", + "status", + "info", + "data" ] }, - "Subnet": { + "Error": { "type": "object", "properties": { - "cidr": { - "type": "string" - }, - "life": { - "type": "string" - }, - "provider-id": { - "type": "string" - }, - "provider-network-id": { - "type": "string" - }, - "provider-space-id": { - "type": "string" - }, - "space-tag": { - "type": "string" - }, - "status": { + "code": { "type": "string" }, - "vlan-tag": { - "type": "integer" - }, - "zones": { - "type": "array", - "items": { - "type": "string" + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } } + }, + "message": { + "type": "string" } }, "additionalProperties": false, "required": [ - "cidr", - "vlan-tag", - "life", - "space-tag", - "zones" + "message", + "code" ] }, - "UnitInfoResult": { + "ErrorResult": { "type": "object", "properties": { "error": { "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/UnitResult" } }, "additionalProperties": false }, - "UnitInfoResults": { + "ErrorResults": { "type": "object", "properties": { "results": { "type": "array", "items": { - "$ref": "#/definitions/UnitInfoResult" + "$ref": "#/definitions/ErrorResult" } } }, @@ -3213,611 +37724,758 @@ "results" ] }, - "UnitResult": { + "ExternalControllerInfo": { "type": "object", "properties": { - "address": { - "type": "string" - }, - "charm": { - "type": "string" - }, - "leader": { - "type": "boolean" - }, - "life": { - "type": "string" - }, - "machine": { - "type": "string" - }, - "opened-ports": { + "addrs": { "type": "array", "items": { "type": "string" } }, - "provider-id": { - "type": "string" - }, - "public-address": { + "ca-cert": { "type": "string" }, - "relation-data": { - "type": "array", - "items": { - "$ref": "#/definitions/EndpointRelationData" - } - }, - "tag": { + "controller-alias": { "type": "string" }, - "workload-version": { + "controller-tag": { "type": "string" } }, "additionalProperties": false, "required": [ - "tag", - "workload-version", - "opened-ports", - "charm" + "controller-tag", + "controller-alias", + "addrs", + "ca-cert" ] }, - "UnitsResolved": { + "GetTokenArg": { "type": "object", "properties": { - "all": { - "type": "boolean" - }, - "retry": { - "type": "boolean" - }, - "tags": { - "$ref": "#/definitions/Entities" + "tag": { + "type": "string" } }, - "additionalProperties": false + "additionalProperties": false, + "required": [ + "tag" + ] }, - "UpdateChannelArg": { + "GetTokenArgs": { "type": "object", "properties": { - "channel": { - "type": "string" - }, - "force": { - "type": "boolean" - }, - "tag": { - "$ref": "#/definitions/Entity" + "Args": { + "type": "array", + "items": { + "$ref": "#/definitions/GetTokenArg" + } } }, "additionalProperties": false, "required": [ - "tag", - "force", - "channel" + "Args" ] }, - "UpdateChannelArgs": { + "LatestSecretRevisionChanges": { "type": "object", "properties": { - "args": { + "changes": { "type": "array", "items": { - "$ref": "#/definitions/UpdateChannelArg" + "$ref": "#/definitions/SecretRevisionChange" } } }, "additionalProperties": false, "required": [ - "args" + "changes" ] }, - "Value": { + "Macaroon": { + "type": "object", + "additionalProperties": false + }, + "RemoteApplication": { "type": "object", "properties": { - "allocate-public-ip": { - "type": "boolean" + "consume-version": { + "type": "integer" }, - "arch": { - "type": "string" + "is-consumer-proxy": { + "type": "boolean" }, - "container": { + "life": { "type": "string" }, - "cores": { - "type": "integer" - }, - "cpu-power": { - "type": "integer" + "macaroon": { + "$ref": "#/definitions/Macaroon" }, - "instance-role": { + "model-uuid": { "type": "string" }, - "instance-type": { + "name": { "type": "string" }, - "mem": { - "type": "integer" - }, - "root-disk": { - "type": "integer" - }, - "root-disk-source": { + "offer-uuid": { "type": "string" }, - "spaces": { - "type": "array", - "items": { - "type": "string" - } - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "virt-type": { + "status": { "type": "string" - }, - "zones": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - } - } - } - }, - { - "Name": "ApplicationOffers", - "Description": "OffersAPI implements the cross model interface and is the concrete\nimplementation of the api end point.", - "Version": 4, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "controller-user" - ], - "Schema": { - "type": "object", - "properties": { - "ApplicationOffers": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/OfferURLs" - }, - "Result": { - "$ref": "#/definitions/ApplicationOffersResults" } }, - "description": "ApplicationOffers gets details about remote applications that match given URLs." + "additionalProperties": false, + "required": [ + "name", + "offer-uuid", + "model-uuid", + "is-consumer-proxy" + ] }, - "DestroyOffers": { + "RemoteApplicationResult": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/DestroyApplicationOffers" + "error": { + "$ref": "#/definitions/Error" }, - "Result": { - "$ref": "#/definitions/ErrorResults" + "result": { + "$ref": "#/definitions/RemoteApplication" } }, - "description": "DestroyOffers removes the offers specified by the given URLs, forcing if necessary." + "additionalProperties": false }, - "FindApplicationOffers": { + "RemoteApplicationResults": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/OfferFilters" - }, - "Result": { - "$ref": "#/definitions/QueryApplicationOffersResults" + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/RemoteApplicationResult" + } } }, - "description": "FindApplicationOffers gets details about remote applications that match given filter." + "additionalProperties": false }, - "GetConsumeDetails": { + "RemoteEndpoint": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/ConsumeOfferDetailsArg" + "interface": { + "type": "string" }, - "Result": { - "$ref": "#/definitions/ConsumeOfferDetailsResults" - } - }, - "description": "GetConsumeDetails returns the details necessary to pass to another model\nto allow the specified args user to consume the offers represented by the args URLs." - }, - "ListApplicationOffers": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/OfferFilters" + "limit": { + "type": "integer" }, - "Result": { - "$ref": "#/definitions/QueryApplicationOffersResults" - } - }, - "description": "ListApplicationOffers gets deployed details about application offers that match given filter.\nThe results contain details about the deployed applications such as connection count." - }, - "ModifyOfferAccess": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ModifyOfferAccessRequest" + "name": { + "type": "string" }, - "Result": { - "$ref": "#/definitions/ErrorResults" + "role": { + "type": "string" } }, - "description": "ModifyOfferAccess changes the application offer access granted to users." + "additionalProperties": false, + "required": [ + "name", + "role", + "interface", + "limit" + ] }, - "Offer": { + "RemoteEntityTokenArg": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/AddApplicationOffers" + "tag": { + "type": "string" }, - "Result": { - "$ref": "#/definitions/ErrorResults" + "token": { + "type": "string" } }, - "description": "Offer makes application endpoints available for consumption at a specified URL." + "additionalProperties": false, + "required": [ + "tag" + ] }, - "RemoteApplicationInfo": { + "RemoteEntityTokenArgs": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/OfferURLs" - }, - "Result": { - "$ref": "#/definitions/RemoteApplicationInfoResults" + "Args": { + "type": "array", + "items": { + "$ref": "#/definitions/RemoteEntityTokenArg" + } } }, - "description": "RemoteApplicationInfo returns information about the requested remote application.\nThis call currently has no client side API, only there for the Dashboard at this stage." - } - }, - "definitions": { - "AddApplicationOffer": { + "additionalProperties": false, + "required": [ + "Args" + ] + }, + "RemoteRelation": { "type": "object", "properties": { - "application-description": { + "application-name": { "type": "string" }, - "application-name": { + "endpoint": { + "$ref": "#/definitions/RemoteEndpoint" + }, + "id": { + "type": "integer" + }, + "key": { "type": "string" }, - "endpoints": { + "life": { + "type": "string" + }, + "remote-application-name": { + "type": "string" + }, + "remote-endpoint-name": { + "type": "string" + }, + "source-model-uuid": { + "type": "string" + }, + "suspended": { + "type": "boolean" + }, + "unit-count": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "life", + "suspended", + "id", + "key", + "application-name", + "endpoint", + "unit-count", + "remote-application-name", + "remote-endpoint-name", + "source-model-uuid" + ] + }, + "RemoteRelationChangeEvent": { + "type": "object", + "properties": { + "application-settings": { "type": "object", "patternProperties": { ".*": { - "type": "string" + "type": "object", + "additionalProperties": true } } }, - "model-tag": { + "application-token": { "type": "string" }, - "offer-name": { + "bakery-version": { + "type": "integer" + }, + "changed-units": { + "type": "array", + "items": { + "$ref": "#/definitions/RemoteRelationUnitChange" + } + }, + "departed-units": { + "type": "array", + "items": { + "type": "integer" + } + }, + "force-cleanup": { + "type": "boolean" + }, + "life": { "type": "string" }, - "owner-tag": { + "macaroons": { + "type": "array", + "items": { + "$ref": "#/definitions/Macaroon" + } + }, + "relation-token": { + "type": "string" + }, + "suspended": { + "type": "boolean" + }, + "suspended-reason": { "type": "string" + }, + "unit-count": { + "type": "integer" } }, "additionalProperties": false, "required": [ - "model-tag", - "offer-name", - "application-name", - "application-description", - "endpoints" + "relation-token", + "application-token", + "life", + "unit-count" ] }, - "AddApplicationOffers": { + "RemoteRelationResult": { "type": "object", "properties": { - "Offers": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "$ref": "#/definitions/RemoteRelation" + } + }, + "additionalProperties": false + }, + "RemoteRelationResults": { + "type": "object", + "properties": { + "results": { "type": "array", "items": { - "$ref": "#/definitions/AddApplicationOffer" + "$ref": "#/definitions/RemoteRelationResult" } } }, "additionalProperties": false, "required": [ - "Offers" + "results" ] }, - "ApplicationOfferAdminDetails": { + "RemoteRelationUnitChange": { "type": "object", "properties": { - "ApplicationOfferDetails": { - "$ref": "#/definitions/ApplicationOfferDetails" - }, - "application-description": { - "type": "string" - }, - "application-name": { - "type": "string" - }, - "bindings": { + "settings": { "type": "object", "patternProperties": { ".*": { - "type": "string" + "type": "object", + "additionalProperties": true } } }, - "charm-url": { - "type": "string" + "unit-id": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "unit-id" + ] + }, + "RemoteRelationWatchResult": { + "type": "object", + "properties": { + "changes": { + "$ref": "#/definitions/RemoteRelationChangeEvent" }, - "connections": { + "error": { + "$ref": "#/definitions/Error" + }, + "watcher-id": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "watcher-id", + "changes" + ] + }, + "RemoteRelationWatchResults": { + "type": "object", + "properties": { + "results": { "type": "array", "items": { - "$ref": "#/definitions/OfferConnection" + "$ref": "#/definitions/RemoteRelationWatchResult" } - }, - "endpoints": { + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "RemoteRelationsChanges": { + "type": "object", + "properties": { + "changes": { "type": "array", "items": { - "$ref": "#/definitions/RemoteEndpoint" + "$ref": "#/definitions/RemoteRelationChangeEvent" } + } + }, + "additionalProperties": false + }, + "SecretRevisionChange": { + "type": "object", + "properties": { + "revision": { + "type": "integer" }, - "offer-name": { - "type": "string" - }, - "offer-url": { - "type": "string" - }, - "offer-uuid": { - "type": "string" - }, - "source-model-tag": { + "uri": { "type": "string" - }, - "spaces": { + } + }, + "additionalProperties": false, + "required": [ + "uri", + "revision" + ] + }, + "SetStatus": { + "type": "object", + "properties": { + "entities": { "type": "array", "items": { - "$ref": "#/definitions/RemoteSpace" + "$ref": "#/definitions/EntityStatusArgs" } + } + }, + "additionalProperties": false, + "required": [ + "entities" + ] + }, + "StringResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" }, - "users": { - "type": "array", - "items": { - "$ref": "#/definitions/OfferUserDetails" - } + "result": { + "type": "string" } }, "additionalProperties": false, "required": [ - "source-model-tag", - "offer-uuid", - "offer-url", - "offer-name", - "application-description", - "ApplicationOfferDetails", - "application-name", - "charm-url" + "result" + ] + }, + "StringResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/StringResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" ] }, - "ApplicationOfferDetails": { + "StringsWatchResult": { "type": "object", "properties": { - "application-description": { - "type": "string" - }, - "bindings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "endpoints": { + "changes": { "type": "array", "items": { - "$ref": "#/definitions/RemoteEndpoint" + "type": "string" } }, - "offer-name": { - "type": "string" - }, - "offer-url": { - "type": "string" - }, - "offer-uuid": { - "type": "string" + "error": { + "$ref": "#/definitions/Error" }, - "source-model-tag": { + "watcher-id": { "type": "string" - }, - "spaces": { - "type": "array", - "items": { - "$ref": "#/definitions/RemoteSpace" - } - }, - "users": { + } + }, + "additionalProperties": false, + "required": [ + "watcher-id" + ] + }, + "StringsWatchResults": { + "type": "object", + "properties": { + "results": { "type": "array", "items": { - "$ref": "#/definitions/OfferUserDetails" + "$ref": "#/definitions/StringsWatchResult" } } }, "additionalProperties": false, "required": [ - "source-model-tag", - "offer-uuid", - "offer-url", - "offer-name", - "application-description" + "results" ] }, - "ApplicationOfferResult": { + "TokenResult": { "type": "object", "properties": { "error": { "$ref": "#/definitions/Error" }, - "result": { - "$ref": "#/definitions/ApplicationOfferAdminDetails" + "token": { + "type": "string" } }, "additionalProperties": false }, - "ApplicationOffersResults": { + "TokenResults": { "type": "object", "properties": { "results": { "type": "array", "items": { - "$ref": "#/definitions/ApplicationOfferResult" + "$ref": "#/definitions/TokenResult" } } }, "additionalProperties": false }, - "ConsumeOfferDetails": { + "UpdateControllerForModel": { "type": "object", "properties": { - "external-controller": { + "info": { "$ref": "#/definitions/ExternalControllerInfo" }, - "macaroon": { - "$ref": "#/definitions/Macaroon" - }, - "offer": { - "$ref": "#/definitions/ApplicationOfferDetails" + "model-tag": { + "type": "string" } }, - "additionalProperties": false + "additionalProperties": false, + "required": [ + "model-tag", + "info" + ] }, - "ConsumeOfferDetailsArg": { + "UpdateControllersForModelsParams": { "type": "object", "properties": { - "offer-urls": { - "$ref": "#/definitions/OfferURLs" - }, - "user-tag": { - "type": "string" + "changes": { + "type": "array", + "items": { + "$ref": "#/definitions/UpdateControllerForModel" + } } }, "additionalProperties": false, "required": [ - "offer-urls" + "changes" ] + } + } + } + }, + { + "Name": "Resources", + "Description": "API is the public API facade for resources.", + "Version": 3, + "AvailableTo": [ + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "AddPendingResources": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/AddPendingResourcesArgsV2" + }, + "Result": { + "$ref": "#/definitions/AddPendingResourcesResult" + } + }, + "description": "AddPendingResources adds the provided resources (info) to the Juju\nmodel in a pending state, meaning they are not available until\nresolved. Handles CharmHub and Local charms." }, - "ConsumeOfferDetailsResult": { + "ListResources": { "type": "object", "properties": { - "ConsumeOfferDetails": { - "$ref": "#/definitions/ConsumeOfferDetails" + "Params": { + "$ref": "#/definitions/ListResourcesArgs" }, - "error": { - "$ref": "#/definitions/Error" + "Result": { + "$ref": "#/definitions/ResourcesResults" + } + }, + "description": "ListResources returns the list of resources for the given application." + } + }, + "definitions": { + "AddPendingResourcesArgsV2": { + "type": "object", + "properties": { + "Entity": { + "$ref": "#/definitions/Entity" }, - "external-controller": { - "$ref": "#/definitions/ExternalControllerInfo" + "charm-origin": { + "$ref": "#/definitions/CharmOrigin" }, "macaroon": { "$ref": "#/definitions/Macaroon" }, - "offer": { - "$ref": "#/definitions/ApplicationOfferDetails" + "resources": { + "type": "array", + "items": { + "$ref": "#/definitions/CharmResource" + } + }, + "tag": { + "type": "string" + }, + "url": { + "type": "string" } }, "additionalProperties": false, "required": [ - "ConsumeOfferDetails" + "tag", + "Entity", + "url", + "charm-origin", + "macaroon", + "resources" ] }, - "ConsumeOfferDetailsResults": { + "AddPendingResourcesResult": { "type": "object", "properties": { - "results": { + "ErrorResult": { + "$ref": "#/definitions/ErrorResult" + }, + "error": { + "$ref": "#/definitions/Error" + }, + "pending-ids": { "type": "array", "items": { - "$ref": "#/definitions/ConsumeOfferDetailsResult" + "type": "string" } } }, - "additionalProperties": false + "additionalProperties": false, + "required": [ + "ErrorResult", + "pending-ids" + ] }, - "DestroyApplicationOffers": { + "Base": { "type": "object", "properties": { - "force": { - "type": "boolean" + "channel": { + "type": "string" }, - "offer-urls": { - "type": "array", - "items": { - "type": "string" - } + "name": { + "type": "string" } }, "additionalProperties": false, "required": [ - "offer-urls" + "name", + "channel" ] }, - "EndpointFilterAttributes": { + "CharmOrigin": { "type": "object", "properties": { - "interface": { + "architecture": { + "type": "string" + }, + "base": { + "$ref": "#/definitions/Base" + }, + "branch": { + "type": "string" + }, + "hash": { + "type": "string" + }, + "id": { + "type": "string" + }, + "instance-key": { + "type": "string" + }, + "revision": { + "type": "integer" + }, + "risk": { + "type": "string" + }, + "source": { + "type": "string" + }, + "track": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "source", + "type", + "id" + ] + }, + "CharmResource": { + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "fingerprint": { + "type": "array", + "items": { + "type": "integer" + } + }, + "name": { + "type": "string" + }, + "origin": { "type": "string" }, - "name": { + "path": { "type": "string" }, - "role": { + "revision": { + "type": "integer" + }, + "size": { + "type": "integer" + }, + "type": { "type": "string" } }, "additionalProperties": false, "required": [ - "role", - "interface", - "name" + "name", + "type", + "path", + "origin", + "revision", + "fingerprint", + "size" ] }, - "EntityStatus": { + "Entity": { "type": "object", "properties": { - "data": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "info": { - "type": "string" - }, - "since": { - "type": "string", - "format": "date-time" - }, - "status": { + "tag": { "type": "string" } }, "additionalProperties": false, "required": [ - "status", - "info", - "since" + "tag" ] }, "Error": { @@ -3854,236 +38512,135 @@ }, "additionalProperties": false }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ExternalControllerInfo": { + "ListResourcesArgs": { "type": "object", "properties": { - "addrs": { + "entities": { "type": "array", "items": { - "type": "string" + "$ref": "#/definitions/Entity" } - }, - "ca-cert": { - "type": "string" - }, - "controller-alias": { - "type": "string" - }, - "controller-tag": { - "type": "string" } }, "additionalProperties": false, "required": [ - "controller-tag", - "controller-alias", - "addrs", - "ca-cert" + "entities" ] }, "Macaroon": { "type": "object", "additionalProperties": false }, - "ModifyOfferAccess": { + "Resource": { "type": "object", "properties": { - "access": { - "type": "string" - }, - "action": { - "type": "string" + "CharmResource": { + "$ref": "#/definitions/CharmResource" }, - "offer-url": { + "application": { "type": "string" }, - "user-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "user-tag", - "action", - "access", - "offer-url" - ] - }, - "ModifyOfferAccessRequest": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "$ref": "#/definitions/ModifyOfferAccess" - } - } - }, - "additionalProperties": false, - "required": [ - "changes" - ] - }, - "OfferConnection": { - "type": "object", - "properties": { - "endpoint": { + "description": { "type": "string" }, - "ingress-subnets": { + "fingerprint": { "type": "array", "items": { - "type": "string" + "type": "integer" } }, - "relation-id": { - "type": "integer" - }, - "source-model-tag": { + "id": { "type": "string" }, - "status": { - "$ref": "#/definitions/EntityStatus" - }, - "username": { + "name": { "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "source-model-tag", - "relation-id", - "username", - "endpoint", - "status", - "ingress-subnets" - ] - }, - "OfferFilter": { - "type": "object", - "properties": { - "allowed-users": { - "type": "array", - "items": { - "type": "string" - } }, - "application-description": { + "origin": { "type": "string" }, - "application-name": { + "path": { "type": "string" }, - "application-user": { + "pending-id": { "type": "string" }, - "connected-users": { - "type": "array", - "items": { - "type": "string" - } + "revision": { + "type": "integer" }, - "endpoints": { - "type": "array", - "items": { - "$ref": "#/definitions/EndpointFilterAttributes" - } + "size": { + "type": "integer" }, - "model-name": { - "type": "string" + "timestamp": { + "type": "string", + "format": "date-time" }, - "offer-name": { + "type": { "type": "string" }, - "owner-name": { + "username": { "type": "string" } }, "additionalProperties": false, "required": [ - "owner-name", - "model-name", - "offer-name", - "application-name", - "application-description", - "application-user", - "endpoints", - "connected-users", - "allowed-users" + "name", + "type", + "path", + "origin", + "revision", + "fingerprint", + "size", + "CharmResource", + "id", + "pending-id", + "application", + "username", + "timestamp" ] }, - "OfferFilters": { + "ResourcesResult": { "type": "object", "properties": { - "Filters": { + "ErrorResult": { + "$ref": "#/definitions/ErrorResult" + }, + "charm-store-resources": { "type": "array", "items": { - "$ref": "#/definitions/OfferFilter" + "$ref": "#/definitions/CharmResource" } - } - }, - "additionalProperties": false, - "required": [ - "Filters" - ] - }, - "OfferURLs": { - "type": "object", - "properties": { - "bakery-version": { - "type": "integer" }, - "offer-urls": { + "error": { + "$ref": "#/definitions/Error" + }, + "resources": { "type": "array", "items": { - "type": "string" + "$ref": "#/definitions/Resource" } - } - }, - "additionalProperties": false - }, - "OfferUserDetails": { - "type": "object", - "properties": { - "access": { - "type": "string" - }, - "display-name": { - "type": "string" }, - "user": { - "type": "string" + "unit-resources": { + "type": "array", + "items": { + "$ref": "#/definitions/UnitResources" + } } }, "additionalProperties": false, "required": [ - "user", - "display-name", - "access" + "ErrorResult", + "resources", + "charm-store-resources", + "unit-resources" ] }, - "QueryApplicationOffersResults": { + "ResourcesResults": { "type": "object", "properties": { "results": { "type": "array", "items": { - "$ref": "#/definitions/ApplicationOfferAdminDetails" + "$ref": "#/definitions/ResourcesResult" } } }, @@ -4092,105 +38649,117 @@ "results" ] }, - "RemoteApplicationInfo": { + "UnitResources": { "type": "object", "properties": { - "description": { - "type": "string" + "Entity": { + "$ref": "#/definitions/Entity" }, - "endpoints": { + "download-progress": { + "type": "object", + "patternProperties": { + ".*": { + "type": "integer" + } + } + }, + "resources": { "type": "array", "items": { - "$ref": "#/definitions/RemoteEndpoint" + "$ref": "#/definitions/Resource" } }, - "icon-url-path": { - "type": "string" - }, - "model-tag": { - "type": "string" - }, - "name": { - "type": "string" - }, - "offer-url": { - "type": "string" - }, - "source-model-label": { + "tag": { "type": "string" } }, "additionalProperties": false, "required": [ - "model-tag", - "name", - "description", - "offer-url", - "endpoints", - "icon-url-path" + "tag", + "Entity", + "resources", + "download-progress" ] - }, - "RemoteApplicationInfoResult": { + } + } + } + }, + { + "Name": "ResourcesHookContext", + "Description": "UnitFacade is the resources portion of the uniter's API facade.", + "Version": 1, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "GetResourceInfo": { "type": "object", "properties": { - "error": { - "$ref": "#/definitions/Error" + "Params": { + "$ref": "#/definitions/ListUnitResourcesArgs" }, - "result": { - "$ref": "#/definitions/RemoteApplicationInfo" + "Result": { + "$ref": "#/definitions/UnitResourcesResult" } }, - "additionalProperties": false - }, - "RemoteApplicationInfoResults": { + "description": "GetResourceInfo returns the resource info for each of the given\nresource names (for the implicit application). If any one is missing then\nthe corresponding result is set with errors.NotFound." + } + }, + "definitions": { + "CharmResource": { "type": "object", "properties": { - "results": { + "description": { + "type": "string" + }, + "fingerprint": { "type": "array", "items": { - "$ref": "#/definitions/RemoteApplicationInfoResult" + "type": "integer" } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "RemoteEndpoint": { - "type": "object", - "properties": { - "interface": { + }, + "name": { "type": "string" }, - "limit": { - "type": "integer" + "origin": { + "type": "string" }, - "name": { + "path": { "type": "string" }, - "role": { + "revision": { + "type": "integer" + }, + "size": { + "type": "integer" + }, + "type": { "type": "string" } }, "additionalProperties": false, "required": [ "name", - "role", - "interface", - "limit" + "type", + "path", + "origin", + "revision", + "fingerprint", + "size" ] }, - "RemoteSpace": { + "Error": { "type": "object", "properties": { - "cloud-type": { - "type": "string" - }, - "name": { + "code": { "type": "string" }, - "provider-attributes": { + "info": { "type": "object", "patternProperties": { ".*": { @@ -4199,75 +38768,155 @@ } } }, - "provider-id": { + "message": { "type": "string" - }, - "subnets": { + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ErrorResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "ListUnitResourcesArgs": { + "type": "object", + "properties": { + "resource-names": { "type": "array", "items": { - "$ref": "#/definitions/Subnet" + "type": "string" } } }, "additionalProperties": false, "required": [ - "cloud-type", - "name", - "provider-id", - "provider-attributes", - "subnets" + "resource-names" ] }, - "Subnet": { + "Resource": { "type": "object", "properties": { - "cidr": { + "CharmResource": { + "$ref": "#/definitions/CharmResource" + }, + "application": { "type": "string" }, - "life": { + "description": { "type": "string" }, - "provider-id": { + "fingerprint": { + "type": "array", + "items": { + "type": "integer" + } + }, + "id": { "type": "string" }, - "provider-network-id": { + "name": { "type": "string" }, - "provider-space-id": { + "origin": { "type": "string" }, - "space-tag": { + "path": { "type": "string" }, - "status": { + "pending-id": { "type": "string" }, - "vlan-tag": { + "revision": { "type": "integer" }, - "zones": { + "size": { + "type": "integer" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "type": { + "type": "string" + }, + "username": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "type", + "path", + "origin", + "revision", + "fingerprint", + "size", + "CharmResource", + "id", + "pending-id", + "application", + "username", + "timestamp" + ] + }, + "UnitResourceResult": { + "type": "object", + "properties": { + "ErrorResult": { + "$ref": "#/definitions/ErrorResult" + }, + "error": { + "$ref": "#/definitions/Error" + }, + "resource": { + "$ref": "#/definitions/Resource" + } + }, + "additionalProperties": false, + "required": [ + "ErrorResult", + "resource" + ] + }, + "UnitResourcesResult": { + "type": "object", + "properties": { + "ErrorResult": { + "$ref": "#/definitions/ErrorResult" + }, + "error": { + "$ref": "#/definitions/Error" + }, + "resources": { "type": "array", "items": { - "type": "string" + "$ref": "#/definitions/UnitResourceResult" } } }, "additionalProperties": false, "required": [ - "cidr", - "vlan-tag", - "life", - "space-tag", - "zones" + "ErrorResult", + "resources" ] } } } }, { - "Name": "Backups", - "Description": "API provides backup-specific API methods.", - "Version": 3, + "Name": "RetryStrategy", + "Description": "RetryStrategyAPI implements RetryStrategy", + "Version": 1, "AvailableTo": [ "controller-machine-agent", "machine-agent", @@ -4277,209 +38926,310 @@ "Schema": { "type": "object", "properties": { - "Create": { + "RetryStrategy": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/BackupsCreateArgs" + "$ref": "#/definitions/Entities" }, "Result": { - "$ref": "#/definitions/BackupsMetadataResult" + "$ref": "#/definitions/RetryStrategyResults" } }, - "description": "Create is the API method that requests juju to create a new backup\nof its state." + "description": "RetryStrategy returns RetryStrategyResults that can be used by any code that uses\nto configure the retry timer that's currently in juju utils." + }, + "WatchRetryStrategy": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/NotifyWatchResults" + } + }, + "description": "WatchRetryStrategy watches for changes to the model. Currently we only allow\nchanges to the boolean that determines whether retries should be attempted or not." } }, "definitions": { - "BackupsCreateArgs": { + "Entities": { "type": "object", "properties": { - "no-download": { - "type": "boolean" - }, - "notes": { - "type": "string" + "entities": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } } }, "additionalProperties": false, "required": [ - "notes", - "no-download" + "entities" ] }, - "BackupsMetadataResult": { + "Entity": { "type": "object", "properties": { - "base": { - "type": "string" - }, - "checksum": { - "type": "string" - }, - "checksum-format": { + "tag": { "type": "string" - }, - "controller-machine-id": { + } + }, + "additionalProperties": false, + "required": [ + "tag" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { "type": "string" }, - "controller-machine-inst-id": { - "type": "string" + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } }, - "controller-uuid": { + "message": { "type": "string" - }, - "filename": { + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "NotifyWatchResult": { + "type": "object", + "properties": { + "NotifyWatcherId": { "type": "string" }, - "finished": { - "type": "string", - "format": "date-time" + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false, + "required": [ + "NotifyWatcherId" + ] + }, + "NotifyWatchResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/NotifyWatchResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "RetryStrategy": { + "type": "object", + "properties": { + "jitter-retry-time": { + "type": "boolean" }, - "format-version": { + "max-retry-time": { "type": "integer" }, - "ha-nodes": { + "min-retry-time": { "type": "integer" }, - "hostname": { - "type": "string" - }, - "id": { - "type": "string" - }, - "machine": { - "type": "string" - }, - "model": { - "type": "string" - }, - "notes": { - "type": "string" - }, - "size": { + "retry-time-factor": { "type": "integer" }, - "started": { - "type": "string", - "format": "date-time" - }, - "stored": { - "type": "string", - "format": "date-time" - }, - "version": { - "$ref": "#/definitions/Number" + "should-retry": { + "type": "boolean" } }, "additionalProperties": false, "required": [ - "id", - "checksum", - "checksum-format", - "size", - "stored", - "started", - "finished", - "notes", - "model", - "machine", - "hostname", - "version", - "base", - "filename", - "format-version", - "controller-uuid", - "controller-machine-id", - "controller-machine-inst-id", - "ha-nodes" + "should-retry", + "min-retry-time", + "max-retry-time", + "jitter-retry-time", + "retry-time-factor" ] }, - "Number": { + "RetryStrategyResult": { "type": "object", "properties": { - "Build": { - "type": "integer" - }, - "Major": { - "type": "integer" - }, - "Minor": { - "type": "integer" - }, - "Patch": { - "type": "integer" + "error": { + "$ref": "#/definitions/Error" }, - "Tag": { - "type": "string" + "result": { + "$ref": "#/definitions/RetryStrategy" + } + }, + "additionalProperties": false + }, + "RetryStrategyResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/RetryStrategyResult" + } } }, "additionalProperties": false, "required": [ - "Major", - "Minor", - "Tag", - "Patch", - "Build" + "results" ] } } } }, { - "Name": "Block", - "Description": "API implements Block interface and is the concrete\nimplementation of the api end point.", - "Version": 2, + "Name": "SSHClient", + "Description": "Facade implements the API required by the sshclient worker.", + "Version": 4, "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", "model-user" ], "Schema": { "type": "object", "properties": { - "List": { + "AllAddresses": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/SSHAddressesResults" + } + }, + "description": "AllAddresses reports all addresses that might have SSH listening for each\nentity in args. The result is sorted with public addresses first.\nMachines and units are supported as entity types." + }, + "ModelCredentialForSSH": { "type": "object", "properties": { "Result": { - "$ref": "#/definitions/BlockResults" + "$ref": "#/definitions/CloudSpecResult" } }, - "description": "List implements Block.List()." + "description": "ModelCredentialForSSH returns a cloud spec for ssh purpose.\nThis facade call is only used for k8s model." }, - "SwitchBlockOff": { + "PrivateAddress": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/BlockSwitchParams" + "$ref": "#/definitions/Entities" }, "Result": { - "$ref": "#/definitions/ErrorResult" + "$ref": "#/definitions/SSHAddressResults" } }, - "description": "SwitchBlockOff implements Block.SwitchBlockOff()." + "description": "PrivateAddress reports the preferred private network address for one or\nmore entities. Machines and units are supported." }, - "SwitchBlockOn": { + "Proxy": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/SSHProxyResult" + } + }, + "description": "Proxy returns whether SSH connections should be proxied through the\ncontroller hosts for the model associated with the API connection." + }, + "PublicAddress": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/BlockSwitchParams" + "$ref": "#/definitions/Entities" }, "Result": { - "$ref": "#/definitions/ErrorResult" + "$ref": "#/definitions/SSHAddressResults" + } + }, + "description": "PublicAddress reports the preferred public network address for one\nor more entities. Machines and units are supported." + }, + "PublicKeys": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/SSHPublicKeysResults" } }, - "description": "SwitchBlockOn implements Block.SwitchBlockOn()." + "description": "PublicKeys returns the public SSH hosts for one or more\nentities. Machines and units are supported." } }, "definitions": { - "Block": { + "CloudCredential": { "type": "object", "properties": { - "id": { + "attrs": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "auth-type": { "type": "string" }, - "message": { + "redacted": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "auth-type" + ] + }, + "CloudSpec": { + "type": "object", + "properties": { + "cacertificates": { + "type": "array", + "items": { + "type": "string" + } + }, + "credential": { + "$ref": "#/definitions/CloudCredential" + }, + "endpoint": { "type": "string" }, - "tag": { + "identity-endpoint": { + "type": "string" + }, + "is-controller-cloud": { + "type": "boolean" + }, + "name": { + "type": "string" + }, + "region": { + "type": "string" + }, + "skip-tls-verify": { + "type": "boolean" + }, + "storage-endpoint": { "type": "string" }, "type": { @@ -4488,51 +39238,47 @@ }, "additionalProperties": false, "required": [ - "id", - "tag", - "type" + "type", + "name" ] }, - "BlockResult": { + "CloudSpecResult": { "type": "object", "properties": { "error": { "$ref": "#/definitions/Error" }, "result": { - "$ref": "#/definitions/Block" + "$ref": "#/definitions/CloudSpec" } }, - "additionalProperties": false, - "required": [ - "result" - ] + "additionalProperties": false }, - "BlockResults": { + "Entities": { "type": "object", "properties": { - "results": { + "entities": { "type": "array", "items": { - "$ref": "#/definitions/BlockResult" + "$ref": "#/definitions/Entity" } } }, - "additionalProperties": false + "additionalProperties": false, + "required": [ + "entities" + ] }, - "BlockSwitchParams": { + "Entity": { "type": "object", "properties": { - "message": { - "type": "string" - }, - "type": { + "tag": { "type": "string" } }, "additionalProperties": false, "required": [ - "type" + "tag" ] }, "Error": { @@ -4560,102 +39306,181 @@ "code" ] }, - "ErrorResult": { + "SSHAddressResult": { + "type": "object", + "properties": { + "address": { + "type": "string" + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "SSHAddressResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/SSHAddressResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "SSHAddressesResult": { + "type": "object", + "properties": { + "addresses": { + "type": "array", + "items": { + "type": "string" + } + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false, + "required": [ + "addresses" + ] + }, + "SSHAddressesResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/SSHAddressesResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "SSHProxyResult": { + "type": "object", + "properties": { + "use-proxy": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "use-proxy" + ] + }, + "SSHPublicKeysResult": { "type": "object", "properties": { "error": { "$ref": "#/definitions/Error" + }, + "public-keys": { + "type": "array", + "items": { + "type": "string" + } } }, "additionalProperties": false + }, + "SSHPublicKeysResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/SSHPublicKeysResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] } } } }, { - "Name": "Bundle", - "Description": "APIv6 provides the Bundle API facade for version 6. It is otherwise\nidentical to V5 with the exception that the V6 adds the support for\nmulti-part yaml handling to GetChanges and GetChangesMapArgs.", - "Version": 6, + "Name": "SecretBackends", + "Description": "SecretBackendsAPI is the server implementation for the SecretBackends facade.", + "Version": 1, "AvailableTo": [ - "controller-user", - "model-user" + "controller-user" ], "Schema": { "type": "object", "properties": { - "ExportBundle": { + "AddSecretBackends": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/ExportBundleParams" + "$ref": "#/definitions/AddSecretBackendArgs" }, "Result": { - "$ref": "#/definitions/StringResult" + "$ref": "#/definitions/ErrorResults" } }, - "description": "ExportBundle exports the current model configuration as bundle." + "description": "AddSecretBackends adds new secret backends." }, - "GetChanges": { + "ListSecretBackends": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/BundleChangesParams" + "$ref": "#/definitions/ListSecretBackendsArgs" }, "Result": { - "$ref": "#/definitions/BundleChangesResults" + "$ref": "#/definitions/ListSecretBackendsResults" } }, - "description": "GetChanges returns the list of changes required to deploy the given bundle\ndata. The changes are sorted by requirements, so that they can be applied in\norder.\nGetChanges has been superseded in favour of GetChangesMapArgs. It's\npreferable to use that new method to add new functionality and move clients\naway from this one." + "description": "ListSecretBackends lists available secret backends." }, - "GetChangesMapArgs": { + "RemoveSecretBackends": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/BundleChangesParams" + "$ref": "#/definitions/RemoveSecretBackendArgs" }, "Result": { - "$ref": "#/definitions/BundleChangesMapArgsResults" + "$ref": "#/definitions/ErrorResults" } }, - "description": "GetChangesMapArgs returns the list of changes required to deploy the given\nbundle data. The changes are sorted by requirements, so that they can be\napplied in order.\nV4 GetChangesMapArgs is not supported on anything less than v4" - } - }, - "definitions": { - "BundleChange": { + "description": "RemoveSecretBackends removes secret backends." + }, + "UpdateSecretBackends": { "type": "object", "properties": { - "args": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": true - } - }, - "id": { - "type": "string" - }, - "method": { - "type": "string" + "Params": { + "$ref": "#/definitions/UpdateSecretBackendArgs" }, - "requires": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "id", - "method", - "args", - "requires" - ] - }, - "BundleChangesMapArgs": { + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "UpdateSecretBackends updates secret backends." + } + }, + "definitions": { + "AddSecretBackendArg": { "type": "object", "properties": { - "args": { + "SecretBackend": { + "$ref": "#/definitions/SecretBackend" + }, + "backend-type": { + "type": "string" + }, + "config": { "type": "object", "patternProperties": { ".*": { @@ -4667,76 +39492,36 @@ "id": { "type": "string" }, - "method": { + "name": { "type": "string" }, - "requires": { - "type": "array", - "items": { - "type": "string" - } + "token-rotate-interval": { + "type": "integer" } }, "additionalProperties": false, "required": [ - "id", - "method", - "args", - "requires" + "name", + "backend-type", + "config", + "SecretBackend" ] }, - "BundleChangesMapArgsResults": { + "AddSecretBackendArgs": { "type": "object", "properties": { - "changes": { - "type": "array", - "items": { - "$ref": "#/definitions/BundleChangesMapArgs" - } - }, - "errors": { + "args": { "type": "array", "items": { - "type": "string" + "$ref": "#/definitions/AddSecretBackendArg" } } }, - "additionalProperties": false - }, - "BundleChangesParams": { - "type": "object", - "properties": { - "bundleURL": { - "type": "string" - }, - "yaml": { - "type": "string" - } - }, "additionalProperties": false, "required": [ - "yaml", - "bundleURL" + "args" ] }, - "BundleChangesResults": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "$ref": "#/definitions/BundleChange" - } - }, - "errors": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - }, "Error": { "type": "object", "properties": { @@ -4762,255 +39547,250 @@ "code" ] }, - "ExportBundleParams": { + "ErrorResult": { "type": "object", "properties": { - "include-charm-defaults": { - "type": "boolean" + "error": { + "$ref": "#/definitions/Error" } }, "additionalProperties": false }, - "StringResult": { + "ErrorResults": { "type": "object", "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "string" + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResult" + } } }, "additionalProperties": false, "required": [ - "result" + "results" ] - } - } - } - }, - { - "Name": "Charms", - "Description": "APIv6 provides the Charms API facade for version 6.\nIt removes the AddCharmWithAuthorization function, as\nwe no longer support macaroons.", - "Version": 6, - "AvailableTo": [ - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "AddCharm": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/AddCharmWithOrigin" - }, - "Result": { - "$ref": "#/definitions/CharmOriginResult" - } - }, - "description": "AddCharm adds the given charm URL (which must include revision) to the\nenvironment, if it does not exist yet. Local charms are not supported,\nonly charm store and charm hub URLs. See also AddLocalCharm()." }, - "CharmInfo": { + "ListSecretBackendsArgs": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/CharmURL" + "names": { + "type": "array", + "items": { + "type": "string" + } }, - "Result": { - "$ref": "#/definitions/Charm" + "reveal": { + "type": "boolean" } }, - "description": "CharmInfo returns information about the requested charm." + "additionalProperties": false, + "required": [ + "names", + "reveal" + ] }, - "CheckCharmPlacement": { + "ListSecretBackendsResults": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/ApplicationCharmPlacements" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/SecretBackendResult" + } } }, - "description": "CheckCharmPlacement checks if a charm is allowed to be placed with in a\ngiven application." + "additionalProperties": false, + "required": [ + "results" + ] }, - "GetDownloadInfos": { + "RemoveSecretBackendArg": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/CharmURLAndOrigins" + "force": { + "type": "boolean" }, - "Result": { - "$ref": "#/definitions/DownloadInfoResults" + "name": { + "type": "string" } }, - "description": "GetDownloadInfos attempts to get the bundle corresponding to the charm url\nand origin." + "additionalProperties": false, + "required": [ + "name" + ] }, - "IsMetered": { + "RemoveSecretBackendArgs": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/CharmURL" - }, - "Result": { - "$ref": "#/definitions/IsMeteredResult" + "args": { + "type": "array", + "items": { + "$ref": "#/definitions/RemoveSecretBackendArg" + } } }, - "description": "IsMetered returns whether or not the charm is metered." + "additionalProperties": false, + "required": [ + "args" + ] }, - "List": { + "SecretBackend": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/CharmsList" + "backend-type": { + "type": "string" }, - "Result": { - "$ref": "#/definitions/CharmsListResult" - } - }, - "description": "List returns a list of charm URLs currently in the state.\nIf supplied parameter contains any names, the result will\nbe filtered to return only the charms with supplied names." - }, - "ListCharmResources": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/CharmURLAndOrigins" + "config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } }, - "Result": { - "$ref": "#/definitions/CharmResourcesResults" + "name": { + "type": "string" + }, + "token-rotate-interval": { + "type": "integer" } }, - "description": "ListCharmResources returns a series of resources for a given charm." + "additionalProperties": false, + "required": [ + "name", + "backend-type", + "config" + ] }, - "ResolveCharms": { + "SecretBackendResult": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/ResolveCharmsWithChannel" + "error": { + "$ref": "#/definitions/Error" }, - "Result": { - "$ref": "#/definitions/ResolveCharmWithChannelResults" - } - }, - "description": "ResolveCharms resolves the given charm URLs with an optionally specified\npreferred channel. Channel provided via CharmOrigin." - } - }, - "definitions": { - "AddCharmWithOrigin": { - "type": "object", - "properties": { - "charm-origin": { - "$ref": "#/definitions/CharmOrigin" + "id": { + "type": "string" + }, + "message": { + "type": "string" + }, + "num-secrets": { + "type": "integer" }, - "force": { - "type": "boolean" + "result": { + "$ref": "#/definitions/SecretBackend" }, - "url": { + "status": { "type": "string" } }, "additionalProperties": false, "required": [ - "url", - "charm-origin", - "force" + "result", + "id", + "num-secrets", + "status" ] }, - "ApplicationCharmPlacement": { + "UpdateSecretBackendArg": { "type": "object", "properties": { - "application": { + "config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "force": { + "type": "boolean" + }, + "name": { "type": "string" }, - "charm-url": { + "name-change": { "type": "string" + }, + "reset": { + "type": "array", + "items": { + "type": "string" + } + }, + "token-rotate-interval": { + "type": "integer" } }, "additionalProperties": false, "required": [ - "application", - "charm-url" + "name", + "token-rotate-interval", + "config", + "reset" ] }, - "ApplicationCharmPlacements": { + "UpdateSecretBackendArgs": { "type": "object", "properties": { - "placements": { + "args": { "type": "array", "items": { - "$ref": "#/definitions/ApplicationCharmPlacement" + "$ref": "#/definitions/UpdateSecretBackendArg" } } }, "additionalProperties": false, "required": [ - "placements" + "args" ] - }, - "Base": { + } + } + } + }, + { + "Name": "SecretBackendsManager", + "Description": "SecretBackendsManagerAPI is the implementation for the SecretsManager facade.", + "Version": 1, + "AvailableTo": [ + "controller-machine-agent" + ], + "Schema": { + "type": "object", + "properties": { + "RotateBackendTokens": { "type": "object", "properties": { - "channel": { - "type": "string" + "Params": { + "$ref": "#/definitions/RotateSecretBackendArgs" }, - "name": { - "type": "string" + "Result": { + "$ref": "#/definitions/ErrorResults" } }, - "additionalProperties": false, - "required": [ - "name", - "channel" - ] + "description": "RotateBackendTokens rotates the tokens for the specified backends." }, - "Charm": { + "WatchSecretBackendsRotateChanges": { "type": "object", "properties": { - "actions": { - "$ref": "#/definitions/CharmActions" - }, - "config": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmOption" - } - } - }, - "lxd-profile": { - "$ref": "#/definitions/CharmLXDProfile" - }, - "manifest": { - "$ref": "#/definitions/CharmManifest" - }, - "meta": { - "$ref": "#/definitions/CharmMeta" - }, - "metrics": { - "$ref": "#/definitions/CharmMetrics" - }, - "revision": { - "type": "integer" - }, - "url": { - "type": "string" + "Result": { + "$ref": "#/definitions/SecretBackendRotateWatchResult" } }, - "additionalProperties": false, - "required": [ - "revision", - "url", - "config" - ] - }, - "CharmActionSpec": { + "description": "WatchSecretBackendsRotateChanges sets up a watcher to notify of changes to secret backend rotations." + } + }, + "definitions": { + "Error": { "type": "object", "properties": { - "description": { + "code": { "type": "string" }, - "params": { + "info": { "type": "object", "patternProperties": { ".*": { @@ -5018,776 +39798,952 @@ "additionalProperties": true } } + }, + "message": { + "type": "string" } }, "additionalProperties": false, "required": [ - "description", - "params" + "message", + "code" ] }, - "CharmActions": { + "ErrorResult": { "type": "object", "properties": { - "specs": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmActionSpec" - } - } + "error": { + "$ref": "#/definitions/Error" } }, "additionalProperties": false }, - "CharmBase": { + "ErrorResults": { "type": "object", "properties": { - "architectures": { + "results": { "type": "array", "items": { - "type": "string" + "$ref": "#/definitions/ErrorResult" } - }, - "channel": { - "type": "string" - }, - "name": { - "type": "string" } }, - "additionalProperties": false + "additionalProperties": false, + "required": [ + "results" + ] }, - "CharmContainer": { + "RotateSecretBackendArgs": { "type": "object", "properties": { - "mounts": { + "backend-ids": { "type": "array", "items": { - "$ref": "#/definitions/CharmMount" + "type": "string" } - }, - "resource": { - "type": "string" } }, - "additionalProperties": false + "additionalProperties": false, + "required": [ + "backend-ids" + ] }, - "CharmDeployment": { + "SecretBackendRotateChange": { "type": "object", "properties": { - "min-version": { - "type": "string" - }, - "mode": { + "backend-name": { "type": "string" }, - "service": { + "id": { "type": "string" }, - "type": { - "type": "string" + "next-trigger-time": { + "type": "string", + "format": "date-time" } }, "additionalProperties": false, "required": [ - "type", - "mode", - "service", - "min-version" + "id", + "backend-name", + "next-trigger-time" ] }, - "CharmDevice": { + "SecretBackendRotateWatchResult": { "type": "object", "properties": { - "CountMax": { - "type": "integer" - }, - "CountMin": { - "type": "integer" - }, - "Description": { - "type": "string" + "changes": { + "type": "array", + "items": { + "$ref": "#/definitions/SecretBackendRotateChange" + } }, - "Name": { - "type": "string" + "error": { + "$ref": "#/definitions/Error" }, - "Type": { + "watcher-id": { "type": "string" } }, "additionalProperties": false, "required": [ - "Name", - "Description", - "Type", - "CountMin", - "CountMax" + "watcher-id", + "changes" ] + } + } + } + }, + { + "Name": "SecretBackendsRotateWatcher", + "Description": "srvSecretBackendsRotateWatcher defines the API wrapping a SecretBackendsRotateWatcher.", + "Version": 1, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "Next": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/SecretBackendRotateWatchResult" + } + }, + "description": "Next returns when a change has occurred to an entity of the\ncollection being watched since the most recent call to Next\nor the Watch call that created the srvSecretRotationWatcher." }, - "CharmLXDProfile": { + "Stop": { + "type": "object", + "description": "Stop stops the watcher." + } + }, + "definitions": { + "Error": { "type": "object", "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "description": { + "code": { "type": "string" }, - "devices": { + "info": { "type": "object", "patternProperties": { ".*": { "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } + "additionalProperties": true } } + }, + "message": { + "type": "string" } }, "additionalProperties": false, "required": [ - "config", - "description", - "devices" + "message", + "code" ] }, - "CharmManifest": { + "SecretBackendRotateChange": { "type": "object", "properties": { - "bases": { - "type": "array", - "items": { - "$ref": "#/definitions/CharmBase" - } + "backend-name": { + "type": "string" + }, + "id": { + "type": "string" + }, + "next-trigger-time": { + "type": "string", + "format": "date-time" } }, - "additionalProperties": false + "additionalProperties": false, + "required": [ + "id", + "backend-name", + "next-trigger-time" + ] }, - "CharmMeta": { + "SecretBackendRotateWatchResult": { "type": "object", "properties": { - "assumes-expr": { - "$ref": "#/definitions/ExpressionTree" - }, - "categories": { + "changes": { "type": "array", "items": { - "type": "string" - } - }, - "containers": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmContainer" - } + "$ref": "#/definitions/SecretBackendRotateChange" } }, - "deployment": { - "$ref": "#/definitions/CharmDeployment" + "error": { + "$ref": "#/definitions/Error" }, - "description": { + "watcher-id": { "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "watcher-id", + "changes" + ] + } + } + } + }, + { + "Name": "Secrets", + "Description": "SecretsAPI is the backend for the Secrets facade.", + "Version": 1, + "AvailableTo": [ + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "ListSecrets": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ListSecretsArgs" }, - "devices": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmDevice" - } - } + "Result": { + "$ref": "#/definitions/ListSecretResults" + } + }, + "description": "ListSecrets lists available secrets." + } + }, + "definitions": { + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" }, - "extra-bindings": { + "info": { "type": "object", "patternProperties": { ".*": { - "type": "string" + "type": "object", + "additionalProperties": true } } }, - "min-juju-version": { + "message": { "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ListSecretResult": { + "type": "object", + "properties": { + "create-time": { + "type": "string", + "format": "date-time" }, - "name": { + "description": { "type": "string" }, - "payload-classes": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmPayloadClass" - } - } + "label": { + "type": "string" }, - "peers": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmRelation" - } - } + "latest-expire-time": { + "type": "string", + "format": "date-time" }, - "provides": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmRelation" - } - } + "latest-revision": { + "type": "integer" }, - "requires": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmRelation" - } - } + "next-rotate-time": { + "type": "string", + "format": "date-time" }, - "resources": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmResourceMeta" - } - } + "owner-tag": { + "type": "string" }, - "series": { + "revisions": { "type": "array", "items": { - "type": "string" + "$ref": "#/definitions/SecretRevision" } }, - "storage": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmStorage" - } - } + "rotate-policy": { + "type": "string" }, - "subordinate": { - "type": "boolean" + "update-time": { + "type": "string", + "format": "date-time" }, - "summary": { + "uri": { "type": "string" }, - "tags": { + "value": { + "$ref": "#/definitions/SecretValueResult" + }, + "version": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "uri", + "version", + "owner-tag", + "latest-revision", + "create-time", + "update-time", + "revisions" + ] + }, + "ListSecretResults": { + "type": "object", + "properties": { + "results": { "type": "array", "items": { - "type": "string" + "$ref": "#/definitions/ListSecretResult" } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "ListSecretsArgs": { + "type": "object", + "properties": { + "filter": { + "$ref": "#/definitions/SecretsFilter" + }, + "show-secrets": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "show-secrets", + "filter" + ] + }, + "SecretRevision": { + "type": "object", + "properties": { + "backend-name": { + "type": "string" + }, + "create-time": { + "type": "string", + "format": "date-time" + }, + "expire-time": { + "type": "string", + "format": "date-time" + }, + "revision": { + "type": "integer" + }, + "update-time": { + "type": "string", + "format": "date-time" }, - "terms": { - "type": "array", - "items": { - "type": "string" - } + "value-ref": { + "$ref": "#/definitions/SecretValueRef" } }, "additionalProperties": false, "required": [ - "name", - "summary", - "description", - "subordinate" + "revision" ] }, - "CharmMetric": { + "SecretValueRef": { "type": "object", "properties": { - "description": { + "backend-id": { "type": "string" }, - "type": { + "revision-id": { "type": "string" } }, "additionalProperties": false, "required": [ - "type", - "description" + "backend-id", + "revision-id" ] }, - "CharmMetrics": { + "SecretValueResult": { "type": "object", "properties": { - "metrics": { + "data": { "type": "object", "patternProperties": { ".*": { - "$ref": "#/definitions/CharmMetric" + "type": "string" } } }, - "plan": { - "$ref": "#/definitions/CharmPlan" + "error": { + "$ref": "#/definitions/Error" } }, - "additionalProperties": false, - "required": [ - "metrics", - "plan" - ] + "additionalProperties": false }, - "CharmMount": { + "SecretsFilter": { "type": "object", "properties": { - "location": { + "owner-tag": { "type": "string" }, - "storage": { + "revision": { + "type": "integer" + }, + "uri": { "type": "string" } }, "additionalProperties": false - }, - "CharmOption": { + } + } + } + }, + { + "Name": "SecretsDrain", + "Description": "SecretsDrainAPI is the implementation for the SecretsDrain facade.", + "Version": 1, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "ChangeSecretBackend": { "type": "object", "properties": { - "default": { - "type": "object", - "additionalProperties": true - }, - "description": { - "type": "string" + "Params": { + "$ref": "#/definitions/ChangeSecretBackendArgs" }, - "type": { - "type": "string" + "Result": { + "$ref": "#/definitions/ErrorResults" } }, - "additionalProperties": false, - "required": [ - "type" - ] + "description": "ChangeSecretBackend updates the backend for the specified secret after migration done." }, - "CharmOrigin": { + "GetSecretsToDrain": { "type": "object", "properties": { - "architecture": { - "type": "string" - }, - "base": { - "$ref": "#/definitions/Base" - }, - "branch": { - "type": "string" - }, - "hash": { - "type": "string" - }, - "id": { - "type": "string" - }, - "instance-key": { - "type": "string" + "Result": { + "$ref": "#/definitions/ListSecretResults" + } + }, + "description": "GetSecretsToDrain returns metadata for the secrets that need to be drained." + }, + "WatchSecretBackendChanged": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/NotifyWatchResult" + } + }, + "description": "WatchSecretBackendChanged sets up a watcher to notify of changes to the secret backend." + } + }, + "definitions": { + "ChangeSecretBackendArg": { + "type": "object", + "properties": { + "content": { + "$ref": "#/definitions/SecretContentParams" }, "revision": { "type": "integer" }, - "risk": { - "type": "string" - }, - "source": { - "type": "string" - }, - "track": { - "type": "string" - }, - "type": { + "uri": { "type": "string" } }, "additionalProperties": false, "required": [ - "source", - "type", - "id" + "uri", + "revision" ] }, - "CharmOriginResult": { + "ChangeSecretBackendArgs": { "type": "object", "properties": { - "charm-origin": { - "$ref": "#/definitions/CharmOrigin" - }, - "error": { - "$ref": "#/definitions/Error" + "args": { + "type": "array", + "items": { + "$ref": "#/definitions/ChangeSecretBackendArg" + } } }, "additionalProperties": false, "required": [ - "charm-origin" + "args" ] }, - "CharmPayloadClass": { + "Error": { "type": "object", "properties": { - "name": { + "code": { "type": "string" }, - "type": { + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { "type": "string" } }, "additionalProperties": false, "required": [ - "name", - "type" + "message", + "code" ] }, - "CharmPlan": { + "ErrorResult": { "type": "object", "properties": { - "required": { - "type": "boolean" + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "ErrorResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResult" + } } }, "additionalProperties": false, "required": [ - "required" + "results" ] }, - "CharmRelation": { + "ListSecretResult": { "type": "object", "properties": { - "interface": { + "create-time": { + "type": "string", + "format": "date-time" + }, + "description": { "type": "string" }, - "limit": { + "label": { + "type": "string" + }, + "latest-expire-time": { + "type": "string", + "format": "date-time" + }, + "latest-revision": { "type": "integer" }, - "name": { + "next-rotate-time": { + "type": "string", + "format": "date-time" + }, + "owner-tag": { "type": "string" }, - "optional": { - "type": "boolean" + "revisions": { + "type": "array", + "items": { + "$ref": "#/definitions/SecretRevision" + } }, - "role": { + "rotate-policy": { + "type": "string" + }, + "update-time": { + "type": "string", + "format": "date-time" + }, + "uri": { + "type": "string" + }, + "value": { + "$ref": "#/definitions/SecretValueResult" + }, + "version": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "uri", + "version", + "owner-tag", + "latest-revision", + "create-time", + "update-time", + "revisions" + ] + }, + "ListSecretResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ListSecretResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "NotifyWatchResult": { + "type": "object", + "properties": { + "NotifyWatcherId": { "type": "string" }, - "scope": { - "type": "string" + "error": { + "$ref": "#/definitions/Error" } }, "additionalProperties": false, "required": [ - "name", - "role", - "interface", - "optional", - "limit", - "scope" + "NotifyWatcherId" ] }, - "CharmResource": { + "SecretContentParams": { "type": "object", "properties": { - "description": { - "type": "string" - }, - "fingerprint": { - "type": "array", - "items": { - "type": "integer" + "data": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } } }, - "name": { + "value-ref": { + "$ref": "#/definitions/SecretValueRef" + } + }, + "additionalProperties": false + }, + "SecretRevision": { + "type": "object", + "properties": { + "backend-name": { "type": "string" }, - "origin": { - "type": "string" + "create-time": { + "type": "string", + "format": "date-time" }, - "path": { - "type": "string" + "expire-time": { + "type": "string", + "format": "date-time" }, "revision": { "type": "integer" }, - "size": { - "type": "integer" + "update-time": { + "type": "string", + "format": "date-time" }, - "type": { - "type": "string" + "value-ref": { + "$ref": "#/definitions/SecretValueRef" } }, "additionalProperties": false, "required": [ - "name", - "type", - "path", - "origin", - "revision", - "fingerprint", - "size" + "revision" ] }, - "CharmResourceMeta": { + "SecretValueRef": { "type": "object", "properties": { - "description": { - "type": "string" - }, - "name": { - "type": "string" - }, - "path": { + "backend-id": { "type": "string" }, - "type": { + "revision-id": { "type": "string" } }, "additionalProperties": false, "required": [ - "name", - "type", - "path", - "description" + "backend-id", + "revision-id" ] }, - "CharmResourceResult": { + "SecretValueResult": { "type": "object", "properties": { - "CharmResource": { - "$ref": "#/definitions/CharmResource" - }, - "ErrorResult": { - "$ref": "#/definitions/ErrorResult" - }, - "description": { - "type": "string" + "data": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } }, "error": { "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + } + } + } + }, + { + "Name": "SecretsManager", + "Description": "SecretsManagerAPI is the implementation for the SecretsManager facade.", + "Version": 2, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "CreateSecretURIs": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/CreateSecretURIsArg" }, - "fingerprint": { - "type": "array", - "items": { - "type": "integer" - } - }, - "name": { - "type": "string" - }, - "origin": { - "type": "string" + "Result": { + "$ref": "#/definitions/StringResults" + } + }, + "description": "CreateSecretURIs creates new secret URIs." + }, + "CreateSecrets": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/CreateSecretArgs" }, - "path": { - "type": "string" + "Result": { + "$ref": "#/definitions/StringResults" + } + }, + "description": "CreateSecrets creates new secrets." + }, + "GetConsumerSecretsRevisionInfo": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/GetSecretConsumerInfoArgs" }, - "revision": { - "type": "integer" + "Result": { + "$ref": "#/definitions/SecretConsumerInfoResults" + } + }, + "description": "GetConsumerSecretsRevisionInfo returns the latest secret revisions for the specified secrets.\nThis facade method is used for remote watcher to get the latest secret revisions and labels for a secret changed hook." + }, + "GetSecretBackendConfigs": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/SecretBackendArgs" }, - "size": { - "type": "integer" + "Result": { + "$ref": "#/definitions/SecretBackendConfigResults" + } + }, + "description": "GetSecretBackendConfigs gets the config needed to create a client to secret backends." + }, + "GetSecretContentInfo": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/GetSecretContentArgs" }, - "type": { - "type": "string" + "Result": { + "$ref": "#/definitions/SecretContentResults" } }, - "additionalProperties": false, - "required": [ - "ErrorResult", - "name", - "type", - "path", - "origin", - "revision", - "fingerprint", - "size", - "CharmResource" - ] + "description": "GetSecretContentInfo returns the secret values for the specified secrets." }, - "CharmResourcesResults": { + "GetSecretMetadata": { "type": "object", "properties": { - "results": { - "type": "array", - "items": { - "type": "array", - "items": { - "$ref": "#/definitions/CharmResourceResult" - } - } + "Result": { + "$ref": "#/definitions/ListSecretResults" } }, - "additionalProperties": false, - "required": [ - "results" - ] + "description": "GetSecretMetadata returns metadata for the caller's secrets." }, - "CharmStorage": { + "GetSecretRevisionContentInfo": { "type": "object", "properties": { - "count-max": { - "type": "integer" - }, - "count-min": { - "type": "integer" - }, - "description": { - "type": "string" - }, - "location": { - "type": "string" - }, - "minimum-size": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "properties": { - "type": "array", - "items": { - "type": "string" - } - }, - "read-only": { - "type": "boolean" + "Params": { + "$ref": "#/definitions/SecretRevisionArg" }, - "shared": { - "type": "boolean" + "Result": { + "$ref": "#/definitions/SecretContentResults" + } + }, + "description": "GetSecretRevisionContentInfo returns the secret values for the specified secret revisions." + }, + "RemoveSecrets": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/DeleteSecretArgs" }, - "type": { - "type": "string" + "Result": { + "$ref": "#/definitions/ErrorResults" } }, - "additionalProperties": false, - "required": [ - "name", - "description", - "type", - "shared", - "read-only", - "count-min", - "count-max", - "minimum-size" - ] + "description": "RemoveSecrets removes the specified secrets." + }, + "SecretsGrant": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/GrantRevokeSecretArgs" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "SecretsGrant grants access to a secret for the specified subjects." }, - "CharmURL": { + "SecretsRevoke": { "type": "object", "properties": { - "url": { - "type": "string" + "Params": { + "$ref": "#/definitions/GrantRevokeSecretArgs" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" } }, - "additionalProperties": false, - "required": [ - "url" - ] + "description": "SecretsRevoke revokes access to a secret for the specified subjects." }, - "CharmURLAndOrigin": { + "SecretsRotated": { "type": "object", "properties": { - "charm-origin": { - "$ref": "#/definitions/CharmOrigin" - }, - "charm-url": { - "type": "string" + "Params": { + "$ref": "#/definitions/SecretRotatedArgs" }, - "macaroon": { - "$ref": "#/definitions/Macaroon" + "Result": { + "$ref": "#/definitions/ErrorResults" } }, - "additionalProperties": false, - "required": [ - "charm-url", - "charm-origin" - ] + "description": "SecretsRotated records when secrets were last rotated." }, - "CharmURLAndOrigins": { + "UpdateSecrets": { "type": "object", "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/CharmURLAndOrigin" - } + "Params": { + "$ref": "#/definitions/UpdateSecretArgs" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" } }, - "additionalProperties": false, - "required": [ - "entities" - ] + "description": "UpdateSecrets updates the specified secrets." }, - "CharmsList": { + "WatchConsumedSecretsChanges": { "type": "object", "properties": { - "names": { - "type": "array", - "items": { - "type": "string" - } + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/StringsWatchResults" } }, - "additionalProperties": false, - "required": [ - "names" - ] + "description": "WatchConsumedSecretsChanges sets up a watcher to notify of changes to secret revisions for the specified consumers." }, - "CharmsListResult": { + "WatchObsolete": { "type": "object", "properties": { - "charm-urls": { - "type": "array", - "items": { - "type": "string" - } + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/StringsWatchResult" } }, - "additionalProperties": false, - "required": [ - "charm-urls" - ] + "description": "WatchObsolete returns a watcher for notifying when:\n - a secret owned by the entity is deleted\n - a secret revision owed by the entity no longer\n has any consumers\n\nObsolete revisions results are \"uri/revno\" and deleted\nsecret results are \"uri\"." }, - "DownloadInfoResult": { + "WatchSecretRevisionsExpiryChanges": { "type": "object", "properties": { - "charm-origin": { - "$ref": "#/definitions/CharmOrigin" + "Params": { + "$ref": "#/definitions/Entities" }, - "url": { - "type": "string" + "Result": { + "$ref": "#/definitions/SecretTriggerWatchResult" } }, - "additionalProperties": false, - "required": [ - "url", - "charm-origin" - ] + "description": "WatchSecretRevisionsExpiryChanges sets up a watcher to notify of changes to secret revision expiry config." }, - "DownloadInfoResults": { + "WatchSecretsRotationChanges": { "type": "object", "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/DownloadInfoResult" - } + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/SecretTriggerWatchResult" } }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "Error": { + "description": "WatchSecretsRotationChanges sets up a watcher to notify of changes to secret rotation config." + } + }, + "definitions": { + "CreateSecretArg": { "type": "object", "properties": { - "code": { + "UpsertSecretArg": { + "$ref": "#/definitions/UpsertSecretArg" + }, + "content": { + "$ref": "#/definitions/SecretContentParams" + }, + "description": { "type": "string" }, - "info": { + "expire-time": { + "type": "string", + "format": "date-time" + }, + "label": { + "type": "string" + }, + "owner-tag": { + "type": "string" + }, + "params": { "type": "object", "patternProperties": { ".*": { @@ -5796,464 +40752,351 @@ } } }, - "message": { + "rotate-policy": { + "type": "string" + }, + "uri": { "type": "string" } }, "additionalProperties": false, "required": [ - "message", - "code" + "UpsertSecretArg", + "owner-tag" ] }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { + "CreateSecretArgs": { "type": "object", "properties": { - "results": { + "args": { "type": "array", "items": { - "$ref": "#/definitions/ErrorResult" + "$ref": "#/definitions/CreateSecretArg" } } }, "additionalProperties": false, "required": [ - "results" - ] - }, - "ExpressionTree": { - "type": "object", - "properties": { - "Expression": { - "type": "object", - "additionalProperties": true - } - }, - "additionalProperties": false, - "required": [ - "Expression" + "args" ] }, - "IsMeteredResult": { + "CreateSecretURIsArg": { "type": "object", "properties": { - "metered": { - "type": "boolean" + "count": { + "type": "integer" } }, "additionalProperties": false, "required": [ - "metered" + "count" ] }, - "Macaroon": { - "type": "object", - "additionalProperties": false - }, - "ResolveCharmWithChannel": { + "DeleteSecretArg": { "type": "object", "properties": { - "charm-origin": { - "$ref": "#/definitions/CharmOrigin" + "revisions": { + "type": "array", + "items": { + "type": "integer" + } }, - "reference": { + "uri": { "type": "string" - }, - "switch-charm": { - "type": "boolean" } }, "additionalProperties": false, "required": [ - "reference", - "charm-origin" + "uri" ] }, - "ResolveCharmWithChannelResult": { + "DeleteSecretArgs": { "type": "object", "properties": { - "charm-origin": { - "$ref": "#/definitions/CharmOrigin" - }, - "error": { - "$ref": "#/definitions/Error" - }, - "supported-series": { + "args": { "type": "array", "items": { - "type": "string" + "$ref": "#/definitions/DeleteSecretArg" } - }, - "url": { - "type": "string" } }, "additionalProperties": false, "required": [ - "url", - "charm-origin", - "supported-series" + "args" ] }, - "ResolveCharmWithChannelResults": { + "Entities": { "type": "object", "properties": { - "Results": { + "entities": { "type": "array", "items": { - "$ref": "#/definitions/ResolveCharmWithChannelResult" + "$ref": "#/definitions/Entity" } } }, "additionalProperties": false, "required": [ - "Results" + "entities" ] }, - "ResolveCharmsWithChannel": { + "Entity": { "type": "object", "properties": { - "macaroon": { - "$ref": "#/definitions/Macaroon" - }, - "resolve": { - "type": "array", - "items": { - "$ref": "#/definitions/ResolveCharmWithChannel" - } + "tag": { + "type": "string" } }, "additionalProperties": false, "required": [ - "resolve" + "tag" ] - } - } - } - }, - { - "Name": "Client", - "Description": "Client serves client-specific API methods.", - "Version": 6, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "FindTools": { + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ErrorResult": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/FindToolsParams" - }, - "Result": { - "$ref": "#/definitions/FindToolsResult" + "error": { + "$ref": "#/definitions/Error" } }, - "description": "FindTools returns a List containing all tools matching the given parameters.\nTODO(juju 3.1) - remove, used by 2.9 client only" + "additionalProperties": false }, - "FullStatus": { + "ErrorResults": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/StatusParams" - }, - "Result": { - "$ref": "#/definitions/FullStatus" + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResult" + } } }, - "description": "FullStatus gives the information needed for juju status over the api" + "additionalProperties": false, + "required": [ + "results" + ] }, - "StatusHistory": { + "GetSecretConsumerInfoArgs": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/StatusHistoryRequests" + "consumer-tag": { + "type": "string" }, - "Result": { - "$ref": "#/definitions/StatusHistoryResults" + "uris": { + "type": "array", + "items": { + "type": "string" + } } }, - "description": "StatusHistory returns a slice of past statuses for several entities." + "additionalProperties": false, + "required": [ + "consumer-tag", + "uris" + ] }, - "WatchAll": { + "GetSecretContentArg": { "type": "object", "properties": { - "Result": { - "$ref": "#/definitions/AllWatcherId" + "label": { + "type": "string" + }, + "peek": { + "type": "boolean" + }, + "refresh": { + "type": "boolean" + }, + "uri": { + "type": "string" } }, - "description": "WatchAll initiates a watcher for entities in the connected model." - } - }, - "definitions": { - "AllWatcherId": { + "additionalProperties": false, + "required": [ + "uri" + ] + }, + "GetSecretContentArgs": { "type": "object", "properties": { - "watcher-id": { - "type": "string" + "args": { + "type": "array", + "items": { + "$ref": "#/definitions/GetSecretContentArg" + } } }, "additionalProperties": false, "required": [ - "watcher-id" + "args" ] }, - "ApplicationOfferStatus": { + "GrantRevokeSecretArg": { "type": "object", "properties": { - "active-connected-count": { - "type": "integer" - }, - "application-name": { + "role": { "type": "string" }, - "charm": { + "scope-tag": { "type": "string" }, - "endpoints": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/RemoteEndpoint" - } + "subject-tags": { + "type": "array", + "items": { + "type": "string" } }, - "err": { - "$ref": "#/definitions/Error" - }, - "offer-name": { + "uri": { "type": "string" - }, - "total-connected-count": { - "type": "integer" } }, "additionalProperties": false, "required": [ - "offer-name", - "application-name", - "charm", - "endpoints", - "active-connected-count", - "total-connected-count" + "uri", + "scope-tag", + "subject-tags", + "role" ] }, - "ApplicationStatus": { + "GrantRevokeSecretArgs": { "type": "object", "properties": { - "base": { - "$ref": "#/definitions/Base" - }, - "can-upgrade-to": { - "type": "string" - }, - "charm": { - "type": "string" - }, - "charm-channel": { - "type": "string" + "args": { + "type": "array", + "items": { + "$ref": "#/definitions/GrantRevokeSecretArg" + } + } + }, + "additionalProperties": false, + "required": [ + "args" + ] + }, + "ListSecretResult": { + "type": "object", + "properties": { + "create-time": { + "type": "string", + "format": "date-time" }, - "charm-profile": { + "description": { "type": "string" }, - "charm-version": { + "label": { "type": "string" }, - "endpoint-bindings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "err": { - "$ref": "#/definitions/Error" - }, - "exposed": { - "type": "boolean" - }, - "exposed-endpoints": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/ExposedEndpoint" - } - } + "latest-expire-time": { + "type": "string", + "format": "date-time" }, - "int": { + "latest-revision": { "type": "integer" }, - "life": { - "type": "string" - }, - "meter-statuses": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/MeterStatus" - } - } - }, - "provider-id": { - "type": "string" + "next-rotate-time": { + "type": "string", + "format": "date-time" }, - "public-address": { + "owner-tag": { "type": "string" }, - "relations": { - "type": "object", - "patternProperties": { - ".*": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "status": { - "$ref": "#/definitions/DetailedStatus" - }, - "subordinate-to": { + "revisions": { "type": "array", "items": { - "type": "string" - } - }, - "units": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/UnitStatus" - } + "$ref": "#/definitions/SecretRevision" } }, - "workload-version": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "charm", - "charm-version", - "charm-profile", - "base", - "exposed", - "life", - "relations", - "can-upgrade-to", - "subordinate-to", - "units", - "meter-statuses", - "status", - "workload-version", - "endpoint-bindings", - "public-address" - ] - }, - "Base": { - "type": "object", - "properties": { - "channel": { + "rotate-policy": { "type": "string" }, - "name": { + "update-time": { + "type": "string", + "format": "date-time" + }, + "uri": { "type": "string" + }, + "value": { + "$ref": "#/definitions/SecretValueResult" + }, + "version": { + "type": "integer" } }, "additionalProperties": false, "required": [ - "name", - "channel" + "uri", + "version", + "owner-tag", + "latest-revision", + "create-time", + "update-time", + "revisions" ] }, - "Binary": { + "ListSecretResults": { "type": "object", "properties": { - "Arch": { - "type": "string" - }, - "Build": { - "type": "integer" - }, - "Major": { - "type": "integer" - }, - "Minor": { - "type": "integer" - }, - "Number": { - "$ref": "#/definitions/Number" - }, - "Patch": { - "type": "integer" - }, - "Release": { - "type": "string" - }, - "Tag": { - "type": "string" + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ListSecretResult" + } } }, "additionalProperties": false, "required": [ - "Major", - "Minor", - "Tag", - "Patch", - "Build", - "Number", - "Release", - "Arch" + "results" ] }, - "BranchStatus": { + "SecretBackendArgs": { "type": "object", "properties": { - "assigned-units": { - "type": "object", - "patternProperties": { - ".*": { - "type": "array", - "items": { - "type": "string" - } - } + "backend-ids": { + "type": "array", + "items": { + "type": "string" } }, - "created": { - "type": "integer" - }, - "created-by": { - "type": "string" + "for-drain": { + "type": "boolean" } }, "additionalProperties": false, "required": [ - "assigned-units", - "created", - "created-by" + "for-drain", + "backend-ids" ] }, - "DetailedStatus": { + "SecretBackendConfig": { "type": "object", "properties": { - "data": { + "params": { "type": "object", "patternProperties": { ".*": { @@ -6262,691 +41105,767 @@ } } }, - "err": { - "$ref": "#/definitions/Error" - }, - "info": { - "type": "string" - }, - "kind": { - "type": "string" - }, - "life": { - "type": "string" - }, - "since": { - "type": "string", - "format": "date-time" - }, - "status": { - "type": "string" - }, - "version": { + "type": { "type": "string" } }, "additionalProperties": false, "required": [ - "status", - "info", - "data", - "since", - "kind", - "version", - "life" + "type" ] }, - "EndpointStatus": { + "SecretBackendConfigResult": { "type": "object", "properties": { - "application": { - "type": "string" + "config": { + "$ref": "#/definitions/SecretBackendConfig" }, - "name": { + "draining": { + "type": "boolean" + }, + "model-controller": { "type": "string" }, - "role": { + "model-name": { "type": "string" }, - "subordinate": { - "type": "boolean" + "model-uuid": { + "type": "string" } }, "additionalProperties": false, "required": [ - "application", - "name", - "role", - "subordinate" + "model-controller", + "model-uuid", + "model-name", + "draining" ] }, - "Error": { + "SecretBackendConfigResults": { "type": "object", "properties": { - "code": { + "active-id": { "type": "string" }, - "info": { + "results": { "type": "object", "patternProperties": { ".*": { - "type": "object", - "additionalProperties": true + "$ref": "#/definitions/SecretBackendConfigResult" } } + } + }, + "additionalProperties": false, + "required": [ + "active-id" + ] + }, + "SecretConsumerInfoResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" }, - "message": { + "label": { "type": "string" + }, + "revision": { + "type": "integer" } }, "additionalProperties": false, "required": [ - "message", - "code" + "revision", + "label" ] }, - "ExposedEndpoint": { + "SecretConsumerInfoResults": { "type": "object", "properties": { - "expose-to-cidrs": { + "results": { "type": "array", "items": { - "type": "string" + "$ref": "#/definitions/SecretConsumerInfoResult" } - }, - "expose-to-spaces": { - "type": "array", - "items": { - "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "SecretContentParams": { + "type": "object", + "properties": { + "data": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } } + }, + "value-ref": { + "$ref": "#/definitions/SecretValueRef" } }, "additionalProperties": false }, - "FindToolsParams": { + "SecretContentResult": { "type": "object", "properties": { - "agentstream": { - "type": "string" - }, - "arch": { - "type": "string" + "backend-config": { + "$ref": "#/definitions/SecretBackendConfigResult" }, - "major": { - "type": "integer" + "content": { + "$ref": "#/definitions/SecretContentParams" }, - "number": { - "$ref": "#/definitions/Number" + "error": { + "$ref": "#/definitions/Error" }, - "os-type": { - "type": "string" + "latest-revision": { + "type": "integer" } }, "additionalProperties": false, "required": [ - "number", - "major", - "arch", - "os-type", - "agentstream" + "content" ] }, - "FindToolsResult": { + "SecretContentResults": { "type": "object", "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "list": { + "results": { "type": "array", "items": { - "$ref": "#/definitions/Tools" + "$ref": "#/definitions/SecretContentResult" } } }, "additionalProperties": false, "required": [ - "list" + "results" ] }, - "FullStatus": { + "SecretRevision": { "type": "object", "properties": { - "applications": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/ApplicationStatus" - } - } + "backend-name": { + "type": "string" }, - "branches": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/BranchStatus" - } - } + "create-time": { + "type": "string", + "format": "date-time" }, - "controller-timestamp": { + "expire-time": { "type": "string", "format": "date-time" }, - "machines": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/MachineStatus" - } - } + "revision": { + "type": "integer" }, - "model": { - "$ref": "#/definitions/ModelStatusInfo" + "update-time": { + "type": "string", + "format": "date-time" }, - "offers": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/ApplicationOfferStatus" - } - } + "value-ref": { + "$ref": "#/definitions/SecretValueRef" + } + }, + "additionalProperties": false, + "required": [ + "revision" + ] + }, + "SecretRevisionArg": { + "type": "object", + "properties": { + "pending-delete": { + "type": "boolean" }, - "relations": { + "revisions": { "type": "array", "items": { - "$ref": "#/definitions/RelationStatus" + "type": "integer" } }, - "remote-applications": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/RemoteApplicationStatus" - } - } + "uri": { + "type": "string" } }, "additionalProperties": false, "required": [ - "model", - "machines", - "applications", - "remote-applications", - "offers", - "relations", - "controller-timestamp", - "branches" + "uri", + "revisions", + "pending-delete" ] }, - "History": { + "SecretRotatedArg": { "type": "object", "properties": { - "error": { - "$ref": "#/definitions/Error" + "original-revision": { + "type": "integer" }, - "statuses": { + "skip": { + "type": "boolean" + }, + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri", + "original-revision", + "skip" + ] + }, + "SecretRotatedArgs": { + "type": "object", + "properties": { + "args": { "type": "array", "items": { - "$ref": "#/definitions/DetailedStatus" + "$ref": "#/definitions/SecretRotatedArg" } } }, "additionalProperties": false, "required": [ - "statuses" + "args" ] }, - "LXDProfile": { + "SecretTriggerChange": { "type": "object", "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } + "next-trigger-time": { + "type": "string", + "format": "date-time" }, - "description": { - "type": "string" + "revision": { + "type": "integer" }, - "devices": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - } - } + "uri": { + "type": "string" } }, "additionalProperties": false, "required": [ - "config", - "description", - "devices" + "uri", + "next-trigger-time" ] }, - "MachineStatus": { + "SecretTriggerWatchResult": { "type": "object", "properties": { - "agent-status": { - "$ref": "#/definitions/DetailedStatus" + "changes": { + "type": "array", + "items": { + "$ref": "#/definitions/SecretTriggerChange" + } }, - "base": { - "$ref": "#/definitions/Base" + "error": { + "$ref": "#/definitions/Error" }, - "constraints": { + "watcher-id": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "watcher-id", + "changes" + ] + }, + "SecretValueRef": { + "type": "object", + "properties": { + "backend-id": { "type": "string" }, - "containers": { + "revision-id": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "backend-id", + "revision-id" + ] + }, + "SecretValueResult": { + "type": "object", + "properties": { + "data": { "type": "object", "patternProperties": { ".*": { - "$ref": "#/definitions/MachineStatus" + "type": "string" } } }, - "display-name": { - "type": "string" - }, - "dns-name": { - "type": "string" - }, - "hardware": { - "type": "string" - }, - "has-vote": { - "type": "boolean" - }, - "hostname": { - "type": "string" - }, - "id": { - "type": "string" + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "StringResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" }, - "instance-id": { + "result": { "type": "string" - }, - "instance-status": { - "$ref": "#/definitions/DetailedStatus" - }, - "ip-addresses": { + } + }, + "additionalProperties": false, + "required": [ + "result" + ] + }, + "StringResults": { + "type": "object", + "properties": { + "results": { "type": "array", "items": { - "type": "string" + "$ref": "#/definitions/StringResult" } - }, - "jobs": { + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "StringsWatchResult": { + "type": "object", + "properties": { + "changes": { "type": "array", "items": { "type": "string" } }, - "lxd-profiles": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/LXDProfile" - } - } - }, - "modification-status": { - "$ref": "#/definitions/DetailedStatus" - }, - "network-interfaces": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/NetworkInterface" - } - } - }, - "primary-controller-machine": { - "type": "boolean" + "error": { + "$ref": "#/definitions/Error" }, - "wants-vote": { - "type": "boolean" + "watcher-id": { + "type": "string" } }, "additionalProperties": false, "required": [ - "agent-status", - "instance-status", - "modification-status", - "dns-name", - "instance-id", - "display-name", - "base", - "id", - "containers", - "constraints", - "hardware", - "jobs", - "has-vote", - "wants-vote" + "watcher-id" ] }, - "MeterStatus": { + "StringsWatchResults": { "type": "object", "properties": { - "color": { - "type": "string" - }, - "message": { - "type": "string" + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/StringsWatchResult" + } } }, "additionalProperties": false, "required": [ - "color", - "message" + "results" ] }, - "ModelStatusInfo": { + "UpdateSecretArg": { "type": "object", "properties": { - "available-version": { - "type": "string" - }, - "cloud-tag": { - "type": "string" - }, - "meter-status": { - "$ref": "#/definitions/MeterStatus" + "UpsertSecretArg": { + "$ref": "#/definitions/UpsertSecretArg" }, - "model-status": { - "$ref": "#/definitions/DetailedStatus" - }, - "name": { - "type": "string" + "content": { + "$ref": "#/definitions/SecretContentParams" }, - "region": { + "description": { "type": "string" }, - "sla": { + "expire-time": { + "type": "string", + "format": "date-time" + }, + "label": { "type": "string" }, - "type": { + "params": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "rotate-policy": { "type": "string" }, - "version": { + "uri": { "type": "string" } }, "additionalProperties": false, "required": [ - "name", - "type", - "cloud-tag", - "version", - "available-version", - "model-status", - "meter-status", - "sla" + "UpsertSecretArg", + "uri" ] }, - "NetworkInterface": { + "UpdateSecretArgs": { "type": "object", "properties": { - "dns-nameservers": { + "args": { "type": "array", "items": { - "type": "string" + "$ref": "#/definitions/UpdateSecretArg" } + } + }, + "additionalProperties": false, + "required": [ + "args" + ] + }, + "UpsertSecretArg": { + "type": "object", + "properties": { + "content": { + "$ref": "#/definitions/SecretContentParams" }, - "gateway": { + "description": { "type": "string" }, - "ip-addresses": { - "type": "array", - "items": { - "type": "string" - } - }, - "is-up": { - "type": "boolean" + "expire-time": { + "type": "string", + "format": "date-time" }, - "mac-address": { + "label": { "type": "string" }, - "space": { + "params": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "rotate-policy": { "type": "string" } }, - "additionalProperties": false, - "required": [ - "ip-addresses", - "mac-address", - "is-up" - ] + "additionalProperties": false + } + } + } + }, + { + "Name": "SecretsRevisionWatcher", + "Description": "srvSecretsRevisionWatcher defines the API wrapping a SecretsRevisionWatcher.", + "Version": 1, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "Next": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/SecretRevisionWatchResult" + } + }, + "description": "Next returns when a change has occurred to an entity of the\ncollection being watched since the most recent call to Next\nor the Watch call that created the srvSecretRotationWatcher." }, - "Number": { + "Stop": { + "type": "object", + "description": "Stop stops the watcher." + } + }, + "definitions": { + "Error": { "type": "object", "properties": { - "Build": { - "type": "integer" - }, - "Major": { - "type": "integer" - }, - "Minor": { - "type": "integer" + "code": { + "type": "string" }, - "Patch": { - "type": "integer" + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } }, - "Tag": { + "message": { "type": "string" } }, "additionalProperties": false, "required": [ - "Major", - "Minor", - "Tag", - "Patch", - "Build" + "message", + "code" ] }, - "RelationStatus": { + "SecretRevisionChange": { "type": "object", "properties": { - "endpoints": { - "type": "array", - "items": { - "$ref": "#/definitions/EndpointStatus" - } - }, - "id": { + "revision": { "type": "integer" }, - "interface": { - "type": "string" - }, - "key": { - "type": "string" - }, - "scope": { + "uri": { "type": "string" - }, - "status": { - "$ref": "#/definitions/DetailedStatus" } }, "additionalProperties": false, "required": [ - "id", - "key", - "interface", - "scope", - "endpoints", - "status" + "uri", + "revision" ] }, - "RemoteApplicationStatus": { + "SecretRevisionWatchResult": { "type": "object", "properties": { - "endpoints": { + "changes": { "type": "array", "items": { - "$ref": "#/definitions/RemoteEndpoint" + "$ref": "#/definitions/SecretRevisionChange" } }, - "err": { + "error": { "$ref": "#/definitions/Error" }, - "life": { - "type": "string" - }, - "offer-name": { + "watcher-id": { "type": "string" - }, - "offer-url": { + } + }, + "additionalProperties": false, + "required": [ + "watcher-id", + "changes" + ] + } + } + } + }, + { + "Name": "SecretsTriggerWatcher", + "Description": "srvSecretTriggerWatcher defines the API wrapping a SecretsTriggerWatcher.", + "Version": 1, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "Next": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/SecretTriggerWatchResult" + } + }, + "description": "Next returns when a change has occurred to an entity of the\ncollection being watched since the most recent call to Next\nor the Watch call that created the srvSecretRotationWatcher." + }, + "Stop": { + "type": "object", + "description": "Stop stops the watcher." + } + }, + "definitions": { + "Error": { + "type": "object", + "properties": { + "code": { "type": "string" }, - "relations": { + "info": { "type": "object", "patternProperties": { ".*": { - "type": "array", - "items": { - "type": "string" - } + "type": "object", + "additionalProperties": true } } }, - "status": { - "$ref": "#/definitions/DetailedStatus" + "message": { + "type": "string" } }, "additionalProperties": false, "required": [ - "offer-url", - "offer-name", - "endpoints", - "life", - "relations", - "status" + "message", + "code" ] }, - "RemoteEndpoint": { + "SecretTriggerChange": { "type": "object", "properties": { - "interface": { - "type": "string" + "next-trigger-time": { + "type": "string", + "format": "date-time" }, - "limit": { + "revision": { "type": "integer" }, - "name": { + "uri": { "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri", + "next-trigger-time" + ] + }, + "SecretTriggerWatchResult": { + "type": "object", + "properties": { + "changes": { + "type": "array", + "items": { + "$ref": "#/definitions/SecretTriggerChange" + } + }, + "error": { + "$ref": "#/definitions/Error" }, - "role": { + "watcher-id": { "type": "string" } }, "additionalProperties": false, "required": [ - "name", - "role", - "interface", - "limit" + "watcher-id", + "changes" ] - }, - "StatusHistoryFilter": { + } + } + } + }, + { + "Name": "Singular", + "Description": "Facade allows controller machines to request exclusive rights to administer\nsome specific model or controller for a limited time.", + "Version": 2, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "Claim": { "type": "object", "properties": { - "date": { - "type": "string", - "format": "date-time" + "Params": { + "$ref": "#/definitions/SingularClaims" }, - "delta": { - "type": "integer" + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "Claim makes the supplied singular-controller lease requests. (In practice,\nany requests not for the connection's model or controller, or not on behalf\nof the connected ModelManager machine, will be rejected.)" + }, + "Wait": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" }, - "exclude": { + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "Wait waits for the singular-controller lease to expire for all supplied\nentities. (In practice, any requests that do not refer to the connection's\nmodel or controller will be rejected.)" + } + }, + "definitions": { + "Entities": { + "type": "object", + "properties": { + "entities": { "type": "array", "items": { - "type": "string" + "$ref": "#/definitions/Entity" } - }, - "size": { - "type": "integer" } }, "additionalProperties": false, "required": [ - "size", - "date", - "delta", - "exclude" + "entities" ] }, - "StatusHistoryRequest": { + "Entity": { "type": "object", "properties": { - "filter": { - "$ref": "#/definitions/StatusHistoryFilter" - }, - "historyKind": { - "type": "string" - }, - "size": { - "type": "integer" - }, "tag": { "type": "string" } }, "additionalProperties": false, "required": [ - "historyKind", - "size", - "filter", "tag" ] }, - "StatusHistoryRequests": { + "Error": { "type": "object", "properties": { - "requests": { - "type": "array", - "items": { - "$ref": "#/definitions/StatusHistoryRequest" + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } } + }, + "message": { + "type": "string" } }, "additionalProperties": false, "required": [ - "requests" + "message", + "code" ] }, - "StatusHistoryResult": { + "ErrorResult": { "type": "object", "properties": { "error": { "$ref": "#/definitions/Error" - }, - "history": { - "$ref": "#/definitions/History" } }, - "additionalProperties": false, - "required": [ - "history" - ] + "additionalProperties": false }, - "StatusHistoryResults": { + "ErrorResults": { "type": "object", "properties": { "results": { "type": "array", "items": { - "$ref": "#/definitions/StatusHistoryResult" + "$ref": "#/definitions/ErrorResult" } } }, @@ -6955,740 +41874,923 @@ "results" ] }, - "StatusParams": { - "type": "object", - "properties": { - "patterns": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "patterns" - ] - }, - "Tools": { + "SingularClaim": { "type": "object", "properties": { - "sha256": { + "claimant-tag": { "type": "string" }, - "size": { + "duration": { "type": "integer" }, - "url": { + "entity-tag": { "type": "string" - }, - "version": { - "$ref": "#/definitions/Binary" } }, "additionalProperties": false, "required": [ - "version", - "url", - "size" + "entity-tag", + "claimant-tag", + "duration" ] }, - "UnitStatus": { + "SingularClaims": { "type": "object", "properties": { - "address": { - "type": "string" - }, - "agent-status": { - "$ref": "#/definitions/DetailedStatus" - }, - "charm": { - "type": "string" - }, - "leader": { - "type": "boolean" - }, - "machine": { - "type": "string" - }, - "opened-ports": { + "claims": { "type": "array", "items": { - "type": "string" - } - }, - "provider-id": { - "type": "string" - }, - "public-address": { - "type": "string" - }, - "subordinates": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/UnitStatus" - } + "$ref": "#/definitions/SingularClaim" } - }, - "workload-status": { - "$ref": "#/definitions/DetailedStatus" - }, - "workload-version": { - "type": "string" } }, "additionalProperties": false, "required": [ - "agent-status", - "workload-status", - "workload-version", - "machine", - "opened-ports", - "public-address", - "charm", - "subordinates" + "claims" ] } } } }, { - "Name": "Cloud", - "Description": "CloudAPI implements the cloud interface and is the concrete implementation\nof the api end point.", - "Version": 7, + "Name": "Spaces", + "Description": "API provides the spaces API facade for version 6.", + "Version": 6, "AvailableTo": [ "controller-machine-agent", "machine-agent", "unit-agent", - "controller-user" + "model-user" ], "Schema": { "type": "object", "properties": { - "AddCloud": { + "CreateSpaces": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/AddCloudArgs" + "$ref": "#/definitions/CreateSpacesParams" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" } }, - "description": "AddCloud adds a new cloud, different from the one managed by the controller." + "description": "CreateSpaces creates a new Juju network space, associating the\nspecified subnets with it (optional; can be empty)." }, - "AddCredentials": { + "ListSpaces": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/ListSpacesResults" + } + }, + "description": "ListSpaces lists all the available spaces and their associated subnets." + }, + "MoveSubnets": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/TaggedCredentials" + "$ref": "#/definitions/MoveSubnetsParams" }, "Result": { - "$ref": "#/definitions/ErrorResults" + "$ref": "#/definitions/MoveSubnetsResults" } }, - "description": "AddCredentials adds new credentials.\nIn contrast to UpdateCredentials() below, the new credentials can be\nfor a cloud that the controller does not manage (this is required\nfor CAAS models)" + "description": "MoveSubnets ensures that the input subnets are in the input space." }, - "CheckCredentialsModels": { + "ReloadSpaces": { + "type": "object", + "description": "ReloadSpaces refreshes spaces from substrate" + }, + "RemoveSpace": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/TaggedCredentials" + "$ref": "#/definitions/RemoveSpaceParams" }, "Result": { - "$ref": "#/definitions/UpdateCredentialResults" + "$ref": "#/definitions/RemoveSpaceResults" } }, - "description": "CheckCredentialsModels validates supplied cloud credentials' content against\nmodels that currently use these credentials.\nIf there are any models that are using a credential and these models or their\ncloud instances are not going to be accessible with corresponding credential,\nthere will be detailed validation errors per model.\nThere's no Juju API client which uses this, but JAAS does," + "description": "RemoveSpace removes a space.\nReturns SpaceResults if entities/settings are found which makes the deletion not possible." }, - "Cloud": { + "RenameSpace": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/RenameSpacesParams" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "RenameSpace renames a space." + }, + "ShowSpace": { "type": "object", "properties": { "Params": { "$ref": "#/definitions/Entities" }, - "Result": { - "$ref": "#/definitions/CloudResults" + "Result": { + "$ref": "#/definitions/ShowSpaceResults" + } + }, + "description": "ShowSpace shows the spaces for a set of given entities." + } + }, + "definitions": { + "CreateSpaceParams": { + "type": "object", + "properties": { + "cidrs": { + "type": "array", + "items": { + "type": "string" + } + }, + "provider-id": { + "type": "string" + }, + "public": { + "type": "boolean" + }, + "space-tag": { + "type": "string" } }, - "description": "Cloud returns the cloud definitions for the specified clouds." + "additionalProperties": false, + "required": [ + "cidrs", + "space-tag", + "public" + ] }, - "CloudInfo": { + "CreateSpacesParams": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/CloudInfoResults" + "spaces": { + "type": "array", + "items": { + "$ref": "#/definitions/CreateSpaceParams" + } } }, - "description": "CloudInfo returns information about the specified clouds." + "additionalProperties": false, + "required": [ + "spaces" + ] }, - "Clouds": { + "Entities": { "type": "object", "properties": { - "Result": { - "$ref": "#/definitions/CloudsResult" + "entities": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } } }, - "description": "Clouds returns the definitions of all clouds supported by the controller\nthat the logged in user can see." + "additionalProperties": false, + "required": [ + "entities" + ] }, - "Credential": { + "Entity": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/CloudCredentialResults" + "tag": { + "type": "string" } }, - "description": "Credential returns the specified cloud credential for each tag, minus secrets." + "additionalProperties": false, + "required": [ + "tag" + ] }, - "CredentialContents": { + "Error": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/CloudCredentialArgs" + "code": { + "type": "string" }, - "Result": { - "$ref": "#/definitions/CredentialContentResults" + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" } }, - "description": "CredentialContents returns the specified cloud credentials,\nincluding the secrets if requested.\nIf no specific credential name/cloud was passed in, all credentials for this user\nare returned.\nOnly credential owner can see its contents as well as what models use it.\nController admin has no special superpowers here and is treated the same as all other users." + "additionalProperties": false, + "required": [ + "message", + "code" + ] }, - "InstanceTypes": { + "ErrorResult": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/CloudInstanceTypesConstraints" - }, - "Result": { - "$ref": "#/definitions/InstanceTypesResults" + "error": { + "$ref": "#/definitions/Error" } }, - "description": "InstanceTypes returns instance type information for the cloud and region\nin which the current model is deployed." + "additionalProperties": false }, - "ListCloudInfo": { + "ErrorResults": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/ListCloudsRequest" - }, - "Result": { - "$ref": "#/definitions/ListCloudInfoResults" + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResult" + } } }, - "description": "ListCloudInfo returns clouds that the specified user has access to.\nController admins (superuser) can list clouds for any user.\nOther users can only ask about their own clouds." + "additionalProperties": false, + "required": [ + "results" + ] }, - "ModifyCloudAccess": { + "ListSpacesResults": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/ModifyCloudAccessRequest" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/Space" + } } }, - "description": "ModifyCloudAccess changes the model access granted to users." + "additionalProperties": false, + "required": [ + "results" + ] }, - "RemoveClouds": { + "MoveSubnetsParam": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/Entities" + "force": { + "type": "boolean" }, - "Result": { - "$ref": "#/definitions/ErrorResults" + "space-tag": { + "type": "string" + }, + "subnets": { + "type": "array", + "items": { + "type": "string" + } } }, - "description": "RemoveClouds removes the specified clouds from the controller.\nIf a cloud is in use (has models deployed to it), the removal will fail." + "additionalProperties": false, + "required": [ + "subnets", + "space-tag", + "force" + ] }, - "RevokeCredentialsCheckModels": { + "MoveSubnetsParams": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/RevokeCredentialArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" + "args": { + "type": "array", + "items": { + "$ref": "#/definitions/MoveSubnetsParam" + } } }, - "description": "RevokeCredentialsCheckModels revokes a set of cloud credentials.\nIf the credentials are used by any of the models, the credential deletion will be aborted.\nIf credential-in-use needs to be revoked nonetheless, this method allows the use of force." + "additionalProperties": false, + "required": [ + "args" + ] }, - "UpdateCloud": { + "MoveSubnetsResult": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/UpdateCloudArgs" + "error": { + "$ref": "#/definitions/Error" }, - "Result": { - "$ref": "#/definitions/ErrorResults" + "moved-subnets": { + "type": "array", + "items": { + "$ref": "#/definitions/MovedSubnet" + } + }, + "new-space": { + "type": "string" } }, - "description": "UpdateCloud updates an existing cloud that the controller knows about." + "additionalProperties": false, + "required": [ + "new-space" + ] }, - "UpdateCredentialsCheckModels": { + "MoveSubnetsResults": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/UpdateCredentialArgs" - }, - "Result": { - "$ref": "#/definitions/UpdateCredentialResults" + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/MoveSubnetsResult" + } } }, - "description": "UpdateCredentialsCheckModels updates a set of cloud credentials' content.\nIf there are any models that are using a credential and these models\nare not going to be visible with updated credential content,\nthere will be detailed validation errors per model. Such model errors are returned\nseparately and do not contribute to the overall method error status.\nController admins can 'force' an update of the credential\nregardless of whether it is deemed valid or not." + "additionalProperties": false, + "required": [ + "results" + ] }, - "UserCredentials": { + "MovedSubnet": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/UserClouds" + "cidr": { + "type": "string" }, - "Result": { - "$ref": "#/definitions/StringsResults" + "old-space": { + "type": "string" + }, + "subnet": { + "type": "string" } }, - "description": "UserCredentials returns the cloud credentials for a set of users." - } - }, - "definitions": { - "AddCloudArgs": { + "additionalProperties": false, + "required": [ + "subnet", + "old-space", + "cidr" + ] + }, + "RemoveSpaceParam": { "type": "object", "properties": { - "cloud": { - "$ref": "#/definitions/Cloud" + "dry-run": { + "type": "boolean" }, "force": { "type": "boolean" }, - "name": { - "type": "string" + "space": { + "$ref": "#/definitions/Entity" + } + }, + "additionalProperties": false, + "required": [ + "space" + ] + }, + "RemoveSpaceParams": { + "type": "object", + "properties": { + "space-param": { + "type": "array", + "items": { + "$ref": "#/definitions/RemoveSpaceParam" + } } }, "additionalProperties": false, "required": [ - "cloud", - "name" + "space-param" ] }, - "Cloud": { + "RemoveSpaceResult": { "type": "object", "properties": { - "auth-types": { + "bindings": { "type": "array", "items": { - "type": "string" + "$ref": "#/definitions/Entity" } }, - "ca-certificates": { + "constraints": { "type": "array", "items": { - "type": "string" - } - }, - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "endpoint": { - "type": "string" - }, - "host-cloud-region": { - "type": "string" - }, - "identity-endpoint": { - "type": "string" - }, - "is-controller-cloud": { - "type": "boolean" - }, - "region-config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - } + "$ref": "#/definitions/Entity" } }, - "regions": { + "controller-settings": { "type": "array", "items": { - "$ref": "#/definitions/CloudRegion" + "type": "string" } }, - "skip-tls-verify": { - "type": "boolean" - }, - "storage-endpoint": { - "type": "string" - }, - "type": { - "type": "string" + "error": { + "$ref": "#/definitions/Error" } }, - "additionalProperties": false, - "required": [ - "type" - ] + "additionalProperties": false }, - "CloudCredential": { + "RemoveSpaceResults": { "type": "object", "properties": { - "attrs": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "auth-type": { - "type": "string" - }, - "redacted": { + "results": { "type": "array", "items": { - "type": "string" + "$ref": "#/definitions/RemoveSpaceResult" } } }, "additionalProperties": false, "required": [ - "auth-type" + "results" ] }, - "CloudCredentialArg": { + "RenameSpaceParams": { "type": "object", "properties": { - "cloud-name": { + "from-space-tag": { "type": "string" }, - "credential-name": { + "to-space-tag": { "type": "string" } }, "additionalProperties": false, "required": [ - "cloud-name", - "credential-name" + "from-space-tag", + "to-space-tag" ] }, - "CloudCredentialArgs": { + "RenameSpacesParams": { "type": "object", "properties": { - "credentials": { + "changes": { "type": "array", "items": { - "$ref": "#/definitions/CloudCredentialArg" + "$ref": "#/definitions/RenameSpaceParams" } - }, - "include-secrets": { - "type": "boolean" } }, "additionalProperties": false, "required": [ - "include-secrets" + "changes" ] }, - "CloudCredentialResult": { + "ShowSpaceResult": { "type": "object", "properties": { + "applications": { + "type": "array", + "items": { + "type": "string" + } + }, "error": { "$ref": "#/definitions/Error" }, - "result": { - "$ref": "#/definitions/CloudCredential" + "machine-count": { + "type": "integer" + }, + "space": { + "$ref": "#/definitions/Space" } }, - "additionalProperties": false + "additionalProperties": false, + "required": [ + "space", + "applications", + "machine-count" + ] }, - "CloudCredentialResults": { + "ShowSpaceResults": { "type": "object", "properties": { "results": { "type": "array", "items": { - "$ref": "#/definitions/CloudCredentialResult" + "$ref": "#/definitions/ShowSpaceResult" } } }, - "additionalProperties": false + "additionalProperties": false, + "required": [ + "results" + ] }, - "CloudDetails": { + "Space": { "type": "object", "properties": { - "auth-types": { + "error": { + "$ref": "#/definitions/Error" + }, + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "subnets": { "type": "array", "items": { - "type": "string" + "$ref": "#/definitions/Subnet" } + } + }, + "additionalProperties": false, + "required": [ + "id", + "name", + "subnets" + ] + }, + "Subnet": { + "type": "object", + "properties": { + "cidr": { + "type": "string" }, - "endpoint": { + "life": { "type": "string" }, - "identity-endpoint": { + "provider-id": { "type": "string" }, - "regions": { + "provider-network-id": { + "type": "string" + }, + "provider-space-id": { + "type": "string" + }, + "space-tag": { + "type": "string" + }, + "status": { + "type": "string" + }, + "vlan-tag": { + "type": "integer" + }, + "zones": { "type": "array", "items": { - "$ref": "#/definitions/CloudRegion" + "type": "string" } - }, - "storage-endpoint": { + } + }, + "additionalProperties": false, + "required": [ + "cidr", + "vlan-tag", + "life", + "space-tag", + "zones" + ] + } + } + } + }, + { + "Name": "StatusHistory", + "Description": "API is the concrete implementation of the Pruner endpoint.", + "Version": 2, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "ModelConfig": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/ModelConfigResult" + } + }, + "description": "ModelConfig returns the current model's configuration." + }, + "Prune": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/StatusHistoryPruneArgs" + } + }, + "description": "Prune endpoint removes status history entries until\nonly the ones newer than now - p.MaxHistoryTime remain and\nthe history is smaller than p.MaxHistoryMB." + }, + "WatchForModelConfigChanges": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/NotifyWatchResult" + } + }, + "description": "WatchForModelConfigChanges returns a NotifyWatcher that observes\nchanges to the model configuration.\nNote that although the NotifyWatchResult contains an Error field,\nit's not used because we are only returning a single watcher,\nso we use the regular error return." + } + }, + "definitions": { + "Error": { + "type": "object", + "properties": { + "code": { "type": "string" }, - "type": { + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { "type": "string" } }, "additionalProperties": false, "required": [ - "type" + "message", + "code" ] }, - "CloudInfo": { + "ModelConfigResult": { "type": "object", "properties": { - "CloudDetails": { - "$ref": "#/definitions/CloudDetails" - }, - "users": { - "type": "array", - "items": { - "$ref": "#/definitions/CloudUserInfo" + "config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } } } }, "additionalProperties": false, "required": [ - "CloudDetails", - "users" + "config" ] }, - "CloudInfoResult": { + "NotifyWatchResult": { "type": "object", "properties": { + "NotifyWatcherId": { + "type": "string" + }, "error": { "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/CloudInfo" } }, - "additionalProperties": false + "additionalProperties": false, + "required": [ + "NotifyWatcherId" + ] }, - "CloudInfoResults": { + "StatusHistoryPruneArgs": { "type": "object", "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/CloudInfoResult" - } + "max-history-mb": { + "type": "integer" + }, + "max-history-time": { + "type": "integer" } }, "additionalProperties": false, "required": [ - "results" + "max-history-time", + "max-history-mb" ] - }, - "CloudInstanceTypesConstraint": { + } + } + } + }, + { + "Name": "Storage", + "Description": "StorageAPI implements the latest version (v6) of the Storage API.", + "Version": 6, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "AddToUnit": { "type": "object", "properties": { - "cloud-tag": { - "type": "string" - }, - "constraints": { - "$ref": "#/definitions/Value" + "Params": { + "$ref": "#/definitions/StoragesAddParams" }, - "region": { - "type": "string" + "Result": { + "$ref": "#/definitions/AddStorageResults" } }, - "additionalProperties": false, - "required": [ - "cloud-tag", - "region" - ] + "description": "AddToUnit validates and creates additional storage instances for units.\nA \"CHANGE\" block can block this operation." }, - "CloudInstanceTypesConstraints": { + "Attach": { "type": "object", "properties": { - "constraints": { - "type": "array", - "items": { - "$ref": "#/definitions/CloudInstanceTypesConstraint" - } + "Params": { + "$ref": "#/definitions/StorageAttachmentIds" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" } }, - "additionalProperties": false, - "required": [ - "constraints" - ] + "description": "Attach attaches existing storage instances to units.\nA \"CHANGE\" block can block this operation." }, - "CloudRegion": { + "CreatePool": { "type": "object", "properties": { - "endpoint": { - "type": "string" - }, - "identity-endpoint": { - "type": "string" - }, - "name": { - "type": "string" + "Params": { + "$ref": "#/definitions/StoragePoolArgs" }, - "storage-endpoint": { - "type": "string" + "Result": { + "$ref": "#/definitions/ErrorResults" } }, - "additionalProperties": false, - "required": [ - "name" - ] + "description": "CreatePool creates a new pool with specified parameters." }, - "CloudResult": { + "DetachStorage": { "type": "object", "properties": { - "cloud": { - "$ref": "#/definitions/Cloud" + "Params": { + "$ref": "#/definitions/StorageDetachmentParams" }, - "error": { - "$ref": "#/definitions/Error" + "Result": { + "$ref": "#/definitions/ErrorResults" } }, - "additionalProperties": false + "description": "DetachStorage sets the specified storage attachments to Dying, unless they are\nalready Dying or Dead. Any associated, persistent storage will remain\nalive. This call can be forced." }, - "CloudResults": { + "Import": { "type": "object", "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/CloudResult" - } + "Params": { + "$ref": "#/definitions/BulkImportStorageParams" + }, + "Result": { + "$ref": "#/definitions/ImportStorageResults" } }, - "additionalProperties": false + "description": "Import imports existing storage into the model.\nA \"CHANGE\" block can block this operation." }, - "CloudUserInfo": { + "ListFilesystems": { "type": "object", "properties": { - "access": { - "type": "string" + "Params": { + "$ref": "#/definitions/FilesystemFilters" }, - "display-name": { - "type": "string" + "Result": { + "$ref": "#/definitions/FilesystemDetailsListResults" + } + }, + "description": "ListFilesystems returns a list of filesystems in the environment matching\nthe provided filter. Each result describes a filesystem in detail, including\nthe filesystem's attachments." + }, + "ListPools": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/StoragePoolFilters" }, - "user": { - "type": "string" + "Result": { + "$ref": "#/definitions/StoragePoolsResults" } }, - "additionalProperties": false, - "required": [ - "user", - "display-name", - "access" - ] + "description": "ListPools returns a list of pools.\nIf filter is provided, returned list only contains pools that match\nthe filter.\nPools can be filtered on names and provider types.\nIf both names and types are provided as filter,\npools that match either are returned.\nThis method lists union of pools and environment provider types.\nIf no filter is provided, all pools are returned." }, - "CloudsResult": { + "ListStorageDetails": { "type": "object", "properties": { - "clouds": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/Cloud" - } - } + "Params": { + "$ref": "#/definitions/StorageFilters" + }, + "Result": { + "$ref": "#/definitions/StorageDetailsListResults" } }, - "additionalProperties": false + "description": "ListStorageDetails returns storage matching a filter." }, - "ControllerCredentialInfo": { + "ListVolumes": { "type": "object", "properties": { - "content": { - "$ref": "#/definitions/CredentialContent" + "Params": { + "$ref": "#/definitions/VolumeFilters" }, - "models": { - "type": "array", - "items": { - "$ref": "#/definitions/ModelAccess" - } + "Result": { + "$ref": "#/definitions/VolumeDetailsListResults" } }, - "additionalProperties": false + "description": "ListVolumes lists volumes with the given filters. Each filter produces\nan independent list of volumes, or an error if the filter is invalid\nor the volumes could not be listed." }, - "CredentialContent": { + "Remove": { "type": "object", "properties": { - "attrs": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } + "Params": { + "$ref": "#/definitions/RemoveStorage" }, - "auth-type": { - "type": "string" + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "Remove sets the specified storage entities to Dying, unless they are\nalready Dying or Dead, such that the storage will eventually be removed\nfrom the model. If the arguments specify that the storage should be\ndestroyed, then the associated cloud storage will be destroyed first;\notherwise it will only be released from Juju's control." + }, + "RemovePool": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/StoragePoolDeleteArgs" }, - "cloud": { - "type": "string" + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "RemovePool deletes the named pool" + }, + "StorageDetails": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" }, - "name": { - "type": "string" + "Result": { + "$ref": "#/definitions/StorageDetailsResults" + } + }, + "description": "StorageDetails retrieves and returns detailed information about desired\nstorage identified by supplied tags. If specified storage cannot be\nretrieved, individual error is returned instead of storage information." + }, + "UpdatePool": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/StoragePoolArgs" }, - "valid": { - "type": "boolean" + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "UpdatePool deletes the named pool" + } + }, + "definitions": { + "AddStorageDetails": { + "type": "object", + "properties": { + "storage-tags": { + "type": "array", + "items": { + "type": "string" + } } }, "additionalProperties": false, "required": [ - "name", - "cloud", - "auth-type" + "storage-tags" ] }, - "CredentialContentResult": { + "AddStorageResult": { "type": "object", "properties": { "error": { "$ref": "#/definitions/Error" }, "result": { - "$ref": "#/definitions/ControllerCredentialInfo" + "$ref": "#/definitions/AddStorageDetails" } }, "additionalProperties": false }, - "CredentialContentResults": { + "AddStorageResults": { "type": "object", "properties": { "results": { "type": "array", "items": { - "$ref": "#/definitions/CredentialContentResult" + "$ref": "#/definitions/AddStorageResult" } } }, - "additionalProperties": false + "additionalProperties": false, + "required": [ + "results" + ] + }, + "BulkImportStorageParams": { + "type": "object", + "properties": { + "storage": { + "type": "array", + "items": { + "$ref": "#/definitions/ImportStorageParams" + } + } + }, + "additionalProperties": false, + "required": [ + "storage" + ] }, "Entities": { "type": "object", @@ -7717,6 +42819,36 @@ "tag" ] }, + "EntityStatus": { + "type": "object", + "properties": { + "data": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "info": { + "type": "string" + }, + "since": { + "type": "string", + "format": "date-time" + }, + "status": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "status", + "info", + "since" + ] + }, "Error": { "type": "object", "properties": { @@ -7766,115 +42898,210 @@ "results" ] }, - "InstanceType": { + "FilesystemAttachmentDetails": { "type": "object", "properties": { - "arches": { - "type": "array", - "items": { - "type": "string" - } - }, - "cost": { - "type": "integer" - }, - "cpu-cores": { - "type": "integer" - }, - "memory": { - "type": "integer" + "FilesystemAttachmentInfo": { + "$ref": "#/definitions/FilesystemAttachmentInfo" }, - "name": { + "life": { "type": "string" }, - "root-disk": { - "type": "integer" - }, - "virt-type": { + "mount-point": { "type": "string" + }, + "read-only": { + "type": "boolean" } }, "additionalProperties": false, "required": [ - "arches", - "cpu-cores", - "memory" + "FilesystemAttachmentInfo" ] }, - "InstanceTypesResult": { + "FilesystemAttachmentInfo": { "type": "object", "properties": { - "cost-currency": { + "mount-point": { "type": "string" }, - "cost-divisor": { - "type": "integer" + "read-only": { + "type": "boolean" + } + }, + "additionalProperties": false + }, + "FilesystemDetails": { + "type": "object", + "properties": { + "filesystem-tag": { + "type": "string" }, - "cost-unit": { + "info": { + "$ref": "#/definitions/FilesystemInfo" + }, + "life": { "type": "string" }, + "machine-attachments": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/FilesystemAttachmentDetails" + } + } + }, + "status": { + "$ref": "#/definitions/EntityStatus" + }, + "storage": { + "$ref": "#/definitions/StorageDetails" + }, + "unit-attachments": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/FilesystemAttachmentDetails" + } + } + }, + "volume-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "filesystem-tag", + "info", + "status" + ] + }, + "FilesystemDetailsListResult": { + "type": "object", + "properties": { "error": { "$ref": "#/definitions/Error" }, - "instance-types": { + "result": { "type": "array", "items": { - "$ref": "#/definitions/InstanceType" + "$ref": "#/definitions/FilesystemDetails" } } }, "additionalProperties": false }, - "InstanceTypesResults": { + "FilesystemDetailsListResults": { "type": "object", "properties": { "results": { "type": "array", "items": { - "$ref": "#/definitions/InstanceTypesResult" + "$ref": "#/definitions/FilesystemDetailsListResult" + } + } + }, + "additionalProperties": false + }, + "FilesystemFilter": { + "type": "object", + "properties": { + "machines": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "FilesystemFilters": { + "type": "object", + "properties": { + "filters": { + "type": "array", + "items": { + "$ref": "#/definitions/FilesystemFilter" } } }, + "additionalProperties": false + }, + "FilesystemInfo": { + "type": "object", + "properties": { + "filesystem-id": { + "type": "string" + }, + "pool": { + "type": "string" + }, + "size": { + "type": "integer" + } + }, "additionalProperties": false, "required": [ - "results" + "filesystem-id", + "pool", + "size" ] }, - "ListCloudInfo": { + "ImportStorageDetails": { "type": "object", "properties": { - "CloudDetails": { - "$ref": "#/definitions/CloudDetails" + "storage-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "storage-tag" + ] + }, + "ImportStorageParams": { + "type": "object", + "properties": { + "kind": { + "type": "integer" }, - "user-access": { + "pool": { + "type": "string" + }, + "provider-id": { + "type": "string" + }, + "storage-name": { "type": "string" } }, "additionalProperties": false, "required": [ - "CloudDetails", - "user-access" + "kind", + "pool", + "provider-id", + "storage-name" ] }, - "ListCloudInfoResult": { + "ImportStorageResult": { "type": "object", "properties": { "error": { "$ref": "#/definitions/Error" }, "result": { - "$ref": "#/definitions/ListCloudInfo" + "$ref": "#/definitions/ImportStorageDetails" } }, "additionalProperties": false }, - "ListCloudInfoResults": { + "ImportStorageResults": { "type": "object", "properties": { "results": { "type": "array", "items": { - "$ref": "#/definitions/ListCloudInfoResult" + "$ref": "#/definitions/ImportStorageResult" } } }, @@ -7883,327 +43110,339 @@ "results" ] }, - "ListCloudsRequest": { + "RemoveStorage": { "type": "object", "properties": { - "all": { - "type": "boolean" - }, - "user-tag": { - "type": "string" + "storage": { + "type": "array", + "items": { + "$ref": "#/definitions/RemoveStorageInstance" + } } }, "additionalProperties": false, "required": [ - "user-tag" + "storage" ] }, - "ModelAccess": { + "RemoveStorageInstance": { "type": "object", "properties": { - "access": { - "type": "string" + "destroy-attachments": { + "type": "boolean" }, - "model": { + "destroy-storage": { + "type": "boolean" + }, + "force": { + "type": "boolean" + }, + "max-wait": { + "type": "integer" + }, + "tag": { "type": "string" } }, - "additionalProperties": false + "additionalProperties": false, + "required": [ + "tag" + ] }, - "ModifyCloudAccess": { + "StorageAddParams": { "type": "object", "properties": { - "access": { - "type": "string" - }, - "action": { + "name": { "type": "string" }, - "cloud-tag": { - "type": "string" + "storage": { + "$ref": "#/definitions/StorageConstraints" }, - "user-tag": { + "unit": { "type": "string" } }, "additionalProperties": false, "required": [ - "user-tag", - "cloud-tag", - "action", - "access" + "unit", + "name", + "storage" ] }, - "ModifyCloudAccessRequest": { + "StorageAttachmentDetails": { "type": "object", "properties": { - "changes": { - "type": "array", - "items": { - "$ref": "#/definitions/ModifyCloudAccess" - } + "life": { + "type": "string" + }, + "location": { + "type": "string" + }, + "machine-tag": { + "type": "string" + }, + "storage-tag": { + "type": "string" + }, + "unit-tag": { + "type": "string" } }, "additionalProperties": false, "required": [ - "changes" + "storage-tag", + "unit-tag", + "machine-tag" ] }, - "RevokeCredentialArg": { + "StorageAttachmentId": { "type": "object", "properties": { - "force": { - "type": "boolean" + "storage-tag": { + "type": "string" }, - "tag": { + "unit-tag": { "type": "string" } }, "additionalProperties": false, "required": [ - "tag", - "force" + "storage-tag", + "unit-tag" ] }, - "RevokeCredentialArgs": { + "StorageAttachmentIds": { "type": "object", "properties": { - "credentials": { + "ids": { "type": "array", "items": { - "$ref": "#/definitions/RevokeCredentialArg" + "$ref": "#/definitions/StorageAttachmentId" } } }, "additionalProperties": false, "required": [ - "credentials" + "ids" ] }, - "StringsResult": { + "StorageConstraints": { "type": "object", "properties": { - "error": { - "$ref": "#/definitions/Error" + "count": { + "type": "integer" }, - "result": { - "type": "array", - "items": { - "type": "string" - } + "pool": { + "type": "string" + }, + "size": { + "type": "integer" } }, "additionalProperties": false }, - "StringsResults": { + "StorageDetachmentParams": { "type": "object", "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StringsResult" - } + "force": { + "type": "boolean" + }, + "ids": { + "$ref": "#/definitions/StorageAttachmentIds" + }, + "max-wait": { + "type": "integer" } }, "additionalProperties": false, "required": [ - "results" + "ids" ] }, - "TaggedCredential": { + "StorageDetails": { "type": "object", "properties": { - "credential": { - "$ref": "#/definitions/CloudCredential" + "attachments": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/StorageAttachmentDetails" + } + } }, - "tag": { + "kind": { + "type": "integer" + }, + "life": { + "type": "string" + }, + "owner-tag": { + "type": "string" + }, + "persistent": { + "type": "boolean" + }, + "status": { + "$ref": "#/definitions/EntityStatus" + }, + "storage-tag": { "type": "string" } }, "additionalProperties": false, "required": [ - "tag", - "credential" + "storage-tag", + "owner-tag", + "kind", + "status", + "persistent" ] }, - "TaggedCredentials": { + "StorageDetailsListResult": { "type": "object", "properties": { - "credentials": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { "type": "array", "items": { - "$ref": "#/definitions/TaggedCredential" + "$ref": "#/definitions/StorageDetails" } } }, "additionalProperties": false }, - "UpdateCloudArgs": { + "StorageDetailsListResults": { "type": "object", "properties": { - "clouds": { + "results": { "type": "array", "items": { - "$ref": "#/definitions/AddCloudArgs" + "$ref": "#/definitions/StorageDetailsListResult" } } }, - "additionalProperties": false, - "required": [ - "clouds" - ] + "additionalProperties": false }, - "UpdateCredentialArgs": { + "StorageDetailsResult": { "type": "object", "properties": { - "credentials": { - "type": "array", - "items": { - "$ref": "#/definitions/TaggedCredential" - } + "error": { + "$ref": "#/definitions/Error" }, - "force": { - "type": "boolean" + "result": { + "$ref": "#/definitions/StorageDetails" } }, - "additionalProperties": false, - "required": [ - "credentials", - "force" - ] + "additionalProperties": false }, - "UpdateCredentialModelResult": { + "StorageDetailsResults": { "type": "object", "properties": { - "errors": { + "results": { "type": "array", "items": { - "$ref": "#/definitions/ErrorResult" + "$ref": "#/definitions/StorageDetailsResult" } - }, - "name": { - "type": "string" - }, - "uuid": { - "type": "string" } }, - "additionalProperties": false, - "required": [ - "uuid", - "name" - ] + "additionalProperties": false }, - "UpdateCredentialResult": { + "StorageFilter": { + "type": "object", + "additionalProperties": false + }, + "StorageFilters": { "type": "object", "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "models": { + "filters": { "type": "array", "items": { - "$ref": "#/definitions/UpdateCredentialModelResult" + "$ref": "#/definitions/StorageFilter" + } + } + }, + "additionalProperties": false + }, + "StoragePool": { + "type": "object", + "properties": { + "attrs": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } } }, - "tag": { + "name": { + "type": "string" + }, + "provider": { "type": "string" } }, "additionalProperties": false, "required": [ - "tag" + "name", + "provider", + "attrs" ] }, - "UpdateCredentialResults": { + "StoragePoolArgs": { "type": "object", "properties": { - "results": { + "pools": { "type": "array", "items": { - "$ref": "#/definitions/UpdateCredentialResult" + "$ref": "#/definitions/StoragePool" } } }, - "additionalProperties": false + "additionalProperties": false, + "required": [ + "pools" + ] }, - "UserCloud": { + "StoragePoolDeleteArg": { "type": "object", "properties": { - "cloud-tag": { - "type": "string" - }, - "user-tag": { + "name": { "type": "string" } }, "additionalProperties": false, "required": [ - "user-tag", - "cloud-tag" + "name" ] }, - "UserClouds": { + "StoragePoolDeleteArgs": { "type": "object", "properties": { - "user-clouds": { + "pools": { "type": "array", "items": { - "$ref": "#/definitions/UserCloud" + "$ref": "#/definitions/StoragePoolDeleteArg" } } }, - "additionalProperties": false + "additionalProperties": false, + "required": [ + "pools" + ] }, - "Value": { + "StoragePoolFilter": { "type": "object", "properties": { - "allocate-public-ip": { - "type": "boolean" - }, - "arch": { - "type": "string" - }, - "container": { - "type": "string" - }, - "cores": { - "type": "integer" - }, - "cpu-power": { - "type": "integer" - }, - "instance-role": { - "type": "string" - }, - "instance-type": { - "type": "string" - }, - "mem": { - "type": "integer" - }, - "root-disk": { - "type": "integer" - }, - "root-disk-source": { - "type": "string" - }, - "spaces": { - "type": "array", - "items": { - "type": "string" - } - }, - "tags": { + "names": { "type": "array", "items": { "type": "string" } }, - "virt-type": { - "type": "string" - }, - "zones": { + "providers": { "type": "array", "items": { "type": "string" @@ -8211,1394 +43450,1267 @@ } }, "additionalProperties": false - } - } - } - }, - { - "Name": "Controller", - "Description": "ControllerAPI provides the Controller API.", - "Version": 11, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "controller-user" - ], - "Schema": { - "type": "object", - "properties": { - "AllModels": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/UserModelList" - } - }, - "description": "AllModels allows controller administrators to get the list of all the\nmodels in the controller." }, - "CloudSpec": { + "StoragePoolFilters": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/CloudSpecResults" + "filters": { + "type": "array", + "items": { + "$ref": "#/definitions/StoragePoolFilter" + } } }, - "description": "CloudSpec returns the model's cloud spec." + "additionalProperties": false }, - "ConfigSet": { + "StoragePoolsResult": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/ControllerConfigSet" + "error": { + "$ref": "#/definitions/Error" + }, + "storage-pools": { + "type": "array", + "items": { + "$ref": "#/definitions/StoragePool" + } } }, - "description": "ConfigSet changes the value of specified controller configuration\nsettings. Only some settings can be changed after bootstrap.\nSettings that aren't specified in the params are left unchanged." + "additionalProperties": false }, - "ControllerAPIInfoForModels": { + "StoragePoolsResults": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ControllerAPIInfoResults" + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/StoragePoolsResult" + } } }, - "description": "ControllerAPIInfoForModels returns the controller api connection details for the specified models." + "additionalProperties": false }, - "ControllerConfig": { + "StoragesAddParams": { "type": "object", "properties": { - "Result": { - "$ref": "#/definitions/ControllerConfigResult" + "storages": { + "type": "array", + "items": { + "$ref": "#/definitions/StorageAddParams" + } } }, - "description": "ControllerConfig returns the controller's configuration." + "additionalProperties": false, + "required": [ + "storages" + ] }, - "ControllerVersion": { + "VolumeAttachmentDetails": { "type": "object", "properties": { - "Result": { - "$ref": "#/definitions/ControllerVersionResults" + "VolumeAttachmentInfo": { + "$ref": "#/definitions/VolumeAttachmentInfo" + }, + "bus-address": { + "type": "string" + }, + "device-link": { + "type": "string" + }, + "device-name": { + "type": "string" + }, + "life": { + "type": "string" + }, + "plan-info": { + "$ref": "#/definitions/VolumeAttachmentPlanInfo" + }, + "read-only": { + "type": "boolean" } }, - "description": "ControllerVersion returns the version information associated with this\ncontroller binary.\n\nNOTE: the implementation intentionally does not check for SuperuserAccess\nas the Version is known even to users with login access." + "additionalProperties": false, + "required": [ + "VolumeAttachmentInfo" + ] }, - "DashboardConnectionInfo": { + "VolumeAttachmentInfo": { "type": "object", "properties": { - "Result": { - "$ref": "#/definitions/DashboardConnectionInfo" + "bus-address": { + "type": "string" + }, + "device-link": { + "type": "string" + }, + "device-name": { + "type": "string" + }, + "plan-info": { + "$ref": "#/definitions/VolumeAttachmentPlanInfo" + }, + "read-only": { + "type": "boolean" } }, - "description": "DashboardConnectionInfo returns the connection information for a client to\nconnect to the Juju Dashboard including any proxying information." + "additionalProperties": false }, - "DestroyController": { + "VolumeAttachmentPlanInfo": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/DestroyControllerArgs" + "device-attributes": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "device-type": { + "type": "string" } }, - "description": "DestroyController destroys the controller.\n\nIf the args specify the destruction of the models, this method will\nattempt to do so. Otherwise, if the controller has any non-empty,\nnon-Dead hosted models, then an error with the code\nparams.CodeHasHostedModels will be transmitted." + "additionalProperties": false }, - "GetCloudSpec": { + "VolumeDetails": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/ModelTag" + "info": { + "$ref": "#/definitions/VolumeInfo" + }, + "life": { + "type": "string" + }, + "machine-attachments": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/VolumeAttachmentDetails" + } + } + }, + "status": { + "$ref": "#/definitions/EntityStatus" }, - "Result": { - "$ref": "#/definitions/CloudSpecResult" - } - }, - "description": "GetCloudSpec constructs the CloudSpec for a validated and authorized model." - }, - "GetControllerAccess": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" + "storage": { + "$ref": "#/definitions/StorageDetails" }, - "Result": { - "$ref": "#/definitions/UserAccessResults" + "unit-attachments": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/VolumeAttachmentDetails" + } + } + }, + "volume-tag": { + "type": "string" } }, - "description": "GetControllerAccess returns the level of access the specified users\nhave on the controller." + "additionalProperties": false, + "required": [ + "volume-tag", + "info", + "status" + ] }, - "HostedModelConfigs": { + "VolumeDetailsListResult": { "type": "object", "properties": { - "Result": { - "$ref": "#/definitions/HostedModelConfigsResults" + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "type": "array", + "items": { + "$ref": "#/definitions/VolumeDetails" + } } }, - "description": "HostedModelConfigs returns all the information that the client needs in\norder to connect directly with the host model's provider and destroy it\ndirectly." + "additionalProperties": false }, - "IdentityProviderURL": { + "VolumeDetailsListResults": { "type": "object", "properties": { - "Result": { - "$ref": "#/definitions/StringResult" + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/VolumeDetailsListResult" + } } }, - "description": "IdentityProviderURL returns the URL of the configured external identity\nprovider for this controller or an empty string if no external identity\nprovider has been configured when the controller was bootstrapped.\n\nNOTE: the implementation intentionally does not check for SuperuserAccess\nas the URL is known even to users with login access." + "additionalProperties": false }, - "InitiateMigration": { + "VolumeFilter": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/InitiateMigrationArgs" - }, - "Result": { - "$ref": "#/definitions/InitiateMigrationResults" + "machines": { + "type": "array", + "items": { + "type": "string" + } } }, - "description": "InitiateMigration attempts to begin the migration of one or\nmore models to other controllers." + "additionalProperties": false }, - "ListBlockedModels": { + "VolumeFilters": { "type": "object", "properties": { - "Result": { - "$ref": "#/definitions/ModelBlockInfoList" + "filters": { + "type": "array", + "items": { + "$ref": "#/definitions/VolumeFilter" + } } }, - "description": "ListBlockedModels returns a list of all models on the controller\nwhich have a block in place. The resulting slice is sorted by model\nname, then owner. Callers must be controller administrators to retrieve the\nlist." + "additionalProperties": false }, - "ModelConfig": { + "VolumeInfo": { "type": "object", "properties": { - "Result": { - "$ref": "#/definitions/ModelConfigResults" + "hardware-id": { + "type": "string" + }, + "persistent": { + "type": "boolean" + }, + "pool": { + "type": "string" + }, + "size": { + "type": "integer" + }, + "volume-id": { + "type": "string" + }, + "wwn": { + "type": "string" } }, - "description": "ModelConfig returns the model config for the controller\nmodel. For information on the current model, use\nclient.ModelGet" - }, - "ModelStatus": { + "additionalProperties": false, + "required": [ + "volume-id", + "size", + "persistent" + ] + } + } + } + }, + { + "Name": "StorageProvisioner", + "Description": "StorageProvisionerAPIv4 provides the StorageProvisioner API v4 facade.", + "Version": 4, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "AttachmentLife": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/Entities" + "$ref": "#/definitions/MachineStorageIds" }, "Result": { - "$ref": "#/definitions/ModelStatusResults" + "$ref": "#/definitions/LifeResults" } }, - "description": "ModelStatus returns a summary of the model." + "description": "AttachmentLife returns the lifecycle state of each specified machine\nstorage attachment." }, - "ModifyControllerAccess": { + "CreateVolumeAttachmentPlans": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/ModifyControllerAccessRequest" + "$ref": "#/definitions/VolumeAttachmentPlans" }, "Result": { "$ref": "#/definitions/ErrorResults" } - }, - "description": "ModifyControllerAccess changes the model access granted to users." + } }, - "MongoVersion": { + "EnsureDead": { "type": "object", "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, "Result": { - "$ref": "#/definitions/StringResult" + "$ref": "#/definitions/ErrorResults" } }, - "description": "MongoVersion allows the introspection of the mongo version per controller" + "description": "EnsureDead calls EnsureDead on each given entity from state. It\nwill fail if the entity is not present. If it's Alive, nothing will\nhappen (see state/EnsureDead() for units or machines)." }, - "RemoveBlocks": { + "FilesystemAttachmentParams": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/RemoveBlocksArgs" - } - }, - "description": "RemoveBlocks removes all the blocks in the controller." - }, - "WatchAllModelSummaries": { - "type": "object", - "properties": { + "$ref": "#/definitions/MachineStorageIds" + }, "Result": { - "$ref": "#/definitions/SummaryWatcherID" + "$ref": "#/definitions/FilesystemAttachmentParamsResults" } }, - "description": "WatchAllModelSummaries starts watching the summary updates from the cache.\nThis method is superuser access only, and watches all models in the\ncontroller." + "description": "FilesystemAttachmentParams returns the parameters for creating the filesystem\nattachments with the specified IDs." }, - "WatchAllModels": { + "FilesystemAttachments": { "type": "object", "properties": { + "Params": { + "$ref": "#/definitions/MachineStorageIds" + }, "Result": { - "$ref": "#/definitions/AllWatcherId" + "$ref": "#/definitions/FilesystemAttachmentResults" } }, - "description": "WatchAllModels starts watching events for all models in the\ncontroller. The returned AllWatcherId should be used with Next on the\nAllModelWatcher endpoint to receive deltas." + "description": "FilesystemAttachments returns details of filesystem attachments with the specified IDs." }, - "WatchCloudSpecsChanges": { + "FilesystemParams": { "type": "object", "properties": { "Params": { "$ref": "#/definitions/Entities" }, "Result": { - "$ref": "#/definitions/NotifyWatchResults" + "$ref": "#/definitions/FilesystemParamsResults" } }, - "description": "WatchCloudSpecsChanges returns a watcher for cloud spec changes." + "description": "FilesystemParams returns the parameters for creating the filesystems\nwith the specified tags." }, - "WatchModelSummaries": { + "Filesystems": { "type": "object", "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, "Result": { - "$ref": "#/definitions/SummaryWatcherID" - } - }, - "description": "WatchModelSummaries starts watching the summary updates from the cache.\nOnly models that the user has access to are returned." - } - }, - "definitions": { - "AllWatcherId": { - "type": "object", - "properties": { - "watcher-id": { - "type": "string" + "$ref": "#/definitions/FilesystemResults" } }, - "additionalProperties": false, - "required": [ - "watcher-id" - ] + "description": "Filesystems returns details of filesystems with the specified tags." }, - "CloudCredential": { + "InstanceId": { "type": "object", "properties": { - "attrs": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "auth-type": { - "type": "string" + "Params": { + "$ref": "#/definitions/Entities" }, - "redacted": { - "type": "array", - "items": { - "type": "string" - } + "Result": { + "$ref": "#/definitions/StringResults" } }, - "additionalProperties": false, - "required": [ - "auth-type" - ] + "description": "InstanceId returns the provider specific instance id for each given\nmachine or an CodeNotProvisioned error, if not set." }, - "CloudSpec": { + "Life": { "type": "object", "properties": { - "cacertificates": { - "type": "array", - "items": { - "type": "string" - } - }, - "credential": { - "$ref": "#/definitions/CloudCredential" - }, - "endpoint": { - "type": "string" - }, - "identity-endpoint": { - "type": "string" - }, - "is-controller-cloud": { - "type": "boolean" - }, - "name": { - "type": "string" - }, - "region": { - "type": "string" - }, - "skip-tls-verify": { - "type": "boolean" - }, - "storage-endpoint": { - "type": "string" + "Params": { + "$ref": "#/definitions/Entities" }, - "type": { - "type": "string" + "Result": { + "$ref": "#/definitions/LifeResults" } }, - "additionalProperties": false, - "required": [ - "type", - "name" - ] + "description": "Life returns the life status of every supplied entity, where available." }, - "CloudSpecResult": { + "Remove": { "type": "object", "properties": { - "error": { - "$ref": "#/definitions/Error" + "Params": { + "$ref": "#/definitions/Entities" }, - "result": { - "$ref": "#/definitions/CloudSpec" + "Result": { + "$ref": "#/definitions/ErrorResults" } }, - "additionalProperties": false + "description": "Remove removes volumes and filesystems from state." }, - "CloudSpecResults": { + "RemoveAttachment": { "type": "object", "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/CloudSpecResult" - } + "Params": { + "$ref": "#/definitions/MachineStorageIds" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" } }, - "additionalProperties": false + "description": "RemoveAttachment removes the specified machine storage attachments\nfrom state." }, - "ConfigValue": { + "RemoveFilesystemParams": { "type": "object", "properties": { - "source": { - "type": "string" + "Params": { + "$ref": "#/definitions/Entities" }, - "value": { - "type": "object", - "additionalProperties": true + "Result": { + "$ref": "#/definitions/RemoveFilesystemParamsResults" } }, - "additionalProperties": false, - "required": [ - "value", - "source" - ] + "description": "RemoveFilesystemParams returns the parameters for destroying or\nreleasing the filesystems with the specified tags." }, - "ControllerAPIInfoResult": { + "RemoveVolumeAttachmentPlan": { "type": "object", "properties": { - "addresses": { - "type": "array", - "items": { - "type": "string" - } + "Params": { + "$ref": "#/definitions/MachineStorageIds" }, - "cacert": { - "type": "string" + "Result": { + "$ref": "#/definitions/ErrorResults" + } + } + }, + "RemoveVolumeParams": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" }, - "error": { - "$ref": "#/definitions/Error" + "Result": { + "$ref": "#/definitions/RemoveVolumeParamsResults" } }, - "additionalProperties": false, - "required": [ - "addresses", - "cacert" - ] + "description": "RemoveVolumeParams returns the parameters for destroying\nor releasing the volumes with the specified tags." }, - "ControllerAPIInfoResults": { + "SetFilesystemAttachmentInfo": { "type": "object", "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ControllerAPIInfoResult" - } + "Params": { + "$ref": "#/definitions/FilesystemAttachments" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" } }, - "additionalProperties": false, - "required": [ - "results" - ] + "description": "SetFilesystemAttachmentInfo records the details of newly provisioned filesystem\nattachments." }, - "ControllerConfigResult": { + "SetFilesystemInfo": { "type": "object", "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } + "Params": { + "$ref": "#/definitions/Filesystems" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" } }, - "additionalProperties": false, - "required": [ - "config" - ] + "description": "SetFilesystemInfo records the details of newly provisioned filesystems." }, - "ControllerConfigSet": { + "SetStatus": { "type": "object", "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } + "Params": { + "$ref": "#/definitions/SetStatus" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" } }, - "additionalProperties": false, - "required": [ - "config" - ] + "description": "SetStatus sets the status of each given entity." }, - "ControllerVersionResults": { + "SetVolumeAttachmentInfo": { "type": "object", "properties": { - "git-commit": { - "type": "string" + "Params": { + "$ref": "#/definitions/VolumeAttachments" }, - "version": { - "type": "string" + "Result": { + "$ref": "#/definitions/ErrorResults" } }, - "additionalProperties": false, - "required": [ - "version", - "git-commit" - ] + "description": "SetVolumeAttachmentInfo records the details of newly provisioned volume\nattachments." }, - "DashboardConnectionInfo": { + "SetVolumeAttachmentPlanBlockInfo": { "type": "object", "properties": { - "error": { - "$ref": "#/definitions/Error" + "Params": { + "$ref": "#/definitions/VolumeAttachmentPlans" }, - "proxy-connection": { - "$ref": "#/definitions/Proxy" + "Result": { + "$ref": "#/definitions/ErrorResults" + } + } + }, + "SetVolumeInfo": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Volumes" }, - "ssh-connection": { - "$ref": "#/definitions/DashboardConnectionSSHTunnel" + "Result": { + "$ref": "#/definitions/ErrorResults" } }, - "additionalProperties": false, - "required": [ - "proxy-connection", - "ssh-connection" - ] + "description": "SetVolumeInfo records the details of newly provisioned volumes." }, - "DashboardConnectionSSHTunnel": { + "VolumeAttachmentParams": { "type": "object", "properties": { - "entity": { - "type": "string" - }, - "host": { - "type": "string" - }, - "model": { - "type": "string" + "Params": { + "$ref": "#/definitions/MachineStorageIds" }, - "port": { - "type": "string" + "Result": { + "$ref": "#/definitions/VolumeAttachmentParamsResults" } }, - "additionalProperties": false, - "required": [ - "host", - "port" - ] + "description": "VolumeAttachmentParams returns the parameters for creating the volume\nattachments with the specified IDs." }, - "DestroyControllerArgs": { + "VolumeAttachmentPlans": { "type": "object", "properties": { - "destroy-models": { - "type": "boolean" - }, - "destroy-storage": { - "type": "boolean" - }, - "force": { - "type": "boolean" - }, - "max-wait": { - "type": "integer" + "Params": { + "$ref": "#/definitions/MachineStorageIds" }, - "model-timeout": { - "type": "integer" + "Result": { + "$ref": "#/definitions/VolumeAttachmentPlanResults" } }, - "additionalProperties": false, - "required": [ - "destroy-models" - ] + "description": "VolumeAttachmentPlans returns details of volume attachment plans with the specified IDs." }, - "Entities": { + "VolumeAttachments": { "type": "object", "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/Entity" - } + "Params": { + "$ref": "#/definitions/MachineStorageIds" + }, + "Result": { + "$ref": "#/definitions/VolumeAttachmentResults" } }, - "additionalProperties": false, - "required": [ - "entities" - ] + "description": "VolumeAttachments returns details of volume attachments with the specified IDs." }, - "Entity": { + "VolumeBlockDevices": { "type": "object", "properties": { - "tag": { - "type": "string" + "Params": { + "$ref": "#/definitions/MachineStorageIds" + }, + "Result": { + "$ref": "#/definitions/BlockDeviceResults" } }, - "additionalProperties": false, - "required": [ - "tag" - ] + "description": "VolumeBlockDevices returns details of the block devices corresponding to the\nvolume attachments with the specified IDs." }, - "Error": { + "VolumeParams": { "type": "object", "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } + "Params": { + "$ref": "#/definitions/Entities" }, - "message": { - "type": "string" + "Result": { + "$ref": "#/definitions/VolumeParamsResults" } }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] + "description": "VolumeParams returns the parameters for creating or destroying\nthe volumes with the specified tags." }, - "ErrorResult": { + "Volumes": { "type": "object", "properties": { - "error": { - "$ref": "#/definitions/Error" + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/VolumeResults" } }, - "additionalProperties": false + "description": "Volumes returns details of volumes with the specified tags." }, - "ErrorResults": { + "WatchApplications": { "type": "object", "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } + "Result": { + "$ref": "#/definitions/StringsWatchResult" } }, - "additionalProperties": false, - "required": [ - "results" - ] + "description": "WatchApplications starts a StringsWatcher to watch CAAS applications\ndeployed to this model." }, - "HostedModelConfig": { + "WatchBlockDevices": { "type": "object", - "properties": { - "cloud-spec": { - "$ref": "#/definitions/CloudSpec" - }, - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "name": { - "type": "string" + "properties": { + "Params": { + "$ref": "#/definitions/Entities" }, - "owner": { - "type": "string" + "Result": { + "$ref": "#/definitions/NotifyWatchResults" } }, - "additionalProperties": false, - "required": [ - "name", - "owner" - ] + "description": "WatchBlockDevices watches for changes to the specified machines' block devices." }, - "HostedModelConfigsResults": { + "WatchFilesystemAttachments": { "type": "object", "properties": { - "models": { - "type": "array", - "items": { - "$ref": "#/definitions/HostedModelConfig" - } + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/MachineStorageIdsWatchResults" } }, - "additionalProperties": false, - "required": [ - "models" - ] + "description": "WatchFilesystemAttachments watches for changes to filesystem attachments\nscoped to the entity with the tag passed to NewState." }, - "InitiateMigrationArgs": { + "WatchFilesystems": { "type": "object", "properties": { - "specs": { - "type": "array", - "items": { - "$ref": "#/definitions/MigrationSpec" - } + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/StringsWatchResults" } }, - "additionalProperties": false, - "required": [ - "specs" - ] + "description": "WatchFilesystems watches for changes to filesystems scoped\nto the entity with the tag passed to NewState." }, - "InitiateMigrationResult": { + "WatchMachines": { "type": "object", "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "migration-id": { - "type": "string" + "Params": { + "$ref": "#/definitions/Entities" }, - "model-tag": { - "type": "string" + "Result": { + "$ref": "#/definitions/NotifyWatchResults" } }, - "additionalProperties": false, - "required": [ - "model-tag", - "migration-id" - ] + "description": "WatchMachines watches for changes to the specified machines." }, - "InitiateMigrationResults": { + "WatchVolumeAttachmentPlans": { "type": "object", "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/InitiateMigrationResult" - } + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/MachineStorageIdsWatchResults" } }, - "additionalProperties": false, - "required": [ - "results" - ] + "description": "WatchVolumeAttachmentPlans watches for changes to volume attachments for a machine for the purpose of allowing\nthat machine to run any initialization needed, for that volume to actually appear as a block device (ie: iSCSI)" }, - "MachineHardware": { + "WatchVolumeAttachments": { "type": "object", "properties": { - "arch": { - "type": "string" - }, - "availability-zone": { - "type": "string" - }, - "cores": { - "type": "integer" - }, - "cpu-power": { - "type": "integer" - }, - "mem": { - "type": "integer" - }, - "root-disk": { - "type": "integer" - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } + "Params": { + "$ref": "#/definitions/Entities" }, - "virt-type": { - "type": "string" + "Result": { + "$ref": "#/definitions/MachineStorageIdsWatchResults" } }, - "additionalProperties": false + "description": "WatchVolumeAttachments watches for changes to volume attachments scoped to\nthe entity with the tag passed to NewState." }, - "MigrationSpec": { + "WatchVolumes": { "type": "object", "properties": { - "model-tag": { - "type": "string" + "Params": { + "$ref": "#/definitions/Entities" }, - "target-info": { - "$ref": "#/definitions/MigrationTargetInfo" + "Result": { + "$ref": "#/definitions/StringsWatchResults" } }, - "additionalProperties": false, - "required": [ - "model-tag", - "target-info" - ] - }, - "MigrationTargetInfo": { + "description": "WatchVolumes watches for changes to volumes scoped to the\nentity with the tag passed to NewState." + } + }, + "definitions": { + "BlockDevice": { "type": "object", "properties": { - "addrs": { + "BusAddress": { + "type": "string" + }, + "DeviceLinks": { "type": "array", "items": { "type": "string" } }, - "auth-tag": { + "DeviceName": { "type": "string" }, - "ca-cert": { + "FilesystemType": { "type": "string" }, - "controller-alias": { + "HardwareId": { "type": "string" }, - "controller-tag": { - "type": "string" + "InUse": { + "type": "boolean" }, - "macaroons": { + "Label": { "type": "string" }, - "password": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "controller-tag", - "addrs", - "ca-cert", - "auth-tag" - ] - }, - "Model": { - "type": "object", - "properties": { - "name": { + "MountPoint": { "type": "string" }, - "owner-tag": { + "SerialId": { "type": "string" }, - "type": { - "type": "string" + "Size": { + "type": "integer" }, - "uuid": { + "UUID": { "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "uuid", - "type", - "owner-tag" - ] - }, - "ModelApplicationInfo": { - "type": "object", - "properties": { - "name": { + }, + "WWN": { "type": "string" } }, "additionalProperties": false, "required": [ - "name" + "DeviceName", + "DeviceLinks", + "Label", + "UUID", + "HardwareId", + "WWN", + "BusAddress", + "Size", + "FilesystemType", + "InUse", + "MountPoint", + "SerialId" ] }, - "ModelBlockInfo": { + "BlockDeviceResult": { "type": "object", "properties": { - "blocks": { - "type": "array", - "items": { - "type": "string" - } - }, - "model-uuid": { - "type": "string" - }, - "name": { - "type": "string" + "error": { + "$ref": "#/definitions/Error" }, - "owner-tag": { - "type": "string" + "result": { + "$ref": "#/definitions/BlockDevice" } }, "additionalProperties": false, "required": [ - "name", - "model-uuid", - "owner-tag", - "blocks" + "result" ] }, - "ModelBlockInfoList": { + "BlockDeviceResults": { "type": "object", "properties": { - "models": { + "results": { "type": "array", "items": { - "$ref": "#/definitions/ModelBlockInfo" + "$ref": "#/definitions/BlockDeviceResult" } } }, "additionalProperties": false }, - "ModelConfigResults": { + "Entities": { "type": "object", "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/ConfigValue" - } + "entities": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" } } }, "additionalProperties": false, "required": [ - "config" + "entities" ] }, - "ModelFilesystemInfo": { + "Entity": { "type": "object", "properties": { - "detachable": { - "type": "boolean" - }, - "id": { - "type": "string" - }, - "message": { - "type": "string" - }, - "provider-id": { - "type": "string" - }, - "status": { + "tag": { "type": "string" } }, "additionalProperties": false, "required": [ - "id" + "tag" ] }, - "ModelMachineInfo": { + "EntityStatusArgs": { "type": "object", "properties": { - "display-name": { - "type": "string" - }, - "ha-primary": { - "type": "boolean" - }, - "hardware": { - "$ref": "#/definitions/MachineHardware" - }, - "has-vote": { - "type": "boolean" - }, - "id": { - "type": "string" - }, - "instance-id": { - "type": "string" + "data": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } }, - "message": { + "info": { "type": "string" }, "status": { "type": "string" }, - "wants-vote": { - "type": "boolean" + "tag": { + "type": "string" } }, "additionalProperties": false, "required": [ - "id" + "tag", + "status", + "info", + "data" ] }, - "ModelStatus": { + "Error": { "type": "object", "properties": { - "application-count": { - "type": "integer" - }, - "applications": { - "type": "array", - "items": { - "$ref": "#/definitions/ModelApplicationInfo" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "filesystems": { - "type": "array", - "items": { - "$ref": "#/definitions/ModelFilesystemInfo" - } - }, - "hosted-machine-count": { - "type": "integer" - }, - "life": { + "code": { "type": "string" }, - "machines": { - "type": "array", - "items": { - "$ref": "#/definitions/ModelMachineInfo" + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } } }, - "model-tag": { - "type": "string" - }, - "owner-tag": { - "type": "string" - }, - "type": { + "message": { "type": "string" - }, - "unit-count": { - "type": "integer" - }, - "volumes": { - "type": "array", - "items": { - "$ref": "#/definitions/ModelVolumeInfo" - } } }, "additionalProperties": false, "required": [ - "model-tag", - "life", - "type", - "hosted-machine-count", - "application-count", - "unit-count", - "owner-tag" + "message", + "code" ] }, - "ModelStatusResults": { + "ErrorResult": { "type": "object", "properties": { - "models": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "ErrorResults": { + "type": "object", + "properties": { + "results": { "type": "array", "items": { - "$ref": "#/definitions/ModelStatus" + "$ref": "#/definitions/ErrorResult" } } }, "additionalProperties": false, "required": [ - "models" + "results" ] }, - "ModelTag": { - "type": "object", - "additionalProperties": false - }, - "ModelVolumeInfo": { + "Filesystem": { "type": "object", "properties": { - "detachable": { - "type": "boolean" - }, - "id": { - "type": "string" - }, - "message": { + "filesystem-tag": { "type": "string" }, - "provider-id": { - "type": "string" + "info": { + "$ref": "#/definitions/FilesystemInfo" }, - "status": { + "volume-tag": { "type": "string" } }, "additionalProperties": false, "required": [ - "id" + "filesystem-tag", + "info" ] }, - "ModifyControllerAccess": { + "FilesystemAttachment": { "type": "object", "properties": { - "access": { + "filesystem-tag": { "type": "string" }, - "action": { - "type": "string" + "info": { + "$ref": "#/definitions/FilesystemAttachmentInfo" }, - "user-tag": { + "machine-tag": { "type": "string" } }, "additionalProperties": false, "required": [ - "user-tag", - "action", - "access" + "filesystem-tag", + "machine-tag", + "info" ] }, - "ModifyControllerAccessRequest": { + "FilesystemAttachmentInfo": { "type": "object", "properties": { - "changes": { - "type": "array", - "items": { - "$ref": "#/definitions/ModifyControllerAccess" - } + "mount-point": { + "type": "string" + }, + "read-only": { + "type": "boolean" + } + }, + "additionalProperties": false + }, + "FilesystemAttachmentParams": { + "type": "object", + "properties": { + "filesystem-id": { + "type": "string" + }, + "filesystem-tag": { + "type": "string" + }, + "instance-id": { + "type": "string" + }, + "machine-tag": { + "type": "string" + }, + "mount-point": { + "type": "string" + }, + "provider": { + "type": "string" + }, + "read-only": { + "type": "boolean" } }, "additionalProperties": false, "required": [ - "changes" + "filesystem-tag", + "machine-tag", + "provider" ] }, - "NotifyWatchResult": { + "FilesystemAttachmentParamsResult": { "type": "object", "properties": { - "NotifyWatcherId": { - "type": "string" - }, "error": { "$ref": "#/definitions/Error" + }, + "result": { + "$ref": "#/definitions/FilesystemAttachmentParams" } }, "additionalProperties": false, "required": [ - "NotifyWatcherId" + "result" ] }, - "NotifyWatchResults": { + "FilesystemAttachmentParamsResults": { "type": "object", "properties": { "results": { "type": "array", "items": { - "$ref": "#/definitions/NotifyWatchResult" + "$ref": "#/definitions/FilesystemAttachmentParamsResult" } } }, - "additionalProperties": false, - "required": [ - "results" - ] + "additionalProperties": false }, - "Proxy": { + "FilesystemAttachmentResult": { "type": "object", "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } + "error": { + "$ref": "#/definitions/Error" }, - "type": { - "type": "string" + "result": { + "$ref": "#/definitions/FilesystemAttachment" } }, "additionalProperties": false, "required": [ - "config", - "type" + "result" ] }, - "RemoveBlocksArgs": { + "FilesystemAttachmentResults": { "type": "object", "properties": { - "all": { - "type": "boolean" + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/FilesystemAttachmentResult" + } } }, - "additionalProperties": false, - "required": [ - "all" - ] + "additionalProperties": false }, - "StringResult": { + "FilesystemAttachments": { "type": "object", "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "string" + "filesystem-attachments": { + "type": "array", + "items": { + "$ref": "#/definitions/FilesystemAttachment" + } } }, "additionalProperties": false, "required": [ - "result" + "filesystem-attachments" ] }, - "SummaryWatcherID": { + "FilesystemInfo": { "type": "object", "properties": { - "watcher-id": { + "filesystem-id": { + "type": "string" + }, + "pool": { "type": "string" + }, + "size": { + "type": "integer" } }, "additionalProperties": false, "required": [ - "watcher-id" + "filesystem-id", + "pool", + "size" ] }, - "UserAccess": { + "FilesystemParams": { "type": "object", "properties": { - "access": { + "attachment": { + "$ref": "#/definitions/FilesystemAttachmentParams" + }, + "attributes": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "filesystem-tag": { "type": "string" }, - "user-tag": { + "provider": { + "type": "string" + }, + "size": { + "type": "integer" + }, + "tags": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "volume-tag": { "type": "string" } }, "additionalProperties": false, "required": [ - "user-tag", - "access" + "filesystem-tag", + "size", + "provider" ] }, - "UserAccessResult": { + "FilesystemParamsResult": { "type": "object", "properties": { "error": { "$ref": "#/definitions/Error" }, "result": { - "$ref": "#/definitions/UserAccess" + "$ref": "#/definitions/FilesystemParams" } }, - "additionalProperties": false + "additionalProperties": false, + "required": [ + "result" + ] }, - "UserAccessResults": { + "FilesystemParamsResults": { "type": "object", "properties": { "results": { "type": "array", "items": { - "$ref": "#/definitions/UserAccessResult" + "$ref": "#/definitions/FilesystemParamsResult" } } }, "additionalProperties": false }, - "UserModel": { + "FilesystemResult": { "type": "object", "properties": { - "last-connection": { - "type": "string", - "format": "date-time" + "error": { + "$ref": "#/definitions/Error" }, - "model": { - "$ref": "#/definitions/Model" + "result": { + "$ref": "#/definitions/Filesystem" } }, "additionalProperties": false, "required": [ - "model", - "last-connection" + "result" ] }, - "UserModelList": { + "FilesystemResults": { "type": "object", "properties": { - "user-models": { + "results": { "type": "array", "items": { - "$ref": "#/definitions/UserModel" + "$ref": "#/definitions/FilesystemResult" } } }, - "additionalProperties": false, - "required": [ - "user-models" - ] - } - } - } - }, - { - "Name": "CredentialManager", - "Description": "", - "Version": 1, - "AvailableTo": [ - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "InvalidateModelCredential": { + "additionalProperties": false + }, + "Filesystems": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/InvalidateCredentialArg" - }, - "Result": { - "$ref": "#/definitions/ErrorResult" + "filesystems": { + "type": "array", + "items": { + "$ref": "#/definitions/Filesystem" + } } }, - "description": "InvalidateModelCredential marks the cloud credential for this model as invalid." - } - }, - "definitions": { - "Error": { + "additionalProperties": false, + "required": [ + "filesystems" + ] + }, + "LifeResult": { "type": "object", "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } + "error": { + "$ref": "#/definitions/Error" }, - "message": { + "life": { "type": "string" } }, "additionalProperties": false, "required": [ - "message", - "code" + "life" ] }, - "ErrorResult": { + "LifeResults": { "type": "object", "properties": { - "error": { - "$ref": "#/definitions/Error" + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/LifeResult" + } } }, - "additionalProperties": false + "additionalProperties": false, + "required": [ + "results" + ] }, - "InvalidateCredentialArg": { + "MachineStorageId": { "type": "object", "properties": { - "reason": { + "attachment-tag": { + "type": "string" + }, + "machine-tag": { "type": "string" } }, - "additionalProperties": false - } - } - } - }, - { - "Name": "FirewallRules", - "Description": "API provides the firewallrules facade APIs for v1.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "ListFirewallRules": { + "additionalProperties": false, + "required": [ + "machine-tag", + "attachment-tag" + ] + }, + "MachineStorageIds": { "type": "object", "properties": { - "Result": { - "$ref": "#/definitions/ListFirewallRulesResults" + "ids": { + "type": "array", + "items": { + "$ref": "#/definitions/MachineStorageId" + } } }, - "description": "ListFirewallRules returns all the firewall rules." + "additionalProperties": false, + "required": [ + "ids" + ] }, - "SetFirewallRules": { + "MachineStorageIdsWatchResult": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/FirewallRuleArgs" + "changes": { + "type": "array", + "items": { + "$ref": "#/definitions/MachineStorageId" + } }, - "Result": { - "$ref": "#/definitions/ErrorResults" + "error": { + "$ref": "#/definitions/Error" + }, + "watcher-id": { + "type": "string" } }, - "description": "SetFirewallRules creates or updates the specified firewall rules." - } - }, - "definitions": { - "Error": { + "additionalProperties": false, + "required": [ + "watcher-id", + "changes" + ] + }, + "MachineStorageIdsWatchResults": { "type": "object", "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/MachineStorageIdsWatchResult" } - }, - "message": { - "type": "string" } }, "additionalProperties": false, "required": [ - "message", - "code" + "results" ] }, - "ErrorResult": { + "NotifyWatchResult": { "type": "object", "properties": { + "NotifyWatcherId": { + "type": "string" + }, "error": { "$ref": "#/definitions/Error" } }, - "additionalProperties": false + "additionalProperties": false, + "required": [ + "NotifyWatcherId" + ] }, - "ErrorResults": { + "NotifyWatchResults": { "type": "object", "properties": { "results": { "type": "array", "items": { - "$ref": "#/definitions/ErrorResult" + "$ref": "#/definitions/NotifyWatchResult" } } }, @@ -9607,90 +44719,79 @@ "results" ] }, - "FirewallRule": { + "RemoveFilesystemParams": { "type": "object", "properties": { - "known-service": { + "destroy": { + "type": "boolean" + }, + "filesystem-id": { "type": "string" }, - "whitelist-cidrs": { - "type": "array", - "items": { - "type": "string" - } + "provider": { + "type": "string" } }, "additionalProperties": false, "required": [ - "known-service" + "provider", + "filesystem-id" ] }, - "FirewallRuleArgs": { + "RemoveFilesystemParamsResult": { "type": "object", "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/FirewallRule" - } + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "$ref": "#/definitions/RemoveFilesystemParams" } }, "additionalProperties": false, "required": [ - "args" + "result" ] }, - "ListFirewallRulesResults": { + "RemoveFilesystemParamsResults": { "type": "object", "properties": { - "Rules": { + "results": { "type": "array", "items": { - "$ref": "#/definitions/FirewallRule" + "$ref": "#/definitions/RemoveFilesystemParamsResult" } } }, - "additionalProperties": false, - "required": [ - "Rules" - ] - } - } - } - }, - { - "Name": "HighAvailability", - "Description": "HighAvailabilityAPI implements the HighAvailability interface and is the concrete\nimplementation of the api end point.", - "Version": 2, - "AvailableTo": [ - "controller-user", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "EnableHA": { + "additionalProperties": false + }, + "RemoveVolumeParams": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/ControllersSpecs" + "destroy": { + "type": "boolean" }, - "Result": { - "$ref": "#/definitions/ControllersChangeResults" + "provider": { + "type": "string" + }, + "volume-id": { + "type": "string" } }, - "description": "EnableHA adds controller machines as necessary to ensure the\ncontroller has the number of machines specified." - } - }, - "definitions": { - "ControllersChangeResult": { + "additionalProperties": false, + "required": [ + "provider", + "volume-id" + ] + }, + "RemoveVolumeParamsResult": { "type": "object", "properties": { "error": { "$ref": "#/definitions/Error" }, "result": { - "$ref": "#/definitions/ControllersChanges" + "$ref": "#/definitions/RemoveVolumeParams" } }, "additionalProperties": false, @@ -9698,366 +44799,263 @@ "result" ] }, - "ControllersChangeResults": { + "RemoveVolumeParamsResults": { "type": "object", "properties": { "results": { "type": "array", "items": { - "$ref": "#/definitions/ControllersChangeResult" + "$ref": "#/definitions/RemoveVolumeParamsResult" } } }, - "additionalProperties": false, - "required": [ - "results" - ] + "additionalProperties": false }, - "ControllersChanges": { + "SetStatus": { "type": "object", "properties": { - "added": { - "type": "array", - "items": { - "type": "string" - } - }, - "converted": { - "type": "array", - "items": { - "type": "string" - } - }, - "maintained": { - "type": "array", - "items": { - "type": "string" - } - }, - "removed": { + "entities": { "type": "array", "items": { - "type": "string" + "$ref": "#/definitions/EntityStatusArgs" } } }, - "additionalProperties": false + "additionalProperties": false, + "required": [ + "entities" + ] }, - "ControllersSpec": { + "StringResult": { "type": "object", "properties": { - "constraints": { - "$ref": "#/definitions/Value" - }, - "num-controllers": { - "type": "integer" + "error": { + "$ref": "#/definitions/Error" }, - "placement": { - "type": "array", - "items": { - "type": "string" - } + "result": { + "type": "string" } }, "additionalProperties": false, "required": [ - "num-controllers" + "result" ] }, - "ControllersSpecs": { + "StringResults": { "type": "object", "properties": { - "specs": { + "results": { "type": "array", "items": { - "$ref": "#/definitions/ControllersSpec" + "$ref": "#/definitions/StringResult" } } }, "additionalProperties": false, "required": [ - "specs" + "results" ] }, - "Error": { + "StringsWatchResult": { "type": "object", "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } + "changes": { + "type": "array", + "items": { + "type": "string" } }, - "message": { + "error": { + "$ref": "#/definitions/Error" + }, + "watcher-id": { "type": "string" } }, "additionalProperties": false, "required": [ - "message", - "code" + "watcher-id" ] }, - "Value": { + "StringsWatchResults": { "type": "object", "properties": { - "allocate-public-ip": { - "type": "boolean" - }, - "arch": { - "type": "string" - }, - "container": { - "type": "string" - }, - "cores": { - "type": "integer" - }, - "cpu-power": { - "type": "integer" - }, - "instance-role": { - "type": "string" - }, - "instance-type": { - "type": "string" - }, - "mem": { - "type": "integer" - }, - "root-disk": { - "type": "integer" - }, - "root-disk-source": { - "type": "string" - }, - "spaces": { - "type": "array", - "items": { - "type": "string" - } - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "virt-type": { - "type": "string" - }, - "zones": { + "results": { "type": "array", "items": { - "type": "string" + "$ref": "#/definitions/StringsWatchResult" } } }, - "additionalProperties": false - } - } - } - }, - { - "Name": "ImageMetadataManager", - "Description": "API is the concrete implementation of the api end point\nfor loud image metadata manipulations.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "Delete": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/MetadataImageIds" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "Delete deletes cloud image metadata for given image ids.\nIt supports bulk calls." + "additionalProperties": false, + "required": [ + "results" + ] }, - "List": { + "Volume": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/ImageMetadataFilter" + "info": { + "$ref": "#/definitions/VolumeInfo" }, - "Result": { - "$ref": "#/definitions/ListCloudImageMetadataResult" + "volume-tag": { + "type": "string" } }, - "description": "List returns all found cloud image metadata that satisfy\ngiven filter.\nReturned list contains metadata ordered by priority." + "additionalProperties": false, + "required": [ + "volume-tag", + "info" + ] }, - "Save": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/MetadataSaveParams" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "Save stores given cloud image metadata.\nIt supports bulk calls." - } - }, - "definitions": { - "CloudImageMetadata": { + "VolumeAttachment": { "type": "object", "properties": { - "arch": { - "type": "string" - }, - "image-id": { - "type": "string" - }, - "priority": { - "type": "integer" - }, - "region": { - "type": "string" - }, - "root-storage-size": { - "type": "integer" - }, - "root-storage-type": { - "type": "string" - }, - "source": { - "type": "string" - }, - "stream": { - "type": "string" + "info": { + "$ref": "#/definitions/VolumeAttachmentInfo" }, - "version": { + "machine-tag": { "type": "string" }, - "virt-type": { + "volume-tag": { "type": "string" } }, "additionalProperties": false, "required": [ - "image-id", - "region", - "version", - "arch", - "source", - "priority" + "volume-tag", + "machine-tag", + "info" ] }, - "CloudImageMetadataList": { + "VolumeAttachmentInfo": { "type": "object", "properties": { - "metadata": { - "type": "array", - "items": { - "$ref": "#/definitions/CloudImageMetadata" - } + "bus-address": { + "type": "string" + }, + "device-link": { + "type": "string" + }, + "device-name": { + "type": "string" + }, + "plan-info": { + "$ref": "#/definitions/VolumeAttachmentPlanInfo" + }, + "read-only": { + "type": "boolean" } }, "additionalProperties": false }, - "Error": { + "VolumeAttachmentParams": { "type": "object", "properties": { - "code": { + "instance-id": { "type": "string" }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } + "machine-tag": { + "type": "string" }, - "message": { + "provider": { + "type": "string" + }, + "read-only": { + "type": "boolean" + }, + "volume-id": { + "type": "string" + }, + "volume-tag": { "type": "string" } }, "additionalProperties": false, "required": [ - "message", - "code" + "volume-tag", + "machine-tag", + "provider" ] }, - "ErrorResult": { + "VolumeAttachmentParamsResult": { "type": "object", "properties": { "error": { "$ref": "#/definitions/Error" + }, + "result": { + "$ref": "#/definitions/VolumeAttachmentParams" } }, - "additionalProperties": false + "additionalProperties": false, + "required": [ + "result" + ] }, - "ErrorResults": { + "VolumeAttachmentParamsResults": { "type": "object", "properties": { "results": { "type": "array", "items": { - "$ref": "#/definitions/ErrorResult" + "$ref": "#/definitions/VolumeAttachmentParamsResult" } } }, - "additionalProperties": false, - "required": [ - "results" - ] + "additionalProperties": false }, - "ImageMetadataFilter": { + "VolumeAttachmentPlan": { "type": "object", "properties": { - "arches": { - "type": "array", - "items": { - "type": "string" - } + "block-device": { + "$ref": "#/definitions/BlockDevice" }, - "region": { + "life": { "type": "string" }, - "root-storage-type": { + "machine-tag": { "type": "string" }, - "stream": { - "type": "string" + "plan-info": { + "$ref": "#/definitions/VolumeAttachmentPlanInfo" }, - "versions": { - "type": "array", - "items": { - "type": "string" + "volume-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "volume-tag", + "machine-tag", + "plan-info" + ] + }, + "VolumeAttachmentPlanInfo": { + "type": "object", + "properties": { + "device-attributes": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } } }, - "virt-type": { + "device-type": { "type": "string" } }, "additionalProperties": false }, - "ListCloudImageMetadataResult": { + "VolumeAttachmentPlanResult": { "type": "object", "properties": { + "error": { + "$ref": "#/definitions/Error" + }, "result": { - "type": "array", - "items": { - "$ref": "#/definitions/CloudImageMetadata" - } + "$ref": "#/definitions/VolumeAttachmentPlan" } }, "additionalProperties": false, @@ -10065,130 +45063,111 @@ "result" ] }, - "MetadataImageIds": { + "VolumeAttachmentPlanResults": { "type": "object", "properties": { - "image-ids": { + "results": { "type": "array", "items": { - "type": "string" + "$ref": "#/definitions/VolumeAttachmentPlanResult" } } }, - "additionalProperties": false, - "required": [ - "image-ids" - ] + "additionalProperties": false }, - "MetadataSaveParams": { + "VolumeAttachmentPlans": { "type": "object", "properties": { - "metadata": { + "volume-plans": { "type": "array", "items": { - "$ref": "#/definitions/CloudImageMetadataList" + "$ref": "#/definitions/VolumeAttachmentPlan" } } }, - "additionalProperties": false - } - } - } - }, - { - "Name": "KeyManager", - "Description": "KeyManagerAPI provides api endpoints for manipulating ssh keys", - "Version": 1, - "AvailableTo": [ - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "AddKeys": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ModifyUserSSHKeys" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "AddKeys adds new authorised ssh keys for the specified user." + "additionalProperties": false, + "required": [ + "volume-plans" + ] }, - "DeleteKeys": { + "VolumeAttachmentResult": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/ModifyUserSSHKeys" + "error": { + "$ref": "#/definitions/Error" }, - "Result": { - "$ref": "#/definitions/ErrorResults" + "result": { + "$ref": "#/definitions/VolumeAttachment" } }, - "description": "DeleteKeys deletes the authorised ssh keys for the specified user." + "additionalProperties": false, + "required": [ + "result" + ] }, - "ImportKeys": { + "VolumeAttachmentResults": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/ModifyUserSSHKeys" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/VolumeAttachmentResult" + } } }, - "description": "ImportKeys imports new authorised ssh keys from the specified key ids for the specified user." + "additionalProperties": false }, - "ListKeys": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ListSSHKeys" - }, - "Result": { - "$ref": "#/definitions/StringsResults" - } - }, - "description": "ListKeys returns the authorised ssh keys for the specified users." - } - }, - "definitions": { - "Entities": { + "VolumeAttachments": { "type": "object", "properties": { - "entities": { + "volume-attachments": { "type": "array", "items": { - "$ref": "#/definitions/Entity" + "$ref": "#/definitions/VolumeAttachment" } } }, "additionalProperties": false, "required": [ - "entities" + "volume-attachments" ] }, - "Entity": { + "VolumeInfo": { "type": "object", "properties": { - "tag": { + "hardware-id": { + "type": "string" + }, + "persistent": { + "type": "boolean" + }, + "pool": { + "type": "string" + }, + "size": { + "type": "integer" + }, + "volume-id": { + "type": "string" + }, + "wwn": { "type": "string" } }, "additionalProperties": false, "required": [ - "tag" + "volume-id", + "size", + "persistent" ] }, - "Error": { + "VolumeParams": { "type": "object", "properties": { - "code": { - "type": "string" + "attachment": { + "$ref": "#/definitions/VolumeAttachmentParams" }, - "info": { + "attributes": { "type": "object", "patternProperties": { ".*": { @@ -10197,112 +45176,107 @@ } } }, - "message": { + "provider": { + "type": "string" + }, + "size": { + "type": "integer" + }, + "tags": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "volume-tag": { "type": "string" } }, "additionalProperties": false, "required": [ - "message", - "code" + "volume-tag", + "size", + "provider" ] }, - "ErrorResult": { + "VolumeParamsResult": { "type": "object", "properties": { "error": { "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ListSSHKeys": { - "type": "object", - "properties": { - "entities": { - "$ref": "#/definitions/Entities" }, - "mode": { - "type": "boolean" + "result": { + "$ref": "#/definitions/VolumeParams" } }, "additionalProperties": false, "required": [ - "entities", - "mode" + "result" ] }, - "ModifyUserSSHKeys": { + "VolumeParamsResults": { "type": "object", "properties": { - "ssh-keys": { + "results": { "type": "array", "items": { - "type": "string" + "$ref": "#/definitions/VolumeParamsResult" } - }, - "user": { - "type": "string" } }, - "additionalProperties": false, - "required": [ - "user", - "ssh-keys" - ] + "additionalProperties": false }, - "StringsResult": { + "VolumeResult": { "type": "object", "properties": { "error": { "$ref": "#/definitions/Error" }, "result": { + "$ref": "#/definitions/Volume" + } + }, + "additionalProperties": false, + "required": [ + "result" + ] + }, + "VolumeResults": { + "type": "object", + "properties": { + "results": { "type": "array", "items": { - "type": "string" + "$ref": "#/definitions/VolumeResult" } } }, "additionalProperties": false }, - "StringsResults": { + "Volumes": { "type": "object", "properties": { - "results": { + "volumes": { "type": "array", "items": { - "$ref": "#/definitions/StringsResult" + "$ref": "#/definitions/Volume" } } }, "additionalProperties": false, "required": [ - "results" + "volumes" ] } } } }, { - "Name": "MachineManager", - "Description": "MachineManagerAPI provides access to the MachineManager API facade.", - "Version": 10, + "Name": "StringsWatcher", + "Description": "srvStringsWatcher defines the API for methods on a state.StringsWatcher.\nEach client has its own current set of watchers, stored in resources.\nsrvStringsWatcher notifies about changes for all entities of a given kind,\nsending the changes as a list of strings.", + "Version": 1, "AvailableTo": [ "controller-machine-agent", "machine-agent", @@ -10312,721 +45286,652 @@ "Schema": { "type": "object", "properties": { - "AddMachines": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/AddMachines" - }, - "Result": { - "$ref": "#/definitions/AddMachinesResults" - } - }, - "description": "AddMachines adds new machines with the supplied parameters.\nThe args will contain Base info." - }, - "DestroyMachineWithParams": { + "Next": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/DestroyMachinesParams" - }, "Result": { - "$ref": "#/definitions/DestroyMachineResults" + "$ref": "#/definitions/StringsWatchResult" } }, - "description": "DestroyMachineWithParams removes a set of machines from the model." + "description": "Next returns when a change has occurred to an entity of the\ncollection being watched since the most recent call to Next\nor the Watch call that created the srvStringsWatcher." }, - "GetUpgradeSeriesMessages": { + "Stop": { "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/UpgradeSeriesNotificationParams" - }, - "Result": { - "$ref": "#/definitions/StringsResults" - } - }, - "description": "GetUpgradeSeriesMessages returns all new messages associated with upgrade\nseries events. Messages that have already been retrieved once are not\nreturned by this method." - }, - "InstanceTypes": { + "description": "Stop stops the watcher." + } + }, + "definitions": { + "Error": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/ModelInstanceTypesConstraints" + "code": { + "type": "string" }, - "Result": { - "$ref": "#/definitions/InstanceTypesResults" - } - }, - "description": "InstanceTypes returns instance type information for the cloud and region\nin which the current model is deployed." - }, - "ProvisioningScript": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ProvisioningScriptParams" + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } }, - "Result": { - "$ref": "#/definitions/ProvisioningScriptResult" + "message": { + "type": "string" } }, - "description": "ProvisioningScript returns a shell script that, when run,\nprovisions a machine agent on the machine executing the script." + "additionalProperties": false, + "required": [ + "message", + "code" + ] }, - "RetryProvisioning": { + "StringsWatchResult": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/RetryProvisioningArgs" + "changes": { + "type": "array", + "items": { + "type": "string" + } }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "RetryProvisioning marks a provisioning error as transient on the machines." - }, - "UpgradeSeriesComplete": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/UpdateChannelArg" + "error": { + "$ref": "#/definitions/Error" }, - "Result": { - "$ref": "#/definitions/ErrorResult" + "watcher-id": { + "type": "string" } }, - "description": "UpgradeSeriesComplete marks a machine as having completed a managed series\nupgrade." - }, - "UpgradeSeriesPrepare": { + "additionalProperties": false, + "required": [ + "watcher-id" + ] + } + } + } + }, + { + "Name": "Subnets", + "Description": "API provides the subnets API facade for version 5.", + "Version": 5, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "AllZones": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/UpdateChannelArg" - }, "Result": { - "$ref": "#/definitions/ErrorResult" + "$ref": "#/definitions/ZoneResults" } }, - "description": "UpgradeSeriesPrepare prepares a machine for a OS series upgrade." + "description": "AllZones returns all availability zones known to Juju. If a\nzone is unusable, unavailable, or deprecated the Available\nfield will be false." }, - "UpgradeSeriesValidate": { + "ListSubnets": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/UpdateChannelArgs" + "$ref": "#/definitions/SubnetsFilters" }, "Result": { - "$ref": "#/definitions/UpgradeSeriesUnitsResults" + "$ref": "#/definitions/ListSubnetsResults" } }, - "description": "UpgradeSeriesValidate validates that the incoming arguments correspond to a\nvalid series upgrade for the target machine.\nIf they do, a list of the machine's current units is returned for use in\nsoliciting user confirmation of the command." + "description": "ListSubnets returns the matching subnets after applying\noptional filters." }, - "WatchUpgradeSeriesNotifications": { + "SubnetsByCIDR": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/Entities" + "$ref": "#/definitions/CIDRParams" }, "Result": { - "$ref": "#/definitions/NotifyWatchResults" + "$ref": "#/definitions/SubnetsResults" } }, - "description": "WatchUpgradeSeriesNotifications returns a watcher that fires on upgrade\nseries events." + "description": "SubnetsByCIDR returns the collection of subnets matching each CIDR in the input." } }, "definitions": { - "AddMachineParams": { + "CIDRParams": { "type": "object", "properties": { - "addresses": { - "type": "array", - "items": { - "$ref": "#/definitions/Address" - } - }, - "base": { - "$ref": "#/definitions/Base" - }, - "constraints": { - "$ref": "#/definitions/Value" - }, - "container-type": { - "type": "string" - }, - "disks": { - "type": "array", - "items": { - "$ref": "#/definitions/Constraints" - } - }, - "hardware-characteristics": { - "$ref": "#/definitions/HardwareCharacteristics" - }, - "instance-id": { - "type": "string" - }, - "jobs": { + "cidrs": { "type": "array", "items": { "type": "string" } - }, - "nonce": { - "type": "string" - }, - "parent-id": { - "type": "string" - }, - "placement": { - "$ref": "#/definitions/Placement" - } - }, - "additionalProperties": false, - "required": [ - "constraints", - "jobs", - "parent-id", - "container-type", - "instance-id", - "nonce", - "hardware-characteristics", - "addresses" - ] - }, - "AddMachines": { - "type": "object", - "properties": { - "params": { - "type": "array", - "items": { - "$ref": "#/definitions/AddMachineParams" - } } }, "additionalProperties": false, "required": [ - "params" + "cidrs" ] }, - "AddMachinesResult": { + "Error": { "type": "object", "properties": { - "error": { - "$ref": "#/definitions/Error" + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } }, - "machine": { + "message": { "type": "string" } }, "additionalProperties": false, "required": [ - "machine" + "message", + "code" ] }, - "AddMachinesResults": { + "ListSubnetsResults": { "type": "object", "properties": { - "machines": { + "results": { "type": "array", "items": { - "$ref": "#/definitions/AddMachinesResult" + "$ref": "#/definitions/Subnet" } } }, "additionalProperties": false, "required": [ - "machines" + "results" ] }, - "Address": { + "Subnet": { "type": "object", "properties": { "cidr": { "type": "string" }, - "config-type": { + "life": { "type": "string" }, - "is-secondary": { - "type": "boolean" - }, - "scope": { + "provider-id": { "type": "string" }, - "space-id": { + "provider-network-id": { "type": "string" }, - "space-name": { + "provider-space-id": { "type": "string" }, - "type": { + "space-tag": { "type": "string" }, - "value": { + "status": { "type": "string" + }, + "vlan-tag": { + "type": "integer" + }, + "zones": { + "type": "array", + "items": { + "type": "string" + } } }, "additionalProperties": false, "required": [ - "value", - "type", - "scope" + "cidr", + "vlan-tag", + "life", + "space-tag", + "zones" ] }, - "Base": { + "SubnetV2": { "type": "object", "properties": { - "channel": { + "Subnet": { + "$ref": "#/definitions/Subnet" + }, + "cidr": { "type": "string" }, - "name": { + "id": { "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "channel" - ] - }, - "Constraints": { - "type": "object", - "properties": { - "Count": { - "type": "integer" }, - "Pool": { + "life": { "type": "string" }, - "Size": { + "provider-id": { + "type": "string" + }, + "provider-network-id": { + "type": "string" + }, + "provider-space-id": { + "type": "string" + }, + "space-tag": { + "type": "string" + }, + "status": { + "type": "string" + }, + "vlan-tag": { "type": "integer" + }, + "zones": { + "type": "array", + "items": { + "type": "string" + } } }, "additionalProperties": false, "required": [ - "Pool", - "Size", - "Count" + "cidr", + "vlan-tag", + "life", + "space-tag", + "zones", + "Subnet" ] }, - "DestroyMachineInfo": { + "SubnetsFilters": { "type": "object", "properties": { - "destroyed-containers": { - "type": "array", - "items": { - "$ref": "#/definitions/DestroyMachineResult" - } - }, - "destroyed-storage": { - "type": "array", - "items": { - "$ref": "#/definitions/Entity" - } - }, - "destroyed-units": { - "type": "array", - "items": { - "$ref": "#/definitions/Entity" - } - }, - "detached-storage": { - "type": "array", - "items": { - "$ref": "#/definitions/Entity" - } + "space-tag": { + "type": "string" }, - "machine-id": { + "zone": { "type": "string" } }, - "additionalProperties": false, - "required": [ - "machine-id" - ] + "additionalProperties": false }, - "DestroyMachineResult": { + "SubnetsResult": { "type": "object", "properties": { "error": { "$ref": "#/definitions/Error" }, - "info": { - "$ref": "#/definitions/DestroyMachineInfo" + "subnets": { + "type": "array", + "items": { + "$ref": "#/definitions/SubnetV2" + } } }, "additionalProperties": false }, - "DestroyMachineResults": { + "SubnetsResults": { "type": "object", "properties": { "results": { "type": "array", "items": { - "$ref": "#/definitions/DestroyMachineResult" + "$ref": "#/definitions/SubnetsResult" } } }, - "additionalProperties": false + "additionalProperties": false, + "required": [ + "results" + ] }, - "DestroyMachinesParams": { + "ZoneResult": { "type": "object", "properties": { - "dry-run": { - "type": "boolean" - }, - "force": { - "type": "boolean" - }, - "keep": { + "available": { "type": "boolean" }, - "machine-tags": { - "type": "array", - "items": { - "type": "string" - } + "error": { + "$ref": "#/definitions/Error" }, - "max-wait": { - "type": "integer" + "name": { + "type": "string" } }, "additionalProperties": false, "required": [ - "machine-tags" + "name", + "available" ] }, - "Entities": { + "ZoneResults": { "type": "object", "properties": { - "entities": { + "results": { "type": "array", "items": { - "$ref": "#/definitions/Entity" + "$ref": "#/definitions/ZoneResult" } } }, "additionalProperties": false, "required": [ - "entities" + "results" ] + } + } + } + }, + { + "Name": "Undertaker", + "Description": "UndertakerAPI implements the API used by the model undertaker worker.", + "Version": 1, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "CloudSpec": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/CloudSpecResults" + } + }, + "description": "CloudSpec returns the model's cloud spec." + }, + "GetCloudSpec": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ModelTag" + }, + "Result": { + "$ref": "#/definitions/CloudSpecResult" + } + }, + "description": "GetCloudSpec constructs the CloudSpec for a validated and authorized model." + }, + "ModelConfig": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/ModelConfigResult" + } + }, + "description": "ModelConfig returns the current model's configuration." + }, + "ModelInfo": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/UndertakerModelInfoResult" + } + }, + "description": "ModelInfo returns information on the model needed by the undertaker worker." + }, + "ProcessDyingModel": { + "type": "object", + "description": "ProcessDyingModel checks if a dying model has any machines or applications.\nIf there are none, the model's life is changed from dying to dead." + }, + "RemoveModel": { + "type": "object", + "description": "RemoveModel removes any records of this model from Juju." + }, + "SetStatus": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/SetStatus" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "SetStatus sets the status of each given entity." }, - "Entity": { + "WatchCloudSpecsChanges": { "type": "object", "properties": { - "tag": { - "type": "string" + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/NotifyWatchResults" } }, - "additionalProperties": false, - "required": [ - "tag" - ] + "description": "WatchCloudSpecsChanges returns a watcher for cloud spec changes." }, - "Error": { + "WatchForModelConfigChanges": { "type": "object", "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "message": { - "type": "string" + "Result": { + "$ref": "#/definitions/NotifyWatchResult" } }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] + "description": "WatchForModelConfigChanges returns a NotifyWatcher that observes\nchanges to the model configuration.\nNote that although the NotifyWatchResult contains an Error field,\nit's not used because we are only returning a single watcher,\nso we use the regular error return." }, - "ErrorResult": { + "WatchModel": { "type": "object", "properties": { - "error": { - "$ref": "#/definitions/Error" + "Result": { + "$ref": "#/definitions/NotifyWatchResults" } }, - "additionalProperties": false + "description": "WatchModel creates a watcher for the current model." }, - "ErrorResults": { + "WatchModelResources": { "type": "object", "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } + "Result": { + "$ref": "#/definitions/NotifyWatchResults" } }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "HardwareCharacteristics": { + "description": "WatchModelResources creates watchers for changes to the lifecycle of an\nmodel's machines and applications and storage." + } + }, + "definitions": { + "CloudCredential": { "type": "object", "properties": { - "arch": { - "type": "string" - }, - "availability-zone": { - "type": "string" - }, - "cpu-cores": { - "type": "integer" - }, - "cpu-power": { - "type": "integer" - }, - "mem": { - "type": "integer" - }, - "root-disk": { - "type": "integer" + "attrs": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } }, - "root-disk-source": { + "auth-type": { "type": "string" }, - "tags": { + "redacted": { "type": "array", "items": { "type": "string" } - }, - "virt-type": { - "type": "string" } }, - "additionalProperties": false + "additionalProperties": false, + "required": [ + "auth-type" + ] }, - "InstanceType": { + "CloudSpec": { "type": "object", "properties": { - "arches": { + "cacertificates": { "type": "array", "items": { "type": "string" } }, - "cost": { - "type": "integer" + "credential": { + "$ref": "#/definitions/CloudCredential" }, - "cpu-cores": { - "type": "integer" + "endpoint": { + "type": "string" }, - "memory": { - "type": "integer" + "identity-endpoint": { + "type": "string" + }, + "is-controller-cloud": { + "type": "boolean" }, "name": { "type": "string" }, - "root-disk": { - "type": "integer" + "region": { + "type": "string" }, - "virt-type": { + "skip-tls-verify": { + "type": "boolean" + }, + "storage-endpoint": { + "type": "string" + }, + "type": { "type": "string" } }, "additionalProperties": false, "required": [ - "arches", - "cpu-cores", - "memory" + "type", + "name" ] }, - "InstanceTypesResult": { + "CloudSpecResult": { "type": "object", "properties": { - "cost-currency": { - "type": "string" - }, - "cost-divisor": { - "type": "integer" - }, - "cost-unit": { - "type": "string" - }, "error": { "$ref": "#/definitions/Error" }, - "instance-types": { - "type": "array", - "items": { - "$ref": "#/definitions/InstanceType" - } + "result": { + "$ref": "#/definitions/CloudSpec" } }, "additionalProperties": false }, - "InstanceTypesResults": { + "CloudSpecResults": { "type": "object", "properties": { "results": { "type": "array", "items": { - "$ref": "#/definitions/InstanceTypesResult" + "$ref": "#/definitions/CloudSpecResult" } } }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ModelInstanceTypesConstraint": { - "type": "object", - "properties": { - "value": { - "$ref": "#/definitions/Value" - } - }, "additionalProperties": false }, - "ModelInstanceTypesConstraints": { + "Entities": { "type": "object", "properties": { - "constraints": { + "entities": { "type": "array", "items": { - "$ref": "#/definitions/ModelInstanceTypesConstraint" + "$ref": "#/definitions/Entity" } } }, "additionalProperties": false, "required": [ - "constraints" + "entities" ] }, - "NotifyWatchResult": { + "Entity": { "type": "object", "properties": { - "NotifyWatcherId": { + "tag": { "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" } }, "additionalProperties": false, "required": [ - "NotifyWatcherId" + "tag" ] }, - "NotifyWatchResults": { + "EntityStatusArgs": { "type": "object", "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/NotifyWatchResult" + "data": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "Placement": { - "type": "object", - "properties": { - "directive": { - "type": "string" }, - "scope": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "scope", - "directive" - ] - }, - "ProvisioningScriptParams": { - "type": "object", - "properties": { - "data-dir": { + "info": { "type": "string" }, - "disable-package-commands": { - "type": "boolean" - }, - "machine-id": { + "status": { "type": "string" }, - "nonce": { + "tag": { "type": "string" } }, "additionalProperties": false, "required": [ - "machine-id", - "nonce", - "data-dir", - "disable-package-commands" + "tag", + "status", + "info", + "data" ] }, - "ProvisioningScriptResult": { + "Error": { "type": "object", "properties": { - "script": { + "code": { "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "script" - ] - }, - "RetryProvisioningArgs": { - "type": "object", - "properties": { - "all": { - "type": "boolean" }, - "machines": { - "type": "array", - "items": { - "type": "string" + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } } + }, + "message": { + "type": "string" } }, "additionalProperties": false, "required": [ - "all" + "message", + "code" ] }, - "StringsResult": { + "ErrorResult": { "type": "object", "properties": { "error": { "$ref": "#/definitions/Error" - }, - "result": { - "type": "array", - "items": { - "type": "string" - } } }, "additionalProperties": false }, - "StringsResults": { + "ErrorResults": { "type": "object", "properties": { "results": { "type": "array", "items": { - "$ref": "#/definitions/StringsResult" + "$ref": "#/definitions/ErrorResult" } } }, @@ -11035,198 +45940,170 @@ "results" ] }, - "UpdateChannelArg": { - "type": "object", - "properties": { - "channel": { - "type": "string" - }, - "force": { - "type": "boolean" - }, - "tag": { - "$ref": "#/definitions/Entity" - } - }, - "additionalProperties": false, - "required": [ - "tag", - "force", - "channel" - ] - }, - "UpdateChannelArgs": { + "ModelConfigResult": { "type": "object", "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/UpdateChannelArg" + "config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } } } }, "additionalProperties": false, "required": [ - "args" + "config" ] }, - "UpgradeSeriesNotificationParam": { + "ModelTag": { "type": "object", - "properties": { - "entity": { - "$ref": "#/definitions/Entity" - }, - "watcher-id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "entity", - "watcher-id" - ] + "additionalProperties": false }, - "UpgradeSeriesNotificationParams": { + "NotifyWatchResult": { "type": "object", "properties": { - "params": { - "type": "array", - "items": { - "$ref": "#/definitions/UpgradeSeriesNotificationParam" - } + "NotifyWatcherId": { + "type": "string" + }, + "error": { + "$ref": "#/definitions/Error" } }, "additionalProperties": false, "required": [ - "params" + "NotifyWatcherId" ] }, - "UpgradeSeriesUnitsResult": { + "NotifyWatchResults": { "type": "object", "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "unit-names": { + "results": { "type": "array", "items": { - "type": "string" + "$ref": "#/definitions/NotifyWatchResult" } } }, "additionalProperties": false, "required": [ - "unit-names" + "results" ] }, - "UpgradeSeriesUnitsResults": { + "SetStatus": { "type": "object", "properties": { - "Results": { + "entities": { "type": "array", "items": { - "$ref": "#/definitions/UpgradeSeriesUnitsResult" + "$ref": "#/definitions/EntityStatusArgs" } } }, "additionalProperties": false, "required": [ - "Results" + "entities" ] }, - "Value": { + "UndertakerModelInfo": { "type": "object", "properties": { - "allocate-public-ip": { - "type": "boolean" - }, - "arch": { - "type": "string" - }, - "container": { - "type": "string" - }, - "cores": { - "type": "integer" - }, - "cpu-power": { + "destroy-timeout": { "type": "integer" }, - "instance-role": { - "type": "string" + "force-destroyed": { + "type": "boolean" }, - "instance-type": { + "global-name": { "type": "string" }, - "mem": { - "type": "integer" - }, - "root-disk": { - "type": "integer" + "is-system": { + "type": "boolean" }, - "root-disk-source": { + "life": { "type": "string" }, - "spaces": { - "type": "array", - "items": { - "type": "string" - } - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } + "name": { + "type": "string" }, - "virt-type": { + "uuid": { "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uuid", + "name", + "global-name", + "is-system", + "life" + ] + }, + "UndertakerModelInfoResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" }, - "zones": { - "type": "array", - "items": { - "type": "string" - } + "result": { + "$ref": "#/definitions/UndertakerModelInfo" } }, - "additionalProperties": false + "additionalProperties": false, + "required": [ + "result" + ] } } } }, { - "Name": "MetricsDebug", - "Description": "MetricsDebugAPI implements the metricsdebug interface and is the concrete\nimplementation of the api end point.", - "Version": 2, + "Name": "UnitAssigner", + "Description": "API implements the functionality for assigning units to machines.", + "Version": 1, "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", "model-user" ], "Schema": { "type": "object", "properties": { - "GetMetrics": { + "AssignUnits": { "type": "object", "properties": { "Params": { "$ref": "#/definitions/Entities" }, "Result": { - "$ref": "#/definitions/MetricResults" + "$ref": "#/definitions/ErrorResults" } }, - "description": "GetMetrics returns all metrics stored by the state server." + "description": "AssignUnits assigns the units with the given ids to the correct machine. The\nerror results are returned in the same order as the given entities." }, - "SetMeterStatus": { + "SetAgentStatus": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/MeterStatusParams" + "$ref": "#/definitions/SetStatus" }, "Result": { "$ref": "#/definitions/ErrorResults" } }, - "description": "SetMeterStatus sets meter statuses for entities." + "description": "SetAgentStatus will set status for agents of Units passed in args, if one\nof the args is not an Unit it will fail." + }, + "WatchUnitAssignments": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/StringsWatchResult" + } + }, + "description": "WatchUnitAssignments returns a strings watcher that is notified when new unit\nassignments are added to the db." } }, "definitions": { @@ -11257,20 +46134,35 @@ "tag" ] }, - "EntityMetrics": { + "EntityStatusArgs": { "type": "object", "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "metrics": { - "type": "array", - "items": { - "$ref": "#/definitions/MetricResult" + "data": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } } + }, + "info": { + "type": "string" + }, + "status": { + "type": "string" + }, + "tag": { + "type": "string" } }, - "additionalProperties": false + "additionalProperties": false, + "required": [ + "tag", + "status", + "info", + "data" + ] }, "Error": { "type": "object", @@ -11306,1913 +46198,1355 @@ }, "additionalProperties": false }, - "ErrorResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "MeterStatusParam": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "string" - }, - "tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "tag", - "code" - ] - }, - "MeterStatusParams": { + "ErrorResults": { "type": "object", "properties": { - "statues": { + "results": { "type": "array", "items": { - "$ref": "#/definitions/MeterStatusParam" + "$ref": "#/definitions/ErrorResult" } } }, "additionalProperties": false, "required": [ - "statues" + "results" ] }, - "MetricResult": { + "SetStatus": { "type": "object", "properties": { - "key": { - "type": "string" - }, - "labels": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } + "entities": { + "type": "array", + "items": { + "$ref": "#/definitions/EntityStatusArgs" } - }, - "time": { - "type": "string", - "format": "date-time" - }, - "unit": { - "type": "string" - }, - "value": { - "type": "string" } }, "additionalProperties": false, "required": [ - "time", - "key", - "value", - "unit", - "labels" + "entities" ] }, - "MetricResults": { + "StringsWatchResult": { "type": "object", "properties": { - "results": { + "changes": { "type": "array", "items": { - "$ref": "#/definitions/EntityMetrics" + "type": "string" } + }, + "error": { + "$ref": "#/definitions/Error" + }, + "watcher-id": { + "type": "string" } }, "additionalProperties": false, "required": [ - "results" + "watcher-id" ] } } } }, { - "Name": "ModelConfig", - "Description": "ModelConfigAPIV3 is currently the latest.", - "Version": 3, + "Name": "Uniter", + "Description": "UniterAPI implements the latest version (v18) of the Uniter API.", + "Version": 19, "AvailableTo": [ "controller-machine-agent", "machine-agent", "unit-agent", - "controller-user", "model-user" ], "Schema": { "type": "object", "properties": { - "GetModelConstraints": { + "APIAddresses": { "type": "object", "properties": { "Result": { - "$ref": "#/definitions/GetConstraintsResults" + "$ref": "#/definitions/StringsResult" } }, - "description": "GetModelConstraints returns the constraints for the model." + "description": "APIAddresses returns the list of addresses used to connect to the API." }, - "ModelGet": { + "APIHostPorts": { "type": "object", "properties": { "Result": { - "$ref": "#/definitions/ModelConfigResults" + "$ref": "#/definitions/APIHostPortsResult" } }, - "description": "ModelGet implements the server-side part of the\nmodel-config CLI command." + "description": "APIHostPorts returns the API server addresses." }, - "ModelSet": { + "ActionStatus": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/ModelSet" + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/StringResults" } }, - "description": "ModelSet implements the server-side part of the\nset-model-config CLI command." + "description": "ActionStatus returns the status of Actions by Tags passed in." }, - "ModelUnset": { + "Actions": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/ModelUnset" + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ActionResults" } }, - "description": "ModelUnset implements the server-side part of the\nset-model-config CLI command." + "description": "Actions returns the Actions by Tags passed and ensures that the Unit asking\nfor them is the same Unit that has the Actions." }, - "SLALevel": { + "AddMetricBatches": { "type": "object", "properties": { + "Params": { + "$ref": "#/definitions/MetricBatchParams" + }, "Result": { - "$ref": "#/definitions/StringResult" + "$ref": "#/definitions/ErrorResults" } }, - "description": "SLALevel returns the current sla level for the model." + "description": "AddMetricBatches adds the metrics for the specified unit." }, - "Sequences": { + "ApplicationStatus": { "type": "object", "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, "Result": { - "$ref": "#/definitions/ModelSequencesResult" + "$ref": "#/definitions/ApplicationStatusResults" } }, - "description": "Sequences returns the model's sequence names and next values." + "description": "ApplicationStatus returns the status of the Applications and its workloads\nif the given unit is the leader." }, - "SetModelConstraints": { + "AssignedMachine": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/SetConstraints" + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/StringResults" } }, - "description": "SetModelConstraints sets the constraints for the model." + "description": "AssignedMachine returns the machine tag for each given unit tag, or\nan error satisfying params.IsCodeNotAssigned when a unit has no\nassigned machine." }, - "SetSLALevel": { + "AvailabilityZone": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/ModelSLA" + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/StringResults" } }, - "description": "SetSLALevel sets the sla level on the model." - } - }, - "definitions": { - "ConfigValue": { + "description": "AvailabilityZone returns the availability zone for each given unit, if applicable." + }, + "BeginActions": { "type": "object", "properties": { - "source": { - "type": "string" + "Params": { + "$ref": "#/definitions/Entities" }, - "value": { - "type": "object", - "additionalProperties": true + "Result": { + "$ref": "#/definitions/ErrorResults" } }, - "additionalProperties": false, - "required": [ - "value", - "source" - ] + "description": "BeginActions marks the actions represented by the passed in Tags as running." }, - "Error": { + "CanApplyLXDProfile": { "type": "object", "properties": { - "code": { - "type": "string" + "Params": { + "$ref": "#/definitions/Entities" }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } + "Result": { + "$ref": "#/definitions/BoolResults" + } + }, + "description": "CanApplyLXDProfile is a shim to call the LXDProfileAPIv2 version of this method." + }, + "CharmArchiveSha256": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/CharmURLs" }, - "message": { - "type": "string" + "Result": { + "$ref": "#/definitions/StringResults" } }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] + "description": "CharmArchiveSha256 returns the SHA256 digest of the charm archive\n(bundle) data for each charm url in the given parameters." }, - "GetConstraintsResults": { + "CharmModifiedVersion": { "type": "object", "properties": { - "constraints": { - "$ref": "#/definitions/Value" + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/IntResults" } }, - "additionalProperties": false, - "required": [ - "constraints" - ] + "description": "CharmModifiedVersion returns the most CharmModifiedVersion for all given\nunits or applications." }, - "ModelConfigResults": { + "CharmURL": { "type": "object", "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/ConfigValue" - } - } + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/StringBoolResults" } }, - "additionalProperties": false, - "required": [ - "config" - ] + "description": "CharmURL returns the charm URL for all given units or applications." }, - "ModelSLA": { + "ClearResolved": { "type": "object", "properties": { - "ModelSLAInfo": { - "$ref": "#/definitions/ModelSLAInfo" + "Params": { + "$ref": "#/definitions/Entities" }, - "creds": { - "type": "array", - "items": { - "type": "integer" - } + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "ClearResolved removes any resolved setting from each given unit." + }, + "CloudAPIVersion": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/StringResult" + } + }, + "description": "CloudAPIVersion returns the cloud API version, if available." + }, + "CloudSpec": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/CloudSpecResult" + } + }, + "description": "CloudSpec returns the cloud spec used by the model in which the\nauthenticated unit or application resides.\nA check is made beforehand to ensure that the request is made by an entity\nthat has been granted the appropriate trust." + }, + "CommitHookChanges": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/CommitHookChangesArgs" }, - "level": { - "type": "string" + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "CommitHookChanges batches together all required API calls for applying\na set of changes after a hook successfully completes and executes them in a\nsingle transaction." + }, + "ConfigSettings": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" }, - "owner": { - "type": "string" + "Result": { + "$ref": "#/definitions/ConfigSettingsResults" } }, - "additionalProperties": false, - "required": [ - "level", - "owner", - "ModelSLAInfo", - "creds" - ] + "description": "ConfigSettings returns the complete set of application charm config\nsettings available to each given unit." }, - "ModelSLAInfo": { + "CreateSecretURIs": { "type": "object", "properties": { - "level": { - "type": "string" + "Params": { + "$ref": "#/definitions/CreateSecretURIsArg" }, - "owner": { - "type": "string" + "Result": { + "$ref": "#/definitions/StringResults" } }, - "additionalProperties": false, - "required": [ - "level", - "owner" - ] + "description": "CreateSecretURIs creates new secret URIs." }, - "ModelSequencesResult": { + "CreateSecrets": { "type": "object", "properties": { - "sequences": { - "type": "object", - "patternProperties": { - ".*": { - "type": "integer" - } - } + "Params": { + "$ref": "#/definitions/CreateSecretArgs" + }, + "Result": { + "$ref": "#/definitions/StringResults" } }, - "additionalProperties": false, - "required": [ - "sequences" - ] + "description": "CreateSecrets creates new secrets." }, - "ModelSet": { + "CurrentModel": { "type": "object", "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } + "Result": { + "$ref": "#/definitions/ModelResult" } }, - "additionalProperties": false, - "required": [ - "config" - ] + "description": "CurrentModel returns the name and UUID for the current juju model." }, - "ModelUnset": { + "Destroy": { "type": "object", "properties": { - "keys": { - "type": "array", - "items": { - "type": "string" - } + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" } }, - "additionalProperties": false, - "required": [ - "keys" - ] + "description": "Destroy advances all given Alive units' lifecycles as far as\npossible. See state/Unit.Destroy()." }, - "SetConstraints": { + "DestroyAllSubordinates": { "type": "object", "properties": { - "application": { - "type": "string" + "Params": { + "$ref": "#/definitions/Entities" }, - "constraints": { - "$ref": "#/definitions/Value" + "Result": { + "$ref": "#/definitions/ErrorResults" } }, - "additionalProperties": false, - "required": [ - "application", - "constraints" - ] + "description": "DestroyAllSubordinates destroys all subordinates of each given unit." }, - "StringResult": { + "DestroyUnitStorageAttachments": { "type": "object", "properties": { - "error": { - "$ref": "#/definitions/Error" + "Params": { + "$ref": "#/definitions/Entities" }, - "result": { - "type": "string" + "Result": { + "$ref": "#/definitions/ErrorResults" } }, - "additionalProperties": false, - "required": [ - "result" - ] + "description": "DestroyUnitStorageAttachments marks each storage attachment of the\nspecified units as Dying." }, - "Value": { + "EnsureDead": { "type": "object", "properties": { - "allocate-public-ip": { - "type": "boolean" - }, - "arch": { - "type": "string" - }, - "container": { - "type": "string" - }, - "cores": { - "type": "integer" - }, - "cpu-power": { - "type": "integer" - }, - "instance-role": { - "type": "string" - }, - "instance-type": { - "type": "string" - }, - "mem": { - "type": "integer" - }, - "root-disk": { - "type": "integer" - }, - "root-disk-source": { - "type": "string" - }, - "spaces": { - "type": "array", - "items": { - "type": "string" - } - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "virt-type": { - "type": "string" + "Params": { + "$ref": "#/definitions/Entities" }, - "zones": { - "type": "array", - "items": { - "type": "string" - } + "Result": { + "$ref": "#/definitions/ErrorResults" } }, - "additionalProperties": false - } - } - } - }, - { - "Name": "ModelGeneration", - "Description": "API is the concrete implementation of the API endpoint.", - "Version": 4, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "AbortBranch": { + "description": "EnsureDead calls EnsureDead on each given entity from state. It\nwill fail if the entity is not present. If it's Alive, nothing will\nhappen (see state/EnsureDead() for units or machines)." + }, + "EnterScope": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/BranchArg" + "$ref": "#/definitions/RelationUnits" }, "Result": { - "$ref": "#/definitions/ErrorResult" + "$ref": "#/definitions/ErrorResults" } }, - "description": "AbortBranch aborts the input branch, marking it complete. However no\nchanges are made applicable to the whole model. No units may be assigned\nto the branch when aborting." + "description": "EnterScope ensures each unit has entered its scope in the relation,\nfor all of the given relation/unit pairs. See also\nstate.RelationUnit.EnterScope()." }, - "AddBranch": { + "FinishActions": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/BranchArg" + "$ref": "#/definitions/ActionExecutionResults" }, "Result": { - "$ref": "#/definitions/ErrorResult" + "$ref": "#/definitions/ErrorResults" } }, - "description": "AddBranch adds a new branch with the input name to the model." + "description": "FinishActions saves the result of a completed Action" }, - "BranchInfo": { + "GetConsumerSecretsRevisionInfo": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/BranchInfoArgs" + "$ref": "#/definitions/GetSecretConsumerInfoArgs" }, "Result": { - "$ref": "#/definitions/BranchResults" + "$ref": "#/definitions/SecretConsumerInfoResults" } }, - "description": "BranchInfo will return details of branch identified by the input argument,\nincluding units on the branch and the configuration disjoint with the\nmaster generation.\nAn error is returned if no in-flight branch matching in input is found." + "description": "GetConsumerSecretsRevisionInfo returns the latest secret revisions for the specified secrets.\nThis facade method is used for remote watcher to get the latest secret revisions and labels for a secret changed hook." }, - "CommitBranch": { + "GetMeterStatus": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/BranchArg" + "$ref": "#/definitions/Entities" }, "Result": { - "$ref": "#/definitions/IntResult" + "$ref": "#/definitions/MeterStatusResults" } - }, - "description": "CommitBranch commits the input branch, making its changes applicable to\nthe whole model and marking it complete." + } }, - "HasActiveBranch": { + "GetPodSpec": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/BranchArg" + "$ref": "#/definitions/Entities" }, "Result": { - "$ref": "#/definitions/BoolResult" + "$ref": "#/definitions/StringResults" } }, - "description": "HasActiveBranch returns a true result if the input model has an \"in-flight\"\nbranch matching the input name." + "description": "GetPodSpec gets the pod specs for a set of applications." }, - "ListCommits": { + "GetPrincipal": { "type": "object", "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, "Result": { - "$ref": "#/definitions/BranchResults" + "$ref": "#/definitions/StringBoolResults" } }, - "description": "ListCommits will return the commits, hence only branches with generation_id higher than 0" + "description": "GetPrincipal returns the result of calling PrincipalName() and\nconverting it to a tag, on each given unit." }, - "ShowCommit": { + "GetRawK8sSpec": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/GenerationId" + "$ref": "#/definitions/Entities" }, "Result": { - "$ref": "#/definitions/GenerationResult" + "$ref": "#/definitions/StringResults" } }, - "description": "ShowCommit will return details a commit given by its generationId\nAn error is returned if either no branch can be found corresponding to the generation id.\nOr the generation id given is below 1." + "description": "GetRawK8sSpec gets the raw k8s specs for a set of applications." }, - "TrackBranch": { + "GetSecretBackendConfigs": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/BranchTrackArg" + "$ref": "#/definitions/SecretBackendArgs" }, "Result": { - "$ref": "#/definitions/ErrorResults" + "$ref": "#/definitions/SecretBackendConfigResults" } }, - "description": "TrackBranch marks the input units and/or applications as tracking the input\nbranch, causing them to realise changes made under that branch." - } - }, - "definitions": { - "BoolResult": { + "description": "GetSecretBackendConfigs gets the config needed to create a client to secret backends." + }, + "GetSecretContentInfo": { "type": "object", "properties": { - "error": { - "$ref": "#/definitions/Error" + "Params": { + "$ref": "#/definitions/GetSecretContentArgs" }, - "result": { - "type": "boolean" + "Result": { + "$ref": "#/definitions/SecretContentResults" } }, - "additionalProperties": false, - "required": [ - "result" - ] + "description": "GetSecretContentInfo returns the secret values for the specified secrets." }, - "BranchArg": { + "GetSecretMetadata": { "type": "object", "properties": { - "branch": { - "type": "string" + "Result": { + "$ref": "#/definitions/ListSecretResults" } }, - "additionalProperties": false, - "required": [ - "branch" - ] + "description": "GetSecretMetadata returns metadata for the caller's secrets." }, - "BranchInfoArgs": { + "GetSecretRevisionContentInfo": { "type": "object", "properties": { - "branches": { - "type": "array", - "items": { - "type": "string" - } + "Params": { + "$ref": "#/definitions/SecretRevisionArg" }, - "detailed": { - "type": "boolean" + "Result": { + "$ref": "#/definitions/SecretContentResults" } }, - "additionalProperties": false, - "required": [ - "branches", - "detailed" - ] + "description": "GetSecretRevisionContentInfo returns the secret values for the specified secret revisions." }, - "BranchResults": { + "GoalStates": { "type": "object", "properties": { - "error": { - "$ref": "#/definitions/Error" + "Params": { + "$ref": "#/definitions/Entities" }, - "generations": { - "type": "array", - "items": { - "$ref": "#/definitions/Generation" - } + "Result": { + "$ref": "#/definitions/GoalStateResults" } }, - "additionalProperties": false, - "required": [ - "generations" - ] + "description": "GoalStates returns information of charm units and relations." }, - "BranchTrackArg": { + "HasSubordinates": { "type": "object", "properties": { - "branch": { - "type": "string" + "Params": { + "$ref": "#/definitions/Entities" }, - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/Entity" - } + "Result": { + "$ref": "#/definitions/BoolResults" + } + }, + "description": "HasSubordinates returns the whether each given unit has any subordinates." + }, + "LXDProfileName": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/StringResults" + } + }, + "description": "LXDProfileName is a shim to call the LXDProfileAPIv2 version of this method." + }, + "LXDProfileRequired": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/CharmURLs" }, - "num-units": { - "type": "integer" + "Result": { + "$ref": "#/definitions/BoolResults" } }, - "additionalProperties": false, - "required": [ - "branch", - "entities" - ] + "description": "LXDProfileRequired is a shim to call the LXDProfileAPIv2 version of this method." }, - "Entity": { + "LeaveScope": { "type": "object", "properties": { - "tag": { - "type": "string" + "Params": { + "$ref": "#/definitions/RelationUnits" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" } }, - "additionalProperties": false, - "required": [ - "tag" - ] + "description": "LeaveScope signals each unit has left its scope in the relation,\nfor all of the given relation/unit pairs. See also\nstate.RelationUnit.LeaveScope()." }, - "Error": { + "Life": { "type": "object", "properties": { - "code": { - "type": "string" + "Params": { + "$ref": "#/definitions/Entities" }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } + "Result": { + "$ref": "#/definitions/LifeResults" + } + }, + "description": "Life returns the life status of every supplied entity, where available." + }, + "LogActionsMessages": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ActionMessageParams" }, - "message": { - "type": "string" + "Result": { + "$ref": "#/definitions/ErrorResults" } }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] + "description": "LogActionsMessages records the log messages against the specified actions." }, - "ErrorResult": { + "Merge": { "type": "object", "properties": { - "error": { - "$ref": "#/definitions/Error" + "Params": { + "$ref": "#/definitions/MergeLeadershipSettingsBulkParams" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" } }, - "additionalProperties": false + "description": "Merge merges in the provided leadership settings. Only leaders for\nthe given service may perform this operation." }, - "ErrorResults": { + "ModelConfig": { "type": "object", "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } + "Result": { + "$ref": "#/definitions/ModelConfigResult" } }, - "additionalProperties": false, - "required": [ - "results" - ] + "description": "ModelConfig returns the current model's configuration." }, - "Generation": { + "NetworkInfo": { "type": "object", "properties": { - "applications": { - "type": "array", - "items": { - "$ref": "#/definitions/GenerationApplication" - } - }, - "branch": { - "type": "string" - }, - "completed": { - "type": "integer" - }, - "completed-by": { - "type": "string" - }, - "created": { - "type": "integer" - }, - "created-by": { - "type": "string" + "Params": { + "$ref": "#/definitions/NetworkInfoParams" }, - "generation-id": { - "type": "integer" + "Result": { + "$ref": "#/definitions/NetworkInfoResults" } }, - "additionalProperties": false, - "required": [ - "branch", - "created", - "created-by", - "applications" - ] + "description": "NetworkInfo returns network interfaces/addresses for specified bindings." }, - "GenerationApplication": { + "OpenedMachinePortRangesByEndpoint": { "type": "object", "properties": { - "application": { - "type": "string" - }, - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "pending": { - "type": "array", - "items": { - "type": "string" - } - }, - "progress": { - "type": "string" + "Params": { + "$ref": "#/definitions/Entities" }, - "tracking": { - "type": "array", - "items": { - "type": "string" - } + "Result": { + "$ref": "#/definitions/OpenPortRangesByEndpointResults" } }, - "additionalProperties": false, - "required": [ - "application", - "progress", - "config" - ] + "description": "OpenedMachinePortRangesByEndpoint returns the port ranges opened by each\nunit on the provided machines grouped by application endpoint." }, - "GenerationId": { + "OpenedPortRangesByEndpoint": { "type": "object", "properties": { - "generation-id": { - "type": "integer" + "Result": { + "$ref": "#/definitions/OpenPortRangesByEndpointResults" } }, - "additionalProperties": false, - "required": [ - "generation-id" - ] + "description": "OpenedPortRangesByEndpoint returns the port ranges opened by the unit." }, - "GenerationResult": { + "PrivateAddress": { "type": "object", "properties": { - "error": { - "$ref": "#/definitions/Error" + "Params": { + "$ref": "#/definitions/Entities" }, - "generation": { - "$ref": "#/definitions/Generation" + "Result": { + "$ref": "#/definitions/StringResults" } }, - "additionalProperties": false, - "required": [ - "generation" - ] + "description": "PrivateAddress returns the private address for each given unit, if set." }, - "IntResult": { + "ProviderType": { "type": "object", "properties": { - "error": { - "$ref": "#/definitions/Error" + "Result": { + "$ref": "#/definitions/StringResult" + } + }, + "description": "ProviderType returns the provider type used by the current juju\nmodel.\n\nTODO(dimitern): Refactor the uniter to call this instead of calling\nModelConfig() just to get the provider type. Once we have machine\naddresses, this might be completely unnecessary though." + }, + "PublicAddress": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" }, - "result": { - "type": "integer" + "Result": { + "$ref": "#/definitions/StringResults" } }, - "additionalProperties": false, - "required": [ - "result" - ] - } - } - } - }, - { - "Name": "ModelManager", - "Description": "ModelManagerAPI implements the model manager interface and is\nthe concrete implementation of the api end point.", - "Version": 9, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "controller-user" - ], - "Schema": { - "type": "object", - "properties": { - "ChangeModelCredential": { + "description": "PublicAddress returns the public address for each given unit, if set." + }, + "Read": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/ChangeModelCredentialsParams" + "$ref": "#/definitions/Entities" }, "Result": { - "$ref": "#/definitions/ErrorResults" + "$ref": "#/definitions/GetLeadershipSettingsBulkResults" } }, - "description": "ChangeModelCredential changes cloud credential reference for models.\nThese new cloud credentials must already exist on the controller." + "description": "Read reads leadership settings for the provided service ID. Any\nunit of the service may perform this operation." }, - "CreateModel": { + "ReadLocalApplicationSettings": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/ModelCreateArgs" + "$ref": "#/definitions/RelationUnit" }, "Result": { - "$ref": "#/definitions/ModelInfo" + "$ref": "#/definitions/SettingsResult" } }, - "description": "CreateModel creates a new model using the account and\nmodel config specified in the args." + "description": "ReadLocalApplicationSettings returns the local application settings for a\nparticular relation when invoked by the leader unit." }, - "DestroyModels": { + "ReadRemoteSettings": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/DestroyModelsParams" + "$ref": "#/definitions/RelationUnitPairs" }, "Result": { - "$ref": "#/definitions/ErrorResults" + "$ref": "#/definitions/SettingsResults" } }, - "description": "DestroyModels will try to destroy the specified models.\nIf there is a block on destruction, this method will return an error.\nFrom ModelManager v7 onwards, DestroyModels gains 'force' and 'max-wait' parameters." + "description": "ReadRemoteSettings returns the remote settings of each given set of\nrelation/local unit/remote unit." }, - "DumpModels": { + "ReadSettings": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/DumpModelRequest" + "$ref": "#/definitions/RelationUnits" }, "Result": { - "$ref": "#/definitions/StringResults" + "$ref": "#/definitions/SettingsResults" } }, - "description": "DumpModels will export the models into the database agnostic\nrepresentation. The user needs to either be a controller admin, or have\nadmin privileges on the model itself." + "description": "ReadSettings returns the local settings of each given set of\nrelation/unit.\n\nNOTE(achilleasa): Using this call to read application data is deprecated\nand will not work for k8s charms (see LP1876097). Instead, clients should\nuse ReadLocalApplicationSettings." }, - "DumpModelsDB": { + "Refresh": { "type": "object", "properties": { "Params": { "$ref": "#/definitions/Entities" }, "Result": { - "$ref": "#/definitions/MapResults" + "$ref": "#/definitions/UnitRefreshResults" } }, - "description": "DumpModelsDB will gather all documents from all model collections\nfor the specified model. The map result contains a map of collection\nnames to lists of documents represented as maps." + "description": "Refresh retrieves the latest values for attributes on this unit." }, - "ListModelSummaries": { + "Relation": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/ModelSummariesRequest" + "$ref": "#/definitions/RelationUnits" }, "Result": { - "$ref": "#/definitions/ModelSummaryResults" + "$ref": "#/definitions/RelationResults" } }, - "description": "ListModelSummaries returns models that the specified user\nhas access to in the current server. Controller admins (superuser)\ncan list models for any user. Other users\ncan only ask about their own models." + "description": "Relation returns information about all given relation/unit pairs,\nincluding their id, key and the local endpoint." }, - "ListModels": { + "RelationById": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/Entity" + "$ref": "#/definitions/RelationIds" }, "Result": { - "$ref": "#/definitions/UserModelList" + "$ref": "#/definitions/RelationResults" } }, - "description": "ListModels returns the models that the specified user\nhas access to in the current server. Controller admins (superuser)\ncan list models for any user. Other users\ncan only ask about their own models." + "description": "RelationById returns information about all given relations,\nspecified by their ids, including their key and the local\nendpoint." }, - "ModelDefaultsForClouds": { + "RelationsStatus": { "type": "object", "properties": { "Params": { "$ref": "#/definitions/Entities" }, "Result": { - "$ref": "#/definitions/ModelDefaultsResults" + "$ref": "#/definitions/RelationUnitStatusResults" } }, - "description": "ModelDefaultsForClouds returns the default config values for the specified\nclouds." + "description": "RelationsStatus returns for each unit the corresponding relation and status information." }, - "ModelInfo": { + "RemoveSecrets": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/Entities" + "$ref": "#/definitions/DeleteSecretArgs" }, "Result": { - "$ref": "#/definitions/ModelInfoResults" + "$ref": "#/definitions/ErrorResults" } }, - "description": "ModelInfo returns information about the specified models." + "description": "RemoveSecrets removes the specified secrets." }, - "ModelStatus": { + "RemoveStorageAttachments": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/Entities" + "$ref": "#/definitions/StorageAttachmentIds" }, "Result": { - "$ref": "#/definitions/ModelStatusResults" + "$ref": "#/definitions/ErrorResults" } }, - "description": "ModelStatus returns a summary of the model." + "description": "RemoveStorageAttachments removes the specified storage\nattachments from state." }, - "ModifyModelAccess": { + "RequestReboot": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/ModifyModelAccessRequest" + "$ref": "#/definitions/Entities" }, "Result": { "$ref": "#/definitions/ErrorResults" } }, - "description": "ModifyModelAccess changes the model access granted to users." + "description": "RequestReboot sets the reboot flag on the provided machines" }, - "SetModelDefaults": { + "Resolved": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/SetModelDefaults" + "$ref": "#/definitions/Entities" }, "Result": { - "$ref": "#/definitions/ErrorResults" + "$ref": "#/definitions/ResolvedModeResults" + } + }, + "description": "Resolved returns the current resolved setting for each given unit." + }, + "SLALevel": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/StringResult" } }, - "description": "SetModelDefaults writes new values for the specified default model settings." + "description": "SLALevel returns the model's SLA level." }, - "UnsetModelDefaults": { + "SecretsGrant": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/UnsetModelDefaults" + "$ref": "#/definitions/GrantRevokeSecretArgs" }, "Result": { "$ref": "#/definitions/ErrorResults" } }, - "description": "UnsetModelDefaults removes the specified default model settings." - } - }, - "definitions": { - "ChangeModelCredentialParams": { + "description": "SecretsGrant grants access to a secret for the specified subjects." + }, + "SecretsRevoke": { "type": "object", "properties": { - "credential-tag": { - "type": "string" + "Params": { + "$ref": "#/definitions/GrantRevokeSecretArgs" }, - "model-tag": { - "type": "string" + "Result": { + "$ref": "#/definitions/ErrorResults" } }, - "additionalProperties": false, - "required": [ - "model-tag", - "credential-tag" - ] + "description": "SecretsRevoke revokes access to a secret for the specified subjects." }, - "ChangeModelCredentialsParams": { + "SecretsRotated": { "type": "object", "properties": { - "model-credentials": { - "type": "array", - "items": { - "$ref": "#/definitions/ChangeModelCredentialParams" - } + "Params": { + "$ref": "#/definitions/SecretRotatedArgs" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" } }, - "additionalProperties": false, - "required": [ - "model-credentials" - ] + "description": "SecretsRotated records when secrets were last rotated." }, - "DestroyModelParams": { + "SetAgentStatus": { "type": "object", "properties": { - "destroy-storage": { - "type": "boolean" - }, - "force": { - "type": "boolean" - }, - "max-wait": { - "type": "integer" - }, - "model-tag": { - "type": "string" + "Params": { + "$ref": "#/definitions/SetStatus" }, - "timeout": { - "type": "integer" + "Result": { + "$ref": "#/definitions/ErrorResults" } }, - "additionalProperties": false, - "required": [ - "model-tag" - ] + "description": "SetAgentStatus will set status for agents of Units passed in args, if one\nof the args is not an Unit it will fail." }, - "DestroyModelsParams": { + "SetApplicationStatus": { "type": "object", "properties": { - "models": { - "type": "array", - "items": { - "$ref": "#/definitions/DestroyModelParams" - } + "Params": { + "$ref": "#/definitions/SetStatus" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" } }, - "additionalProperties": false, - "required": [ - "models" - ] + "description": "SetApplicationStatus sets the status for all the Applications in args if the given Unit is\nthe leader." }, - "DumpModelRequest": { + "SetCharmURL": { "type": "object", "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/Entity" - } + "Params": { + "$ref": "#/definitions/EntitiesCharmURL" }, - "simplified": { - "type": "boolean" + "Result": { + "$ref": "#/definitions/ErrorResults" } }, - "additionalProperties": false, - "required": [ - "entities", - "simplified" - ] + "description": "SetCharmURL sets the charm URL for each given unit. An error will\nbe returned if a unit is dead, or the charm URL is not known." }, - "Entities": { + "SetRelationStatus": { "type": "object", "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/Entity" - } + "Params": { + "$ref": "#/definitions/RelationStatusArgs" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" } }, - "additionalProperties": false, - "required": [ - "entities" - ] + "description": "SetRelationStatus updates the status of the specified relations." }, - "Entity": { + "SetState": { "type": "object", "properties": { - "tag": { - "type": "string" + "Params": { + "$ref": "#/definitions/SetUnitStateArgs" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" } }, - "additionalProperties": false, - "required": [ - "tag" - ] + "description": "SetState sets the state persisted by the charm running in this unit\nand the state internal to the uniter for this unit." }, - "EntityStatus": { + "SetStatus": { "type": "object", "properties": { - "data": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "info": { - "type": "string" - }, - "since": { - "type": "string", - "format": "date-time" + "Params": { + "$ref": "#/definitions/SetStatus" }, - "status": { - "type": "string" + "Result": { + "$ref": "#/definitions/ErrorResults" } }, - "additionalProperties": false, - "required": [ - "status", - "info", - "since" - ] + "description": "SetStatus will set status for a entities passed in args. If the entity is\na Unit it will instead set status to its agent, to emulate backwards\ncompatibility." }, - "Error": { + "SetUnitStatus": { "type": "object", "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } + "Params": { + "$ref": "#/definitions/SetStatus" }, - "message": { - "type": "string" + "Result": { + "$ref": "#/definitions/ErrorResults" } }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] + "description": "SetUnitStatus sets status for all elements passed in args, the difference\nwith SetStatus is that if an entity is a Unit it will set its status instead\nof its agent." }, - "ErrorResult": { + "SetUpgradeSeriesUnitStatus": { "type": "object", "properties": { - "error": { - "$ref": "#/definitions/Error" + "Params": { + "$ref": "#/definitions/UpgradeSeriesStatusParams" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" } }, - "additionalProperties": false + "description": "SetUpgradeSeriesUnitStatus sets the upgrade series status of the unit.\nIf no upgrade is in progress an error is returned instead." }, - "ErrorResults": { + "SetWorkloadVersion": { "type": "object", "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } + "Params": { + "$ref": "#/definitions/EntityWorkloadVersions" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" } }, - "additionalProperties": false, - "required": [ - "results" - ] + "description": "SetWorkloadVersion sets the workload version for each given unit. An error will\nbe returned if a unit is dead." }, - "MachineHardware": { + "State": { "type": "object", "properties": { - "arch": { - "type": "string" - }, - "availability-zone": { - "type": "string" - }, - "cores": { - "type": "integer" - }, - "cpu-power": { - "type": "integer" - }, - "mem": { - "type": "integer" - }, - "root-disk": { - "type": "integer" - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } + "Params": { + "$ref": "#/definitions/Entities" }, - "virt-type": { - "type": "string" + "Result": { + "$ref": "#/definitions/UnitStateResults" } }, - "additionalProperties": false + "description": "State returns the state persisted by the charm running in this unit\nand the state internal to the uniter for this unit." }, - "MapResult": { + "StorageAttachmentLife": { "type": "object", "properties": { - "error": { - "$ref": "#/definitions/Error" + "Params": { + "$ref": "#/definitions/StorageAttachmentIds" }, - "result": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } + "Result": { + "$ref": "#/definitions/LifeResults" } }, - "additionalProperties": false, - "required": [ - "result" - ] + "description": "StorageAttachmentLife returns the lifecycle state of the storage attachments\nwith the specified tags." }, - "MapResults": { + "StorageAttachments": { "type": "object", "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/MapResult" - } + "Params": { + "$ref": "#/definitions/StorageAttachmentIds" + }, + "Result": { + "$ref": "#/definitions/StorageAttachmentResults" } }, - "additionalProperties": false, - "required": [ - "results" - ] + "description": "StorageAttachments returns the storage attachments with the specified tags." }, - "Model": { + "UnitStatus": { "type": "object", "properties": { - "name": { - "type": "string" - }, - "owner-tag": { - "type": "string" - }, - "type": { - "type": "string" + "Params": { + "$ref": "#/definitions/Entities" }, - "uuid": { - "type": "string" + "Result": { + "$ref": "#/definitions/StatusResults" } }, - "additionalProperties": false, - "required": [ - "name", - "uuid", - "type", - "owner-tag" - ] + "description": "UnitStatus returns the workload status information for the unit." }, - "ModelApplicationInfo": { + "UnitStorageAttachments": { "type": "object", "properties": { - "name": { - "type": "string" + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/StorageAttachmentIdsResults" } }, - "additionalProperties": false, - "required": [ - "name" - ] + "description": "UnitStorageAttachments returns the IDs of storage attachments for a collection of units." }, - "ModelCreateArgs": { + "UpdateNetworkInfo": { "type": "object", "properties": { - "cloud-tag": { - "type": "string" - }, - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "credential": { - "type": "string" - }, - "name": { - "type": "string" - }, - "owner-tag": { - "type": "string" + "Params": { + "$ref": "#/definitions/Entities" }, - "region": { - "type": "string" + "Result": { + "$ref": "#/definitions/ErrorResults" } }, - "additionalProperties": false, - "required": [ - "name", - "owner-tag" - ] + "description": "UpdateNetworkInfo refreshes the network settings for a unit's bound\nendpoints." }, - "ModelDefaultValues": { + "UpdateSecrets": { "type": "object", "properties": { - "cloud-region": { - "type": "string" - }, - "cloud-tag": { - "type": "string" + "Params": { + "$ref": "#/definitions/UpdateSecretArgs" }, - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } + "Result": { + "$ref": "#/definitions/ErrorResults" } }, - "additionalProperties": false, - "required": [ - "config" - ] + "description": "UpdateSecrets updates the specified secrets." }, - "ModelDefaults": { + "UpgradeSeriesUnitStatus": { "type": "object", "properties": { - "controller": { - "type": "object", - "additionalProperties": true - }, - "default": { - "type": "object", - "additionalProperties": true + "Params": { + "$ref": "#/definitions/Entities" }, - "regions": { - "type": "array", - "items": { - "$ref": "#/definitions/RegionDefaults" - } + "Result": { + "$ref": "#/definitions/UpgradeSeriesStatusResults" } }, - "additionalProperties": false + "description": "UpgradeSeriesUnitStatus returns the current preparation status of an\nupgrading unit.\nIf no series upgrade is in progress an error is returned instead." }, - "ModelDefaultsResult": { + "Watch": { "type": "object", "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/ModelDefaults" - } - } + "Params": { + "$ref": "#/definitions/Entities" }, - "error": { - "$ref": "#/definitions/Error" + "Result": { + "$ref": "#/definitions/NotifyWatchResults" } }, - "additionalProperties": false, - "required": [ - "config" - ] + "description": "Watch starts an NotifyWatcher for each given entity." }, - "ModelDefaultsResults": { + "WatchAPIHostPorts": { "type": "object", "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ModelDefaultsResult" - } + "Result": { + "$ref": "#/definitions/NotifyWatchResult" } }, - "additionalProperties": false, - "required": [ - "results" - ] + "description": "WatchAPIHostPorts watches the API server addresses." }, - "ModelEntityCount": { + "WatchActionNotifications": { "type": "object", "properties": { - "count": { - "type": "integer" + "Params": { + "$ref": "#/definitions/Entities" }, - "entity": { - "type": "string" + "Result": { + "$ref": "#/definitions/StringsWatchResults" } }, - "additionalProperties": false, - "required": [ - "entity", - "count" - ] + "description": "WatchActionNotifications returns a StringsWatcher for observing\nincoming action calls to a unit. See also state/watcher.go\nUnit.WatchActionNotifications(). This method is called from\napi/uniter/uniter.go WatchActionNotifications()." }, - "ModelFilesystemInfo": { + "WatchConfigSettingsHash": { "type": "object", "properties": { - "detachable": { - "type": "boolean" - }, - "id": { - "type": "string" - }, - "message": { - "type": "string" - }, - "provider-id": { - "type": "string" + "Params": { + "$ref": "#/definitions/Entities" }, - "status": { - "type": "string" + "Result": { + "$ref": "#/definitions/StringsWatchResults" } }, - "additionalProperties": false, - "required": [ - "id" - ] + "description": "WatchConfigSettingsHash returns a StringsWatcher that yields a hash\nof the config values every time the config changes. The uniter can\nsave this hash and use it to decide whether the config-changed hook\nneeds to be run (or whether this was just an agent restart with no\nsubstantive config change)." }, - "ModelInfo": { + "WatchConsumedSecretsChanges": { "type": "object", "properties": { - "agent-version": { - "$ref": "#/definitions/Number" - }, - "cloud-credential-tag": { - "type": "string" - }, - "cloud-credential-validity": { - "type": "boolean" - }, - "cloud-region": { - "type": "string" - }, - "cloud-tag": { - "type": "string" - }, - "controller-uuid": { - "type": "string" - }, - "default-base": { - "type": "string" - }, - "default-series": { - "type": "string" - }, - "is-controller": { - "type": "boolean" - }, - "life": { - "type": "string" - }, - "machines": { - "type": "array", - "items": { - "$ref": "#/definitions/ModelMachineInfo" - } - }, - "migration": { - "$ref": "#/definitions/ModelMigrationStatus" - }, - "name": { - "type": "string" - }, - "owner-tag": { - "type": "string" - }, - "provider-type": { - "type": "string" - }, - "secret-backends": { - "type": "array", - "items": { - "$ref": "#/definitions/SecretBackendResult" - } - }, - "sla": { - "$ref": "#/definitions/ModelSLAInfo" - }, - "status": { - "$ref": "#/definitions/EntityStatus" - }, - "supported-features": { - "type": "array", - "items": { - "$ref": "#/definitions/SupportedFeature" - } - }, - "type": { - "type": "string" - }, - "users": { - "type": "array", - "items": { - "$ref": "#/definitions/ModelUserInfo" - } + "Params": { + "$ref": "#/definitions/Entities" }, - "uuid": { - "type": "string" + "Result": { + "$ref": "#/definitions/StringsWatchResults" } }, - "additionalProperties": false, - "required": [ - "name", - "type", - "uuid", - "controller-uuid", - "is-controller", - "cloud-tag", - "owner-tag", - "life", - "users", - "machines", - "secret-backends", - "sla", - "agent-version" - ] + "description": "WatchConsumedSecretsChanges sets up a watcher to notify of changes to secret revisions for the specified consumers." + }, + "WatchForModelConfigChanges": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/NotifyWatchResult" + } + }, + "description": "WatchForModelConfigChanges returns a NotifyWatcher that observes\nchanges to the model configuration.\nNote that although the NotifyWatchResult contains an Error field,\nit's not used because we are only returning a single watcher,\nso we use the regular error return." }, - "ModelInfoResult": { + "WatchInstanceData": { "type": "object", "properties": { - "error": { - "$ref": "#/definitions/Error" + "Params": { + "$ref": "#/definitions/Entities" }, - "result": { - "$ref": "#/definitions/ModelInfo" + "Result": { + "$ref": "#/definitions/NotifyWatchResults" } }, - "additionalProperties": false + "description": "WatchInstanceData is a shim to call the LXDProfileAPIv2 version of this method." }, - "ModelInfoResults": { + "WatchLeadershipSettings": { "type": "object", "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ModelInfoResult" - } + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/NotifyWatchResults" } }, - "additionalProperties": false, - "required": [ - "results" - ] + "description": "WatchLeadershipSettings will block the caller until leadership settings\nfor the given service ID change." }, - "ModelMachineInfo": { + "WatchMeterStatus": { "type": "object", "properties": { - "display-name": { - "type": "string" - }, - "ha-primary": { - "type": "boolean" - }, - "hardware": { - "$ref": "#/definitions/MachineHardware" - }, - "has-vote": { - "type": "boolean" - }, - "id": { - "type": "string" - }, - "instance-id": { - "type": "string" - }, - "message": { - "type": "string" + "Params": { + "$ref": "#/definitions/Entities" }, - "status": { - "type": "string" + "Result": { + "$ref": "#/definitions/NotifyWatchResults" + } + } + }, + "WatchObsolete": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" }, - "wants-vote": { - "type": "boolean" + "Result": { + "$ref": "#/definitions/StringsWatchResult" } }, - "additionalProperties": false, - "required": [ - "id" - ] + "description": "WatchObsolete returns a watcher for notifying when:\n - a secret owned by the entity is deleted\n - a secret revision owed by the entity no longer\n has any consumers\n\nObsolete revisions results are \"uri/revno\" and deleted\nsecret results are \"uri\"." }, - "ModelMigrationStatus": { + "WatchRelationUnits": { "type": "object", "properties": { - "end": { - "type": "string", - "format": "date-time" - }, - "start": { - "type": "string", - "format": "date-time" + "Params": { + "$ref": "#/definitions/RelationUnits" }, - "status": { - "type": "string" + "Result": { + "$ref": "#/definitions/RelationUnitsWatchResults" } }, - "additionalProperties": false, - "required": [ - "status", - "start" - ] + "description": "WatchRelationUnits returns a RelationUnitsWatcher for observing\nchanges to every unit in the supplied relation that is visible to\nthe supplied unit. See also state/watcher.go:RelationUnit.Watch()." }, - "ModelSLAInfo": { + "WatchSecretRevisionsExpiryChanges": { "type": "object", "properties": { - "level": { - "type": "string" + "Params": { + "$ref": "#/definitions/Entities" }, - "owner": { - "type": "string" + "Result": { + "$ref": "#/definitions/SecretTriggerWatchResult" } }, - "additionalProperties": false, - "required": [ - "level", - "owner" - ] + "description": "WatchSecretRevisionsExpiryChanges sets up a watcher to notify of changes to secret revision expiry config." }, - "ModelStatus": { + "WatchSecretsRotationChanges": { "type": "object", "properties": { - "application-count": { - "type": "integer" - }, - "applications": { - "type": "array", - "items": { - "$ref": "#/definitions/ModelApplicationInfo" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "filesystems": { - "type": "array", - "items": { - "$ref": "#/definitions/ModelFilesystemInfo" - } - }, - "hosted-machine-count": { - "type": "integer" - }, - "life": { - "type": "string" - }, - "machines": { - "type": "array", - "items": { - "$ref": "#/definitions/ModelMachineInfo" - } - }, - "model-tag": { - "type": "string" - }, - "owner-tag": { - "type": "string" - }, - "type": { - "type": "string" - }, - "unit-count": { - "type": "integer" + "Params": { + "$ref": "#/definitions/Entities" }, - "volumes": { - "type": "array", - "items": { - "$ref": "#/definitions/ModelVolumeInfo" - } + "Result": { + "$ref": "#/definitions/SecretTriggerWatchResult" } }, - "additionalProperties": false, - "required": [ - "model-tag", - "life", - "type", - "hosted-machine-count", - "application-count", - "unit-count", - "owner-tag" - ] + "description": "WatchSecretsRotationChanges sets up a watcher to notify of changes to secret rotation config." }, - "ModelStatusResults": { + "WatchStorageAttachments": { "type": "object", "properties": { - "models": { - "type": "array", - "items": { - "$ref": "#/definitions/ModelStatus" - } + "Params": { + "$ref": "#/definitions/StorageAttachmentIds" + }, + "Result": { + "$ref": "#/definitions/NotifyWatchResults" } }, - "additionalProperties": false, - "required": [ - "models" - ] + "description": "WatchStorageAttachments creates watchers for a collection of storage\nattachments, each of which can be used to watch changes to storage\nattachment info." }, - "ModelSummariesRequest": { + "WatchTrustConfigSettingsHash": { "type": "object", "properties": { - "all": { - "type": "boolean" + "Params": { + "$ref": "#/definitions/Entities" }, - "user-tag": { - "type": "string" + "Result": { + "$ref": "#/definitions/StringsWatchResults" } }, - "additionalProperties": false, - "required": [ - "user-tag" - ] + "description": "WatchTrustConfigSettingsHash returns a StringsWatcher that yields a\nhash of the application config values whenever they change. The\nuniter can use the hash to determine whether the actual values have\nchanged since it last saw the config." }, - "ModelSummary": { + "WatchUnitAddressesHash": { "type": "object", "properties": { - "agent-version": { - "$ref": "#/definitions/Number" - }, - "cloud-credential-tag": { - "type": "string" - }, - "cloud-region": { - "type": "string" - }, - "cloud-tag": { - "type": "string" - }, - "controller-uuid": { - "type": "string" - }, - "counts": { - "type": "array", - "items": { - "$ref": "#/definitions/ModelEntityCount" - } - }, - "default-series": { - "type": "string" - }, - "is-controller": { - "type": "boolean" - }, - "last-connection": { - "type": "string", - "format": "date-time" - }, - "life": { - "type": "string" - }, - "migration": { - "$ref": "#/definitions/ModelMigrationStatus" - }, - "name": { - "type": "string" - }, - "owner-tag": { - "type": "string" - }, - "provider-type": { - "type": "string" - }, - "sla": { - "$ref": "#/definitions/ModelSLAInfo" - }, - "status": { - "$ref": "#/definitions/EntityStatus" - }, - "type": { - "type": "string" + "Params": { + "$ref": "#/definitions/Entities" }, - "user-access": { - "type": "string" + "Result": { + "$ref": "#/definitions/StringsWatchResults" + } + }, + "description": "WatchUnitAddressesHash returns a StringsWatcher that yields the\nhashes of the addresses for the unit whenever the addresses\nchange. The uniter can use the hash to determine whether the actual\naddress values have changed since it last saw the config." + }, + "WatchUnitRelations": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" }, - "uuid": { - "type": "string" + "Result": { + "$ref": "#/definitions/StringsWatchResults" } }, - "additionalProperties": false, - "required": [ - "name", - "uuid", - "type", - "controller-uuid", - "is-controller", - "cloud-tag", - "owner-tag", - "life", - "user-access", - "last-connection", - "counts", - "sla", - "agent-version" - ] + "description": "WatchUnitRelations returns a StringsWatcher, for each given\nunit, that notifies of changes to the lifecycles of relations\nrelevant to that unit. For principal units, this will be all of the\nrelations for the application. For subordinate units, only\nrelations with the principal unit's application will be monitored." }, - "ModelSummaryResult": { + "WatchUnitStorageAttachments": { "type": "object", "properties": { - "error": { - "$ref": "#/definitions/Error" + "Params": { + "$ref": "#/definitions/Entities" }, - "result": { - "$ref": "#/definitions/ModelSummary" + "Result": { + "$ref": "#/definitions/StringsWatchResults" } }, - "additionalProperties": false + "description": "WatchUnitStorageAttachments creates watchers for a collection of units,\neach of which can be used to watch for lifecycle changes to the corresponding\nunit's storage attachments." }, - "ModelSummaryResults": { + "WatchUpgradeSeriesNotifications": { "type": "object", "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ModelSummaryResult" - } + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/NotifyWatchResults" } }, - "additionalProperties": false, - "required": [ - "results" - ] + "description": "WatchUpgradeSeriesNotifications returns a NotifyWatcher for observing changes to upgrade series locks." }, - "ModelUnsetKeys": { + "WorkloadVersion": { "type": "object", "properties": { - "cloud-region": { - "type": "string" - }, - "cloud-tag": { - "type": "string" + "Params": { + "$ref": "#/definitions/Entities" }, - "keys": { + "Result": { + "$ref": "#/definitions/StringResults" + } + }, + "description": "WorkloadVersion returns the workload version for all given units or applications." + } + }, + "definitions": { + "APIHostPortsResult": { + "type": "object", + "properties": { + "servers": { "type": "array", "items": { - "type": "string" + "type": "array", + "items": { + "$ref": "#/definitions/HostPort" + } } } }, "additionalProperties": false, "required": [ - "keys" + "servers" ] }, - "ModelUserInfo": { + "Action": { "type": "object", "properties": { - "access": { + "execution-group": { "type": "string" }, - "display-name": { + "name": { "type": "string" }, - "last-connection": { - "type": "string", - "format": "date-time" + "parallel": { + "type": "boolean" }, - "model-tag": { + "parameters": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "receiver": { "type": "string" }, - "user": { + "tag": { "type": "string" } }, "additionalProperties": false, "required": [ - "model-tag", - "user", - "display-name", - "last-connection", - "access" + "tag", + "receiver", + "name" ] }, - "ModelVolumeInfo": { + "ActionExecutionResult": { "type": "object", "properties": { - "detachable": { - "type": "boolean" - }, - "id": { + "action-tag": { "type": "string" }, "message": { "type": "string" }, - "provider-id": { - "type": "string" + "results": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } }, "status": { "type": "string" @@ -13220,175 +47554,193 @@ }, "additionalProperties": false, "required": [ - "id" + "action-tag", + "status" ] }, - "ModifyModelAccess": { + "ActionExecutionResults": { "type": "object", "properties": { - "access": { - "type": "string" - }, - "action": { - "type": "string" - }, - "model-tag": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ActionExecutionResult" + } + } + }, + "additionalProperties": false + }, + "ActionMessage": { + "type": "object", + "properties": { + "message": { "type": "string" }, - "user-tag": { - "type": "string" + "timestamp": { + "type": "string", + "format": "date-time" } }, "additionalProperties": false, "required": [ - "user-tag", - "action", - "access", - "model-tag" + "timestamp", + "message" ] }, - "ModifyModelAccessRequest": { + "ActionMessageParams": { "type": "object", "properties": { - "changes": { + "messages": { "type": "array", "items": { - "$ref": "#/definitions/ModifyModelAccess" + "$ref": "#/definitions/EntityString" } } }, "additionalProperties": false, "required": [ - "changes" + "messages" ] }, - "Number": { + "ActionResult": { "type": "object", "properties": { - "Build": { - "type": "integer" + "action": { + "$ref": "#/definitions/Action" }, - "Major": { - "type": "integer" + "completed": { + "type": "string", + "format": "date-time" }, - "Minor": { - "type": "integer" + "enqueued": { + "type": "string", + "format": "date-time" }, - "Patch": { - "type": "integer" + "error": { + "$ref": "#/definitions/Error" }, - "Tag": { + "log": { + "type": "array", + "items": { + "$ref": "#/definitions/ActionMessage" + } + }, + "message": { + "type": "string" + }, + "output": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "started": { + "type": "string", + "format": "date-time" + }, + "status": { "type": "string" } }, - "additionalProperties": false, - "required": [ - "Major", - "Minor", - "Tag", - "Patch", - "Build" - ] + "additionalProperties": false }, - "RegionDefaults": { + "ActionResults": { "type": "object", "properties": { - "region-name": { - "type": "string" - }, - "value": { - "type": "object", - "additionalProperties": true + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ActionResult" + } } }, - "additionalProperties": false, - "required": [ - "region-name", - "value" - ] + "additionalProperties": false }, - "SecretBackend": { + "Address": { "type": "object", "properties": { - "backend-type": { + "cidr": { "type": "string" }, - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } + "config-type": { + "type": "string" }, - "name": { + "is-secondary": { + "type": "boolean" + }, + "scope": { + "type": "string" + }, + "space-id": { + "type": "string" + }, + "space-name": { + "type": "string" + }, + "type": { + "type": "string" + }, + "value": { "type": "string" - }, - "token-rotate-interval": { - "type": "integer" } }, "additionalProperties": false, "required": [ - "name", - "backend-type", - "config" + "value", + "type", + "scope" ] }, - "SecretBackendResult": { + "ApplicationStatusResult": { "type": "object", "properties": { + "application": { + "$ref": "#/definitions/StatusResult" + }, "error": { "$ref": "#/definitions/Error" }, - "id": { - "type": "string" - }, - "message": { - "type": "string" - }, - "num-secrets": { - "type": "integer" - }, - "result": { - "$ref": "#/definitions/SecretBackend" - }, - "status": { - "type": "string" + "units": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/StatusResult" + } + } } }, "additionalProperties": false, "required": [ - "result", - "id", - "num-secrets", - "status" + "application", + "units" ] }, - "SetModelDefaults": { + "ApplicationStatusResults": { "type": "object", "properties": { - "config": { + "results": { "type": "array", "items": { - "$ref": "#/definitions/ModelDefaultValues" + "$ref": "#/definitions/ApplicationStatusResult" } } }, "additionalProperties": false, "required": [ - "config" + "results" ] }, - "StringResult": { + "BoolResult": { "type": "object", "properties": { "error": { "$ref": "#/definitions/Error" }, "result": { - "type": "string" + "type": "boolean" } }, "additionalProperties": false, @@ -13396,13 +47748,13 @@ "result" ] }, - "StringResults": { + "BoolResults": { "type": "object", "properties": { "results": { "type": "array", "items": { - "$ref": "#/definitions/StringResult" + "$ref": "#/definitions/BoolResult" } } }, @@ -13411,543 +47763,563 @@ "results" ] }, - "SupportedFeature": { + "CharmRelation": { "type": "object", "properties": { - "description": { + "interface": { "type": "string" }, + "limit": { + "type": "integer" + }, "name": { "type": "string" }, - "version": { + "optional": { + "type": "boolean" + }, + "role": { + "type": "string" + }, + "scope": { "type": "string" } }, "additionalProperties": false, "required": [ "name", - "description" + "role", + "interface", + "optional", + "limit", + "scope" ] }, - "UnsetModelDefaults": { + "CharmURL": { "type": "object", "properties": { - "keys": { - "type": "array", - "items": { - "$ref": "#/definitions/ModelUnsetKeys" - } + "url": { + "type": "string" } }, "additionalProperties": false, "required": [ - "keys" + "url" ] }, - "UserModel": { + "CharmURLs": { "type": "object", "properties": { - "last-connection": { - "type": "string", - "format": "date-time" - }, - "model": { - "$ref": "#/definitions/Model" + "urls": { + "type": "array", + "items": { + "$ref": "#/definitions/CharmURL" + } } }, "additionalProperties": false, "required": [ - "model", - "last-connection" + "urls" ] }, - "UserModelList": { + "CloudCredential": { "type": "object", "properties": { - "user-models": { + "attrs": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "auth-type": { + "type": "string" + }, + "redacted": { "type": "array", "items": { - "$ref": "#/definitions/UserModel" + "type": "string" } } }, "additionalProperties": false, "required": [ - "user-models" + "auth-type" ] - } - } - } - }, - { - "Name": "ModelUpgrader", - "Description": "ModelUpgraderAPI implements the model upgrader interface and is\nthe concrete implementation of the api end point.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "controller-user" - ], - "Schema": { - "type": "object", - "properties": { - "AbortModelUpgrade": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ModelParam" - } - }, - "description": "AbortModelUpgrade aborts and archives the model upgrade\nsynchronisation record, if any." }, - "UpgradeModel": { + "CloudSpec": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/UpgradeModelParams" + "cacertificates": { + "type": "array", + "items": { + "type": "string" + } }, - "Result": { - "$ref": "#/definitions/UpgradeModelResult" - } - }, - "description": "UpgradeModel upgrades a model." - } - }, - "definitions": { - "Error": { - "type": "object", - "properties": { - "code": { + "credential": { + "$ref": "#/definitions/CloudCredential" + }, + "endpoint": { "type": "string" }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } + "identity-endpoint": { + "type": "string" }, - "message": { + "is-controller-cloud": { + "type": "boolean" + }, + "name": { + "type": "string" + }, + "region": { + "type": "string" + }, + "skip-tls-verify": { + "type": "boolean" + }, + "storage-endpoint": { + "type": "string" + }, + "type": { "type": "string" } }, "additionalProperties": false, "required": [ - "message", - "code" + "type", + "name" ] }, - "ModelParam": { + "CloudSpecResult": { "type": "object", "properties": { - "model-tag": { - "type": "string" + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "$ref": "#/definitions/CloudSpec" } }, - "additionalProperties": false, - "required": [ - "model-tag" - ] + "additionalProperties": false }, - "Number": { + "CommitHookChangesArg": { "type": "object", "properties": { - "Build": { - "type": "integer" + "add-storage": { + "type": "array", + "items": { + "$ref": "#/definitions/StorageAddParams" + } }, - "Major": { - "type": "integer" + "close-ports": { + "type": "array", + "items": { + "$ref": "#/definitions/EntityPortRange" + } }, - "Minor": { - "type": "integer" + "open-ports": { + "type": "array", + "items": { + "$ref": "#/definitions/EntityPortRange" + } }, - "Patch": { - "type": "integer" + "pod-spec": { + "$ref": "#/definitions/PodSpec" + }, + "relation-unit-settings": { + "type": "array", + "items": { + "$ref": "#/definitions/RelationUnitSettings" + } + }, + "secret-creates": { + "type": "array", + "items": { + "$ref": "#/definitions/CreateSecretArg" + } + }, + "secret-deletes": { + "type": "array", + "items": { + "$ref": "#/definitions/DeleteSecretArg" + } + }, + "secret-grants": { + "type": "array", + "items": { + "$ref": "#/definitions/GrantRevokeSecretArg" + } + }, + "secret-revokes": { + "type": "array", + "items": { + "$ref": "#/definitions/GrantRevokeSecretArg" + } + }, + "secret-track-latest": { + "type": "array", + "items": { + "type": "string" + } + }, + "secret-updates": { + "type": "array", + "items": { + "$ref": "#/definitions/UpdateSecretArg" + } }, - "Tag": { + "set-raw-k8s-spec": { + "$ref": "#/definitions/PodSpec" + }, + "tag": { "type": "string" + }, + "unit-state": { + "$ref": "#/definitions/SetUnitStateArg" + }, + "update-network-info": { + "type": "boolean" } }, "additionalProperties": false, "required": [ - "Major", - "Minor", - "Tag", - "Patch", - "Build" + "tag", + "update-network-info" ] }, - "UpgradeModelParams": { + "CommitHookChangesArgs": { "type": "object", "properties": { - "agent-stream": { - "type": "string" - }, - "dry-run": { - "type": "boolean" - }, - "ignore-agent-versions": { - "type": "boolean" - }, - "model-tag": { - "type": "string" - }, - "target-version": { - "$ref": "#/definitions/Number" + "args": { + "type": "array", + "items": { + "$ref": "#/definitions/CommitHookChangesArg" + } } }, "additionalProperties": false, "required": [ - "model-tag", - "target-version" + "args" ] }, - "UpgradeModelResult": { + "ConfigSettingsResult": { "type": "object", "properties": { - "chosen-version": { - "$ref": "#/definitions/Number" - }, "error": { "$ref": "#/definitions/Error" + }, + "settings": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } } }, "additionalProperties": false, "required": [ - "chosen-version" + "settings" ] - } - } - } - }, - { - "Name": "Payloads", - "Description": "API serves payload-specific API methods.", - "Version": 1, - "AvailableTo": [ - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "List": { + }, + "ConfigSettingsResults": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/PayloadListArgs" - }, - "Result": { - "$ref": "#/definitions/PayloadListResults" + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ConfigSettingsResult" + } } }, - "description": "List builds the list of payloads being tracked for\nthe given unit and IDs. If no IDs are provided then all tracked\npayloads for the unit are returned." - } - }, - "definitions": { - "Payload": { + "additionalProperties": false, + "required": [ + "results" + ] + }, + "CreateSecretArg": { "type": "object", "properties": { - "class": { - "type": "string" + "UpsertSecretArg": { + "$ref": "#/definitions/UpsertSecretArg" }, - "id": { + "content": { + "$ref": "#/definitions/SecretContentParams" + }, + "description": { "type": "string" }, - "labels": { - "type": "array", - "items": { - "type": "string" - } + "expire-time": { + "type": "string", + "format": "date-time" }, - "machine": { + "label": { "type": "string" }, - "status": { + "owner-tag": { "type": "string" }, - "type": { + "params": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "rotate-policy": { "type": "string" }, - "unit": { + "uri": { "type": "string" } }, "additionalProperties": false, "required": [ - "class", - "type", - "id", - "status", - "labels", - "unit", - "machine" + "UpsertSecretArg", + "owner-tag" ] }, - "PayloadListArgs": { + "CreateSecretArgs": { "type": "object", "properties": { - "patterns": { + "args": { "type": "array", "items": { - "type": "string" + "$ref": "#/definitions/CreateSecretArg" } } }, "additionalProperties": false, "required": [ - "patterns" + "args" ] }, - "PayloadListResults": { + "CreateSecretURIsArg": { "type": "object", "properties": { - "results": { + "count": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "count" + ] + }, + "DeleteSecretArg": { + "type": "object", + "properties": { + "revisions": { "type": "array", "items": { - "$ref": "#/definitions/Payload" + "type": "integer" } + }, + "uri": { + "type": "string" } }, "additionalProperties": false, "required": [ - "results" + "uri" ] - } - } - } - }, - { - "Name": "Pinger", - "Description": "pinger describes a resource that can be pinged and stopped.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "controller-user", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "Ping": { - "type": "object" }, - "Stop": { - "type": "object" - } - } - } - }, - { - "Name": "Resources", - "Description": "API is the public API facade for resources.", - "Version": 3, - "AvailableTo": [ - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "AddPendingResources": { + "DeleteSecretArgs": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/AddPendingResourcesArgsV2" - }, - "Result": { - "$ref": "#/definitions/AddPendingResourcesResult" + "args": { + "type": "array", + "items": { + "$ref": "#/definitions/DeleteSecretArg" + } } }, - "description": "AddPendingResources adds the provided resources (info) to the Juju\nmodel in a pending state, meaning they are not available until\nresolved. Handles CharmHub and Local charms." + "additionalProperties": false, + "required": [ + "args" + ] }, - "ListResources": { + "Endpoint": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/ListResourcesArgs" + "application-name": { + "type": "string" }, - "Result": { - "$ref": "#/definitions/ResourcesResults" + "relation": { + "$ref": "#/definitions/CharmRelation" } }, - "description": "ListResources returns the list of resources for the given application." - } - }, - "definitions": { - "AddPendingResourcesArgsV2": { + "additionalProperties": false, + "required": [ + "application-name", + "relation" + ] + }, + "Entities": { "type": "object", "properties": { - "Entity": { - "$ref": "#/definitions/Entity" - }, - "charm-origin": { - "$ref": "#/definitions/CharmOrigin" - }, - "macaroon": { - "$ref": "#/definitions/Macaroon" - }, - "resources": { + "entities": { "type": "array", "items": { - "$ref": "#/definitions/CharmResource" + "$ref": "#/definitions/Entity" } - }, - "tag": { - "type": "string" - }, - "url": { - "type": "string" } }, "additionalProperties": false, "required": [ - "tag", - "Entity", - "url", - "charm-origin", - "macaroon", - "resources" + "entities" ] }, - "AddPendingResourcesResult": { + "EntitiesCharmURL": { "type": "object", "properties": { - "ErrorResult": { - "$ref": "#/definitions/ErrorResult" - }, - "error": { - "$ref": "#/definitions/Error" - }, - "pending-ids": { + "entities": { "type": "array", "items": { - "type": "string" + "$ref": "#/definitions/EntityCharmURL" } } }, "additionalProperties": false, "required": [ - "ErrorResult", - "pending-ids" + "entities" + ] + }, + "Entity": { + "type": "object", + "properties": { + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag" ] }, - "Base": { + "EntityCharmURL": { "type": "object", "properties": { - "channel": { + "charm-url": { "type": "string" }, - "name": { + "tag": { "type": "string" } }, "additionalProperties": false, "required": [ - "name", - "channel" + "tag", + "charm-url" ] }, - "CharmOrigin": { + "EntityPortRange": { "type": "object", "properties": { - "architecture": { - "type": "string" - }, - "base": { - "$ref": "#/definitions/Base" - }, - "branch": { + "endpoint": { "type": "string" }, - "hash": { - "type": "string" + "from-port": { + "type": "integer" }, - "id": { + "protocol": { "type": "string" }, - "instance-key": { + "tag": { "type": "string" }, - "revision": { + "to-port": { "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "tag", + "protocol", + "from-port", + "to-port", + "endpoint" + ] + }, + "EntityStatusArgs": { + "type": "object", + "properties": { + "data": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } }, - "risk": { - "type": "string" - }, - "source": { + "info": { "type": "string" }, - "track": { + "status": { "type": "string" }, - "type": { + "tag": { "type": "string" } }, "additionalProperties": false, "required": [ - "source", - "type", - "id" + "tag", + "status", + "info", + "data" ] }, - "CharmResource": { + "EntityString": { "type": "object", "properties": { - "description": { - "type": "string" - }, - "fingerprint": { - "type": "array", - "items": { - "type": "integer" - } - }, - "name": { + "tag": { "type": "string" }, - "origin": { + "value": { "type": "string" - }, - "path": { + } + }, + "additionalProperties": false, + "required": [ + "tag", + "value" + ] + }, + "EntityWorkloadVersion": { + "type": "object", + "properties": { + "tag": { "type": "string" }, - "revision": { - "type": "integer" - }, - "size": { - "type": "integer" - }, - "type": { + "workload-version": { "type": "string" } }, "additionalProperties": false, "required": [ - "name", - "type", - "path", - "origin", - "revision", - "fingerprint", - "size" + "tag", + "workload-version" ] }, - "Entity": { + "EntityWorkloadVersions": { "type": "object", "properties": { - "tag": { - "type": "string" + "entities": { + "type": "array", + "items": { + "$ref": "#/definitions/EntityWorkloadVersion" + } } }, "additionalProperties": false, "required": [ - "tag" + "entities" ] }, "Error": { @@ -13984,135 +48356,165 @@ }, "additionalProperties": false }, - "ListResourcesArgs": { + "ErrorResults": { "type": "object", "properties": { - "entities": { + "results": { "type": "array", "items": { - "$ref": "#/definitions/Entity" + "$ref": "#/definitions/ErrorResult" } } }, "additionalProperties": false, "required": [ - "entities" + "results" ] }, - "Macaroon": { + "GetLeadershipSettingsBulkResults": { "type": "object", - "additionalProperties": false + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/GetLeadershipSettingsResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] }, - "Resource": { + "GetLeadershipSettingsResult": { "type": "object", "properties": { - "CharmResource": { - "$ref": "#/definitions/CharmResource" - }, - "application": { - "type": "string" + "error": { + "$ref": "#/definitions/Error" }, - "description": { + "settings": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + } + }, + "additionalProperties": false, + "required": [ + "settings" + ] + }, + "GetSecretConsumerInfoArgs": { + "type": "object", + "properties": { + "consumer-tag": { "type": "string" }, - "fingerprint": { + "uris": { "type": "array", "items": { - "type": "integer" + "type": "string" } - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "origin": { - "type": "string" - }, - "path": { - "type": "string" - }, - "pending-id": { + } + }, + "additionalProperties": false, + "required": [ + "consumer-tag", + "uris" + ] + }, + "GetSecretContentArg": { + "type": "object", + "properties": { + "label": { "type": "string" }, - "revision": { - "type": "integer" - }, - "size": { - "type": "integer" + "peek": { + "type": "boolean" }, - "timestamp": { - "type": "string", - "format": "date-time" + "refresh": { + "type": "boolean" }, - "type": { + "uri": { "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + }, + "GetSecretContentArgs": { + "type": "object", + "properties": { + "args": { + "type": "array", + "items": { + "$ref": "#/definitions/GetSecretContentArg" + } + } + }, + "additionalProperties": false, + "required": [ + "args" + ] + }, + "GoalState": { + "type": "object", + "properties": { + "relations": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/GoalStateStatus" + } + } + } + } }, - "username": { - "type": "string" + "units": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/GoalStateStatus" + } + } } }, "additionalProperties": false, "required": [ - "name", - "type", - "path", - "origin", - "revision", - "fingerprint", - "size", - "CharmResource", - "id", - "pending-id", - "application", - "username", - "timestamp" + "units", + "relations" ] }, - "ResourcesResult": { + "GoalStateResult": { "type": "object", "properties": { - "ErrorResult": { - "$ref": "#/definitions/ErrorResult" - }, - "charm-store-resources": { - "type": "array", - "items": { - "$ref": "#/definitions/CharmResource" - } - }, "error": { "$ref": "#/definitions/Error" }, - "resources": { - "type": "array", - "items": { - "$ref": "#/definitions/Resource" - } - }, - "unit-resources": { - "type": "array", - "items": { - "$ref": "#/definitions/UnitResources" - } + "result": { + "$ref": "#/definitions/GoalState" } }, "additionalProperties": false, "required": [ - "ErrorResult", - "resources", - "charm-store-resources", - "unit-resources" + "result", + "error" ] }, - "ResourcesResults": { + "GoalStateResults": { "type": "object", "properties": { "results": { "type": "array", "items": { - "$ref": "#/definitions/ResourcesResult" + "$ref": "#/definitions/GoalStateResult" } } }, @@ -14121,274 +48523,328 @@ "results" ] }, - "UnitResources": { + "GoalStateStatus": { "type": "object", "properties": { - "Entity": { - "$ref": "#/definitions/Entity" + "since": { + "type": "string", + "format": "date-time" }, - "download-progress": { - "type": "object", - "patternProperties": { - ".*": { - "type": "integer" - } - } + "status": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "status", + "since" + ] + }, + "GrantRevokeSecretArg": { + "type": "object", + "properties": { + "role": { + "type": "string" }, - "resources": { + "scope-tag": { + "type": "string" + }, + "subject-tags": { "type": "array", "items": { - "$ref": "#/definitions/Resource" + "type": "string" } }, - "tag": { + "uri": { "type": "string" } }, "additionalProperties": false, "required": [ - "tag", - "Entity", - "resources", - "download-progress" + "uri", + "scope-tag", + "subject-tags", + "role" ] - } - } - } - }, - { - "Name": "SSHClient", - "Description": "Facade implements the API required by the sshclient worker.", - "Version": 4, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "AllAddresses": { + }, + "GrantRevokeSecretArgs": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/SSHAddressesResults" + "args": { + "type": "array", + "items": { + "$ref": "#/definitions/GrantRevokeSecretArg" + } } }, - "description": "AllAddresses reports all addresses that might have SSH listening for each\nentity in args. The result is sorted with public addresses first.\nMachines and units are supported as entity types." + "additionalProperties": false, + "required": [ + "args" + ] }, - "ModelCredentialForSSH": { + "HostPort": { "type": "object", "properties": { - "Result": { - "$ref": "#/definitions/CloudSpecResult" + "Address": { + "$ref": "#/definitions/Address" + }, + "cidr": { + "type": "string" + }, + "config-type": { + "type": "string" + }, + "is-secondary": { + "type": "boolean" + }, + "port": { + "type": "integer" + }, + "scope": { + "type": "string" + }, + "space-id": { + "type": "string" + }, + "space-name": { + "type": "string" + }, + "type": { + "type": "string" + }, + "value": { + "type": "string" } }, - "description": "ModelCredentialForSSH returns a cloud spec for ssh purpose.\nThis facade call is only used for k8s model." + "additionalProperties": false, + "required": [ + "value", + "type", + "scope", + "Address", + "port" + ] }, - "PrivateAddress": { + "IntResult": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/Entities" + "error": { + "$ref": "#/definitions/Error" }, - "Result": { - "$ref": "#/definitions/SSHAddressResults" + "result": { + "type": "integer" } }, - "description": "PrivateAddress reports the preferred private network address for one or\nmore entities. Machines and units are supported." + "additionalProperties": false, + "required": [ + "result" + ] }, - "Proxy": { + "IntResults": { "type": "object", "properties": { - "Result": { - "$ref": "#/definitions/SSHProxyResult" + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/IntResult" + } } }, - "description": "Proxy returns whether SSH connections should be proxied through the\ncontroller hosts for the model associated with the API connection." + "additionalProperties": false, + "required": [ + "results" + ] }, - "PublicAddress": { + "InterfaceAddress": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/Entities" + "cidr": { + "type": "string" }, - "Result": { - "$ref": "#/definitions/SSHAddressResults" + "hostname": { + "type": "string" + }, + "value": { + "type": "string" } }, - "description": "PublicAddress reports the preferred public network address for one\nor more entities. Machines and units are supported." + "additionalProperties": false, + "required": [ + "hostname", + "value", + "cidr" + ] }, - "PublicKeys": { + "LifeResult": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/Entities" + "error": { + "$ref": "#/definitions/Error" }, - "Result": { - "$ref": "#/definitions/SSHPublicKeysResults" + "life": { + "type": "string" } }, - "description": "PublicKeys returns the public SSH hosts for one or more\nentities. Machines and units are supported." - } - }, - "definitions": { - "CloudCredential": { + "additionalProperties": false, + "required": [ + "life" + ] + }, + "LifeResults": { "type": "object", "properties": { - "attrs": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "auth-type": { - "type": "string" - }, - "redacted": { + "results": { "type": "array", "items": { - "type": "string" + "$ref": "#/definitions/LifeResult" } } }, "additionalProperties": false, "required": [ - "auth-type" + "results" ] }, - "CloudSpec": { + "ListSecretResult": { "type": "object", "properties": { - "cacertificates": { - "type": "array", - "items": { - "type": "string" - } - }, - "credential": { - "$ref": "#/definitions/CloudCredential" + "create-time": { + "type": "string", + "format": "date-time" }, - "endpoint": { + "description": { "type": "string" }, - "identity-endpoint": { + "label": { "type": "string" }, - "is-controller-cloud": { - "type": "boolean" + "latest-expire-time": { + "type": "string", + "format": "date-time" }, - "name": { - "type": "string" + "latest-revision": { + "type": "integer" }, - "region": { + "next-rotate-time": { + "type": "string", + "format": "date-time" + }, + "owner-tag": { "type": "string" }, - "skip-tls-verify": { - "type": "boolean" + "revisions": { + "type": "array", + "items": { + "$ref": "#/definitions/SecretRevision" + } }, - "storage-endpoint": { + "rotate-policy": { "type": "string" }, - "type": { + "update-time": { + "type": "string", + "format": "date-time" + }, + "uri": { "type": "string" + }, + "value": { + "$ref": "#/definitions/SecretValueResult" + }, + "version": { + "type": "integer" } }, "additionalProperties": false, "required": [ - "type", - "name" + "uri", + "version", + "owner-tag", + "latest-revision", + "create-time", + "update-time", + "revisions" ] }, - "CloudSpecResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/CloudSpec" - } - }, - "additionalProperties": false - }, - "Entities": { + "ListSecretResults": { "type": "object", "properties": { - "entities": { + "results": { "type": "array", "items": { - "$ref": "#/definitions/Entity" + "$ref": "#/definitions/ListSecretResult" } } }, "additionalProperties": false, "required": [ - "entities" + "results" ] }, - "Entity": { + "MergeLeadershipSettingsBulkParams": { "type": "object", "properties": { - "tag": { - "type": "string" + "params": { + "type": "array", + "items": { + "$ref": "#/definitions/MergeLeadershipSettingsParam" + } } }, "additionalProperties": false, "required": [ - "tag" + "params" ] }, - "Error": { + "MergeLeadershipSettingsParam": { "type": "object", "properties": { - "code": { + "application-tag": { "type": "string" }, - "info": { + "settings": { "type": "object", "patternProperties": { ".*": { - "type": "object", - "additionalProperties": true + "type": "string" } } }, - "message": { + "unit-tag": { "type": "string" } }, "additionalProperties": false, "required": [ - "message", - "code" + "settings" ] }, - "SSHAddressResult": { + "MeterStatusResult": { "type": "object", "properties": { - "address": { + "code": { "type": "string" }, "error": { "$ref": "#/definitions/Error" + }, + "info": { + "type": "string" } }, - "additionalProperties": false + "additionalProperties": false, + "required": [ + "code", + "info" + ] }, - "SSHAddressResults": { + "MeterStatusResults": { "type": "object", "properties": { "results": { "type": "array", "items": { - "$ref": "#/definitions/SSHAddressResult" + "$ref": "#/definitions/MeterStatusResult" } } }, @@ -14397,153 +48853,97 @@ "results" ] }, - "SSHAddressesResult": { + "Metric": { "type": "object", "properties": { - "addresses": { - "type": "array", - "items": { - "type": "string" + "key": { + "type": "string" + }, + "labels": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } } }, - "error": { - "$ref": "#/definitions/Error" + "time": { + "type": "string", + "format": "date-time" + }, + "value": { + "type": "string" } }, "additionalProperties": false, "required": [ - "addresses" + "key", + "value", + "time" ] }, - "SSHAddressesResults": { + "MetricBatch": { "type": "object", "properties": { - "results": { + "charm-url": { + "type": "string" + }, + "created": { + "type": "string", + "format": "date-time" + }, + "metrics": { "type": "array", "items": { - "$ref": "#/definitions/SSHAddressesResult" + "$ref": "#/definitions/Metric" } + }, + "uuid": { + "type": "string" } }, "additionalProperties": false, "required": [ - "results" + "uuid", + "charm-url", + "created", + "metrics" ] }, - "SSHProxyResult": { + "MetricBatchParam": { "type": "object", "properties": { - "use-proxy": { - "type": "boolean" + "batch": { + "$ref": "#/definitions/MetricBatch" + }, + "tag": { + "type": "string" } }, "additionalProperties": false, "required": [ - "use-proxy" + "tag", + "batch" ] }, - "SSHPublicKeysResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "public-keys": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "SSHPublicKeysResults": { + "MetricBatchParams": { "type": "object", "properties": { - "results": { + "batches": { "type": "array", "items": { - "$ref": "#/definitions/SSHPublicKeysResult" + "$ref": "#/definitions/MetricBatchParam" } } }, "additionalProperties": false, "required": [ - "results" + "batches" ] - } - } - } - }, - { - "Name": "SecretBackends", - "Description": "SecretBackendsAPI is the server implementation for the SecretBackends facade.", - "Version": 1, - "AvailableTo": [ - "controller-user" - ], - "Schema": { - "type": "object", - "properties": { - "AddSecretBackends": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/AddSecretBackendArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "AddSecretBackends adds new secret backends." - }, - "ListSecretBackends": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ListSecretBackendsArgs" - }, - "Result": { - "$ref": "#/definitions/ListSecretBackendsResults" - } - }, - "description": "ListSecretBackends lists available secret backends." - }, - "RemoveSecretBackends": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/RemoveSecretBackendArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "RemoveSecretBackends removes secret backends." }, - "UpdateSecretBackends": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/UpdateSecretBackendArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "UpdateSecretBackends updates secret backends." - } - }, - "definitions": { - "AddSecretBackendArg": { + "ModelConfigResult": { "type": "object", "properties": { - "SecretBackend": { - "$ref": "#/definitions/SecretBackend" - }, - "backend-type": { - "type": "string" - }, "config": { "type": "object", "patternProperties": { @@ -14552,81 +48952,117 @@ "additionalProperties": true } } + } + }, + "additionalProperties": false, + "required": [ + "config" + ] + }, + "ModelResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" }, - "id": { + "name": { "type": "string" }, - "name": { + "type": { "type": "string" }, - "token-rotate-interval": { - "type": "integer" + "uuid": { + "type": "string" } }, "additionalProperties": false, "required": [ "name", - "backend-type", - "config", - "SecretBackend" + "uuid", + "type" ] }, - "AddSecretBackendArgs": { + "NetworkInfo": { "type": "object", "properties": { - "args": { + "addresses": { "type": "array", "items": { - "$ref": "#/definitions/AddSecretBackendArg" + "$ref": "#/definitions/InterfaceAddress" } + }, + "interface-name": { + "type": "string" + }, + "mac-address": { + "type": "string" } }, "additionalProperties": false, "required": [ - "args" + "mac-address", + "interface-name", + "addresses" ] }, - "Error": { + "NetworkInfoParams": { "type": "object", "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } + "bindings": { + "type": "array", + "items": { + "type": "string" } }, - "message": { + "relation-id": { + "type": "integer" + }, + "unit": { "type": "string" } }, "additionalProperties": false, "required": [ - "message", - "code" + "unit", + "bindings" ] }, - "ErrorResult": { + "NetworkInfoResult": { "type": "object", "properties": { + "bind-addresses": { + "type": "array", + "items": { + "$ref": "#/definitions/NetworkInfo" + } + }, + "egress-subnets": { + "type": "array", + "items": { + "type": "string" + } + }, "error": { "$ref": "#/definitions/Error" + }, + "ingress-addresses": { + "type": "array", + "items": { + "type": "string" + } } }, "additionalProperties": false }, - "ErrorResults": { + "NetworkInfoResults": { "type": "object", "properties": { "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/NetworkInfoResult" + } } } }, @@ -14635,32 +49071,28 @@ "results" ] }, - "ListSecretBackendsArgs": { + "NotifyWatchResult": { "type": "object", "properties": { - "names": { - "type": "array", - "items": { - "type": "string" - } + "NotifyWatcherId": { + "type": "string" }, - "reveal": { - "type": "boolean" + "error": { + "$ref": "#/definitions/Error" } }, "additionalProperties": false, "required": [ - "names", - "reveal" + "NotifyWatcherId" ] }, - "ListSecretBackendsResults": { + "NotifyWatchResults": { "type": "object", "properties": { "results": { "type": "array", "items": { - "$ref": "#/definitions/SecretBackendResult" + "$ref": "#/definitions/NotifyWatchResult" } } }, @@ -14669,269 +49101,153 @@ "results" ] }, - "RemoveSecretBackendArg": { + "OpenPortRangesByEndpointResult": { "type": "object", "properties": { - "force": { - "type": "boolean" + "error": { + "$ref": "#/definitions/Error" }, - "name": { - "type": "string" + "unit-port-ranges": { + "type": "object", + "patternProperties": { + ".*": { + "type": "array", + "items": { + "$ref": "#/definitions/OpenUnitPortRangesByEndpoint" + } + } + } } }, "additionalProperties": false, "required": [ - "name" + "unit-port-ranges" ] }, - "RemoveSecretBackendArgs": { + "OpenPortRangesByEndpointResults": { "type": "object", "properties": { - "args": { + "results": { "type": "array", "items": { - "$ref": "#/definitions/RemoveSecretBackendArg" + "$ref": "#/definitions/OpenPortRangesByEndpointResult" } } }, "additionalProperties": false, "required": [ - "args" + "results" ] }, - "SecretBackend": { + "OpenUnitPortRangesByEndpoint": { "type": "object", "properties": { - "backend-type": { + "endpoint": { "type": "string" }, - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } + "port-ranges": { + "type": "array", + "items": { + "$ref": "#/definitions/PortRange" } - }, - "name": { - "type": "string" - }, - "token-rotate-interval": { - "type": "integer" } }, "additionalProperties": false, "required": [ - "name", - "backend-type", - "config" + "endpoint", + "port-ranges" ] }, - "SecretBackendResult": { + "PodSpec": { "type": "object", "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "id": { - "type": "string" - }, - "message": { + "spec": { "type": "string" }, - "num-secrets": { - "type": "integer" - }, - "result": { - "$ref": "#/definitions/SecretBackend" - }, - "status": { + "tag": { "type": "string" } }, "additionalProperties": false, "required": [ - "result", - "id", - "num-secrets", - "status" + "tag" ] }, - "UpdateSecretBackendArg": { + "PortRange": { "type": "object", "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "force": { - "type": "boolean" - }, - "name": { - "type": "string" + "from-port": { + "type": "integer" }, - "name-change": { + "protocol": { "type": "string" }, - "reset": { - "type": "array", - "items": { - "type": "string" - } - }, - "token-rotate-interval": { + "to-port": { "type": "integer" } }, "additionalProperties": false, "required": [ - "name", - "token-rotate-interval", - "config", - "reset" + "from-port", + "to-port", + "protocol" ] }, - "UpdateSecretBackendArgs": { + "RelationIds": { "type": "object", "properties": { - "args": { + "relation-ids": { "type": "array", "items": { - "$ref": "#/definitions/UpdateSecretBackendArg" - } - } - }, - "additionalProperties": false, - "required": [ - "args" - ] - } - } - } - }, - { - "Name": "Secrets", - "Description": "SecretsAPI is the backend for the Secrets facade.", - "Version": 1, - "AvailableTo": [ - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "ListSecrets": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ListSecretsArgs" - }, - "Result": { - "$ref": "#/definitions/ListSecretResults" - } - }, - "description": "ListSecrets lists available secrets." - } - }, - "definitions": { - "Error": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } + "type": "integer" } - }, - "message": { - "type": "string" } }, "additionalProperties": false, "required": [ - "message", - "code" + "relation-ids" ] }, - "ListSecretResult": { + "RelationResult": { "type": "object", "properties": { - "create-time": { - "type": "string", - "format": "date-time" - }, - "description": { - "type": "string" - }, - "label": { - "type": "string" - }, - "latest-expire-time": { - "type": "string", - "format": "date-time" - }, - "latest-revision": { - "type": "integer" - }, - "next-rotate-time": { - "type": "string", - "format": "date-time" - }, - "owner-tag": { - "type": "string" + "bool": { + "type": "boolean" }, - "revisions": { - "type": "array", - "items": { - "$ref": "#/definitions/SecretRevision" - } + "endpoint": { + "$ref": "#/definitions/Endpoint" }, - "rotate-policy": { - "type": "string" + "error": { + "$ref": "#/definitions/Error" }, - "update-time": { - "type": "string", - "format": "date-time" + "id": { + "type": "integer" }, - "uri": { + "key": { "type": "string" }, - "value": { - "$ref": "#/definitions/SecretValueResult" + "life": { + "type": "string" }, - "version": { - "type": "integer" + "other-application": { + "type": "string" } }, "additionalProperties": false, "required": [ - "uri", - "version", - "owner-tag", - "latest-revision", - "create-time", - "update-time", - "revisions" + "life", + "id", + "key", + "endpoint" ] }, - "ListSecretResults": { + "RelationResults": { "type": "object", "properties": { "results": { "type": "array", "items": { - "$ref": "#/definitions/ListSecretResult" + "$ref": "#/definitions/RelationResult" } } }, @@ -14940,72 +49256,100 @@ "results" ] }, - "ListSecretsArgs": { + "RelationStatusArg": { "type": "object", "properties": { - "filter": { - "$ref": "#/definitions/SecretsFilter" + "message": { + "type": "string" }, - "show-secrets": { - "type": "boolean" + "relation-id": { + "type": "integer" + }, + "status": { + "type": "string" + }, + "unit-tag": { + "type": "string" } }, "additionalProperties": false, "required": [ - "show-secrets", - "filter" + "unit-tag", + "relation-id", + "status", + "message" ] }, - "SecretRevision": { + "RelationStatusArgs": { "type": "object", "properties": { - "backend-name": { + "args": { + "type": "array", + "items": { + "$ref": "#/definitions/RelationStatusArg" + } + } + }, + "additionalProperties": false, + "required": [ + "args" + ] + }, + "RelationUnit": { + "type": "object", + "properties": { + "relation": { "type": "string" }, - "create-time": { - "type": "string", - "format": "date-time" - }, - "expire-time": { - "type": "string", - "format": "date-time" - }, - "revision": { - "type": "integer" - }, - "update-time": { - "type": "string", - "format": "date-time" - }, - "value-ref": { - "$ref": "#/definitions/SecretValueRef" + "unit": { + "type": "string" } }, "additionalProperties": false, "required": [ - "revision" + "relation", + "unit" ] }, - "SecretValueRef": { + "RelationUnitPair": { "type": "object", "properties": { - "backend-id": { + "local-unit": { "type": "string" }, - "revision-id": { + "relation": { + "type": "string" + }, + "remote-unit": { "type": "string" } }, "additionalProperties": false, "required": [ - "backend-id", - "revision-id" + "relation", + "local-unit", + "remote-unit" ] }, - "SecretValueResult": { + "RelationUnitPairs": { "type": "object", "properties": { - "data": { + "relation-unit-pairs": { + "type": "array", + "items": { + "$ref": "#/definitions/RelationUnitPair" + } + } + }, + "additionalProperties": false, + "required": [ + "relation-unit-pairs" + ] + }, + "RelationUnitSettings": { + "type": "object", + "properties": { + "application-settings": { "type": "object", "patternProperties": { ".*": { @@ -15013,227 +49357,305 @@ } } }, - "error": { - "$ref": "#/definitions/Error" + "relation": { + "type": "string" + }, + "settings": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "unit": { + "type": "string" } }, - "additionalProperties": false + "additionalProperties": false, + "required": [ + "relation", + "unit", + "settings", + "application-settings" + ] }, - "SecretsFilter": { + "RelationUnitStatus": { "type": "object", "properties": { - "owner-tag": { - "type": "string" - }, - "revision": { - "type": "integer" + "in-scope": { + "type": "boolean" }, - "uri": { + "relation-tag": { "type": "string" + }, + "suspended": { + "type": "boolean" } }, - "additionalProperties": false - } - } - } - }, - { - "Name": "Spaces", - "Description": "API provides the spaces API facade for version 6.", - "Version": 6, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "CreateSpaces": { + "additionalProperties": false, + "required": [ + "relation-tag", + "in-scope", + "suspended" + ] + }, + "RelationUnitStatusResult": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/CreateSpacesParams" + "error": { + "$ref": "#/definitions/Error" }, - "Result": { - "$ref": "#/definitions/ErrorResults" + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/RelationUnitStatus" + } } }, - "description": "CreateSpaces creates a new Juju network space, associating the\nspecified subnets with it (optional; can be empty)." + "additionalProperties": false, + "required": [ + "results" + ] }, - "ListSpaces": { + "RelationUnitStatusResults": { "type": "object", "properties": { - "Result": { - "$ref": "#/definitions/ListSpacesResults" + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/RelationUnitStatusResult" + } } }, - "description": "ListSpaces lists all the available spaces and their associated subnets." + "additionalProperties": false, + "required": [ + "results" + ] }, - "MoveSubnets": { + "RelationUnits": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/MoveSubnetsParams" - }, - "Result": { - "$ref": "#/definitions/MoveSubnetsResults" + "relation-units": { + "type": "array", + "items": { + "$ref": "#/definitions/RelationUnit" + } } }, - "description": "MoveSubnets ensures that the input subnets are in the input space." + "additionalProperties": false, + "required": [ + "relation-units" + ] }, - "ReloadSpaces": { + "RelationUnitsChange": { "type": "object", - "description": "ReloadSpaces refreshes spaces from substrate" + "properties": { + "app-changed": { + "type": "object", + "patternProperties": { + ".*": { + "type": "integer" + } + } + }, + "changed": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/UnitSettings" + } + } + }, + "departed": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "changed" + ] }, - "RemoveSpace": { + "RelationUnitsWatchResult": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/RemoveSpaceParams" + "changes": { + "$ref": "#/definitions/RelationUnitsChange" }, - "Result": { - "$ref": "#/definitions/RemoveSpaceResults" + "error": { + "$ref": "#/definitions/Error" + }, + "watcher-id": { + "type": "string" } }, - "description": "RemoveSpace removes a space.\nReturns SpaceResults if entities/settings are found which makes the deletion not possible." + "additionalProperties": false, + "required": [ + "watcher-id", + "changes" + ] }, - "RenameSpace": { + "RelationUnitsWatchResults": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/RenameSpacesParams" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/RelationUnitsWatchResult" + } } }, - "description": "RenameSpace renames a space." + "additionalProperties": false, + "required": [ + "results" + ] }, - "ShowSpace": { + "ResolvedModeResult": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/Entities" + "error": { + "$ref": "#/definitions/Error" }, - "Result": { - "$ref": "#/definitions/ShowSpaceResults" + "mode": { + "type": "string" } }, - "description": "ShowSpace shows the spaces for a set of given entities." - } - }, - "definitions": { - "CreateSpaceParams": { + "additionalProperties": false, + "required": [ + "mode" + ] + }, + "ResolvedModeResults": { "type": "object", "properties": { - "cidrs": { + "results": { "type": "array", "items": { - "type": "string" + "$ref": "#/definitions/ResolvedModeResult" } - }, - "provider-id": { - "type": "string" - }, - "public": { - "type": "boolean" - }, - "space-tag": { - "type": "string" } }, "additionalProperties": false, "required": [ - "cidrs", - "space-tag", - "public" + "results" ] }, - "CreateSpacesParams": { + "SecretBackendArgs": { "type": "object", "properties": { - "spaces": { + "backend-ids": { "type": "array", "items": { - "$ref": "#/definitions/CreateSpaceParams" + "type": "string" } + }, + "for-drain": { + "type": "boolean" } }, "additionalProperties": false, "required": [ - "spaces" + "for-drain", + "backend-ids" ] }, - "Entities": { + "SecretBackendConfig": { "type": "object", "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/Entity" + "params": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } } + }, + "type": { + "type": "string" } }, "additionalProperties": false, "required": [ - "entities" + "type" ] }, - "Entity": { + "SecretBackendConfigResult": { "type": "object", "properties": { - "tag": { + "config": { + "$ref": "#/definitions/SecretBackendConfig" + }, + "draining": { + "type": "boolean" + }, + "model-controller": { + "type": "string" + }, + "model-name": { + "type": "string" + }, + "model-uuid": { "type": "string" } }, "additionalProperties": false, "required": [ - "tag" + "model-controller", + "model-uuid", + "model-name", + "draining" ] }, - "Error": { + "SecretBackendConfigResults": { "type": "object", "properties": { - "code": { + "active-id": { "type": "string" }, - "info": { + "results": { "type": "object", "patternProperties": { ".*": { - "type": "object", - "additionalProperties": true + "$ref": "#/definitions/SecretBackendConfigResult" } } - }, - "message": { - "type": "string" } }, "additionalProperties": false, "required": [ - "message", - "code" + "active-id" ] }, - "ErrorResult": { + "SecretConsumerInfoResult": { "type": "object", "properties": { "error": { "$ref": "#/definitions/Error" + }, + "label": { + "type": "string" + }, + "revision": { + "type": "integer" } }, - "additionalProperties": false + "additionalProperties": false, + "required": [ + "revision", + "label" + ] }, - "ErrorResults": { + "SecretConsumerInfoResults": { "type": "object", "properties": { "results": { "type": "array", "items": { - "$ref": "#/definitions/ErrorResult" + "$ref": "#/definitions/SecretConsumerInfoResult" } } }, @@ -15242,13 +49664,51 @@ "results" ] }, - "ListSpacesResults": { + "SecretContentParams": { + "type": "object", + "properties": { + "data": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "value-ref": { + "$ref": "#/definitions/SecretValueRef" + } + }, + "additionalProperties": false + }, + "SecretContentResult": { + "type": "object", + "properties": { + "backend-config": { + "$ref": "#/definitions/SecretBackendConfigResult" + }, + "content": { + "$ref": "#/definitions/SecretContentParams" + }, + "error": { + "$ref": "#/definitions/Error" + }, + "latest-revision": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "content" + ] + }, + "SecretContentResults": { "type": "object", "properties": { "results": { "type": "array", "items": { - "$ref": "#/definitions/Space" + "$ref": "#/definitions/SecretContentResult" } } }, @@ -15257,152 +49717,161 @@ "results" ] }, - "MoveSubnetsParam": { + "SecretRevision": { "type": "object", "properties": { - "force": { - "type": "boolean" - }, - "space-tag": { + "backend-name": { "type": "string" }, - "subnets": { - "type": "array", - "items": { - "type": "string" - } + "create-time": { + "type": "string", + "format": "date-time" + }, + "expire-time": { + "type": "string", + "format": "date-time" + }, + "revision": { + "type": "integer" + }, + "update-time": { + "type": "string", + "format": "date-time" + }, + "value-ref": { + "$ref": "#/definitions/SecretValueRef" } }, "additionalProperties": false, "required": [ - "subnets", - "space-tag", - "force" + "revision" ] }, - "MoveSubnetsParams": { + "SecretRevisionArg": { "type": "object", "properties": { - "args": { + "pending-delete": { + "type": "boolean" + }, + "revisions": { "type": "array", "items": { - "$ref": "#/definitions/MoveSubnetsParam" + "type": "integer" } + }, + "uri": { + "type": "string" } }, "additionalProperties": false, "required": [ - "args" + "uri", + "revisions", + "pending-delete" ] }, - "MoveSubnetsResult": { + "SecretRotatedArg": { "type": "object", "properties": { - "error": { - "$ref": "#/definitions/Error" + "original-revision": { + "type": "integer" }, - "moved-subnets": { - "type": "array", - "items": { - "$ref": "#/definitions/MovedSubnet" - } + "skip": { + "type": "boolean" }, - "new-space": { + "uri": { "type": "string" } }, "additionalProperties": false, "required": [ - "new-space" + "uri", + "original-revision", + "skip" ] }, - "MoveSubnetsResults": { + "SecretRotatedArgs": { "type": "object", "properties": { - "results": { + "args": { "type": "array", "items": { - "$ref": "#/definitions/MoveSubnetsResult" + "$ref": "#/definitions/SecretRotatedArg" } } }, "additionalProperties": false, "required": [ - "results" + "args" ] }, - "MovedSubnet": { + "SecretTriggerChange": { "type": "object", "properties": { - "cidr": { - "type": "string" + "next-trigger-time": { + "type": "string", + "format": "date-time" }, - "old-space": { - "type": "string" + "revision": { + "type": "integer" }, - "subnet": { + "uri": { "type": "string" } }, "additionalProperties": false, "required": [ - "subnet", - "old-space", - "cidr" + "uri", + "next-trigger-time" ] }, - "RemoveSpaceParam": { + "SecretTriggerWatchResult": { "type": "object", "properties": { - "dry-run": { - "type": "boolean" + "changes": { + "type": "array", + "items": { + "$ref": "#/definitions/SecretTriggerChange" + } }, - "force": { - "type": "boolean" + "error": { + "$ref": "#/definitions/Error" }, - "space": { - "$ref": "#/definitions/Entity" + "watcher-id": { + "type": "string" } }, "additionalProperties": false, "required": [ - "space" + "watcher-id", + "changes" ] }, - "RemoveSpaceParams": { + "SecretValueRef": { "type": "object", "properties": { - "space-param": { - "type": "array", - "items": { - "$ref": "#/definitions/RemoveSpaceParam" - } + "backend-id": { + "type": "string" + }, + "revision-id": { + "type": "string" } }, "additionalProperties": false, "required": [ - "space-param" + "backend-id", + "revision-id" ] }, - "RemoveSpaceResult": { + "SecretValueResult": { "type": "object", - "properties": { - "bindings": { - "type": "array", - "items": { - "$ref": "#/definitions/Entity" - } - }, - "constraints": { - "type": "array", - "items": { - "$ref": "#/definitions/Entity" - } - }, - "controller-settings": { - "type": "array", - "items": { - "type": "string" + "properties": { + "data": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } } }, "error": { @@ -15411,85 +49880,103 @@ }, "additionalProperties": false }, - "RemoveSpaceResults": { + "SetStatus": { "type": "object", "properties": { - "results": { + "entities": { "type": "array", "items": { - "$ref": "#/definitions/RemoveSpaceResult" + "$ref": "#/definitions/EntityStatusArgs" } } }, "additionalProperties": false, "required": [ - "results" + "entities" ] }, - "RenameSpaceParams": { + "SetUnitStateArg": { "type": "object", "properties": { - "from-space-tag": { + "charm-state": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "meter-status-state": { "type": "string" }, - "to-space-tag": { + "relation-state": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "secret-state": { + "type": "string" + }, + "storage-state": { + "type": "string" + }, + "tag": { + "type": "string" + }, + "uniter-state": { "type": "string" } }, "additionalProperties": false, "required": [ - "from-space-tag", - "to-space-tag" + "tag" ] }, - "RenameSpacesParams": { + "SetUnitStateArgs": { "type": "object", "properties": { - "changes": { + "args": { "type": "array", "items": { - "$ref": "#/definitions/RenameSpaceParams" + "$ref": "#/definitions/SetUnitStateArg" } } }, "additionalProperties": false, "required": [ - "changes" + "args" ] }, - "ShowSpaceResult": { + "SettingsResult": { "type": "object", "properties": { - "applications": { - "type": "array", - "items": { - "type": "string" - } - }, "error": { "$ref": "#/definitions/Error" }, - "machine-count": { - "type": "integer" - }, - "space": { - "$ref": "#/definitions/Space" + "settings": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } } }, "additionalProperties": false, "required": [ - "space", - "applications", - "machine-count" + "settings" ] }, - "ShowSpaceResults": { + "SettingsResults": { "type": "object", "properties": { "results": { "type": "array", "items": { - "$ref": "#/definitions/ShowSpaceResult" + "$ref": "#/definitions/SettingsResult" } } }, @@ -15498,370 +49985,452 @@ "results" ] }, - "Space": { + "StatusResult": { "type": "object", "properties": { + "data": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, "error": { "$ref": "#/definitions/Error" }, "id": { "type": "string" }, - "name": { + "info": { "type": "string" }, - "subnets": { - "type": "array", - "items": { - "$ref": "#/definitions/Subnet" - } + "life": { + "type": "string" + }, + "since": { + "type": "string", + "format": "date-time" + }, + "status": { + "type": "string" } }, "additionalProperties": false, "required": [ "id", - "name", - "subnets" + "life", + "status", + "info", + "data", + "since" ] }, - "Subnet": { + "StatusResults": { "type": "object", "properties": { - "cidr": { - "type": "string" - }, - "life": { - "type": "string" - }, - "provider-id": { - "type": "string" - }, - "provider-network-id": { - "type": "string" - }, - "provider-space-id": { - "type": "string" - }, - "space-tag": { - "type": "string" - }, - "status": { - "type": "string" - }, - "vlan-tag": { - "type": "integer" - }, - "zones": { + "results": { "type": "array", "items": { - "type": "string" + "$ref": "#/definitions/StatusResult" } } }, "additionalProperties": false, "required": [ - "cidr", - "vlan-tag", - "life", - "space-tag", - "zones" + "results" ] - } - } - } - }, - { - "Name": "Storage", - "Description": "StorageAPI implements the latest version (v6) of the Storage API.", - "Version": 6, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "AddToUnit": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/StoragesAddParams" - }, - "Result": { - "$ref": "#/definitions/AddStorageResults" - } - }, - "description": "AddToUnit validates and creates additional storage instances for units.\nA \"CHANGE\" block can block this operation." }, - "Attach": { + "StorageAddParams": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/StorageAttachmentIds" + "name": { + "type": "string" }, - "Result": { - "$ref": "#/definitions/ErrorResults" + "storage": { + "$ref": "#/definitions/StorageConstraints" + }, + "unit": { + "type": "string" } }, - "description": "Attach attaches existing storage instances to units.\nA \"CHANGE\" block can block this operation." + "additionalProperties": false, + "required": [ + "unit", + "name", + "storage" + ] }, - "CreatePool": { + "StorageAttachment": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/StoragePoolArgs" + "kind": { + "type": "integer" }, - "Result": { - "$ref": "#/definitions/ErrorResults" + "life": { + "type": "string" + }, + "location": { + "type": "string" + }, + "owner-tag": { + "type": "string" + }, + "storage-tag": { + "type": "string" + }, + "unit-tag": { + "type": "string" } }, - "description": "CreatePool creates a new pool with specified parameters." + "additionalProperties": false, + "required": [ + "storage-tag", + "owner-tag", + "unit-tag", + "kind", + "location", + "life" + ] }, - "DetachStorage": { + "StorageAttachmentId": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/StorageDetachmentParams" + "storage-tag": { + "type": "string" }, - "Result": { - "$ref": "#/definitions/ErrorResults" + "unit-tag": { + "type": "string" } }, - "description": "DetachStorage sets the specified storage attachments to Dying, unless they are\nalready Dying or Dead. Any associated, persistent storage will remain\nalive. This call can be forced." + "additionalProperties": false, + "required": [ + "storage-tag", + "unit-tag" + ] }, - "Import": { + "StorageAttachmentIds": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/BulkImportStorageParams" - }, - "Result": { - "$ref": "#/definitions/ImportStorageResults" + "ids": { + "type": "array", + "items": { + "$ref": "#/definitions/StorageAttachmentId" + } } }, - "description": "Import imports existing storage into the model.\nA \"CHANGE\" block can block this operation." + "additionalProperties": false, + "required": [ + "ids" + ] }, - "ListFilesystems": { + "StorageAttachmentIdsResult": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/FilesystemFilters" + "error": { + "$ref": "#/definitions/Error" }, - "Result": { - "$ref": "#/definitions/FilesystemDetailsListResults" + "result": { + "$ref": "#/definitions/StorageAttachmentIds" } }, - "description": "ListFilesystems returns a list of filesystems in the environment matching\nthe provided filter. Each result describes a filesystem in detail, including\nthe filesystem's attachments." + "additionalProperties": false, + "required": [ + "result" + ] }, - "ListPools": { + "StorageAttachmentIdsResults": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/StoragePoolFilters" - }, - "Result": { - "$ref": "#/definitions/StoragePoolsResults" + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/StorageAttachmentIdsResult" + } } }, - "description": "ListPools returns a list of pools.\nIf filter is provided, returned list only contains pools that match\nthe filter.\nPools can be filtered on names and provider types.\nIf both names and types are provided as filter,\npools that match either are returned.\nThis method lists union of pools and environment provider types.\nIf no filter is provided, all pools are returned." + "additionalProperties": false }, - "ListStorageDetails": { + "StorageAttachmentResult": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/StorageFilters" + "error": { + "$ref": "#/definitions/Error" }, - "Result": { - "$ref": "#/definitions/StorageDetailsListResults" + "result": { + "$ref": "#/definitions/StorageAttachment" } }, - "description": "ListStorageDetails returns storage matching a filter." + "additionalProperties": false, + "required": [ + "result" + ] }, - "ListVolumes": { + "StorageAttachmentResults": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/VolumeFilters" - }, - "Result": { - "$ref": "#/definitions/VolumeDetailsListResults" + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/StorageAttachmentResult" + } } }, - "description": "ListVolumes lists volumes with the given filters. Each filter produces\nan independent list of volumes, or an error if the filter is invalid\nor the volumes could not be listed." + "additionalProperties": false }, - "Remove": { + "StorageConstraints": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/RemoveStorage" + "count": { + "type": "integer" }, - "Result": { - "$ref": "#/definitions/ErrorResults" + "pool": { + "type": "string" + }, + "size": { + "type": "integer" } }, - "description": "Remove sets the specified storage entities to Dying, unless they are\nalready Dying or Dead, such that the storage will eventually be removed\nfrom the model. If the arguments specify that the storage should be\ndestroyed, then the associated cloud storage will be destroyed first;\notherwise it will only be released from Juju's control." + "additionalProperties": false }, - "RemovePool": { + "StringBoolResult": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/StoragePoolDeleteArgs" + "error": { + "$ref": "#/definitions/Error" }, - "Result": { - "$ref": "#/definitions/ErrorResults" + "ok": { + "type": "boolean" + }, + "result": { + "type": "string" } }, - "description": "RemovePool deletes the named pool" + "additionalProperties": false, + "required": [ + "result", + "ok" + ] }, - "StorageDetails": { + "StringBoolResults": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StorageDetailsResults" + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/StringBoolResult" + } } }, - "description": "StorageDetails retrieves and returns detailed information about desired\nstorage identified by supplied tags. If specified storage cannot be\nretrieved, individual error is returned instead of storage information." + "additionalProperties": false, + "required": [ + "results" + ] }, - "UpdatePool": { + "StringResult": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/StoragePoolArgs" + "error": { + "$ref": "#/definitions/Error" }, - "Result": { - "$ref": "#/definitions/ErrorResults" + "result": { + "type": "string" } }, - "description": "UpdatePool deletes the named pool" - } - }, - "definitions": { - "AddStorageDetails": { + "additionalProperties": false, + "required": [ + "result" + ] + }, + "StringResults": { "type": "object", "properties": { - "storage-tags": { + "results": { "type": "array", "items": { - "type": "string" + "$ref": "#/definitions/StringResult" } } }, "additionalProperties": false, "required": [ - "storage-tags" + "results" ] }, - "AddStorageResult": { + "StringsResult": { "type": "object", "properties": { "error": { "$ref": "#/definitions/Error" }, "result": { - "$ref": "#/definitions/AddStorageDetails" + "type": "array", + "items": { + "type": "string" + } } }, "additionalProperties": false }, - "AddStorageResults": { + "StringsWatchResult": { "type": "object", "properties": { - "results": { + "changes": { "type": "array", "items": { - "$ref": "#/definitions/AddStorageResult" + "type": "string" } + }, + "error": { + "$ref": "#/definitions/Error" + }, + "watcher-id": { + "type": "string" } }, "additionalProperties": false, "required": [ - "results" + "watcher-id" ] }, - "BulkImportStorageParams": { + "StringsWatchResults": { "type": "object", "properties": { - "storage": { + "results": { "type": "array", "items": { - "$ref": "#/definitions/ImportStorageParams" + "$ref": "#/definitions/StringsWatchResult" } } }, "additionalProperties": false, "required": [ - "storage" + "results" ] }, - "Entities": { + "UnitRefreshResult": { "type": "object", "properties": { - "entities": { + "Error": { + "$ref": "#/definitions/Error" + }, + "Life": { + "type": "string" + }, + "Resolved": { + "type": "string" + }, + "provider-id": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "Life", + "Resolved", + "Error" + ] + }, + "UnitRefreshResults": { + "type": "object", + "properties": { + "Results": { "type": "array", "items": { - "$ref": "#/definitions/Entity" + "$ref": "#/definitions/UnitRefreshResult" } } }, "additionalProperties": false, "required": [ - "entities" + "Results" ] }, - "Entity": { + "UnitSettings": { "type": "object", "properties": { - "tag": { - "type": "string" + "version": { + "type": "integer" } }, "additionalProperties": false, "required": [ - "tag" + "version" ] }, - "EntityStatus": { + "UnitStateResult": { "type": "object", "properties": { - "data": { + "charm-state": { "type": "object", "patternProperties": { ".*": { - "type": "object", - "additionalProperties": true + "type": "string" } } }, - "info": { + "error": { + "$ref": "#/definitions/Error" + }, + "meter-status-state": { "type": "string" }, - "since": { - "type": "string", - "format": "date-time" + "relation-state": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } }, - "status": { + "secret-state": { + "type": "string" + }, + "storage-state": { + "type": "string" + }, + "uniter-state": { "type": "string" } }, + "additionalProperties": false + }, + "UnitStateResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/UnitStateResult" + } + } + }, "additionalProperties": false, "required": [ - "status", - "info", - "since" + "results" ] }, - "Error": { + "UpdateSecretArg": { "type": "object", "properties": { - "code": { + "UpsertSecretArg": { + "$ref": "#/definitions/UpsertSecretArg" + }, + "content": { + "$ref": "#/definitions/SecretContentParams" + }, + "description": { "type": "string" }, - "info": { + "expire-time": { + "type": "string", + "format": "date-time" + }, + "label": { + "type": "string" + }, + "params": { "type": "object", "patternProperties": { ".*": { @@ -15870,282 +50439,367 @@ } } }, - "message": { + "rotate-policy": { + "type": "string" + }, + "uri": { "type": "string" } }, "additionalProperties": false, "required": [ - "message", - "code" + "UpsertSecretArg", + "uri" ] }, - "ErrorResult": { + "UpdateSecretArgs": { "type": "object", "properties": { - "error": { - "$ref": "#/definitions/Error" + "args": { + "type": "array", + "items": { + "$ref": "#/definitions/UpdateSecretArg" + } } }, - "additionalProperties": false + "additionalProperties": false, + "required": [ + "args" + ] + }, + "UpgradeSeriesStatusParam": { + "type": "object", + "properties": { + "entity": { + "$ref": "#/definitions/Entity" + }, + "message": { + "type": "string" + }, + "status": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "entity", + "status", + "message" + ] }, - "ErrorResults": { + "UpgradeSeriesStatusParams": { "type": "object", "properties": { - "results": { + "params": { "type": "array", "items": { - "$ref": "#/definitions/ErrorResult" + "$ref": "#/definitions/UpgradeSeriesStatusParam" } } }, "additionalProperties": false, "required": [ - "results" + "params" ] }, - "FilesystemAttachmentDetails": { + "UpgradeSeriesStatusResult": { "type": "object", "properties": { - "FilesystemAttachmentInfo": { - "$ref": "#/definitions/FilesystemAttachmentInfo" + "error": { + "$ref": "#/definitions/Error" }, - "life": { + "status": { "type": "string" }, - "mount-point": { + "target": { "type": "string" - }, - "read-only": { - "type": "boolean" } }, - "additionalProperties": false, - "required": [ - "FilesystemAttachmentInfo" - ] + "additionalProperties": false }, - "FilesystemAttachmentInfo": { + "UpgradeSeriesStatusResults": { "type": "object", "properties": { - "mount-point": { - "type": "string" - }, - "read-only": { - "type": "boolean" + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/UpgradeSeriesStatusResult" + } } }, "additionalProperties": false }, - "FilesystemDetails": { + "UpsertSecretArg": { "type": "object", "properties": { - "filesystem-tag": { + "content": { + "$ref": "#/definitions/SecretContentParams" + }, + "description": { "type": "string" }, - "info": { - "$ref": "#/definitions/FilesystemInfo" + "expire-time": { + "type": "string", + "format": "date-time" }, - "life": { + "label": { "type": "string" }, - "machine-attachments": { + "params": { "type": "object", "patternProperties": { ".*": { - "$ref": "#/definitions/FilesystemAttachmentDetails" + "type": "object", + "additionalProperties": true } } }, - "status": { - "$ref": "#/definitions/EntityStatus" - }, - "storage": { - "$ref": "#/definitions/StorageDetails" + "rotate-policy": { + "type": "string" + } + }, + "additionalProperties": false + } + } + } + }, + { + "Name": "UpgradeSeries", + "Description": "API serves methods required by the machine agent upgrade-machine worker.", + "Version": 3, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "CurrentSeries": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" }, - "unit-attachments": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/FilesystemAttachmentDetails" - } - } + "Result": { + "$ref": "#/definitions/StringResults" + } + }, + "description": "CurrentSeries returns what Juju thinks the current series of the machine is.\nNote that a machine could have been upgraded out-of-band by running\ndo-release-upgrade outside of the upgrade-machine workflow,\nmaking this value incorrect." + }, + "FinishUpgradeSeries": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/UpdateChannelArgs" }, - "volume-tag": { - "type": "string" + "Result": { + "$ref": "#/definitions/ErrorResults" } }, - "additionalProperties": false, - "required": [ - "filesystem-tag", - "info", - "status" - ] + "description": "FinishUpgradeSeries is the last action in the upgrade workflow and is\ncalled after all machine and unit statuses are \"completed\".\nIt updates the machine series to reflect the completed upgrade, then\nremoves the upgrade-machine lock." }, - "FilesystemDetailsListResult": { + "MachineStatus": { "type": "object", "properties": { - "error": { - "$ref": "#/definitions/Error" + "Params": { + "$ref": "#/definitions/Entities" }, - "result": { - "type": "array", - "items": { - "$ref": "#/definitions/FilesystemDetails" - } + "Result": { + "$ref": "#/definitions/UpgradeSeriesStatusResults" } }, - "additionalProperties": false + "description": "MachineStatus gets the current upgrade-machine status of a machine." }, - "FilesystemDetailsListResults": { + "PinMachineApplications": { "type": "object", "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/FilesystemDetailsListResult" - } + "Result": { + "$ref": "#/definitions/PinApplicationsResults" } }, - "additionalProperties": false + "description": "PinMachineApplications pins leadership for applications represented by units\nrunning on the auth'd machine." }, - "FilesystemFilter": { + "PinnedLeadership": { "type": "object", "properties": { - "machines": { - "type": "array", - "items": { - "type": "string" - } + "Result": { + "$ref": "#/definitions/PinnedLeadershipResult" } }, - "additionalProperties": false + "description": "PinnedLeadership returns all pinned applications and the entities that\nrequire their pinned behaviour, for leadership in the current model." }, - "FilesystemFilters": { + "SetInstanceStatus": { "type": "object", "properties": { - "filters": { - "type": "array", - "items": { - "$ref": "#/definitions/FilesystemFilter" - } + "Params": { + "$ref": "#/definitions/SetStatus" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" } }, - "additionalProperties": false + "description": "SetInstanceStatus sets the status of the machine." }, - "FilesystemInfo": { + "SetMachineStatus": { "type": "object", "properties": { - "filesystem-id": { - "type": "string" + "Params": { + "$ref": "#/definitions/UpgradeSeriesStatusParams" }, - "pool": { - "type": "string" + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "SetMachineStatus sets the current upgrade-machine status of a machine." + }, + "SetUpgradeSeriesUnitStatus": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/UpgradeSeriesStatusParams" }, - "size": { - "type": "integer" + "Result": { + "$ref": "#/definitions/ErrorResults" } }, - "additionalProperties": false, - "required": [ - "filesystem-id", - "pool", - "size" - ] + "description": "SetUpgradeSeriesUnitStatus sets the upgrade series status of the unit.\nIf no upgrade is in progress an error is returned instead." }, - "ImportStorageDetails": { + "StartUnitCompletion": { "type": "object", "properties": { - "storage-tag": { - "type": "string" + "Params": { + "$ref": "#/definitions/UpgradeSeriesStartUnitCompletionParam" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" } }, - "additionalProperties": false, - "required": [ - "storage-tag" - ] + "description": "StartUnitCompletion starts the upgrade series completion phase for all subordinate\nunits of a given machine." }, - "ImportStorageParams": { + "TargetSeries": { "type": "object", "properties": { - "kind": { - "type": "integer" + "Params": { + "$ref": "#/definitions/Entities" }, - "pool": { - "type": "string" + "Result": { + "$ref": "#/definitions/StringResults" + } + }, + "description": "TargetSeries returns the series that a machine has been locked\nfor upgrading to." + }, + "UnitsCompleted": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" }, - "provider-id": { - "type": "string" + "Result": { + "$ref": "#/definitions/EntitiesResults" + } + }, + "description": "UnitsCompleted returns the units running on this machine that have completed\nthe upgrade-machine workflow and are in their normal running state." + }, + "UnitsPrepared": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" }, - "storage-name": { - "type": "string" + "Result": { + "$ref": "#/definitions/EntitiesResults" } }, - "additionalProperties": false, - "required": [ - "kind", - "pool", - "provider-id", - "storage-name" - ] + "description": "UnitsPrepared returns the units running on this machine that have completed\ntheir upgrade-machine preparation, and are ready to be stopped and have their\nunit agent services converted for the target series." }, - "ImportStorageResult": { + "UnpinMachineApplications": { "type": "object", "properties": { - "error": { - "$ref": "#/definitions/Error" + "Result": { + "$ref": "#/definitions/PinApplicationsResults" + } + }, + "description": "UnpinMachineApplications unpins leadership for applications represented by\nunits running on the auth'd machine." + }, + "UpgradeSeriesUnitStatus": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" }, - "result": { - "$ref": "#/definitions/ImportStorageDetails" + "Result": { + "$ref": "#/definitions/UpgradeSeriesStatusResults" + } + }, + "description": "UpgradeSeriesUnitStatus returns the current preparation status of an\nupgrading unit.\nIf no series upgrade is in progress an error is returned instead." + }, + "WatchUpgradeSeriesNotifications": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/NotifyWatchResults" + } + }, + "description": "WatchUpgradeSeriesNotifications returns a NotifyWatcher for observing changes to upgrade series locks." + } + }, + "definitions": { + "Entities": { + "type": "object", + "properties": { + "entities": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } } }, - "additionalProperties": false + "additionalProperties": false, + "required": [ + "entities" + ] }, - "ImportStorageResults": { + "EntitiesResult": { "type": "object", "properties": { - "results": { + "entities": { "type": "array", "items": { - "$ref": "#/definitions/ImportStorageResult" + "$ref": "#/definitions/Entity" } + }, + "error": { + "$ref": "#/definitions/Error" } }, "additionalProperties": false, "required": [ - "results" + "entities" ] }, - "RemoveStorage": { + "EntitiesResults": { "type": "object", "properties": { - "storage": { + "results": { "type": "array", "items": { - "$ref": "#/definitions/RemoveStorageInstance" + "$ref": "#/definitions/EntitiesResult" } } }, "additionalProperties": false, "required": [ - "storage" + "results" ] }, - "RemoveStorageInstance": { + "Entity": { "type": "object", "properties": { - "destroy-attachments": { - "type": "boolean" - }, - "destroy-storage": { - "type": "boolean" - }, - "force": { - "type": "boolean" - }, - "max-wait": { - "type": "integer" - }, "tag": { "type": "string" } @@ -16155,559 +50809,487 @@ "tag" ] }, - "StorageAddParams": { + "EntityStatusArgs": { "type": "object", "properties": { - "name": { + "data": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "info": { "type": "string" }, - "storage": { - "$ref": "#/definitions/StorageConstraints" + "status": { + "type": "string" }, - "unit": { + "tag": { "type": "string" } }, "additionalProperties": false, "required": [ - "unit", - "name", - "storage" + "tag", + "status", + "info", + "data" ] }, - "StorageAttachmentDetails": { + "Error": { "type": "object", "properties": { - "life": { - "type": "string" - }, - "location": { - "type": "string" - }, - "machine-tag": { + "code": { "type": "string" }, - "storage-tag": { - "type": "string" + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } }, - "unit-tag": { + "message": { "type": "string" } }, "additionalProperties": false, "required": [ - "storage-tag", - "unit-tag", - "machine-tag" + "message", + "code" ] }, - "StorageAttachmentId": { + "ErrorResult": { "type": "object", "properties": { - "storage-tag": { - "type": "string" - }, - "unit-tag": { - "type": "string" + "error": { + "$ref": "#/definitions/Error" } }, - "additionalProperties": false, - "required": [ - "storage-tag", - "unit-tag" - ] + "additionalProperties": false }, - "StorageAttachmentIds": { + "ErrorResults": { "type": "object", "properties": { - "ids": { + "results": { "type": "array", "items": { - "$ref": "#/definitions/StorageAttachmentId" + "$ref": "#/definitions/ErrorResult" } } }, "additionalProperties": false, "required": [ - "ids" + "results" ] }, - "StorageConstraints": { + "NotifyWatchResult": { "type": "object", "properties": { - "count": { - "type": "integer" - }, - "pool": { + "NotifyWatcherId": { "type": "string" }, - "size": { - "type": "integer" - } - }, - "additionalProperties": false - }, - "StorageDetachmentParams": { - "type": "object", - "properties": { - "force": { - "type": "boolean" - }, - "ids": { - "$ref": "#/definitions/StorageAttachmentIds" - }, - "max-wait": { - "type": "integer" + "error": { + "$ref": "#/definitions/Error" } }, "additionalProperties": false, "required": [ - "ids" + "NotifyWatcherId" ] }, - "StorageDetails": { + "NotifyWatchResults": { "type": "object", "properties": { - "attachments": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/StorageAttachmentDetails" - } + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/NotifyWatchResult" } - }, - "kind": { - "type": "integer" - }, - "life": { - "type": "string" - }, - "owner-tag": { - "type": "string" - }, - "persistent": { - "type": "boolean" - }, - "status": { - "$ref": "#/definitions/EntityStatus" - }, - "storage-tag": { - "type": "string" } }, "additionalProperties": false, "required": [ - "storage-tag", - "owner-tag", - "kind", - "status", - "persistent" + "results" ] }, - "StorageDetailsListResult": { + "PinApplicationResult": { "type": "object", "properties": { + "application-name": { + "type": "string" + }, "error": { "$ref": "#/definitions/Error" - }, - "result": { - "type": "array", - "items": { - "$ref": "#/definitions/StorageDetails" - } } }, - "additionalProperties": false + "additionalProperties": false, + "required": [ + "application-name" + ] }, - "StorageDetailsListResults": { + "PinApplicationsResults": { "type": "object", "properties": { "results": { "type": "array", "items": { - "$ref": "#/definitions/StorageDetailsListResult" + "$ref": "#/definitions/PinApplicationResult" } } }, - "additionalProperties": false + "additionalProperties": false, + "required": [ + "results" + ] }, - "StorageDetailsResult": { + "PinnedLeadershipResult": { "type": "object", "properties": { - "error": { - "$ref": "#/definitions/Error" - }, "result": { - "$ref": "#/definitions/StorageDetails" - } - }, - "additionalProperties": false - }, - "StorageDetailsResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StorageDetailsResult" + "type": "object", + "patternProperties": { + ".*": { + "type": "array", + "items": { + "type": "string" + } + } } } }, "additionalProperties": false }, - "StorageFilter": { - "type": "object", - "additionalProperties": false - }, - "StorageFilters": { + "SetStatus": { "type": "object", "properties": { - "filters": { + "entities": { "type": "array", "items": { - "$ref": "#/definitions/StorageFilter" + "$ref": "#/definitions/EntityStatusArgs" } } }, - "additionalProperties": false + "additionalProperties": false, + "required": [ + "entities" + ] }, - "StoragePool": { + "StringResult": { "type": "object", "properties": { - "attrs": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "name": { - "type": "string" + "error": { + "$ref": "#/definitions/Error" }, - "provider": { + "result": { "type": "string" } }, - "additionalProperties": false, - "required": [ - "name", - "provider", - "attrs" + "additionalProperties": false, + "required": [ + "result" ] }, - "StoragePoolArgs": { + "StringResults": { "type": "object", "properties": { - "pools": { + "results": { "type": "array", "items": { - "$ref": "#/definitions/StoragePool" + "$ref": "#/definitions/StringResult" } } }, "additionalProperties": false, "required": [ - "pools" + "results" ] }, - "StoragePoolDeleteArg": { + "UpdateChannelArg": { "type": "object", "properties": { - "name": { + "channel": { "type": "string" + }, + "force": { + "type": "boolean" + }, + "tag": { + "$ref": "#/definitions/Entity" } }, "additionalProperties": false, "required": [ - "name" + "tag", + "force", + "channel" ] }, - "StoragePoolDeleteArgs": { + "UpdateChannelArgs": { "type": "object", "properties": { - "pools": { + "args": { "type": "array", "items": { - "$ref": "#/definitions/StoragePoolDeleteArg" + "$ref": "#/definitions/UpdateChannelArg" } } }, "additionalProperties": false, "required": [ - "pools" + "args" ] }, - "StoragePoolFilter": { + "UpgradeSeriesStartUnitCompletionParam": { "type": "object", "properties": { - "names": { + "entities": { "type": "array", "items": { - "type": "string" + "$ref": "#/definitions/Entity" } }, - "providers": { - "type": "array", - "items": { - "type": "string" - } + "message": { + "type": "string" } }, - "additionalProperties": false + "additionalProperties": false, + "required": [ + "entities", + "message" + ] }, - "StoragePoolFilters": { + "UpgradeSeriesStatusParam": { "type": "object", "properties": { - "filters": { - "type": "array", - "items": { - "$ref": "#/definitions/StoragePoolFilter" - } + "entity": { + "$ref": "#/definitions/Entity" + }, + "message": { + "type": "string" + }, + "status": { + "type": "string" } }, - "additionalProperties": false + "additionalProperties": false, + "required": [ + "entity", + "status", + "message" + ] }, - "StoragePoolsResult": { + "UpgradeSeriesStatusParams": { "type": "object", "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "storage-pools": { + "params": { "type": "array", "items": { - "$ref": "#/definitions/StoragePool" + "$ref": "#/definitions/UpgradeSeriesStatusParam" } } }, - "additionalProperties": false + "additionalProperties": false, + "required": [ + "params" + ] }, - "StoragePoolsResults": { + "UpgradeSeriesStatusResult": { "type": "object", "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StoragePoolsResult" - } + "error": { + "$ref": "#/definitions/Error" + }, + "status": { + "type": "string" + }, + "target": { + "type": "string" } }, "additionalProperties": false }, - "StoragesAddParams": { + "UpgradeSeriesStatusResults": { "type": "object", "properties": { - "storages": { + "results": { "type": "array", "items": { - "$ref": "#/definitions/StorageAddParams" + "$ref": "#/definitions/UpgradeSeriesStatusResult" } } }, - "additionalProperties": false, - "required": [ - "storages" - ] - }, - "VolumeAttachmentDetails": { + "additionalProperties": false + } + } + } + }, + { + "Name": "UpgradeSteps", + "Description": "UpgradeStepsAPI implements version 2 of the Upgrade Steps API,\nwhich adds WriteUniterState.", + "Version": 2, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent" + ], + "Schema": { + "type": "object", + "properties": { + "ResetKVMMachineModificationStatusIdle": { "type": "object", "properties": { - "VolumeAttachmentInfo": { - "$ref": "#/definitions/VolumeAttachmentInfo" - }, - "bus-address": { - "type": "string" - }, - "device-link": { - "type": "string" - }, - "device-name": { - "type": "string" - }, - "life": { - "type": "string" - }, - "plan-info": { - "$ref": "#/definitions/VolumeAttachmentPlanInfo" + "Params": { + "$ref": "#/definitions/Entity" }, - "read-only": { - "type": "boolean" + "Result": { + "$ref": "#/definitions/ErrorResult" } }, - "additionalProperties": false, - "required": [ - "VolumeAttachmentInfo" - ] + "description": "ResetKVMMachineModificationStatusIdle sets the modification status\nof a kvm machine to idle if it is in an error state before upgrade.\nRelated to lp:1829393." }, - "VolumeAttachmentInfo": { + "WriteAgentState": { "type": "object", "properties": { - "bus-address": { - "type": "string" - }, - "device-link": { - "type": "string" - }, - "device-name": { - "type": "string" - }, - "plan-info": { - "$ref": "#/definitions/VolumeAttachmentPlanInfo" + "Params": { + "$ref": "#/definitions/SetUnitStateArgs" }, - "read-only": { - "type": "boolean" + "Result": { + "$ref": "#/definitions/ErrorResults" } }, - "additionalProperties": false - }, - "VolumeAttachmentPlanInfo": { + "description": "WriteAgentState writes the agent state for the set of units provided. This\ncall presently deals with the state for the unit agent." + } + }, + "definitions": { + "Entity": { "type": "object", "properties": { - "device-attributes": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "device-type": { + "tag": { "type": "string" } }, - "additionalProperties": false + "additionalProperties": false, + "required": [ + "tag" + ] }, - "VolumeDetails": { + "Error": { "type": "object", "properties": { - "info": { - "$ref": "#/definitions/VolumeInfo" - }, - "life": { + "code": { "type": "string" }, - "machine-attachments": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/VolumeAttachmentDetails" - } - } - }, - "status": { - "$ref": "#/definitions/EntityStatus" - }, - "storage": { - "$ref": "#/definitions/StorageDetails" - }, - "unit-attachments": { + "info": { "type": "object", "patternProperties": { ".*": { - "$ref": "#/definitions/VolumeAttachmentDetails" + "type": "object", + "additionalProperties": true } } }, - "volume-tag": { + "message": { "type": "string" } }, "additionalProperties": false, "required": [ - "volume-tag", - "info", - "status" + "message", + "code" ] }, - "VolumeDetailsListResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "array", - "items": { - "$ref": "#/definitions/VolumeDetails" - } - } - }, - "additionalProperties": false - }, - "VolumeDetailsListResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/VolumeDetailsListResult" - } - } - }, - "additionalProperties": false - }, - "VolumeFilter": { - "type": "object", - "properties": { - "machines": { - "type": "array", - "items": { - "type": "string" - } + "ErrorResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" } }, "additionalProperties": false }, - "VolumeFilters": { + "ErrorResults": { "type": "object", "properties": { - "filters": { + "results": { "type": "array", "items": { - "$ref": "#/definitions/VolumeFilter" + "$ref": "#/definitions/ErrorResult" } } }, - "additionalProperties": false + "additionalProperties": false, + "required": [ + "results" + ] }, - "VolumeInfo": { + "SetUnitStateArg": { "type": "object", "properties": { - "hardware-id": { + "charm-state": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "meter-status-state": { "type": "string" }, - "persistent": { - "type": "boolean" + "relation-state": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } }, - "pool": { + "secret-state": { "type": "string" }, - "size": { - "type": "integer" + "storage-state": { + "type": "string" }, - "volume-id": { + "tag": { "type": "string" }, - "wwn": { + "uniter-state": { "type": "string" } }, "additionalProperties": false, "required": [ - "volume-id", - "size", - "persistent" + "tag" + ] + }, + "SetUnitStateArgs": { + "type": "object", + "properties": { + "args": { + "type": "array", + "items": { + "$ref": "#/definitions/SetUnitStateArg" + } + } + }, + "additionalProperties": false, + "required": [ + "args" ] } } } }, { - "Name": "Subnets", - "Description": "API provides the subnets API facade for version 5.", - "Version": 5, + "Name": "Upgrader", + "Description": "", + "Version": 1, "AvailableTo": [ "controller-machine-agent", "machine-agent", @@ -16717,54 +51299,148 @@ "Schema": { "type": "object", "properties": { - "AllZones": { + "DesiredVersion": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/VersionResults" + } + } + }, + "SetTools": { "type": "object", "properties": { + "Params": { + "$ref": "#/definitions/EntitiesVersion" + }, "Result": { - "$ref": "#/definitions/ZoneResults" + "$ref": "#/definitions/ErrorResults" } - }, - "description": "AllZones returns all availability zones known to Juju. If a\nzone is unusable, unavailable, or deprecated the Available\nfield will be false." + } }, - "ListSubnets": { + "Tools": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/SubnetsFilters" + "$ref": "#/definitions/Entities" }, "Result": { - "$ref": "#/definitions/ListSubnetsResults" + "$ref": "#/definitions/ToolsResults" } - }, - "description": "ListSubnets returns the matching subnets after applying\noptional filters." + } }, - "SubnetsByCIDR": { + "WatchAPIVersion": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/CIDRParams" + "$ref": "#/definitions/Entities" }, "Result": { - "$ref": "#/definitions/SubnetsResults" + "$ref": "#/definitions/NotifyWatchResults" } - }, - "description": "SubnetsByCIDR returns the collection of subnets matching each CIDR in the input." + } } }, "definitions": { - "CIDRParams": { + "Binary": { "type": "object", "properties": { - "cidrs": { + "Arch": { + "type": "string" + }, + "Build": { + "type": "integer" + }, + "Major": { + "type": "integer" + }, + "Minor": { + "type": "integer" + }, + "Number": { + "$ref": "#/definitions/Number" + }, + "Patch": { + "type": "integer" + }, + "Release": { + "type": "string" + }, + "Tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "Major", + "Minor", + "Tag", + "Patch", + "Build", + "Number", + "Release", + "Arch" + ] + }, + "Entities": { + "type": "object", + "properties": { + "entities": { "type": "array", "items": { - "type": "string" + "$ref": "#/definitions/Entity" } } }, "additionalProperties": false, "required": [ - "cidrs" + "entities" + ] + }, + "EntitiesVersion": { + "type": "object", + "properties": { + "agent-tools": { + "type": "array", + "items": { + "$ref": "#/definitions/EntityVersion" + } + } + }, + "additionalProperties": false, + "required": [ + "agent-tools" + ] + }, + "Entity": { + "type": "object", + "properties": { + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag" + ] + }, + "EntityVersion": { + "type": "object", + "properties": { + "tag": { + "type": "string" + }, + "tools": { + "$ref": "#/definitions/Version" + } + }, + "additionalProperties": false, + "required": [ + "tag", + "tools" ] }, "Error": { @@ -16792,13 +51468,22 @@ "code" ] }, - "ListSubnetsResults": { + "ErrorResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "ErrorResults": { "type": "object", "properties": { "results": { "type": "array", "items": { - "$ref": "#/definitions/Subnet" + "$ref": "#/definitions/ErrorResult" } } }, @@ -16807,133 +51492,112 @@ "results" ] }, - "Subnet": { + "NotifyWatchResult": { "type": "object", "properties": { - "cidr": { - "type": "string" - }, - "life": { - "type": "string" - }, - "provider-id": { - "type": "string" - }, - "provider-network-id": { - "type": "string" - }, - "provider-space-id": { - "type": "string" - }, - "space-tag": { - "type": "string" - }, - "status": { + "NotifyWatcherId": { "type": "string" }, - "vlan-tag": { - "type": "integer" - }, - "zones": { - "type": "array", - "items": { - "type": "string" - } + "error": { + "$ref": "#/definitions/Error" } }, "additionalProperties": false, "required": [ - "cidr", - "vlan-tag", - "life", - "space-tag", - "zones" + "NotifyWatcherId" ] }, - "SubnetV2": { + "NotifyWatchResults": { "type": "object", "properties": { - "Subnet": { - "$ref": "#/definitions/Subnet" - }, - "cidr": { - "type": "string" - }, - "id": { - "type": "string" - }, - "life": { - "type": "string" - }, - "provider-id": { - "type": "string" - }, - "provider-network-id": { - "type": "string" - }, - "provider-space-id": { - "type": "string" + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/NotifyWatchResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "Number": { + "type": "object", + "properties": { + "Build": { + "type": "integer" }, - "space-tag": { - "type": "string" + "Major": { + "type": "integer" }, - "status": { - "type": "string" + "Minor": { + "type": "integer" }, - "vlan-tag": { + "Patch": { "type": "integer" }, - "zones": { - "type": "array", - "items": { - "type": "string" - } + "Tag": { + "type": "string" } }, "additionalProperties": false, "required": [ - "cidr", - "vlan-tag", - "life", - "space-tag", - "zones", - "Subnet" + "Major", + "Minor", + "Tag", + "Patch", + "Build" ] }, - "SubnetsFilters": { + "Tools": { "type": "object", "properties": { - "space-tag": { + "sha256": { "type": "string" }, - "zone": { + "size": { + "type": "integer" + }, + "url": { "type": "string" + }, + "version": { + "$ref": "#/definitions/Binary" } }, - "additionalProperties": false + "additionalProperties": false, + "required": [ + "version", + "url", + "size" + ] }, - "SubnetsResult": { + "ToolsResult": { "type": "object", "properties": { "error": { "$ref": "#/definitions/Error" }, - "subnets": { + "tools": { "type": "array", "items": { - "$ref": "#/definitions/SubnetV2" + "$ref": "#/definitions/Tools" } } }, - "additionalProperties": false + "additionalProperties": false, + "required": [ + "tools" + ] }, - "SubnetsResults": { + "ToolsResults": { "type": "object", "properties": { "results": { "type": "array", "items": { - "$ref": "#/definitions/SubnetsResult" + "$ref": "#/definitions/ToolsResult" } } }, @@ -16942,32 +51606,37 @@ "results" ] }, - "ZoneResult": { + "Version": { "type": "object", "properties": { - "available": { - "type": "boolean" - }, - "error": { - "$ref": "#/definitions/Error" - }, - "name": { - "type": "string" + "version": { + "$ref": "#/definitions/Binary" } }, "additionalProperties": false, "required": [ - "name", - "available" + "version" ] }, - "ZoneResults": { + "VersionResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "version": { + "$ref": "#/definitions/Number" + } + }, + "additionalProperties": false + }, + "VersionResults": { "type": "object", "properties": { "results": { "type": "array", "items": { - "$ref": "#/definitions/ZoneResult" + "$ref": "#/definitions/VersionResult" } } }, @@ -17402,5 +52071,193 @@ } } } + }, + { + "Name": "VolumeAttachmentPlansWatcher", + "Description": "srvMachineStorageIdsWatcher defines the API wrapping a state.StringsWatcher\nwatching machine/storage attachments. This watcher notifies about storage\nentities (volumes/filesystems) being attached to and detached from machines.\n\nTODO(axw) state needs a new watcher, this is a bt of a hack. State watchers\ncould do with some deduplication of logic, and I don't want to add to that\nspaghetti right now.", + "Version": 1, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "Next": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/MachineStorageIdsWatchResult" + } + }, + "description": "Next returns when a change has occurred to an entity of the\ncollection being watched since the most recent call to Next\nor the Watch call that created the srvMachineStorageIdsWatcher." + }, + "Stop": { + "type": "object", + "description": "Stop stops the watcher." + } + }, + "definitions": { + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "MachineStorageId": { + "type": "object", + "properties": { + "attachment-tag": { + "type": "string" + }, + "machine-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "machine-tag", + "attachment-tag" + ] + }, + "MachineStorageIdsWatchResult": { + "type": "object", + "properties": { + "changes": { + "type": "array", + "items": { + "$ref": "#/definitions/MachineStorageId" + } + }, + "error": { + "$ref": "#/definitions/Error" + }, + "watcher-id": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "watcher-id", + "changes" + ] + } + } + } + }, + { + "Name": "VolumeAttachmentsWatcher", + "Description": "srvMachineStorageIdsWatcher defines the API wrapping a state.StringsWatcher\nwatching machine/storage attachments. This watcher notifies about storage\nentities (volumes/filesystems) being attached to and detached from machines.\n\nTODO(axw) state needs a new watcher, this is a bt of a hack. State watchers\ncould do with some deduplication of logic, and I don't want to add to that\nspaghetti right now.", + "Version": 2, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "Next": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/MachineStorageIdsWatchResult" + } + }, + "description": "Next returns when a change has occurred to an entity of the\ncollection being watched since the most recent call to Next\nor the Watch call that created the srvMachineStorageIdsWatcher." + }, + "Stop": { + "type": "object", + "description": "Stop stops the watcher." + } + }, + "definitions": { + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "MachineStorageId": { + "type": "object", + "properties": { + "attachment-tag": { + "type": "string" + }, + "machine-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "machine-tag", + "attachment-tag" + ] + }, + "MachineStorageIdsWatchResult": { + "type": "object", + "properties": { + "changes": { + "type": "array", + "items": { + "$ref": "#/definitions/MachineStorageId" + } + }, + "error": { + "$ref": "#/definitions/Error" + }, + "watcher-id": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "watcher-id", + "changes" + ] + } + } + } } ] \ No newline at end of file diff --git a/juju/client/schemas-juju-3.3.6.json b/juju/client/schemas-juju-3.3.6.json index 88e8102d..74047ac3 100644 --- a/juju/client/schemas-juju-3.3.6.json +++ b/juju/client/schemas-juju-3.3.6.json @@ -546,6 +546,125 @@ } } }, + { + "Name": "ActionPruner", + "Description": "API provides access to the action pruner API.", + "Version": 1, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "ModelConfig": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/ModelConfigResult" + } + }, + "description": "ModelConfig returns the current model's configuration." + }, + "Prune": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ActionPruneArgs" + } + }, + "description": "Prune endpoint removes action entries until\nonly the ones newer than now - p.MaxHistoryTime remain and\nthe history is smaller than p.MaxHistoryMB." + }, + "WatchForModelConfigChanges": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/NotifyWatchResult" + } + }, + "description": "WatchForModelConfigChanges returns a NotifyWatcher that observes\nchanges to the model configuration.\nNote that although the NotifyWatchResult contains an Error field,\nit's not used because we are only returning a single watcher,\nso we use the regular error return." + } + }, + "definitions": { + "ActionPruneArgs": { + "type": "object", + "properties": { + "max-history-mb": { + "type": "integer" + }, + "max-history-time": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "max-history-time", + "max-history-mb" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ModelConfigResult": { + "type": "object", + "properties": { + "config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + } + }, + "additionalProperties": false, + "required": [ + "config" + ] + }, + "NotifyWatchResult": { + "type": "object", + "properties": { + "NotifyWatcherId": { + "type": "string" + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false, + "required": [ + "NotifyWatcherId" + ] + } + } + } + }, { "Name": "Admin", "Description": "admin is the only object that unlogged-in clients can access. It holds any\nmethods that are needed to log in.", @@ -832,192 +951,320 @@ } }, { - "Name": "AllModelWatcher", - "Description": "SrvAllWatcher defines the API methods on a state.Multiwatcher.\nwhich watches any changes to the state. Each client has its own\ncurrent set of watchers, stored in resources. It is used by both\nthe AllWatcher and AllModelWatcher facades.", - "Version": 4, + "Name": "Agent", + "Description": "AgentAPI implements the version 3 of the API provided to an agent.", + "Version": 3, "AvailableTo": [ - "controller-user" + "controller-machine-agent", + "machine-agent", + "unit-agent" ], "Schema": { "type": "object", "properties": { - "Next": { + "ClearReboot": { "type": "object", "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, "Result": { - "$ref": "#/definitions/AllWatcherNextResults" + "$ref": "#/definitions/ErrorResults" } }, - "description": "Next will return the current state of everything on the first call\nand subsequent calls will" + "description": "ClearReboot will clear the reboot flag on provided machines, if it exists." }, - "Stop": { + "CloudSpec": { "type": "object", - "description": "Stop stops the watcher." + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/CloudSpecResults" + } + }, + "description": "CloudSpec returns the model's cloud spec." + }, + "ControllerAPIInfoForModels": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ControllerAPIInfoResults" + } + }, + "description": "ControllerAPIInfoForModels returns the controller api connection details for the specified models." + }, + "ControllerConfig": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/ControllerConfigResult" + } + }, + "description": "ControllerConfig returns the controller's configuration." + }, + "GetCloudSpec": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ModelTag" + }, + "Result": { + "$ref": "#/definitions/CloudSpecResult" + } + }, + "description": "GetCloudSpec constructs the CloudSpec for a validated and authorized model." + }, + "GetEntities": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/AgentGetEntitiesResults" + } + } + }, + "IsMaster": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/IsMasterResult" + } + } + }, + "ModelConfig": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/ModelConfigResult" + } + }, + "description": "ModelConfig returns the current model's configuration." + }, + "SetPasswords": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/EntityPasswords" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "SetPasswords sets the given password for each supplied entity, if possible." + }, + "StateServingInfo": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/StateServingInfo" + } + } + }, + "WatchCloudSpecsChanges": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/NotifyWatchResults" + } + }, + "description": "WatchCloudSpecsChanges returns a watcher for cloud spec changes." + }, + "WatchCredentials": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/NotifyWatchResults" + } + }, + "description": "WatchCredentials watches for changes to the specified credentials." + }, + "WatchForModelConfigChanges": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/NotifyWatchResult" + } + }, + "description": "WatchForModelConfigChanges returns a NotifyWatcher that observes\nchanges to the model configuration.\nNote that although the NotifyWatchResult contains an Error field,\nit's not used because we are only returning a single watcher,\nso we use the regular error return." } }, "definitions": { - "AllWatcherNextResults": { + "AgentGetEntitiesResult": { "type": "object", "properties": { - "deltas": { + "container-type": { + "type": "string" + }, + "error": { + "$ref": "#/definitions/Error" + }, + "jobs": { "type": "array", "items": { - "$ref": "#/definitions/Delta" + "type": "string" } + }, + "life": { + "type": "string" } }, "additionalProperties": false, "required": [ - "deltas" + "life", + "jobs", + "container-type" ] }, - "Delta": { + "AgentGetEntitiesResults": { "type": "object", "properties": { - "entity": { - "type": "object", - "additionalProperties": true - }, - "removed": { - "type": "boolean" + "entities": { + "type": "array", + "items": { + "$ref": "#/definitions/AgentGetEntitiesResult" + } } }, "additionalProperties": false, "required": [ - "removed", - "entity" + "entities" ] - } - } - } - }, - { - "Name": "AllWatcher", - "Description": "SrvAllWatcher defines the API methods on a state.Multiwatcher.\nwhich watches any changes to the state. Each client has its own\ncurrent set of watchers, stored in resources. It is used by both\nthe AllWatcher and AllModelWatcher facades.", - "Version": 3, - "AvailableTo": [ - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "Next": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/AllWatcherNextResults" - } - }, - "description": "Next will return the current state of everything on the first call\nand subsequent calls will" }, - "Stop": { - "type": "object", - "description": "Stop stops the watcher." - } - }, - "definitions": { - "AllWatcherNextResults": { + "CloudCredential": { "type": "object", "properties": { - "deltas": { + "attrs": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "auth-type": { + "type": "string" + }, + "redacted": { "type": "array", "items": { - "$ref": "#/definitions/Delta" + "type": "string" } } }, "additionalProperties": false, "required": [ - "deltas" + "auth-type" ] }, - "Delta": { + "CloudSpec": { "type": "object", "properties": { - "entity": { - "type": "object", - "additionalProperties": true + "cacertificates": { + "type": "array", + "items": { + "type": "string" + } }, - "removed": { + "credential": { + "$ref": "#/definitions/CloudCredential" + }, + "endpoint": { + "type": "string" + }, + "identity-endpoint": { + "type": "string" + }, + "is-controller-cloud": { + "type": "boolean" + }, + "name": { + "type": "string" + }, + "region": { + "type": "string" + }, + "skip-tls-verify": { "type": "boolean" + }, + "storage-endpoint": { + "type": "string" + }, + "type": { + "type": "string" } }, "additionalProperties": false, "required": [ - "removed", - "entity" + "type", + "name" ] - } - } - } - }, - { - "Name": "Annotations", - "Description": "API implements the service interface and is the concrete\nimplementation of the api end point.", - "Version": 2, - "AvailableTo": [ - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "Get": { + }, + "CloudSpecResult": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/Entities" + "error": { + "$ref": "#/definitions/Error" }, - "Result": { - "$ref": "#/definitions/AnnotationsGetResults" + "result": { + "$ref": "#/definitions/CloudSpec" } }, - "description": "Get returns annotations for given entities.\nIf annotations cannot be retrieved for a given entity, an error is returned.\nEach entity is treated independently and, hence, will fail or succeed independently." + "additionalProperties": false }, - "Set": { + "CloudSpecResults": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/AnnotationsSet" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/CloudSpecResult" + } } }, - "description": "Set stores annotations for given entities" - } - }, - "definitions": { - "AnnotationsGetResult": { + "additionalProperties": false + }, + "ControllerAPIInfoResult": { "type": "object", "properties": { - "annotations": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } + "addresses": { + "type": "array", + "items": { + "type": "string" } }, - "entity": { + "cacert": { "type": "string" }, "error": { - "$ref": "#/definitions/ErrorResult" + "$ref": "#/definitions/Error" } }, "additionalProperties": false, "required": [ - "entity", - "annotations" + "addresses", + "cacert" ] }, - "AnnotationsGetResults": { + "ControllerAPIInfoResults": { "type": "object", "properties": { "results": { "type": "array", "items": { - "$ref": "#/definitions/AnnotationsGetResult" + "$ref": "#/definitions/ControllerAPIInfoResult" } } }, @@ -1026,19 +1273,22 @@ "results" ] }, - "AnnotationsSet": { + "ControllerConfigResult": { "type": "object", "properties": { - "annotations": { - "type": "array", - "items": { - "$ref": "#/definitions/EntityAnnotations" + "config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } } } }, "additionalProperties": false, "required": [ - "annotations" + "config" ] }, "Entities": { @@ -1068,25 +1318,35 @@ "tag" ] }, - "EntityAnnotations": { + "EntityPassword": { "type": "object", "properties": { - "annotations": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } + "password": { + "type": "string" }, - "entity": { + "tag": { "type": "string" } }, "additionalProperties": false, "required": [ - "entity", - "annotations" + "tag", + "password" + ] + }, + "EntityPasswords": { + "type": "object", + "properties": { + "changes": { + "type": "array", + "items": { + "$ref": "#/definitions/EntityPassword" + } + } + }, + "additionalProperties": false, + "required": [ + "changes" ] }, "Error": { @@ -1137,694 +1397,36017 @@ "required": [ "results" ] - } - } - } - }, - { - "Name": "Application", - "Description": "APIv19 provides the Application API facade for version 19.", - "Version": 19, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "AddRelation": { + }, + "IsMasterResult": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/AddRelation" - }, - "Result": { - "$ref": "#/definitions/AddRelationResults" + "master": { + "type": "boolean" } }, - "description": "AddRelation adds a relation between the specified endpoints and returns the relation info." + "additionalProperties": false, + "required": [ + "master" + ] }, - "AddUnits": { + "ModelConfigResult": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/AddApplicationUnits" - }, - "Result": { - "$ref": "#/definitions/AddApplicationUnitsResults" + "config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } } }, - "description": "AddUnits adds a given number of units to an application." + "additionalProperties": false, + "required": [ + "config" + ] }, - "ApplicationsInfo": { + "ModelTag": { "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ApplicationInfoResults" - } - }, - "description": "ApplicationsInfo returns applications information." + "additionalProperties": false }, - "CharmConfig": { + "NotifyWatchResult": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/ApplicationGetArgs" + "NotifyWatcherId": { + "type": "string" }, - "Result": { - "$ref": "#/definitions/ApplicationGetConfigResults" + "error": { + "$ref": "#/definitions/Error" } }, - "description": "CharmConfig returns charm config for the input list of applications and\nmodel generations." + "additionalProperties": false, + "required": [ + "NotifyWatcherId" + ] }, - "CharmRelations": { + "NotifyWatchResults": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/ApplicationCharmRelations" - }, - "Result": { - "$ref": "#/definitions/ApplicationCharmRelationsResults" + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/NotifyWatchResult" + } } }, - "description": "CharmRelations implements the server side of Application.CharmRelations." + "additionalProperties": false, + "required": [ + "results" + ] }, - "Consume": { + "StateServingInfo": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/ConsumeApplicationArgs" + "api-port": { + "type": "integer" }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "Consume adds remote applications to the model without creating any\nrelations." - }, - "Deploy": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ApplicationsDeploy" + "ca-private-key": { + "type": "string" }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "Deploy fetches the charms from the charm store and deploys them\nusing the specified placement directives." - }, - "DeployFromRepository": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/DeployFromRepositoryArgs" + "cert": { + "type": "string" }, - "Result": { - "$ref": "#/definitions/DeployFromRepositoryResults" - } - }, - "description": "DeployFromRepository is a one-stop deployment method for repository\ncharms. Only a charm name is required to deploy. If argument validation\nfails, a list of all errors found in validation will be returned. If a\nlocal resource is provided, details required for uploading the validated\nresource will be returned." - }, - "DestroyApplication": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/DestroyApplicationsParams" + "controller-api-port": { + "type": "integer" }, - "Result": { - "$ref": "#/definitions/DestroyApplicationResults" - } - }, - "description": "DestroyApplication removes a given set of applications." - }, - "DestroyConsumedApplications": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/DestroyConsumedApplicationsParams" + "private-key": { + "type": "string" }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "DestroyConsumedApplications removes a given set of consumed (remote) applications." - }, - "DestroyRelation": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/DestroyRelation" - } - }, - "description": "DestroyRelation removes the relation between the\nspecified endpoints or an id." - }, - "DestroyUnit": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/DestroyUnitsParams" + "shared-secret": { + "type": "string" }, - "Result": { - "$ref": "#/definitions/DestroyUnitResults" - } - }, - "description": "DestroyUnit removes a given set of application units." - }, - "Expose": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ApplicationExpose" + "state-port": { + "type": "integer" + }, + "system-identity": { + "type": "string" } }, - "description": "Expose changes the juju-managed firewall to expose any ports that\nwere also explicitly marked by units as open." - }, - "Get": { + "additionalProperties": false, + "required": [ + "api-port", + "state-port", + "cert", + "private-key", + "ca-private-key", + "shared-secret", + "system-identity" + ] + } + } + } + }, + { + "Name": "AgentLifeFlag", + "Description": "", + "Version": 1, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "Life": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/ApplicationGet" + "$ref": "#/definitions/Entities" }, "Result": { - "$ref": "#/definitions/ApplicationGetResults" + "$ref": "#/definitions/LifeResults" } }, - "description": "Get returns the charm configuration for an application." + "description": "Life returns the life status of every supplied entity, where available." }, - "GetCharmURLOrigin": { + "Watch": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/ApplicationGet" + "$ref": "#/definitions/Entities" }, "Result": { - "$ref": "#/definitions/CharmURLOriginResult" + "$ref": "#/definitions/NotifyWatchResults" } }, - "description": "GetCharmURLOrigin returns the charm URL and charm origin the given\napplication is running at present." - }, - "GetConfig": { + "description": "Watch starts an NotifyWatcher for each given entity." + } + }, + "definitions": { + "Entities": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ApplicationGetConfigResults" + "entities": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } } }, - "description": "GetConfig returns the charm config for each of the input applications." + "additionalProperties": false, + "required": [ + "entities" + ] }, - "GetConstraints": { + "Entity": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ApplicationGetConstraintsResults" + "tag": { + "type": "string" } }, - "description": "GetConstraints returns the constraints for a given application." + "additionalProperties": false, + "required": [ + "tag" + ] }, - "Leader": { + "Error": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/Entity" + "code": { + "type": "string" }, - "Result": { - "$ref": "#/definitions/StringResult" + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" } }, - "description": "Leader returns the unit name of the leader for the given application." + "additionalProperties": false, + "required": [ + "message", + "code" + ] }, - "MergeBindings": { + "LifeResult": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/ApplicationMergeBindingsArgs" + "error": { + "$ref": "#/definitions/Error" }, - "Result": { - "$ref": "#/definitions/ErrorResults" + "life": { + "type": "string" } }, - "description": "MergeBindings merges operator-defined bindings with the current bindings for\none or more applications." + "additionalProperties": false, + "required": [ + "life" + ] }, - "ResolveUnitErrors": { + "LifeResults": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/UnitsResolved" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/LifeResult" + } } }, - "description": "ResolveUnitErrors marks errors on the specified units as resolved." + "additionalProperties": false, + "required": [ + "results" + ] }, - "ScaleApplications": { + "NotifyWatchResult": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/ScaleApplicationsParams" + "NotifyWatcherId": { + "type": "string" }, - "Result": { - "$ref": "#/definitions/ScaleApplicationResults" + "error": { + "$ref": "#/definitions/Error" } }, - "description": "ScaleApplications scales the specified application to the requested number of units." + "additionalProperties": false, + "required": [ + "NotifyWatcherId" + ] }, - "SetCharm": { + "NotifyWatchResults": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/ApplicationSetCharm" + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/NotifyWatchResult" + } } }, - "description": "SetCharm sets the charm for a given for the application." - }, - "SetConfigs": { + "additionalProperties": false, + "required": [ + "results" + ] + } + } + } + }, + { + "Name": "AgentTools", + "Description": "AgentToolsAPI implements the API used by the machine model worker.", + "Version": 1, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "UpdateToolsAvailable": { + "type": "object", + "description": "UpdateToolsAvailable invokes a lookup and further update in environ\nfor new patches of the current tool versions." + } + } + } + }, + { + "Name": "AllModelWatcher", + "Description": "SrvAllWatcher defines the API methods on a state.Multiwatcher.\nwhich watches any changes to the state. Each client has its own\ncurrent set of watchers, stored in resources. It is used by both\nthe AllWatcher and AllModelWatcher facades.", + "Version": 4, + "AvailableTo": [ + "controller-user" + ], + "Schema": { + "type": "object", + "properties": { + "Next": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/ConfigSetArgs" - }, "Result": { - "$ref": "#/definitions/ErrorResults" + "$ref": "#/definitions/AllWatcherNextResults" } }, - "description": "SetConfigs implements the server side of Application.SetConfig. Both\napplication and charm config are set. It does not unset values in\nConfig map that are set to an empty string. Unset should be used for that." + "description": "Next will return the current state of everything on the first call\nand subsequent calls will" }, - "SetConstraints": { + "Stop": { + "type": "object", + "description": "Stop stops the watcher." + } + }, + "definitions": { + "AllWatcherNextResults": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/SetConstraints" + "deltas": { + "type": "array", + "items": { + "$ref": "#/definitions/Delta" + } } }, - "description": "SetConstraints sets the constraints for a given application." + "additionalProperties": false, + "required": [ + "deltas" + ] }, - "SetMetricCredentials": { + "Delta": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/ApplicationMetricCredentials" + "entity": { + "type": "object", + "additionalProperties": true }, - "Result": { - "$ref": "#/definitions/ErrorResults" + "removed": { + "type": "boolean" } }, - "description": "SetMetricCredentials sets credentials on the application.\nTODO (cderici) only used for metered charms in cmd MeteredDeployAPI,\nkept for client compatibility, remove in juju 4.0" - }, - "SetRelationsSuspended": { + "additionalProperties": false, + "required": [ + "removed", + "entity" + ] + } + } + } + }, + { + "Name": "AllWatcher", + "Description": "SrvAllWatcher defines the API methods on a state.Multiwatcher.\nwhich watches any changes to the state. Each client has its own\ncurrent set of watchers, stored in resources. It is used by both\nthe AllWatcher and AllModelWatcher facades.", + "Version": 3, + "AvailableTo": [ + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "Next": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/RelationSuspendedArgs" - }, "Result": { - "$ref": "#/definitions/ErrorResults" + "$ref": "#/definitions/AllWatcherNextResults" } }, - "description": "SetRelationsSuspended sets the suspended status of the specified relations." + "description": "Next will return the current state of everything on the first call\nand subsequent calls will" }, - "Unexpose": { + "Stop": { + "type": "object", + "description": "Stop stops the watcher." + } + }, + "definitions": { + "AllWatcherNextResults": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/ApplicationUnexpose" + "deltas": { + "type": "array", + "items": { + "$ref": "#/definitions/Delta" + } } }, - "description": "Unexpose changes the juju-managed firewall to unexpose any ports that\nwere also explicitly marked by units as open." + "additionalProperties": false, + "required": [ + "deltas" + ] }, - "UnitsInfo": { + "Delta": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/Entities" + "entity": { + "type": "object", + "additionalProperties": true }, - "Result": { - "$ref": "#/definitions/UnitInfoResults" + "removed": { + "type": "boolean" } }, - "description": "UnitsInfo returns unit information for the given entities (units or\napplications)." - }, - "UnsetApplicationsConfig": { + "additionalProperties": false, + "required": [ + "removed", + "entity" + ] + } + } + } + }, + { + "Name": "Annotations", + "Description": "API implements the service interface and is the concrete\nimplementation of the api end point.", + "Version": 2, + "AvailableTo": [ + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "Get": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/ApplicationConfigUnsetArgs" + "$ref": "#/definitions/Entities" }, "Result": { - "$ref": "#/definitions/ErrorResults" + "$ref": "#/definitions/AnnotationsGetResults" } }, - "description": "UnsetApplicationsConfig implements the server side of Application.UnsetApplicationsConfig." + "description": "Get returns annotations for given entities.\nIf annotations cannot be retrieved for a given entity, an error is returned.\nEach entity is treated independently and, hence, will fail or succeed independently." }, - "UpdateApplicationBase": { + "Set": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/UpdateChannelArgs" + "$ref": "#/definitions/AnnotationsSet" }, "Result": { "$ref": "#/definitions/ErrorResults" } }, - "description": "UpdateApplicationBase updates the application base.\nBase for subordinates is updated too." + "description": "Set stores annotations for given entities" } }, "definitions": { - "AddApplicationUnits": { + "AnnotationsGetResult": { "type": "object", "properties": { - "application": { - "type": "string" - }, - "attach-storage": { - "type": "array", - "items": { - "type": "string" - } - }, - "num-units": { - "type": "integer" - }, - "placement": { - "type": "array", - "items": { - "$ref": "#/definitions/Placement" + "annotations": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } } }, - "policy": { + "entity": { "type": "string" + }, + "error": { + "$ref": "#/definitions/ErrorResult" } }, "additionalProperties": false, "required": [ - "application", - "num-units", - "placement" + "entity", + "annotations" ] }, - "AddApplicationUnitsResults": { + "AnnotationsGetResults": { "type": "object", "properties": { - "units": { + "results": { "type": "array", "items": { - "type": "string" + "$ref": "#/definitions/AnnotationsGetResult" } } }, "additionalProperties": false, "required": [ - "units" + "results" ] }, - "AddRelation": { + "AnnotationsSet": { "type": "object", "properties": { - "endpoints": { - "type": "array", - "items": { - "type": "string" - } - }, - "via-cidrs": { + "annotations": { "type": "array", "items": { - "type": "string" + "$ref": "#/definitions/EntityAnnotations" } } }, "additionalProperties": false, "required": [ - "endpoints" + "annotations" ] }, - "AddRelationResults": { + "Entities": { "type": "object", "properties": { - "endpoints": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmRelation" - } + "entities": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" } } }, "additionalProperties": false, "required": [ - "endpoints" + "entities" + ] + }, + "Entity": { + "type": "object", + "properties": { + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag" + ] + }, + "EntityAnnotations": { + "type": "object", + "properties": { + "annotations": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "entity": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "entity", + "annotations" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ErrorResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "ErrorResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + } + } + } + }, + { + "Name": "Application", + "Description": "APIv19 provides the Application API facade for version 19.", + "Version": 19, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "AddRelation": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/AddRelation" + }, + "Result": { + "$ref": "#/definitions/AddRelationResults" + } + }, + "description": "AddRelation adds a relation between the specified endpoints and returns the relation info." + }, + "AddUnits": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/AddApplicationUnits" + }, + "Result": { + "$ref": "#/definitions/AddApplicationUnitsResults" + } + }, + "description": "AddUnits adds a given number of units to an application." + }, + "ApplicationsInfo": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ApplicationInfoResults" + } + }, + "description": "ApplicationsInfo returns applications information." + }, + "CharmConfig": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ApplicationGetArgs" + }, + "Result": { + "$ref": "#/definitions/ApplicationGetConfigResults" + } + }, + "description": "CharmConfig returns charm config for the input list of applications and\nmodel generations." + }, + "CharmRelations": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ApplicationCharmRelations" + }, + "Result": { + "$ref": "#/definitions/ApplicationCharmRelationsResults" + } + }, + "description": "CharmRelations implements the server side of Application.CharmRelations." + }, + "Consume": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ConsumeApplicationArgs" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "Consume adds remote applications to the model without creating any\nrelations." + }, + "Deploy": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ApplicationsDeploy" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "Deploy fetches the charms from the charm store and deploys them\nusing the specified placement directives." + }, + "DeployFromRepository": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/DeployFromRepositoryArgs" + }, + "Result": { + "$ref": "#/definitions/DeployFromRepositoryResults" + } + }, + "description": "DeployFromRepository is a one-stop deployment method for repository\ncharms. Only a charm name is required to deploy. If argument validation\nfails, a list of all errors found in validation will be returned. If a\nlocal resource is provided, details required for uploading the validated\nresource will be returned." + }, + "DestroyApplication": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/DestroyApplicationsParams" + }, + "Result": { + "$ref": "#/definitions/DestroyApplicationResults" + } + }, + "description": "DestroyApplication removes a given set of applications." + }, + "DestroyConsumedApplications": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/DestroyConsumedApplicationsParams" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "DestroyConsumedApplications removes a given set of consumed (remote) applications." + }, + "DestroyRelation": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/DestroyRelation" + } + }, + "description": "DestroyRelation removes the relation between the\nspecified endpoints or an id." + }, + "DestroyUnit": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/DestroyUnitsParams" + }, + "Result": { + "$ref": "#/definitions/DestroyUnitResults" + } + }, + "description": "DestroyUnit removes a given set of application units." + }, + "Expose": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ApplicationExpose" + } + }, + "description": "Expose changes the juju-managed firewall to expose any ports that\nwere also explicitly marked by units as open." + }, + "Get": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ApplicationGet" + }, + "Result": { + "$ref": "#/definitions/ApplicationGetResults" + } + }, + "description": "Get returns the charm configuration for an application." + }, + "GetCharmURLOrigin": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ApplicationGet" + }, + "Result": { + "$ref": "#/definitions/CharmURLOriginResult" + } + }, + "description": "GetCharmURLOrigin returns the charm URL and charm origin the given\napplication is running at present." + }, + "GetConfig": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ApplicationGetConfigResults" + } + }, + "description": "GetConfig returns the charm config for each of the input applications." + }, + "GetConstraints": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ApplicationGetConstraintsResults" + } + }, + "description": "GetConstraints returns the constraints for a given application." + }, + "Leader": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entity" + }, + "Result": { + "$ref": "#/definitions/StringResult" + } + }, + "description": "Leader returns the unit name of the leader for the given application." + }, + "MergeBindings": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ApplicationMergeBindingsArgs" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "MergeBindings merges operator-defined bindings with the current bindings for\none or more applications." + }, + "ResolveUnitErrors": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/UnitsResolved" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "ResolveUnitErrors marks errors on the specified units as resolved." + }, + "ScaleApplications": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ScaleApplicationsParams" + }, + "Result": { + "$ref": "#/definitions/ScaleApplicationResults" + } + }, + "description": "ScaleApplications scales the specified application to the requested number of units." + }, + "SetCharm": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ApplicationSetCharm" + } + }, + "description": "SetCharm sets the charm for a given for the application." + }, + "SetConfigs": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ConfigSetArgs" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "SetConfigs implements the server side of Application.SetConfig. Both\napplication and charm config are set. It does not unset values in\nConfig map that are set to an empty string. Unset should be used for that." + }, + "SetConstraints": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/SetConstraints" + } + }, + "description": "SetConstraints sets the constraints for a given application." + }, + "SetMetricCredentials": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ApplicationMetricCredentials" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "SetMetricCredentials sets credentials on the application.\nTODO (cderici) only used for metered charms in cmd MeteredDeployAPI,\nkept for client compatibility, remove in juju 4.0" + }, + "SetRelationsSuspended": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/RelationSuspendedArgs" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "SetRelationsSuspended sets the suspended status of the specified relations." + }, + "Unexpose": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ApplicationUnexpose" + } + }, + "description": "Unexpose changes the juju-managed firewall to unexpose any ports that\nwere also explicitly marked by units as open." + }, + "UnitsInfo": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/UnitInfoResults" + } + }, + "description": "UnitsInfo returns unit information for the given entities (units or\napplications)." + }, + "UnsetApplicationsConfig": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ApplicationConfigUnsetArgs" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "UnsetApplicationsConfig implements the server side of Application.UnsetApplicationsConfig." + }, + "UpdateApplicationBase": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/UpdateChannelArgs" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "UpdateApplicationBase updates the application base.\nBase for subordinates is updated too." + } + }, + "definitions": { + "AddApplicationUnits": { + "type": "object", + "properties": { + "application": { + "type": "string" + }, + "attach-storage": { + "type": "array", + "items": { + "type": "string" + } + }, + "num-units": { + "type": "integer" + }, + "placement": { + "type": "array", + "items": { + "$ref": "#/definitions/Placement" + } + }, + "policy": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "application", + "num-units", + "placement" + ] + }, + "AddApplicationUnitsResults": { + "type": "object", + "properties": { + "units": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "units" + ] + }, + "AddRelation": { + "type": "object", + "properties": { + "endpoints": { + "type": "array", + "items": { + "type": "string" + } + }, + "via-cidrs": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "endpoints" + ] + }, + "AddRelationResults": { + "type": "object", + "properties": { + "endpoints": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmRelation" + } + } + } + }, + "additionalProperties": false, + "required": [ + "endpoints" + ] + }, + "ApplicationCharmRelations": { + "type": "object", + "properties": { + "application": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "application" + ] + }, + "ApplicationCharmRelationsResults": { + "type": "object", + "properties": { + "charm-relations": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "charm-relations" + ] + }, + "ApplicationConfigUnsetArgs": { + "type": "object", + "properties": { + "Args": { + "type": "array", + "items": { + "$ref": "#/definitions/ApplicationUnset" + } + } + }, + "additionalProperties": false, + "required": [ + "Args" + ] + }, + "ApplicationConstraint": { + "type": "object", + "properties": { + "constraints": { + "$ref": "#/definitions/Value" + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false, + "required": [ + "constraints" + ] + }, + "ApplicationDeploy": { + "type": "object", + "properties": { + "Force": { + "type": "boolean" + }, + "application": { + "type": "string" + }, + "attach-storage": { + "type": "array", + "items": { + "type": "string" + } + }, + "channel": { + "type": "string" + }, + "charm-origin": { + "$ref": "#/definitions/CharmOrigin" + }, + "charm-url": { + "type": "string" + }, + "config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "config-yaml": { + "type": "string" + }, + "constraints": { + "$ref": "#/definitions/Value" + }, + "devices": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/Constraints" + } + } + }, + "endpoint-bindings": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "num-units": { + "type": "integer" + }, + "placement": { + "type": "array", + "items": { + "$ref": "#/definitions/Placement" + } + }, + "policy": { + "type": "string" + }, + "resources": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "storage": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/Constraints" + } + } + } + }, + "additionalProperties": false, + "required": [ + "application", + "charm-url", + "channel", + "num-units", + "config-yaml", + "constraints", + "Force" + ] + }, + "ApplicationExpose": { + "type": "object", + "properties": { + "application": { + "type": "string" + }, + "exposed-endpoints": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/ExposedEndpoint" + } + } + } + }, + "additionalProperties": false, + "required": [ + "application" + ] + }, + "ApplicationGet": { + "type": "object", + "properties": { + "application": { + "type": "string" + }, + "branch": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "application", + "branch" + ] + }, + "ApplicationGetArgs": { + "type": "object", + "properties": { + "args": { + "type": "array", + "items": { + "$ref": "#/definitions/ApplicationGet" + } + } + }, + "additionalProperties": false, + "required": [ + "args" + ] + }, + "ApplicationGetConfigResults": { + "type": "object", + "properties": { + "Results": { + "type": "array", + "items": { + "$ref": "#/definitions/ConfigResult" + } + } + }, + "additionalProperties": false, + "required": [ + "Results" + ] + }, + "ApplicationGetConstraintsResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ApplicationConstraint" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "ApplicationGetResults": { + "type": "object", + "properties": { + "application": { + "type": "string" + }, + "application-config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "base": { + "$ref": "#/definitions/Base" + }, + "channel": { + "type": "string" + }, + "charm": { + "type": "string" + }, + "config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "constraints": { + "$ref": "#/definitions/Value" + }, + "endpoint-bindings": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + } + }, + "additionalProperties": false, + "required": [ + "application", + "charm", + "config", + "constraints", + "base", + "channel" + ] + }, + "ApplicationInfoResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "$ref": "#/definitions/ApplicationResult" + } + }, + "additionalProperties": false + }, + "ApplicationInfoResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ApplicationInfoResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "ApplicationMergeBindings": { + "type": "object", + "properties": { + "application-tag": { + "type": "string" + }, + "bindings": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "force": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "application-tag", + "bindings", + "force" + ] + }, + "ApplicationMergeBindingsArgs": { + "type": "object", + "properties": { + "args": { + "type": "array", + "items": { + "$ref": "#/definitions/ApplicationMergeBindings" + } + } + }, + "additionalProperties": false, + "required": [ + "args" + ] + }, + "ApplicationMetricCredential": { + "type": "object", + "properties": { + "application": { + "type": "string" + }, + "metrics-credentials": { + "type": "array", + "items": { + "type": "integer" + } + } + }, + "additionalProperties": false, + "required": [ + "application", + "metrics-credentials" + ] + }, + "ApplicationMetricCredentials": { + "type": "object", + "properties": { + "creds": { + "type": "array", + "items": { + "$ref": "#/definitions/ApplicationMetricCredential" + } + } + }, + "additionalProperties": false, + "required": [ + "creds" + ] + }, + "ApplicationOfferDetails": { + "type": "object", + "properties": { + "application-description": { + "type": "string" + }, + "bindings": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "endpoints": { + "type": "array", + "items": { + "$ref": "#/definitions/RemoteEndpoint" + } + }, + "offer-name": { + "type": "string" + }, + "offer-url": { + "type": "string" + }, + "offer-uuid": { + "type": "string" + }, + "source-model-tag": { + "type": "string" + }, + "spaces": { + "type": "array", + "items": { + "$ref": "#/definitions/RemoteSpace" + } + }, + "users": { + "type": "array", + "items": { + "$ref": "#/definitions/OfferUserDetails" + } + } + }, + "additionalProperties": false, + "required": [ + "source-model-tag", + "offer-uuid", + "offer-url", + "offer-name", + "application-description" + ] + }, + "ApplicationResult": { + "type": "object", + "properties": { + "base": { + "$ref": "#/definitions/Base" + }, + "channel": { + "type": "string" + }, + "charm": { + "type": "string" + }, + "constraints": { + "$ref": "#/definitions/Value" + }, + "endpoint-bindings": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "exposed": { + "type": "boolean" + }, + "exposed-endpoints": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/ExposedEndpoint" + } + } + }, + "life": { + "type": "string" + }, + "principal": { + "type": "boolean" + }, + "remote": { + "type": "boolean" + }, + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag", + "principal", + "exposed", + "remote", + "life" + ] + }, + "ApplicationSetCharm": { + "type": "object", + "properties": { + "application": { + "type": "string" + }, + "channel": { + "type": "string" + }, + "charm-origin": { + "$ref": "#/definitions/CharmOrigin" + }, + "charm-url": { + "type": "string" + }, + "config-settings": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "config-settings-yaml": { + "type": "string" + }, + "endpoint-bindings": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "force": { + "type": "boolean" + }, + "force-base": { + "type": "boolean" + }, + "force-units": { + "type": "boolean" + }, + "generation": { + "type": "string" + }, + "resource-ids": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "storage-constraints": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/StorageConstraints" + } + } + } + }, + "additionalProperties": false, + "required": [ + "application", + "generation", + "charm-url", + "channel", + "force", + "force-units", + "force-base" + ] + }, + "ApplicationUnexpose": { + "type": "object", + "properties": { + "application": { + "type": "string" + }, + "exposed-endpoints": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "application", + "exposed-endpoints" + ] + }, + "ApplicationUnset": { + "type": "object", + "properties": { + "application": { + "type": "string" + }, + "branch": { + "type": "string" + }, + "options": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "application", + "branch", + "options" + ] + }, + "ApplicationsDeploy": { + "type": "object", + "properties": { + "applications": { + "type": "array", + "items": { + "$ref": "#/definitions/ApplicationDeploy" + } + } + }, + "additionalProperties": false, + "required": [ + "applications" + ] + }, + "Base": { + "type": "object", + "properties": { + "channel": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "channel" + ] + }, + "CharmOrigin": { + "type": "object", + "properties": { + "architecture": { + "type": "string" + }, + "base": { + "$ref": "#/definitions/Base" + }, + "branch": { + "type": "string" + }, + "hash": { + "type": "string" + }, + "id": { + "type": "string" + }, + "instance-key": { + "type": "string" + }, + "revision": { + "type": "integer" + }, + "risk": { + "type": "string" + }, + "source": { + "type": "string" + }, + "track": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "source", + "type", + "id" + ] + }, + "CharmRelation": { + "type": "object", + "properties": { + "interface": { + "type": "string" + }, + "limit": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "optional": { + "type": "boolean" + }, + "role": { + "type": "string" + }, + "scope": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "role", + "interface", + "optional", + "limit", + "scope" + ] + }, + "CharmURLOriginResult": { + "type": "object", + "properties": { + "charm-origin": { + "$ref": "#/definitions/CharmOrigin" + }, + "error": { + "$ref": "#/definitions/Error" + }, + "url": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "url", + "charm-origin" + ] + }, + "ConfigResult": { + "type": "object", + "properties": { + "config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false, + "required": [ + "config" + ] + }, + "ConfigSet": { + "type": "object", + "properties": { + "application": { + "type": "string" + }, + "config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "config-yaml": { + "type": "string" + }, + "generation": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "application", + "generation", + "config", + "config-yaml" + ] + }, + "ConfigSetArgs": { + "type": "object", + "properties": { + "Args": { + "type": "array", + "items": { + "$ref": "#/definitions/ConfigSet" + } + } + }, + "additionalProperties": false, + "required": [ + "Args" + ] + }, + "Constraints": { + "type": "object", + "properties": { + "Count": { + "type": "integer" + }, + "Pool": { + "type": "string" + }, + "Size": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "Pool", + "Size", + "Count" + ] + }, + "ConsumeApplicationArg": { + "type": "object", + "properties": { + "ApplicationOfferDetails": { + "$ref": "#/definitions/ApplicationOfferDetails" + }, + "application-alias": { + "type": "string" + }, + "application-description": { + "type": "string" + }, + "bindings": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "endpoints": { + "type": "array", + "items": { + "$ref": "#/definitions/RemoteEndpoint" + } + }, + "external-controller": { + "$ref": "#/definitions/ExternalControllerInfo" + }, + "macaroon": { + "$ref": "#/definitions/Macaroon" + }, + "offer-name": { + "type": "string" + }, + "offer-url": { + "type": "string" + }, + "offer-uuid": { + "type": "string" + }, + "source-model-tag": { + "type": "string" + }, + "spaces": { + "type": "array", + "items": { + "$ref": "#/definitions/RemoteSpace" + } + }, + "users": { + "type": "array", + "items": { + "$ref": "#/definitions/OfferUserDetails" + } + } + }, + "additionalProperties": false, + "required": [ + "source-model-tag", + "offer-uuid", + "offer-url", + "offer-name", + "application-description", + "ApplicationOfferDetails" + ] + }, + "ConsumeApplicationArgs": { + "type": "object", + "properties": { + "args": { + "type": "array", + "items": { + "$ref": "#/definitions/ConsumeApplicationArg" + } + } + }, + "additionalProperties": false + }, + "DeployFromRepositoryArg": { + "type": "object", + "properties": { + "ApplicationName": { + "type": "string" + }, + "AttachStorage": { + "type": "array", + "items": { + "type": "string" + } + }, + "CharmName": { + "type": "string" + }, + "ConfigYAML": { + "type": "string" + }, + "Cons": { + "$ref": "#/definitions/Value" + }, + "Devices": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/Constraints" + } + } + }, + "DryRun": { + "type": "boolean" + }, + "Placement": { + "type": "array", + "items": { + "$ref": "#/definitions/Placement" + } + }, + "Storage": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/Constraints" + } + } + }, + "Trust": { + "type": "boolean" + }, + "base": { + "$ref": "#/definitions/Base" + }, + "channel": { + "type": "string" + }, + "endpoint-bindings": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "force": { + "type": "boolean" + }, + "num-units": { + "type": "integer" + }, + "resources": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "revision": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "CharmName", + "ApplicationName", + "AttachStorage", + "ConfigYAML", + "Cons", + "Devices", + "DryRun", + "Placement", + "Storage", + "Trust" + ] + }, + "DeployFromRepositoryArgs": { + "type": "object", + "properties": { + "Args": { + "type": "array", + "items": { + "$ref": "#/definitions/DeployFromRepositoryArg" + } + } + }, + "additionalProperties": false, + "required": [ + "Args" + ] + }, + "DeployFromRepositoryInfo": { + "type": "object", + "properties": { + "architecture": { + "type": "string" + }, + "base": { + "$ref": "#/definitions/Base" + }, + "channel": { + "type": "string" + }, + "effective-channel": { + "type": "string" + }, + "name": { + "type": "string" + }, + "revision": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "architecture", + "channel", + "name", + "revision" + ] + }, + "DeployFromRepositoryResult": { + "type": "object", + "properties": { + "Errors": { + "type": "array", + "items": { + "$ref": "#/definitions/Error" + } + }, + "Info": { + "$ref": "#/definitions/DeployFromRepositoryInfo" + }, + "PendingResourceUploads": { + "type": "array", + "items": { + "$ref": "#/definitions/PendingResourceUpload" + } + } + }, + "additionalProperties": false, + "required": [ + "Errors", + "Info", + "PendingResourceUploads" + ] + }, + "DeployFromRepositoryResults": { + "type": "object", + "properties": { + "Results": { + "type": "array", + "items": { + "$ref": "#/definitions/DeployFromRepositoryResult" + } + } + }, + "additionalProperties": false, + "required": [ + "Results" + ] + }, + "DestroyApplicationInfo": { + "type": "object", + "properties": { + "destroyed-storage": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } + }, + "destroyed-units": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } + }, + "detached-storage": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } + } + }, + "additionalProperties": false + }, + "DestroyApplicationParams": { + "type": "object", + "properties": { + "application-tag": { + "type": "string" + }, + "destroy-storage": { + "type": "boolean" + }, + "dry-run": { + "type": "boolean" + }, + "force": { + "type": "boolean" + }, + "max-wait": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "application-tag", + "force" + ] + }, + "DestroyApplicationResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "info": { + "$ref": "#/definitions/DestroyApplicationInfo" + } + }, + "additionalProperties": false + }, + "DestroyApplicationResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/DestroyApplicationResult" + } + } + }, + "additionalProperties": false + }, + "DestroyApplicationsParams": { + "type": "object", + "properties": { + "applications": { + "type": "array", + "items": { + "$ref": "#/definitions/DestroyApplicationParams" + } + } + }, + "additionalProperties": false, + "required": [ + "applications" + ] + }, + "DestroyConsumedApplicationParams": { + "type": "object", + "properties": { + "application-tag": { + "type": "string" + }, + "force": { + "type": "boolean" + }, + "max-wait": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "application-tag" + ] + }, + "DestroyConsumedApplicationsParams": { + "type": "object", + "properties": { + "applications": { + "type": "array", + "items": { + "$ref": "#/definitions/DestroyConsumedApplicationParams" + } + } + }, + "additionalProperties": false, + "required": [ + "applications" + ] + }, + "DestroyRelation": { + "type": "object", + "properties": { + "endpoints": { + "type": "array", + "items": { + "type": "string" + } + }, + "force": { + "type": "boolean" + }, + "max-wait": { + "type": "integer" + }, + "relation-id": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "relation-id" + ] + }, + "DestroyUnitInfo": { + "type": "object", + "properties": { + "destroyed-storage": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } + }, + "detached-storage": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } + } + }, + "additionalProperties": false + }, + "DestroyUnitParams": { + "type": "object", + "properties": { + "destroy-storage": { + "type": "boolean" + }, + "dry-run": { + "type": "boolean" + }, + "force": { + "type": "boolean" + }, + "max-wait": { + "type": "integer" + }, + "unit-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "unit-tag" + ] + }, + "DestroyUnitResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "info": { + "$ref": "#/definitions/DestroyUnitInfo" + } + }, + "additionalProperties": false + }, + "DestroyUnitResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/DestroyUnitResult" + } + } + }, + "additionalProperties": false + }, + "DestroyUnitsParams": { + "type": "object", + "properties": { + "units": { + "type": "array", + "items": { + "$ref": "#/definitions/DestroyUnitParams" + } + } + }, + "additionalProperties": false, + "required": [ + "units" + ] + }, + "EndpointRelationData": { + "type": "object", + "properties": { + "ApplicationData": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "cross-model": { + "type": "boolean" + }, + "endpoint": { + "type": "string" + }, + "related-endpoint": { + "type": "string" + }, + "relation-id": { + "type": "integer" + }, + "unit-relation-data": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/RelationData" + } + } + } + }, + "additionalProperties": false, + "required": [ + "relation-id", + "endpoint", + "cross-model", + "related-endpoint", + "ApplicationData", + "unit-relation-data" + ] + }, + "Entities": { + "type": "object", + "properties": { + "entities": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } + } + }, + "additionalProperties": false, + "required": [ + "entities" + ] + }, + "Entity": { + "type": "object", + "properties": { + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ErrorResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "ErrorResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "ExposedEndpoint": { + "type": "object", + "properties": { + "expose-to-cidrs": { + "type": "array", + "items": { + "type": "string" + } + }, + "expose-to-spaces": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "ExternalControllerInfo": { + "type": "object", + "properties": { + "addrs": { + "type": "array", + "items": { + "type": "string" + } + }, + "ca-cert": { + "type": "string" + }, + "controller-alias": { + "type": "string" + }, + "controller-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "controller-tag", + "controller-alias", + "addrs", + "ca-cert" + ] + }, + "Macaroon": { + "type": "object", + "additionalProperties": false + }, + "OfferUserDetails": { + "type": "object", + "properties": { + "access": { + "type": "string" + }, + "display-name": { + "type": "string" + }, + "user": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "user", + "display-name", + "access" + ] + }, + "PendingResourceUpload": { + "type": "object", + "properties": { + "Filename": { + "type": "string" + }, + "Name": { + "type": "string" + }, + "Type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "Name", + "Filename", + "Type" + ] + }, + "Placement": { + "type": "object", + "properties": { + "directive": { + "type": "string" + }, + "scope": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "scope", + "directive" + ] + }, + "RelationData": { + "type": "object", + "properties": { + "InScope": { + "type": "boolean" + }, + "UnitData": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + } + }, + "additionalProperties": false, + "required": [ + "InScope", + "UnitData" + ] + }, + "RelationSuspendedArg": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "relation-id": { + "type": "integer" + }, + "suspended": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "relation-id", + "message", + "suspended" + ] + }, + "RelationSuspendedArgs": { + "type": "object", + "properties": { + "args": { + "type": "array", + "items": { + "$ref": "#/definitions/RelationSuspendedArg" + } + } + }, + "additionalProperties": false, + "required": [ + "args" + ] + }, + "RemoteEndpoint": { + "type": "object", + "properties": { + "interface": { + "type": "string" + }, + "limit": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "role": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "role", + "interface", + "limit" + ] + }, + "RemoteSpace": { + "type": "object", + "properties": { + "cloud-type": { + "type": "string" + }, + "name": { + "type": "string" + }, + "provider-attributes": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "provider-id": { + "type": "string" + }, + "subnets": { + "type": "array", + "items": { + "$ref": "#/definitions/Subnet" + } + } + }, + "additionalProperties": false, + "required": [ + "cloud-type", + "name", + "provider-id", + "provider-attributes", + "subnets" + ] + }, + "ScaleApplicationInfo": { + "type": "object", + "properties": { + "num-units": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "num-units" + ] + }, + "ScaleApplicationParams": { + "type": "object", + "properties": { + "application-tag": { + "type": "string" + }, + "force": { + "type": "boolean" + }, + "scale": { + "type": "integer" + }, + "scale-change": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "application-tag", + "scale", + "force" + ] + }, + "ScaleApplicationResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "info": { + "$ref": "#/definitions/ScaleApplicationInfo" + } + }, + "additionalProperties": false + }, + "ScaleApplicationResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ScaleApplicationResult" + } + } + }, + "additionalProperties": false + }, + "ScaleApplicationsParams": { + "type": "object", + "properties": { + "applications": { + "type": "array", + "items": { + "$ref": "#/definitions/ScaleApplicationParams" + } + } + }, + "additionalProperties": false, + "required": [ + "applications" + ] + }, + "SetConstraints": { + "type": "object", + "properties": { + "application": { + "type": "string" + }, + "constraints": { + "$ref": "#/definitions/Value" + } + }, + "additionalProperties": false, + "required": [ + "application", + "constraints" + ] + }, + "StorageConstraints": { + "type": "object", + "properties": { + "count": { + "type": "integer" + }, + "pool": { + "type": "string" + }, + "size": { + "type": "integer" + } + }, + "additionalProperties": false + }, + "StringResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "result" + ] + }, + "Subnet": { + "type": "object", + "properties": { + "cidr": { + "type": "string" + }, + "life": { + "type": "string" + }, + "provider-id": { + "type": "string" + }, + "provider-network-id": { + "type": "string" + }, + "provider-space-id": { + "type": "string" + }, + "space-tag": { + "type": "string" + }, + "status": { + "type": "string" + }, + "vlan-tag": { + "type": "integer" + }, + "zones": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "cidr", + "vlan-tag", + "life", + "space-tag", + "zones" + ] + }, + "UnitInfoResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "$ref": "#/definitions/UnitResult" + } + }, + "additionalProperties": false + }, + "UnitInfoResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/UnitInfoResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "UnitResult": { + "type": "object", + "properties": { + "address": { + "type": "string" + }, + "charm": { + "type": "string" + }, + "leader": { + "type": "boolean" + }, + "life": { + "type": "string" + }, + "machine": { + "type": "string" + }, + "opened-ports": { + "type": "array", + "items": { + "type": "string" + } + }, + "provider-id": { + "type": "string" + }, + "public-address": { + "type": "string" + }, + "relation-data": { + "type": "array", + "items": { + "$ref": "#/definitions/EndpointRelationData" + } + }, + "tag": { + "type": "string" + }, + "workload-version": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag", + "workload-version", + "opened-ports", + "charm" + ] + }, + "UnitsResolved": { + "type": "object", + "properties": { + "all": { + "type": "boolean" + }, + "retry": { + "type": "boolean" + }, + "tags": { + "$ref": "#/definitions/Entities" + } + }, + "additionalProperties": false + }, + "UpdateChannelArg": { + "type": "object", + "properties": { + "channel": { + "type": "string" + }, + "force": { + "type": "boolean" + }, + "tag": { + "$ref": "#/definitions/Entity" + } + }, + "additionalProperties": false, + "required": [ + "tag", + "force", + "channel" + ] + }, + "UpdateChannelArgs": { + "type": "object", + "properties": { + "args": { + "type": "array", + "items": { + "$ref": "#/definitions/UpdateChannelArg" + } + } + }, + "additionalProperties": false, + "required": [ + "args" + ] + }, + "Value": { + "type": "object", + "properties": { + "allocate-public-ip": { + "type": "boolean" + }, + "arch": { + "type": "string" + }, + "container": { + "type": "string" + }, + "cores": { + "type": "integer" + }, + "cpu-power": { + "type": "integer" + }, + "image-id": { + "type": "string" + }, + "instance-role": { + "type": "string" + }, + "instance-type": { + "type": "string" + }, + "mem": { + "type": "integer" + }, + "root-disk": { + "type": "integer" + }, + "root-disk-source": { + "type": "string" + }, + "spaces": { + "type": "array", + "items": { + "type": "string" + } + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "virt-type": { + "type": "string" + }, + "zones": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + } + } + } + }, + { + "Name": "ApplicationOffers", + "Description": "OffersAPI implements the cross model interface and is the concrete\nimplementation of the api end point.", + "Version": 4, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "controller-user" + ], + "Schema": { + "type": "object", + "properties": { + "ApplicationOffers": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/OfferURLs" + }, + "Result": { + "$ref": "#/definitions/ApplicationOffersResults" + } + }, + "description": "ApplicationOffers gets details about remote applications that match given URLs." + }, + "DestroyOffers": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/DestroyApplicationOffers" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "DestroyOffers removes the offers specified by the given URLs, forcing if necessary." + }, + "FindApplicationOffers": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/OfferFilters" + }, + "Result": { + "$ref": "#/definitions/QueryApplicationOffersResults" + } + }, + "description": "FindApplicationOffers gets details about remote applications that match given filter." + }, + "GetConsumeDetails": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ConsumeOfferDetailsArg" + }, + "Result": { + "$ref": "#/definitions/ConsumeOfferDetailsResults" + } + }, + "description": "GetConsumeDetails returns the details necessary to pass to another model\nto allow the specified args user to consume the offers represented by the args URLs." + }, + "ListApplicationOffers": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/OfferFilters" + }, + "Result": { + "$ref": "#/definitions/QueryApplicationOffersResults" + } + }, + "description": "ListApplicationOffers gets deployed details about application offers that match given filter.\nThe results contain details about the deployed applications such as connection count." + }, + "ModifyOfferAccess": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ModifyOfferAccessRequest" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "ModifyOfferAccess changes the application offer access granted to users." + }, + "Offer": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/AddApplicationOffers" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "Offer makes application endpoints available for consumption at a specified URL." + }, + "RemoteApplicationInfo": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/OfferURLs" + }, + "Result": { + "$ref": "#/definitions/RemoteApplicationInfoResults" + } + }, + "description": "RemoteApplicationInfo returns information about the requested remote application.\nThis call currently has no client side API, only there for the Dashboard at this stage." + } + }, + "definitions": { + "AddApplicationOffer": { + "type": "object", + "properties": { + "application-description": { + "type": "string" + }, + "application-name": { + "type": "string" + }, + "endpoints": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "model-tag": { + "type": "string" + }, + "offer-name": { + "type": "string" + }, + "owner-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "model-tag", + "offer-name", + "application-name", + "application-description", + "endpoints" + ] + }, + "AddApplicationOffers": { + "type": "object", + "properties": { + "Offers": { + "type": "array", + "items": { + "$ref": "#/definitions/AddApplicationOffer" + } + } + }, + "additionalProperties": false, + "required": [ + "Offers" + ] + }, + "ApplicationOfferAdminDetails": { + "type": "object", + "properties": { + "ApplicationOfferDetails": { + "$ref": "#/definitions/ApplicationOfferDetails" + }, + "application-description": { + "type": "string" + }, + "application-name": { + "type": "string" + }, + "bindings": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "charm-url": { + "type": "string" + }, + "connections": { + "type": "array", + "items": { + "$ref": "#/definitions/OfferConnection" + } + }, + "endpoints": { + "type": "array", + "items": { + "$ref": "#/definitions/RemoteEndpoint" + } + }, + "offer-name": { + "type": "string" + }, + "offer-url": { + "type": "string" + }, + "offer-uuid": { + "type": "string" + }, + "source-model-tag": { + "type": "string" + }, + "spaces": { + "type": "array", + "items": { + "$ref": "#/definitions/RemoteSpace" + } + }, + "users": { + "type": "array", + "items": { + "$ref": "#/definitions/OfferUserDetails" + } + } + }, + "additionalProperties": false, + "required": [ + "source-model-tag", + "offer-uuid", + "offer-url", + "offer-name", + "application-description", + "ApplicationOfferDetails", + "application-name", + "charm-url" + ] + }, + "ApplicationOfferDetails": { + "type": "object", + "properties": { + "application-description": { + "type": "string" + }, + "bindings": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "endpoints": { + "type": "array", + "items": { + "$ref": "#/definitions/RemoteEndpoint" + } + }, + "offer-name": { + "type": "string" + }, + "offer-url": { + "type": "string" + }, + "offer-uuid": { + "type": "string" + }, + "source-model-tag": { + "type": "string" + }, + "spaces": { + "type": "array", + "items": { + "$ref": "#/definitions/RemoteSpace" + } + }, + "users": { + "type": "array", + "items": { + "$ref": "#/definitions/OfferUserDetails" + } + } + }, + "additionalProperties": false, + "required": [ + "source-model-tag", + "offer-uuid", + "offer-url", + "offer-name", + "application-description" + ] + }, + "ApplicationOfferResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "$ref": "#/definitions/ApplicationOfferAdminDetails" + } + }, + "additionalProperties": false + }, + "ApplicationOffersResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ApplicationOfferResult" + } + } + }, + "additionalProperties": false + }, + "ConsumeOfferDetails": { + "type": "object", + "properties": { + "external-controller": { + "$ref": "#/definitions/ExternalControllerInfo" + }, + "macaroon": { + "$ref": "#/definitions/Macaroon" + }, + "offer": { + "$ref": "#/definitions/ApplicationOfferDetails" + } + }, + "additionalProperties": false + }, + "ConsumeOfferDetailsArg": { + "type": "object", + "properties": { + "offer-urls": { + "$ref": "#/definitions/OfferURLs" + }, + "user-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "offer-urls" + ] + }, + "ConsumeOfferDetailsResult": { + "type": "object", + "properties": { + "ConsumeOfferDetails": { + "$ref": "#/definitions/ConsumeOfferDetails" + }, + "error": { + "$ref": "#/definitions/Error" + }, + "external-controller": { + "$ref": "#/definitions/ExternalControllerInfo" + }, + "macaroon": { + "$ref": "#/definitions/Macaroon" + }, + "offer": { + "$ref": "#/definitions/ApplicationOfferDetails" + } + }, + "additionalProperties": false, + "required": [ + "ConsumeOfferDetails" + ] + }, + "ConsumeOfferDetailsResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ConsumeOfferDetailsResult" + } + } + }, + "additionalProperties": false + }, + "DestroyApplicationOffers": { + "type": "object", + "properties": { + "force": { + "type": "boolean" + }, + "offer-urls": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "offer-urls" + ] + }, + "EndpointFilterAttributes": { + "type": "object", + "properties": { + "interface": { + "type": "string" + }, + "name": { + "type": "string" + }, + "role": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "role", + "interface", + "name" + ] + }, + "EntityStatus": { + "type": "object", + "properties": { + "data": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "info": { + "type": "string" + }, + "since": { + "type": "string", + "format": "date-time" + }, + "status": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "status", + "info", + "since" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ErrorResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "ErrorResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "ExternalControllerInfo": { + "type": "object", + "properties": { + "addrs": { + "type": "array", + "items": { + "type": "string" + } + }, + "ca-cert": { + "type": "string" + }, + "controller-alias": { + "type": "string" + }, + "controller-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "controller-tag", + "controller-alias", + "addrs", + "ca-cert" + ] + }, + "Macaroon": { + "type": "object", + "additionalProperties": false + }, + "ModifyOfferAccess": { + "type": "object", + "properties": { + "access": { + "type": "string" + }, + "action": { + "type": "string" + }, + "offer-url": { + "type": "string" + }, + "user-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "user-tag", + "action", + "access", + "offer-url" + ] + }, + "ModifyOfferAccessRequest": { + "type": "object", + "properties": { + "changes": { + "type": "array", + "items": { + "$ref": "#/definitions/ModifyOfferAccess" + } + } + }, + "additionalProperties": false, + "required": [ + "changes" + ] + }, + "OfferConnection": { + "type": "object", + "properties": { + "endpoint": { + "type": "string" + }, + "ingress-subnets": { + "type": "array", + "items": { + "type": "string" + } + }, + "relation-id": { + "type": "integer" + }, + "source-model-tag": { + "type": "string" + }, + "status": { + "$ref": "#/definitions/EntityStatus" + }, + "username": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "source-model-tag", + "relation-id", + "username", + "endpoint", + "status", + "ingress-subnets" + ] + }, + "OfferFilter": { + "type": "object", + "properties": { + "allowed-users": { + "type": "array", + "items": { + "type": "string" + } + }, + "application-description": { + "type": "string" + }, + "application-name": { + "type": "string" + }, + "application-user": { + "type": "string" + }, + "connected-users": { + "type": "array", + "items": { + "type": "string" + } + }, + "endpoints": { + "type": "array", + "items": { + "$ref": "#/definitions/EndpointFilterAttributes" + } + }, + "model-name": { + "type": "string" + }, + "offer-name": { + "type": "string" + }, + "owner-name": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "owner-name", + "model-name", + "offer-name", + "application-name", + "application-description", + "application-user", + "endpoints", + "connected-users", + "allowed-users" + ] + }, + "OfferFilters": { + "type": "object", + "properties": { + "Filters": { + "type": "array", + "items": { + "$ref": "#/definitions/OfferFilter" + } + } + }, + "additionalProperties": false, + "required": [ + "Filters" + ] + }, + "OfferURLs": { + "type": "object", + "properties": { + "bakery-version": { + "type": "integer" + }, + "offer-urls": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "OfferUserDetails": { + "type": "object", + "properties": { + "access": { + "type": "string" + }, + "display-name": { + "type": "string" + }, + "user": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "user", + "display-name", + "access" + ] + }, + "QueryApplicationOffersResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ApplicationOfferAdminDetails" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "RemoteApplicationInfo": { + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "endpoints": { + "type": "array", + "items": { + "$ref": "#/definitions/RemoteEndpoint" + } + }, + "icon-url-path": { + "type": "string" + }, + "model-tag": { + "type": "string" + }, + "name": { + "type": "string" + }, + "offer-url": { + "type": "string" + }, + "source-model-label": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "model-tag", + "name", + "description", + "offer-url", + "endpoints", + "icon-url-path" + ] + }, + "RemoteApplicationInfoResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "$ref": "#/definitions/RemoteApplicationInfo" + } + }, + "additionalProperties": false + }, + "RemoteApplicationInfoResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/RemoteApplicationInfoResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "RemoteEndpoint": { + "type": "object", + "properties": { + "interface": { + "type": "string" + }, + "limit": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "role": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "role", + "interface", + "limit" + ] + }, + "RemoteSpace": { + "type": "object", + "properties": { + "cloud-type": { + "type": "string" + }, + "name": { + "type": "string" + }, + "provider-attributes": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "provider-id": { + "type": "string" + }, + "subnets": { + "type": "array", + "items": { + "$ref": "#/definitions/Subnet" + } + } + }, + "additionalProperties": false, + "required": [ + "cloud-type", + "name", + "provider-id", + "provider-attributes", + "subnets" + ] + }, + "Subnet": { + "type": "object", + "properties": { + "cidr": { + "type": "string" + }, + "life": { + "type": "string" + }, + "provider-id": { + "type": "string" + }, + "provider-network-id": { + "type": "string" + }, + "provider-space-id": { + "type": "string" + }, + "space-tag": { + "type": "string" + }, + "status": { + "type": "string" + }, + "vlan-tag": { + "type": "integer" + }, + "zones": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "cidr", + "vlan-tag", + "life", + "space-tag", + "zones" + ] + } + } + } + }, + { + "Name": "ApplicationScaler", + "Description": "Facade allows model-manager clients to watch and rescale services.", + "Version": 1, + "AvailableTo": [ + "controller-machine-agent" + ], + "Schema": { + "type": "object", + "properties": { + "Rescale": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "Rescale causes any supplied services to be scaled up to their\nminimum size." + }, + "Watch": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/StringsWatchResult" + } + }, + "description": "Watch returns a watcher that sends the names of services whose\nunit count may be below their configured minimum." + } + }, + "definitions": { + "Entities": { + "type": "object", + "properties": { + "entities": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } + } + }, + "additionalProperties": false, + "required": [ + "entities" + ] + }, + "Entity": { + "type": "object", + "properties": { + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ErrorResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "ErrorResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "StringsWatchResult": { + "type": "object", + "properties": { + "changes": { + "type": "array", + "items": { + "type": "string" + } + }, + "error": { + "$ref": "#/definitions/Error" + }, + "watcher-id": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "watcher-id" + ] + } + } + } + }, + { + "Name": "Backups", + "Description": "API provides backup-specific API methods.", + "Version": 3, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "Create": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/BackupsCreateArgs" + }, + "Result": { + "$ref": "#/definitions/BackupsMetadataResult" + } + }, + "description": "Create is the API method that requests juju to create a new backup\nof its state." + } + }, + "definitions": { + "BackupsCreateArgs": { + "type": "object", + "properties": { + "no-download": { + "type": "boolean" + }, + "notes": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "notes", + "no-download" + ] + }, + "BackupsMetadataResult": { + "type": "object", + "properties": { + "base": { + "type": "string" + }, + "checksum": { + "type": "string" + }, + "checksum-format": { + "type": "string" + }, + "controller-machine-id": { + "type": "string" + }, + "controller-machine-inst-id": { + "type": "string" + }, + "controller-uuid": { + "type": "string" + }, + "filename": { + "type": "string" + }, + "finished": { + "type": "string", + "format": "date-time" + }, + "format-version": { + "type": "integer" + }, + "ha-nodes": { + "type": "integer" + }, + "hostname": { + "type": "string" + }, + "id": { + "type": "string" + }, + "machine": { + "type": "string" + }, + "model": { + "type": "string" + }, + "notes": { + "type": "string" + }, + "size": { + "type": "integer" + }, + "started": { + "type": "string", + "format": "date-time" + }, + "stored": { + "type": "string", + "format": "date-time" + }, + "version": { + "$ref": "#/definitions/Number" + } + }, + "additionalProperties": false, + "required": [ + "id", + "checksum", + "checksum-format", + "size", + "stored", + "started", + "finished", + "notes", + "model", + "machine", + "hostname", + "version", + "base", + "filename", + "format-version", + "controller-uuid", + "controller-machine-id", + "controller-machine-inst-id", + "ha-nodes" + ] + }, + "Number": { + "type": "object", + "properties": { + "Build": { + "type": "integer" + }, + "Major": { + "type": "integer" + }, + "Minor": { + "type": "integer" + }, + "Patch": { + "type": "integer" + }, + "Tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "Major", + "Minor", + "Tag", + "Patch", + "Build" + ] + } + } + } + }, + { + "Name": "Block", + "Description": "API implements Block interface and is the concrete\nimplementation of the api end point.", + "Version": 2, + "AvailableTo": [ + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "List": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/BlockResults" + } + }, + "description": "List implements Block.List()." + }, + "SwitchBlockOff": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/BlockSwitchParams" + }, + "Result": { + "$ref": "#/definitions/ErrorResult" + } + }, + "description": "SwitchBlockOff implements Block.SwitchBlockOff()." + }, + "SwitchBlockOn": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/BlockSwitchParams" + }, + "Result": { + "$ref": "#/definitions/ErrorResult" + } + }, + "description": "SwitchBlockOn implements Block.SwitchBlockOn()." + } + }, + "definitions": { + "Block": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "message": { + "type": "string" + }, + "tag": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "id", + "tag", + "type" + ] + }, + "BlockResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "$ref": "#/definitions/Block" + } + }, + "additionalProperties": false, + "required": [ + "result" + ] + }, + "BlockResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/BlockResult" + } + } + }, + "additionalProperties": false + }, + "BlockSwitchParams": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "type" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ErrorResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + } + } + } + }, + { + "Name": "Bundle", + "Description": "APIv6 provides the Bundle API facade for version 6. It is otherwise\nidentical to V5 with the exception that the V6 adds the support for\nmulti-part yaml handling to GetChanges and GetChangesMapArgs.", + "Version": 6, + "AvailableTo": [ + "controller-user", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "ExportBundle": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ExportBundleParams" + }, + "Result": { + "$ref": "#/definitions/StringResult" + } + }, + "description": "ExportBundle exports the current model configuration as bundle." + }, + "GetChanges": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/BundleChangesParams" + }, + "Result": { + "$ref": "#/definitions/BundleChangesResults" + } + }, + "description": "GetChanges returns the list of changes required to deploy the given bundle\ndata. The changes are sorted by requirements, so that they can be applied in\norder.\nGetChanges has been superseded in favour of GetChangesMapArgs. It's\npreferable to use that new method to add new functionality and move clients\naway from this one." + }, + "GetChangesMapArgs": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/BundleChangesParams" + }, + "Result": { + "$ref": "#/definitions/BundleChangesMapArgsResults" + } + }, + "description": "GetChangesMapArgs returns the list of changes required to deploy the given\nbundle data. The changes are sorted by requirements, so that they can be\napplied in order.\nV4 GetChangesMapArgs is not supported on anything less than v4" + } + }, + "definitions": { + "BundleChange": { + "type": "object", + "properties": { + "args": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true + } + }, + "id": { + "type": "string" + }, + "method": { + "type": "string" + }, + "requires": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "id", + "method", + "args", + "requires" + ] + }, + "BundleChangesMapArgs": { + "type": "object", + "properties": { + "args": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "id": { + "type": "string" + }, + "method": { + "type": "string" + }, + "requires": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "id", + "method", + "args", + "requires" + ] + }, + "BundleChangesMapArgsResults": { + "type": "object", + "properties": { + "changes": { + "type": "array", + "items": { + "$ref": "#/definitions/BundleChangesMapArgs" + } + }, + "errors": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "BundleChangesParams": { + "type": "object", + "properties": { + "bundleURL": { + "type": "string" + }, + "yaml": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "yaml", + "bundleURL" + ] + }, + "BundleChangesResults": { + "type": "object", + "properties": { + "changes": { + "type": "array", + "items": { + "$ref": "#/definitions/BundleChange" + } + }, + "errors": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ExportBundleParams": { + "type": "object", + "properties": { + "include-charm-defaults": { + "type": "boolean" + }, + "include-series": { + "type": "boolean" + } + }, + "additionalProperties": false + }, + "StringResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "result" + ] + } + } + } + }, + { + "Name": "CAASAdmission", + "Description": "", + "Version": 1, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent" + ], + "Schema": { + "type": "object", + "properties": { + "ControllerAPIInfoForModels": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ControllerAPIInfoResults" + } + }, + "description": "ControllerAPIInfoForModels returns the controller api connection details for the specified models." + }, + "ControllerConfig": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/ControllerConfigResult" + } + }, + "description": "ControllerConfig returns the controller's configuration." + } + }, + "definitions": { + "ControllerAPIInfoResult": { + "type": "object", + "properties": { + "addresses": { + "type": "array", + "items": { + "type": "string" + } + }, + "cacert": { + "type": "string" + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false, + "required": [ + "addresses", + "cacert" + ] + }, + "ControllerAPIInfoResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ControllerAPIInfoResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "ControllerConfigResult": { + "type": "object", + "properties": { + "config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + } + }, + "additionalProperties": false, + "required": [ + "config" + ] + }, + "Entities": { + "type": "object", + "properties": { + "entities": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } + } + }, + "additionalProperties": false, + "required": [ + "entities" + ] + }, + "Entity": { + "type": "object", + "properties": { + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + } + } + } + }, + { + "Name": "CAASAgent", + "Description": "FacadeV2 is the V2 facade of the caas agent", + "Version": 2, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "CloudSpec": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/CloudSpecResults" + } + }, + "description": "CloudSpec returns the model's cloud spec." + }, + "ControllerAPIInfoForModels": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ControllerAPIInfoResults" + } + }, + "description": "ControllerAPIInfoForModels returns the controller api connection details for the specified models." + }, + "ControllerConfig": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/ControllerConfigResult" + } + }, + "description": "ControllerConfig returns the controller's configuration." + }, + "GetCloudSpec": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ModelTag" + }, + "Result": { + "$ref": "#/definitions/CloudSpecResult" + } + }, + "description": "GetCloudSpec constructs the CloudSpec for a validated and authorized model." + }, + "ModelConfig": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/ModelConfigResult" + } + }, + "description": "ModelConfig returns the current model's configuration." + }, + "WatchCloudSpecsChanges": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/NotifyWatchResults" + } + }, + "description": "WatchCloudSpecsChanges returns a watcher for cloud spec changes." + }, + "WatchForModelConfigChanges": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/NotifyWatchResult" + } + }, + "description": "WatchForModelConfigChanges returns a NotifyWatcher that observes\nchanges to the model configuration.\nNote that although the NotifyWatchResult contains an Error field,\nit's not used because we are only returning a single watcher,\nso we use the regular error return." + } + }, + "definitions": { + "CloudCredential": { + "type": "object", + "properties": { + "attrs": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "auth-type": { + "type": "string" + }, + "redacted": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "auth-type" + ] + }, + "CloudSpec": { + "type": "object", + "properties": { + "cacertificates": { + "type": "array", + "items": { + "type": "string" + } + }, + "credential": { + "$ref": "#/definitions/CloudCredential" + }, + "endpoint": { + "type": "string" + }, + "identity-endpoint": { + "type": "string" + }, + "is-controller-cloud": { + "type": "boolean" + }, + "name": { + "type": "string" + }, + "region": { + "type": "string" + }, + "skip-tls-verify": { + "type": "boolean" + }, + "storage-endpoint": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "type", + "name" + ] + }, + "CloudSpecResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "$ref": "#/definitions/CloudSpec" + } + }, + "additionalProperties": false + }, + "CloudSpecResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/CloudSpecResult" + } + } + }, + "additionalProperties": false + }, + "ControllerAPIInfoResult": { + "type": "object", + "properties": { + "addresses": { + "type": "array", + "items": { + "type": "string" + } + }, + "cacert": { + "type": "string" + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false, + "required": [ + "addresses", + "cacert" + ] + }, + "ControllerAPIInfoResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ControllerAPIInfoResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "ControllerConfigResult": { + "type": "object", + "properties": { + "config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + } + }, + "additionalProperties": false, + "required": [ + "config" + ] + }, + "Entities": { + "type": "object", + "properties": { + "entities": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } + } + }, + "additionalProperties": false, + "required": [ + "entities" + ] + }, + "Entity": { + "type": "object", + "properties": { + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ModelConfigResult": { + "type": "object", + "properties": { + "config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + } + }, + "additionalProperties": false, + "required": [ + "config" + ] + }, + "ModelTag": { + "type": "object", + "additionalProperties": false + }, + "NotifyWatchResult": { + "type": "object", + "properties": { + "NotifyWatcherId": { + "type": "string" + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false, + "required": [ + "NotifyWatcherId" + ] + }, + "NotifyWatchResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/NotifyWatchResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + } + } + } + }, + { + "Name": "CAASApplication", + "Description": "", + "Version": 1, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "UnitIntroduction": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/CAASUnitIntroductionArgs" + }, + "Result": { + "$ref": "#/definitions/CAASUnitIntroductionResult" + } + }, + "description": "UnitIntroduction sets the status of each given entity." + }, + "UnitTerminating": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entity" + }, + "Result": { + "$ref": "#/definitions/CAASUnitTerminationResult" + } + }, + "description": "UnitTerminating should be called by the CAASUnitTerminationWorker when\nthe agent receives a signal to exit. UnitTerminating will return how\nthe agent should shutdown." + } + }, + "definitions": { + "CAASUnitIntroduction": { + "type": "object", + "properties": { + "agent-conf": { + "type": "array", + "items": { + "type": "integer" + } + }, + "unit-name": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "unit-name", + "agent-conf" + ] + }, + "CAASUnitIntroductionArgs": { + "type": "object", + "properties": { + "pod-name": { + "type": "string" + }, + "pod-uuid": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "pod-name", + "pod-uuid" + ] + }, + "CAASUnitIntroductionResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "$ref": "#/definitions/CAASUnitIntroduction" + } + }, + "additionalProperties": false + }, + "CAASUnitTerminationResult": { + "type": "object", + "properties": { + "Error": { + "$ref": "#/definitions/Error" + }, + "WillRestart": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "WillRestart", + "Error" + ] + }, + "Entity": { + "type": "object", + "properties": { + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + } + } + } + }, + { + "Name": "CAASApplicationProvisioner", + "Description": "", + "Version": 1, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "ApplicationCharmInfo": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entity" + }, + "Result": { + "$ref": "#/definitions/Charm" + } + }, + "description": "ApplicationCharmInfo returns information about an application's charm." + }, + "ApplicationOCIResources": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/CAASApplicationOCIResourceResults" + } + }, + "description": "ApplicationOCIResources returns the OCI image resources for an application." + }, + "CharmInfo": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/CharmURL" + }, + "Result": { + "$ref": "#/definitions/Charm" + } + }, + "description": "CharmInfo returns information about the requested charm." + }, + "ClearApplicationsResources": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "ClearApplicationsResources clears the flags which indicate\napplications still have resources in the cluster." + }, + "DestroyUnits": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/DestroyUnitsParams" + }, + "Result": { + "$ref": "#/definitions/DestroyUnitResults" + } + }, + "description": "DestroyUnits is responsible for scaling down a set of units on the this\nApplication." + }, + "Life": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/LifeResults" + } + }, + "description": "Life returns the life status of every supplied entity, where available." + }, + "ProvisionerConfig": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/CAASApplicationProvisionerConfigResult" + } + }, + "description": "ProvisionerConfig returns the provisioner's configuration." + }, + "ProvisioningInfo": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/CAASApplicationProvisioningInfoResults" + } + }, + "description": "ProvisioningInfo returns the info needed to provision a caas application." + }, + "ProvisioningState": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entity" + }, + "Result": { + "$ref": "#/definitions/CAASApplicationProvisioningStateResult" + } + }, + "description": "ProvisioningState returns the provisioning state for the application." + }, + "Remove": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "Remove removes every given entity from state, calling EnsureDead\nfirst, then Remove. It will fail if the entity is not present." + }, + "SetOperatorStatus": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/SetStatus" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "SetOperatorStatus sets the status of each given entity." + }, + "SetPasswords": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/EntityPasswords" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "SetPasswords sets the given password for each supplied entity, if possible." + }, + "SetProvisioningState": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/CAASApplicationProvisioningStateArg" + }, + "Result": { + "$ref": "#/definitions/ErrorResult" + } + }, + "description": "SetProvisioningState sets the provisioning state for the application." + }, + "Units": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/CAASUnitsResults" + } + }, + "description": "Units returns all the units for each application specified." + }, + "UpdateApplicationsUnits": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/UpdateApplicationUnitArgs" + }, + "Result": { + "$ref": "#/definitions/UpdateApplicationUnitResults" + } + }, + "description": "UpdateApplicationsUnits updates the Juju data model to reflect the given\nunits of the specified application." + }, + "Watch": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/NotifyWatchResults" + } + }, + "description": "Watch starts an NotifyWatcher for each given entity." + }, + "WatchApplications": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/StringsWatchResult" + } + }, + "description": "WatchApplications starts a StringsWatcher to watch applications\ndeployed to this model." + }, + "WatchProvisioningInfo": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/NotifyWatchResults" + } + }, + "description": "WatchProvisioningInfo provides a watcher for changes that affect the\ninformation returned by ProvisioningInfo. This is useful for ensuring the\nlatest application stated is ensured." + }, + "WatchUnits": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/StringsWatchResults" + } + }, + "description": "WatchUnits starts a StringsWatcher to watch changes to the\nlifecycle states of units for the specified applications in\nthis model." + } + }, + "definitions": { + "ApplicationUnitInfo": { + "type": "object", + "properties": { + "provider-id": { + "type": "string" + }, + "unit-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "provider-id", + "unit-tag" + ] + }, + "ApplicationUnitParams": { + "type": "object", + "properties": { + "address": { + "type": "string" + }, + "data": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "filesystem-info": { + "type": "array", + "items": { + "$ref": "#/definitions/KubernetesFilesystemInfo" + } + }, + "info": { + "type": "string" + }, + "ports": { + "type": "array", + "items": { + "type": "string" + } + }, + "provider-id": { + "type": "string" + }, + "stateful": { + "type": "boolean" + }, + "status": { + "type": "string" + }, + "unit-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "provider-id", + "unit-tag", + "address", + "ports", + "status", + "info" + ] + }, + "Base": { + "type": "object", + "properties": { + "channel": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "channel" + ] + }, + "CAASApplicationOCIResourceResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "$ref": "#/definitions/CAASApplicationOCIResources" + } + }, + "additionalProperties": false + }, + "CAASApplicationOCIResourceResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/CAASApplicationOCIResourceResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "CAASApplicationOCIResources": { + "type": "object", + "properties": { + "images": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/DockerImageInfo" + } + } + } + }, + "additionalProperties": false, + "required": [ + "images" + ] + }, + "CAASApplicationProvisionerConfig": { + "type": "object", + "properties": { + "unmanaged-applications": { + "$ref": "#/definitions/Entities" + } + }, + "additionalProperties": false + }, + "CAASApplicationProvisionerConfigResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "provisioner-config": { + "$ref": "#/definitions/CAASApplicationProvisionerConfig" + } + }, + "additionalProperties": false + }, + "CAASApplicationProvisioningInfo": { + "type": "object", + "properties": { + "api-addresses": { + "type": "array", + "items": { + "type": "string" + } + }, + "base": { + "$ref": "#/definitions/Base" + }, + "ca-cert": { + "type": "string" + }, + "charm-modified-version": { + "type": "integer" + }, + "charm-url": { + "type": "string" + }, + "constraints": { + "$ref": "#/definitions/Value" + }, + "devices": { + "type": "array", + "items": { + "$ref": "#/definitions/KubernetesDeviceParams" + } + }, + "error": { + "$ref": "#/definitions/Error" + }, + "filesystems": { + "type": "array", + "items": { + "$ref": "#/definitions/KubernetesFilesystemParams" + } + }, + "image-repo": { + "$ref": "#/definitions/DockerImageInfo" + }, + "scale": { + "type": "integer" + }, + "tags": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "trust": { + "type": "boolean" + }, + "version": { + "$ref": "#/definitions/Number" + }, + "volumes": { + "type": "array", + "items": { + "$ref": "#/definitions/KubernetesVolumeParams" + } + } + }, + "additionalProperties": false, + "required": [ + "version", + "api-addresses", + "ca-cert", + "constraints" + ] + }, + "CAASApplicationProvisioningInfoResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/CAASApplicationProvisioningInfo" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "CAASApplicationProvisioningState": { + "type": "object", + "properties": { + "scale-target": { + "type": "integer" + }, + "scaling": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "scaling", + "scale-target" + ] + }, + "CAASApplicationProvisioningStateArg": { + "type": "object", + "properties": { + "application": { + "$ref": "#/definitions/Entity" + }, + "provisioning-state": { + "$ref": "#/definitions/CAASApplicationProvisioningState" + } + }, + "additionalProperties": false, + "required": [ + "application", + "provisioning-state" + ] + }, + "CAASApplicationProvisioningStateResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "provisioning-state": { + "$ref": "#/definitions/CAASApplicationProvisioningState" + } + }, + "additionalProperties": false + }, + "CAASUnitInfo": { + "type": "object", + "properties": { + "tag": { + "type": "string" + }, + "unit-status": { + "$ref": "#/definitions/UnitStatus" + } + }, + "additionalProperties": false, + "required": [ + "tag" + ] + }, + "CAASUnitsResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "units": { + "type": "array", + "items": { + "$ref": "#/definitions/CAASUnitInfo" + } + } + }, + "additionalProperties": false + }, + "CAASUnitsResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/CAASUnitsResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "Charm": { + "type": "object", + "properties": { + "actions": { + "$ref": "#/definitions/CharmActions" + }, + "config": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmOption" + } + } + }, + "lxd-profile": { + "$ref": "#/definitions/CharmLXDProfile" + }, + "manifest": { + "$ref": "#/definitions/CharmManifest" + }, + "meta": { + "$ref": "#/definitions/CharmMeta" + }, + "metrics": { + "$ref": "#/definitions/CharmMetrics" + }, + "revision": { + "type": "integer" + }, + "url": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "revision", + "url", + "config" + ] + }, + "CharmActionSpec": { + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "params": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + } + }, + "additionalProperties": false, + "required": [ + "description", + "params" + ] + }, + "CharmActions": { + "type": "object", + "properties": { + "specs": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmActionSpec" + } + } + } + }, + "additionalProperties": false + }, + "CharmBase": { + "type": "object", + "properties": { + "architectures": { + "type": "array", + "items": { + "type": "string" + } + }, + "channel": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "additionalProperties": false + }, + "CharmContainer": { + "type": "object", + "properties": { + "mounts": { + "type": "array", + "items": { + "$ref": "#/definitions/CharmMount" + } + }, + "resource": { + "type": "string" + } + }, + "additionalProperties": false + }, + "CharmDeployment": { + "type": "object", + "properties": { + "min-version": { + "type": "string" + }, + "mode": { + "type": "string" + }, + "service": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "type", + "mode", + "service", + "min-version" + ] + }, + "CharmDevice": { + "type": "object", + "properties": { + "CountMax": { + "type": "integer" + }, + "CountMin": { + "type": "integer" + }, + "Description": { + "type": "string" + }, + "Name": { + "type": "string" + }, + "Type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "Name", + "Description", + "Type", + "CountMin", + "CountMax" + ] + }, + "CharmLXDProfile": { + "type": "object", + "properties": { + "config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "description": { + "type": "string" + }, + "devices": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + } + } + } + }, + "additionalProperties": false, + "required": [ + "config", + "description", + "devices" + ] + }, + "CharmManifest": { + "type": "object", + "properties": { + "bases": { + "type": "array", + "items": { + "$ref": "#/definitions/CharmBase" + } + } + }, + "additionalProperties": false + }, + "CharmMeta": { + "type": "object", + "properties": { + "assumes-expr": { + "$ref": "#/definitions/ExpressionTree" + }, + "categories": { + "type": "array", + "items": { + "type": "string" + } + }, + "containers": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmContainer" + } + } + }, + "deployment": { + "$ref": "#/definitions/CharmDeployment" + }, + "description": { + "type": "string" + }, + "devices": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmDevice" + } + } + }, + "extra-bindings": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "min-juju-version": { + "type": "string" + }, + "name": { + "type": "string" + }, + "payload-classes": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmPayloadClass" + } + } + }, + "peers": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmRelation" + } + } + }, + "provides": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmRelation" + } + } + }, + "requires": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmRelation" + } + } + }, + "resources": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmResourceMeta" + } + } + }, + "series": { + "type": "array", + "items": { + "type": "string" + } + }, + "storage": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmStorage" + } + } + }, + "subordinate": { + "type": "boolean" + }, + "summary": { + "type": "string" + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "terms": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "name", + "summary", + "description", + "subordinate" + ] + }, + "CharmMetric": { + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "type", + "description" + ] + }, + "CharmMetrics": { + "type": "object", + "properties": { + "metrics": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmMetric" + } + } + }, + "plan": { + "$ref": "#/definitions/CharmPlan" + } + }, + "additionalProperties": false, + "required": [ + "metrics", + "plan" + ] + }, + "CharmMount": { + "type": "object", + "properties": { + "location": { + "type": "string" + }, + "storage": { + "type": "string" + } + }, + "additionalProperties": false + }, + "CharmOption": { + "type": "object", + "properties": { + "default": { + "type": "object", + "additionalProperties": true + }, + "description": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "type" + ] + }, + "CharmPayloadClass": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "type" + ] + }, + "CharmPlan": { + "type": "object", + "properties": { + "required": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "required" + ] + }, + "CharmRelation": { + "type": "object", + "properties": { + "interface": { + "type": "string" + }, + "limit": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "optional": { + "type": "boolean" + }, + "role": { + "type": "string" + }, + "scope": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "role", + "interface", + "optional", + "limit", + "scope" + ] + }, + "CharmResourceMeta": { + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "type", + "path", + "description" + ] + }, + "CharmStorage": { + "type": "object", + "properties": { + "count-max": { + "type": "integer" + }, + "count-min": { + "type": "integer" + }, + "description": { + "type": "string" + }, + "location": { + "type": "string" + }, + "minimum-size": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "properties": { + "type": "array", + "items": { + "type": "string" + } + }, + "read-only": { + "type": "boolean" + }, + "shared": { + "type": "boolean" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "description", + "type", + "shared", + "read-only", + "count-min", + "count-max", + "minimum-size" + ] + }, + "CharmURL": { + "type": "object", + "properties": { + "url": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "url" + ] + }, + "DestroyUnitInfo": { + "type": "object", + "properties": { + "destroyed-storage": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } + }, + "detached-storage": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } + } + }, + "additionalProperties": false + }, + "DestroyUnitParams": { + "type": "object", + "properties": { + "destroy-storage": { + "type": "boolean" + }, + "dry-run": { + "type": "boolean" + }, + "force": { + "type": "boolean" + }, + "max-wait": { + "type": "integer" + }, + "unit-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "unit-tag" + ] + }, + "DestroyUnitResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "info": { + "$ref": "#/definitions/DestroyUnitInfo" + } + }, + "additionalProperties": false + }, + "DestroyUnitResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/DestroyUnitResult" + } + } + }, + "additionalProperties": false + }, + "DestroyUnitsParams": { + "type": "object", + "properties": { + "units": { + "type": "array", + "items": { + "$ref": "#/definitions/DestroyUnitParams" + } + } + }, + "additionalProperties": false, + "required": [ + "units" + ] + }, + "DetailedStatus": { + "type": "object", + "properties": { + "data": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "err": { + "$ref": "#/definitions/Error" + }, + "info": { + "type": "string" + }, + "kind": { + "type": "string" + }, + "life": { + "type": "string" + }, + "since": { + "type": "string", + "format": "date-time" + }, + "status": { + "type": "string" + }, + "version": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "status", + "info", + "data", + "since", + "kind", + "version", + "life" + ] + }, + "DockerImageInfo": { + "type": "object", + "properties": { + "auth": { + "type": "string" + }, + "email": { + "type": "string" + }, + "identitytoken": { + "type": "string" + }, + "image-name": { + "type": "string" + }, + "password": { + "type": "string" + }, + "registrytoken": { + "type": "string" + }, + "repository": { + "type": "string" + }, + "serveraddress": { + "type": "string" + }, + "username": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "image-name" + ] + }, + "Entities": { + "type": "object", + "properties": { + "entities": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } + } + }, + "additionalProperties": false, + "required": [ + "entities" + ] + }, + "Entity": { + "type": "object", + "properties": { + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag" + ] + }, + "EntityPassword": { + "type": "object", + "properties": { + "password": { + "type": "string" + }, + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag", + "password" + ] + }, + "EntityPasswords": { + "type": "object", + "properties": { + "changes": { + "type": "array", + "items": { + "$ref": "#/definitions/EntityPassword" + } + } + }, + "additionalProperties": false, + "required": [ + "changes" + ] + }, + "EntityStatus": { + "type": "object", + "properties": { + "data": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "info": { + "type": "string" + }, + "since": { + "type": "string", + "format": "date-time" + }, + "status": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "status", + "info", + "since" + ] + }, + "EntityStatusArgs": { + "type": "object", + "properties": { + "data": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "info": { + "type": "string" + }, + "status": { + "type": "string" + }, + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag", + "status", + "info", + "data" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ErrorResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "ErrorResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "ExpressionTree": { + "type": "object", + "properties": { + "Expression": { + "type": "object", + "additionalProperties": true + } + }, + "additionalProperties": false, + "required": [ + "Expression" + ] + }, + "KubernetesDeviceParams": { + "type": "object", + "properties": { + "Attributes": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "Count": { + "type": "integer" + }, + "Type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "Type", + "Count", + "Attributes" + ] + }, + "KubernetesFilesystemAttachmentParams": { + "type": "object", + "properties": { + "mount-point": { + "type": "string" + }, + "provider": { + "type": "string" + }, + "read-only": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "provider" + ] + }, + "KubernetesFilesystemInfo": { + "type": "object", + "properties": { + "data": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "filesystem-id": { + "type": "string" + }, + "info": { + "type": "string" + }, + "mount-point": { + "type": "string" + }, + "pool": { + "type": "string" + }, + "read-only": { + "type": "boolean" + }, + "size": { + "type": "integer" + }, + "status": { + "type": "string" + }, + "storagename": { + "type": "string" + }, + "volume": { + "$ref": "#/definitions/KubernetesVolumeInfo" + } + }, + "additionalProperties": false, + "required": [ + "storagename", + "pool", + "size", + "filesystem-id", + "status", + "info", + "volume" + ] + }, + "KubernetesFilesystemParams": { + "type": "object", + "properties": { + "attachment": { + "$ref": "#/definitions/KubernetesFilesystemAttachmentParams" + }, + "attributes": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "provider": { + "type": "string" + }, + "size": { + "type": "integer" + }, + "storagename": { + "type": "string" + }, + "tags": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + } + }, + "additionalProperties": false, + "required": [ + "storagename", + "size", + "provider" + ] + }, + "KubernetesVolumeAttachmentParams": { + "type": "object", + "properties": { + "provider": { + "type": "string" + }, + "read-only": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "provider" + ] + }, + "KubernetesVolumeInfo": { + "type": "object", + "properties": { + "data": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "info": { + "type": "string" + }, + "persistent": { + "type": "boolean" + }, + "pool": { + "type": "string" + }, + "size": { + "type": "integer" + }, + "status": { + "type": "string" + }, + "volume-id": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "volume-id", + "size", + "persistent", + "status", + "info" + ] + }, + "KubernetesVolumeParams": { + "type": "object", + "properties": { + "attachment": { + "$ref": "#/definitions/KubernetesVolumeAttachmentParams" + }, + "attributes": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "provider": { + "type": "string" + }, + "size": { + "type": "integer" + }, + "storagename": { + "type": "string" + }, + "tags": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + } + }, + "additionalProperties": false, + "required": [ + "storagename", + "size", + "provider" + ] + }, + "LifeResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "life": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "life" + ] + }, + "LifeResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/LifeResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "NotifyWatchResult": { + "type": "object", + "properties": { + "NotifyWatcherId": { + "type": "string" + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false, + "required": [ + "NotifyWatcherId" + ] + }, + "NotifyWatchResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/NotifyWatchResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "Number": { + "type": "object", + "properties": { + "Build": { + "type": "integer" + }, + "Major": { + "type": "integer" + }, + "Minor": { + "type": "integer" + }, + "Patch": { + "type": "integer" + }, + "Tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "Major", + "Minor", + "Tag", + "Patch", + "Build" + ] + }, + "SetStatus": { + "type": "object", + "properties": { + "entities": { + "type": "array", + "items": { + "$ref": "#/definitions/EntityStatusArgs" + } + } + }, + "additionalProperties": false, + "required": [ + "entities" + ] + }, + "StringsWatchResult": { + "type": "object", + "properties": { + "changes": { + "type": "array", + "items": { + "type": "string" + } + }, + "error": { + "$ref": "#/definitions/Error" + }, + "watcher-id": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "watcher-id" + ] + }, + "StringsWatchResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/StringsWatchResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "UnitStatus": { + "type": "object", + "properties": { + "address": { + "type": "string" + }, + "agent-status": { + "$ref": "#/definitions/DetailedStatus" + }, + "charm": { + "type": "string" + }, + "leader": { + "type": "boolean" + }, + "machine": { + "type": "string" + }, + "opened-ports": { + "type": "array", + "items": { + "type": "string" + } + }, + "provider-id": { + "type": "string" + }, + "public-address": { + "type": "string" + }, + "subordinates": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/UnitStatus" + } + } + }, + "workload-status": { + "$ref": "#/definitions/DetailedStatus" + }, + "workload-version": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "agent-status", + "workload-status", + "workload-version", + "machine", + "opened-ports", + "public-address", + "charm", + "subordinates" + ] + }, + "UpdateApplicationUnitArgs": { + "type": "object", + "properties": { + "args": { + "type": "array", + "items": { + "$ref": "#/definitions/UpdateApplicationUnits" + } + } + }, + "additionalProperties": false, + "required": [ + "args" + ] + }, + "UpdateApplicationUnitResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "info": { + "$ref": "#/definitions/UpdateApplicationUnitsInfo" + } + }, + "additionalProperties": false + }, + "UpdateApplicationUnitResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/UpdateApplicationUnitResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "UpdateApplicationUnits": { + "type": "object", + "properties": { + "application-tag": { + "type": "string" + }, + "generation": { + "type": "integer" + }, + "scale": { + "type": "integer" + }, + "status": { + "$ref": "#/definitions/EntityStatus" + }, + "units": { + "type": "array", + "items": { + "$ref": "#/definitions/ApplicationUnitParams" + } + } + }, + "additionalProperties": false, + "required": [ + "application-tag", + "units" + ] + }, + "UpdateApplicationUnitsInfo": { + "type": "object", + "properties": { + "units": { + "type": "array", + "items": { + "$ref": "#/definitions/ApplicationUnitInfo" + } + } + }, + "additionalProperties": false, + "required": [ + "units" + ] + }, + "Value": { + "type": "object", + "properties": { + "allocate-public-ip": { + "type": "boolean" + }, + "arch": { + "type": "string" + }, + "container": { + "type": "string" + }, + "cores": { + "type": "integer" + }, + "cpu-power": { + "type": "integer" + }, + "image-id": { + "type": "string" + }, + "instance-role": { + "type": "string" + }, + "instance-type": { + "type": "string" + }, + "mem": { + "type": "integer" + }, + "root-disk": { + "type": "integer" + }, + "root-disk-source": { + "type": "string" + }, + "spaces": { + "type": "array", + "items": { + "type": "string" + } + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "virt-type": { + "type": "string" + }, + "zones": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + } + } + } + }, + { + "Name": "CAASFirewaller", + "Description": "", + "Version": 1, + "AvailableTo": [ + "controller-machine-agent" + ], + "Schema": { + "type": "object", + "properties": { + "ApplicationCharmInfo": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entity" + }, + "Result": { + "$ref": "#/definitions/Charm" + } + }, + "description": "ApplicationCharmInfo returns information about an application's charm." + }, + "ApplicationsConfig": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ApplicationGetConfigResults" + } + }, + "description": "ApplicationsConfig returns the config for the specified applications." + }, + "CharmInfo": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/CharmURL" + }, + "Result": { + "$ref": "#/definitions/Charm" + } + }, + "description": "CharmInfo returns information about the requested charm." + }, + "IsExposed": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/BoolResults" + } + }, + "description": "IsExposed returns whether the specified applications are exposed." + }, + "Life": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/LifeResults" + } + }, + "description": "Life returns the life status of every supplied entity, where available." + }, + "Watch": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/NotifyWatchResults" + } + }, + "description": "Watch starts an NotifyWatcher for each given entity." + }, + "WatchApplications": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/StringsWatchResult" + } + }, + "description": "WatchApplications starts a StringsWatcher to watch applications\ndeployed to this model." + } + }, + "definitions": { + "ApplicationGetConfigResults": { + "type": "object", + "properties": { + "Results": { + "type": "array", + "items": { + "$ref": "#/definitions/ConfigResult" + } + } + }, + "additionalProperties": false, + "required": [ + "Results" + ] + }, + "BoolResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "result" + ] + }, + "BoolResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/BoolResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "Charm": { + "type": "object", + "properties": { + "actions": { + "$ref": "#/definitions/CharmActions" + }, + "config": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmOption" + } + } + }, + "lxd-profile": { + "$ref": "#/definitions/CharmLXDProfile" + }, + "manifest": { + "$ref": "#/definitions/CharmManifest" + }, + "meta": { + "$ref": "#/definitions/CharmMeta" + }, + "metrics": { + "$ref": "#/definitions/CharmMetrics" + }, + "revision": { + "type": "integer" + }, + "url": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "revision", + "url", + "config" + ] + }, + "CharmActionSpec": { + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "params": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + } + }, + "additionalProperties": false, + "required": [ + "description", + "params" + ] + }, + "CharmActions": { + "type": "object", + "properties": { + "specs": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmActionSpec" + } + } + } + }, + "additionalProperties": false + }, + "CharmBase": { + "type": "object", + "properties": { + "architectures": { + "type": "array", + "items": { + "type": "string" + } + }, + "channel": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "additionalProperties": false + }, + "CharmContainer": { + "type": "object", + "properties": { + "mounts": { + "type": "array", + "items": { + "$ref": "#/definitions/CharmMount" + } + }, + "resource": { + "type": "string" + } + }, + "additionalProperties": false + }, + "CharmDeployment": { + "type": "object", + "properties": { + "min-version": { + "type": "string" + }, + "mode": { + "type": "string" + }, + "service": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "type", + "mode", + "service", + "min-version" + ] + }, + "CharmDevice": { + "type": "object", + "properties": { + "CountMax": { + "type": "integer" + }, + "CountMin": { + "type": "integer" + }, + "Description": { + "type": "string" + }, + "Name": { + "type": "string" + }, + "Type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "Name", + "Description", + "Type", + "CountMin", + "CountMax" + ] + }, + "CharmLXDProfile": { + "type": "object", + "properties": { + "config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "description": { + "type": "string" + }, + "devices": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + } + } + } + }, + "additionalProperties": false, + "required": [ + "config", + "description", + "devices" + ] + }, + "CharmManifest": { + "type": "object", + "properties": { + "bases": { + "type": "array", + "items": { + "$ref": "#/definitions/CharmBase" + } + } + }, + "additionalProperties": false + }, + "CharmMeta": { + "type": "object", + "properties": { + "assumes-expr": { + "$ref": "#/definitions/ExpressionTree" + }, + "categories": { + "type": "array", + "items": { + "type": "string" + } + }, + "containers": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmContainer" + } + } + }, + "deployment": { + "$ref": "#/definitions/CharmDeployment" + }, + "description": { + "type": "string" + }, + "devices": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmDevice" + } + } + }, + "extra-bindings": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "min-juju-version": { + "type": "string" + }, + "name": { + "type": "string" + }, + "payload-classes": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmPayloadClass" + } + } + }, + "peers": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmRelation" + } + } + }, + "provides": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmRelation" + } + } + }, + "requires": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmRelation" + } + } + }, + "resources": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmResourceMeta" + } + } + }, + "series": { + "type": "array", + "items": { + "type": "string" + } + }, + "storage": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmStorage" + } + } + }, + "subordinate": { + "type": "boolean" + }, + "summary": { + "type": "string" + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "terms": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "name", + "summary", + "description", + "subordinate" + ] + }, + "CharmMetric": { + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "type", + "description" + ] + }, + "CharmMetrics": { + "type": "object", + "properties": { + "metrics": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmMetric" + } + } + }, + "plan": { + "$ref": "#/definitions/CharmPlan" + } + }, + "additionalProperties": false, + "required": [ + "metrics", + "plan" + ] + }, + "CharmMount": { + "type": "object", + "properties": { + "location": { + "type": "string" + }, + "storage": { + "type": "string" + } + }, + "additionalProperties": false + }, + "CharmOption": { + "type": "object", + "properties": { + "default": { + "type": "object", + "additionalProperties": true + }, + "description": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "type" + ] + }, + "CharmPayloadClass": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "type" + ] + }, + "CharmPlan": { + "type": "object", + "properties": { + "required": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "required" + ] + }, + "CharmRelation": { + "type": "object", + "properties": { + "interface": { + "type": "string" + }, + "limit": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "optional": { + "type": "boolean" + }, + "role": { + "type": "string" + }, + "scope": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "role", + "interface", + "optional", + "limit", + "scope" + ] + }, + "CharmResourceMeta": { + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "type", + "path", + "description" + ] + }, + "CharmStorage": { + "type": "object", + "properties": { + "count-max": { + "type": "integer" + }, + "count-min": { + "type": "integer" + }, + "description": { + "type": "string" + }, + "location": { + "type": "string" + }, + "minimum-size": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "properties": { + "type": "array", + "items": { + "type": "string" + } + }, + "read-only": { + "type": "boolean" + }, + "shared": { + "type": "boolean" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "description", + "type", + "shared", + "read-only", + "count-min", + "count-max", + "minimum-size" + ] + }, + "CharmURL": { + "type": "object", + "properties": { + "url": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "url" + ] + }, + "ConfigResult": { + "type": "object", + "properties": { + "config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false, + "required": [ + "config" + ] + }, + "Entities": { + "type": "object", + "properties": { + "entities": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } + } + }, + "additionalProperties": false, + "required": [ + "entities" + ] + }, + "Entity": { + "type": "object", + "properties": { + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ExpressionTree": { + "type": "object", + "properties": { + "Expression": { + "type": "object", + "additionalProperties": true + } + }, + "additionalProperties": false, + "required": [ + "Expression" + ] + }, + "LifeResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "life": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "life" + ] + }, + "LifeResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/LifeResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "NotifyWatchResult": { + "type": "object", + "properties": { + "NotifyWatcherId": { + "type": "string" + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false, + "required": [ + "NotifyWatcherId" + ] + }, + "NotifyWatchResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/NotifyWatchResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "StringsWatchResult": { + "type": "object", + "properties": { + "changes": { + "type": "array", + "items": { + "type": "string" + } + }, + "error": { + "$ref": "#/definitions/Error" + }, + "watcher-id": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "watcher-id" + ] + } + } + } + }, + { + "Name": "CAASFirewallerSidecar", + "Description": "FacadeSidecar provides access to the CAASFirewaller API facade for sidecar applications.", + "Version": 1, + "AvailableTo": [ + "controller-machine-agent" + ], + "Schema": { + "type": "object", + "properties": { + "ApplicationCharmInfo": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entity" + }, + "Result": { + "$ref": "#/definitions/Charm" + } + }, + "description": "ApplicationCharmInfo returns information about an application's charm." + }, + "ApplicationsConfig": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ApplicationGetConfigResults" + } + }, + "description": "ApplicationsConfig returns the config for the specified applications." + }, + "CharmInfo": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/CharmURL" + }, + "Result": { + "$ref": "#/definitions/Charm" + } + }, + "description": "CharmInfo returns information about the requested charm." + }, + "GetOpenedPorts": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entity" + }, + "Result": { + "$ref": "#/definitions/ApplicationOpenedPortsResults" + } + }, + "description": "GetOpenedPorts returns all the opened ports for each given application tag." + }, + "IsExposed": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/BoolResults" + } + }, + "description": "IsExposed returns whether the specified applications are exposed." + }, + "Life": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/LifeResults" + } + }, + "description": "Life returns the life status of every supplied entity, where available." + }, + "Watch": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/NotifyWatchResults" + } + }, + "description": "Watch starts an NotifyWatcher for each given entity." + }, + "WatchApplications": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/StringsWatchResult" + } + }, + "description": "WatchApplications starts a StringsWatcher to watch applications\ndeployed to this model." + }, + "WatchOpenedPorts": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/StringsWatchResults" + } + }, + "description": "WatchOpenedPorts returns a new StringsWatcher for each given\nmodel tag." + } + }, + "definitions": { + "ApplicationGetConfigResults": { + "type": "object", + "properties": { + "Results": { + "type": "array", + "items": { + "$ref": "#/definitions/ConfigResult" + } + } + }, + "additionalProperties": false, + "required": [ + "Results" + ] + }, + "ApplicationOpenedPorts": { + "type": "object", + "properties": { + "endpoint": { + "type": "string" + }, + "port-ranges": { + "type": "array", + "items": { + "$ref": "#/definitions/PortRange" + } + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "port-ranges" + ] + }, + "ApplicationOpenedPortsResult": { + "type": "object", + "properties": { + "application-port-ranges": { + "type": "array", + "items": { + "$ref": "#/definitions/ApplicationOpenedPorts" + } + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false, + "required": [ + "application-port-ranges" + ] + }, + "ApplicationOpenedPortsResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ApplicationOpenedPortsResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "BoolResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "result" + ] + }, + "BoolResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/BoolResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "Charm": { + "type": "object", + "properties": { + "actions": { + "$ref": "#/definitions/CharmActions" + }, + "config": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmOption" + } + } + }, + "lxd-profile": { + "$ref": "#/definitions/CharmLXDProfile" + }, + "manifest": { + "$ref": "#/definitions/CharmManifest" + }, + "meta": { + "$ref": "#/definitions/CharmMeta" + }, + "metrics": { + "$ref": "#/definitions/CharmMetrics" + }, + "revision": { + "type": "integer" + }, + "url": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "revision", + "url", + "config" + ] + }, + "CharmActionSpec": { + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "params": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + } + }, + "additionalProperties": false, + "required": [ + "description", + "params" + ] + }, + "CharmActions": { + "type": "object", + "properties": { + "specs": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmActionSpec" + } + } + } + }, + "additionalProperties": false + }, + "CharmBase": { + "type": "object", + "properties": { + "architectures": { + "type": "array", + "items": { + "type": "string" + } + }, + "channel": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "additionalProperties": false + }, + "CharmContainer": { + "type": "object", + "properties": { + "mounts": { + "type": "array", + "items": { + "$ref": "#/definitions/CharmMount" + } + }, + "resource": { + "type": "string" + } + }, + "additionalProperties": false + }, + "CharmDeployment": { + "type": "object", + "properties": { + "min-version": { + "type": "string" + }, + "mode": { + "type": "string" + }, + "service": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "type", + "mode", + "service", + "min-version" + ] + }, + "CharmDevice": { + "type": "object", + "properties": { + "CountMax": { + "type": "integer" + }, + "CountMin": { + "type": "integer" + }, + "Description": { + "type": "string" + }, + "Name": { + "type": "string" + }, + "Type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "Name", + "Description", + "Type", + "CountMin", + "CountMax" + ] + }, + "CharmLXDProfile": { + "type": "object", + "properties": { + "config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "description": { + "type": "string" + }, + "devices": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + } + } + } + }, + "additionalProperties": false, + "required": [ + "config", + "description", + "devices" + ] + }, + "CharmManifest": { + "type": "object", + "properties": { + "bases": { + "type": "array", + "items": { + "$ref": "#/definitions/CharmBase" + } + } + }, + "additionalProperties": false + }, + "CharmMeta": { + "type": "object", + "properties": { + "assumes-expr": { + "$ref": "#/definitions/ExpressionTree" + }, + "categories": { + "type": "array", + "items": { + "type": "string" + } + }, + "containers": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmContainer" + } + } + }, + "deployment": { + "$ref": "#/definitions/CharmDeployment" + }, + "description": { + "type": "string" + }, + "devices": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmDevice" + } + } + }, + "extra-bindings": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "min-juju-version": { + "type": "string" + }, + "name": { + "type": "string" + }, + "payload-classes": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmPayloadClass" + } + } + }, + "peers": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmRelation" + } + } + }, + "provides": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmRelation" + } + } + }, + "requires": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmRelation" + } + } + }, + "resources": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmResourceMeta" + } + } + }, + "series": { + "type": "array", + "items": { + "type": "string" + } + }, + "storage": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmStorage" + } + } + }, + "subordinate": { + "type": "boolean" + }, + "summary": { + "type": "string" + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "terms": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "name", + "summary", + "description", + "subordinate" + ] + }, + "CharmMetric": { + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "type", + "description" + ] + }, + "CharmMetrics": { + "type": "object", + "properties": { + "metrics": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmMetric" + } + } + }, + "plan": { + "$ref": "#/definitions/CharmPlan" + } + }, + "additionalProperties": false, + "required": [ + "metrics", + "plan" + ] + }, + "CharmMount": { + "type": "object", + "properties": { + "location": { + "type": "string" + }, + "storage": { + "type": "string" + } + }, + "additionalProperties": false + }, + "CharmOption": { + "type": "object", + "properties": { + "default": { + "type": "object", + "additionalProperties": true + }, + "description": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "type" + ] + }, + "CharmPayloadClass": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "type" + ] + }, + "CharmPlan": { + "type": "object", + "properties": { + "required": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "required" + ] + }, + "CharmRelation": { + "type": "object", + "properties": { + "interface": { + "type": "string" + }, + "limit": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "optional": { + "type": "boolean" + }, + "role": { + "type": "string" + }, + "scope": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "role", + "interface", + "optional", + "limit", + "scope" + ] + }, + "CharmResourceMeta": { + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "type", + "path", + "description" + ] + }, + "CharmStorage": { + "type": "object", + "properties": { + "count-max": { + "type": "integer" + }, + "count-min": { + "type": "integer" + }, + "description": { + "type": "string" + }, + "location": { + "type": "string" + }, + "minimum-size": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "properties": { + "type": "array", + "items": { + "type": "string" + } + }, + "read-only": { + "type": "boolean" + }, + "shared": { + "type": "boolean" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "description", + "type", + "shared", + "read-only", + "count-min", + "count-max", + "minimum-size" + ] + }, + "CharmURL": { + "type": "object", + "properties": { + "url": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "url" + ] + }, + "ConfigResult": { + "type": "object", + "properties": { + "config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false, + "required": [ + "config" + ] + }, + "Entities": { + "type": "object", + "properties": { + "entities": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } + } + }, + "additionalProperties": false, + "required": [ + "entities" + ] + }, + "Entity": { + "type": "object", + "properties": { + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ExpressionTree": { + "type": "object", + "properties": { + "Expression": { + "type": "object", + "additionalProperties": true + } + }, + "additionalProperties": false, + "required": [ + "Expression" + ] + }, + "LifeResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "life": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "life" + ] + }, + "LifeResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/LifeResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "NotifyWatchResult": { + "type": "object", + "properties": { + "NotifyWatcherId": { + "type": "string" + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false, + "required": [ + "NotifyWatcherId" + ] + }, + "NotifyWatchResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/NotifyWatchResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "PortRange": { + "type": "object", + "properties": { + "from-port": { + "type": "integer" + }, + "protocol": { + "type": "string" + }, + "to-port": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "from-port", + "to-port", + "protocol" + ] + }, + "StringsWatchResult": { + "type": "object", + "properties": { + "changes": { + "type": "array", + "items": { + "type": "string" + } + }, + "error": { + "$ref": "#/definitions/Error" + }, + "watcher-id": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "watcher-id" + ] + }, + "StringsWatchResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/StringsWatchResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + } + } + } + }, + { + "Name": "CAASModelConfigManager", + "Description": "Facade allows model config manager clients to watch controller config changes and fetch controller config.", + "Version": 1, + "AvailableTo": [ + "controller-machine-agent" + ], + "Schema": { + "type": "object", + "properties": { + "ControllerConfig": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/ControllerConfigResult" + } + } + }, + "WatchControllerConfig": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/NotifyWatchResult" + } + } + } + }, + "definitions": { + "ControllerConfigResult": { + "type": "object", + "properties": { + "config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + } + }, + "additionalProperties": false, + "required": [ + "config" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "NotifyWatchResult": { + "type": "object", + "properties": { + "NotifyWatcherId": { + "type": "string" + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false, + "required": [ + "NotifyWatcherId" + ] + } + } + } + }, + { + "Name": "CAASModelOperator", + "Description": "API represents the controller model operator facade.", + "Version": 1, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "APIAddresses": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/StringsResult" + } + }, + "description": "APIAddresses returns the list of addresses used to connect to the API." + }, + "APIHostPorts": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/APIHostPortsResult" + } + }, + "description": "APIHostPorts returns the API server addresses." + }, + "ModelOperatorProvisioningInfo": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/ModelOperatorInfo" + } + }, + "description": "ModelOperatorProvisioningInfo returns the information needed for provisioning\na new model operator into a caas cluster." + }, + "ModelUUID": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/StringResult" + } + }, + "description": "ModelUUID returns the model UUID that this facade is used to operate.\nIt is implemented here directly as a result of removing it from\nembedded APIAddresser *without* bumping the facade version.\nIt should be blanked when this facade version is next incremented." + }, + "SetPasswords": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/EntityPasswords" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "SetPasswords sets the given password for each supplied entity, if possible." + }, + "WatchAPIHostPorts": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/NotifyWatchResult" + } + }, + "description": "WatchAPIHostPorts watches the API server addresses." + }, + "WatchModelOperatorProvisioningInfo": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/NotifyWatchResult" + } + }, + "description": "WatchModelOperatorProvisioningInfo provides a watcher for changes that affect the\ninformation returned by ModelOperatorProvisioningInfo." + } + }, + "definitions": { + "APIHostPortsResult": { + "type": "object", + "properties": { + "servers": { + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/definitions/HostPort" + } + } + } + }, + "additionalProperties": false, + "required": [ + "servers" + ] + }, + "Address": { + "type": "object", + "properties": { + "cidr": { + "type": "string" + }, + "config-type": { + "type": "string" + }, + "is-secondary": { + "type": "boolean" + }, + "scope": { + "type": "string" + }, + "space-id": { + "type": "string" + }, + "space-name": { + "type": "string" + }, + "type": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "value", + "type", + "scope" + ] + }, + "DockerImageInfo": { + "type": "object", + "properties": { + "auth": { + "type": "string" + }, + "email": { + "type": "string" + }, + "identitytoken": { + "type": "string" + }, + "image-name": { + "type": "string" + }, + "password": { + "type": "string" + }, + "registrytoken": { + "type": "string" + }, + "repository": { + "type": "string" + }, + "serveraddress": { + "type": "string" + }, + "username": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "image-name" + ] + }, + "EntityPassword": { + "type": "object", + "properties": { + "password": { + "type": "string" + }, + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag", + "password" + ] + }, + "EntityPasswords": { + "type": "object", + "properties": { + "changes": { + "type": "array", + "items": { + "$ref": "#/definitions/EntityPassword" + } + } + }, + "additionalProperties": false, + "required": [ + "changes" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ErrorResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "ErrorResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "HostPort": { + "type": "object", + "properties": { + "Address": { + "$ref": "#/definitions/Address" + }, + "cidr": { + "type": "string" + }, + "config-type": { + "type": "string" + }, + "is-secondary": { + "type": "boolean" + }, + "port": { + "type": "integer" + }, + "scope": { + "type": "string" + }, + "space-id": { + "type": "string" + }, + "space-name": { + "type": "string" + }, + "type": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "value", + "type", + "scope", + "Address", + "port" + ] + }, + "ModelOperatorInfo": { + "type": "object", + "properties": { + "api-addresses": { + "type": "array", + "items": { + "type": "string" + } + }, + "image-details": { + "$ref": "#/definitions/DockerImageInfo" + }, + "version": { + "$ref": "#/definitions/Number" + } + }, + "additionalProperties": false, + "required": [ + "api-addresses", + "image-details", + "version" + ] + }, + "NotifyWatchResult": { + "type": "object", + "properties": { + "NotifyWatcherId": { + "type": "string" + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false, + "required": [ + "NotifyWatcherId" + ] + }, + "Number": { + "type": "object", + "properties": { + "Build": { + "type": "integer" + }, + "Major": { + "type": "integer" + }, + "Minor": { + "type": "integer" + }, + "Patch": { + "type": "integer" + }, + "Tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "Major", + "Minor", + "Tag", + "Patch", + "Build" + ] + }, + "StringResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "result" + ] + }, + "StringsResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + } + } + } + }, + { + "Name": "CAASOperator", + "Description": "Facade is the CAAS operator API facade.", + "Version": 1, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "APIAddresses": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/StringsResult" + } + }, + "description": "APIAddresses returns the list of addresses used to connect to the API." + }, + "APIHostPorts": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/APIHostPortsResult" + } + }, + "description": "APIHostPorts returns the API server addresses." + }, + "Charm": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ApplicationCharmResults" + } + }, + "description": "Charm returns the charm info for all given applications." + }, + "CurrentModel": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/ModelResult" + } + }, + "description": "CurrentModel returns the name and UUID for the current juju model." + }, + "Life": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/LifeResults" + } + }, + "description": "Life returns the life status of every supplied entity, where available." + }, + "ModelUUID": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/StringResult" + } + }, + "description": "ModelUUID returns the model UUID that this facade is used to operate.\nIt is implemented here directly as a result of removing it from\nembedded APIAddresser *without* bumping the facade version.\nIt should be blanked when this facade version is next incremented." + }, + "Remove": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "Remove removes every given entity from state, calling EnsureDead\nfirst, then Remove. It will fail if the entity is not present." + }, + "SetPodSpec": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/SetPodSpecParams" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "SetPodSpec sets the container specs for a set of applications.\nTODO(juju3) - remove" + }, + "SetStatus": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/SetStatus" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "SetStatus sets the status of each given entity." + }, + "SetTools": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/EntitiesVersion" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "SetTools updates the recorded tools version for the agents." + }, + "Watch": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/NotifyWatchResults" + } + }, + "description": "Watch starts an NotifyWatcher for each given entity." + }, + "WatchAPIHostPorts": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/NotifyWatchResult" + } + }, + "description": "WatchAPIHostPorts watches the API server addresses." + }, + "WatchContainerStart": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/WatchContainerStartArgs" + }, + "Result": { + "$ref": "#/definitions/StringsWatchResults" + } + }, + "description": "WatchContainerStart starts a StringWatcher to watch for container start events\non the CAAS api for a specific application and container." + }, + "WatchUnits": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/StringsWatchResults" + } + }, + "description": "WatchUnits starts a StringsWatcher to watch changes to the\nlifecycle states of units for the specified applications in\nthis model." + } + }, + "definitions": { + "APIHostPortsResult": { + "type": "object", + "properties": { + "servers": { + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/definitions/HostPort" + } + } + } + }, + "additionalProperties": false, + "required": [ + "servers" + ] + }, + "Address": { + "type": "object", + "properties": { + "cidr": { + "type": "string" + }, + "config-type": { + "type": "string" + }, + "is-secondary": { + "type": "boolean" + }, + "scope": { + "type": "string" + }, + "space-id": { + "type": "string" + }, + "space-name": { + "type": "string" + }, + "type": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "value", + "type", + "scope" + ] + }, + "ApplicationCharm": { + "type": "object", + "properties": { + "charm-modified-version": { + "type": "integer" + }, + "deployment-mode": { + "type": "string" + }, + "force-upgrade": { + "type": "boolean" + }, + "sha256": { + "type": "string" + }, + "url": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "url", + "sha256", + "charm-modified-version" + ] + }, + "ApplicationCharmResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "$ref": "#/definitions/ApplicationCharm" + } + }, + "additionalProperties": false + }, + "ApplicationCharmResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ApplicationCharmResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "Binary": { + "type": "object", + "properties": { + "Arch": { + "type": "string" + }, + "Build": { + "type": "integer" + }, + "Major": { + "type": "integer" + }, + "Minor": { + "type": "integer" + }, + "Number": { + "$ref": "#/definitions/Number" + }, + "Patch": { + "type": "integer" + }, + "Release": { + "type": "string" + }, + "Tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "Major", + "Minor", + "Tag", + "Patch", + "Build", + "Number", + "Release", + "Arch" + ] + }, + "Entities": { + "type": "object", + "properties": { + "entities": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } + } + }, + "additionalProperties": false, + "required": [ + "entities" + ] + }, + "EntitiesVersion": { + "type": "object", + "properties": { + "agent-tools": { + "type": "array", + "items": { + "$ref": "#/definitions/EntityVersion" + } + } + }, + "additionalProperties": false, + "required": [ + "agent-tools" + ] + }, + "Entity": { + "type": "object", + "properties": { + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag" + ] + }, + "EntityStatusArgs": { + "type": "object", + "properties": { + "data": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "info": { + "type": "string" + }, + "status": { + "type": "string" + }, + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag", + "status", + "info", + "data" + ] + }, + "EntityString": { + "type": "object", + "properties": { + "tag": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag", + "value" + ] + }, + "EntityVersion": { + "type": "object", + "properties": { + "tag": { + "type": "string" + }, + "tools": { + "$ref": "#/definitions/Version" + } + }, + "additionalProperties": false, + "required": [ + "tag", + "tools" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ErrorResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "ErrorResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "HostPort": { + "type": "object", + "properties": { + "Address": { + "$ref": "#/definitions/Address" + }, + "cidr": { + "type": "string" + }, + "config-type": { + "type": "string" + }, + "is-secondary": { + "type": "boolean" + }, + "port": { + "type": "integer" + }, + "scope": { + "type": "string" + }, + "space-id": { + "type": "string" + }, + "space-name": { + "type": "string" + }, + "type": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "value", + "type", + "scope", + "Address", + "port" + ] + }, + "LifeResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "life": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "life" + ] + }, + "LifeResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/LifeResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "ModelResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "name": { + "type": "string" + }, + "type": { + "type": "string" + }, + "uuid": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "uuid", + "type" + ] + }, + "NotifyWatchResult": { + "type": "object", + "properties": { + "NotifyWatcherId": { + "type": "string" + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false, + "required": [ + "NotifyWatcherId" + ] + }, + "NotifyWatchResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/NotifyWatchResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "Number": { + "type": "object", + "properties": { + "Build": { + "type": "integer" + }, + "Major": { + "type": "integer" + }, + "Minor": { + "type": "integer" + }, + "Patch": { + "type": "integer" + }, + "Tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "Major", + "Minor", + "Tag", + "Patch", + "Build" + ] + }, + "SetPodSpecParams": { + "type": "object", + "properties": { + "specs": { + "type": "array", + "items": { + "$ref": "#/definitions/EntityString" + } + } + }, + "additionalProperties": false, + "required": [ + "specs" + ] + }, + "SetStatus": { + "type": "object", + "properties": { + "entities": { + "type": "array", + "items": { + "$ref": "#/definitions/EntityStatusArgs" + } + } + }, + "additionalProperties": false, + "required": [ + "entities" + ] + }, + "StringResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "result" + ] + }, + "StringsResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "StringsWatchResult": { + "type": "object", + "properties": { + "changes": { + "type": "array", + "items": { + "type": "string" + } + }, + "error": { + "$ref": "#/definitions/Error" + }, + "watcher-id": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "watcher-id" + ] + }, + "StringsWatchResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/StringsWatchResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "Version": { + "type": "object", + "properties": { + "version": { + "$ref": "#/definitions/Binary" + } + }, + "additionalProperties": false, + "required": [ + "version" + ] + }, + "WatchContainerStartArg": { + "type": "object", + "properties": { + "container": { + "type": "string" + }, + "entity": { + "$ref": "#/definitions/Entity" + } + }, + "additionalProperties": false, + "required": [ + "entity" + ] + }, + "WatchContainerStartArgs": { + "type": "object", + "properties": { + "args": { + "type": "array", + "items": { + "$ref": "#/definitions/WatchContainerStartArg" + } + } + }, + "additionalProperties": false, + "required": [ + "args" + ] + } + } + } + }, + { + "Name": "CAASOperatorProvisioner", + "Description": "", + "Version": 1, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "APIAddresses": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/StringsResult" + } + }, + "description": "APIAddresses returns the list of addresses used to connect to the API." + }, + "APIHostPorts": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/APIHostPortsResult" + } + }, + "description": "APIHostPorts returns the API server addresses." + }, + "ApplicationCharmInfo": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entity" + }, + "Result": { + "$ref": "#/definitions/Charm" + } + }, + "description": "ApplicationCharmInfo returns information about an application's charm." + }, + "CharmInfo": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/CharmURL" + }, + "Result": { + "$ref": "#/definitions/Charm" + } + }, + "description": "CharmInfo returns information about the requested charm." + }, + "IssueOperatorCertificate": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/IssueOperatorCertificateResults" + } + }, + "description": "IssueOperatorCertificate issues an x509 certificate for use by the specified application operator." + }, + "Life": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/LifeResults" + } + }, + "description": "Life returns the life status of every supplied entity, where available." + }, + "ModelUUID": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/StringResult" + } + }, + "description": "ModelUUID returns the model UUID that this facade is used to operate.\nIt is implemented here directly as a result of removing it from\nembedded APIAddresser *without* bumping the facade version.\nIt should be blanked when this facade version is next incremented." + }, + "OperatorProvisioningInfo": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/OperatorProvisioningInfoResults" + } + }, + "description": "OperatorProvisioningInfo returns the info needed to provision an operator." + }, + "SetPasswords": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/EntityPasswords" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "SetPasswords sets the given password for each supplied entity, if possible." + }, + "WatchAPIHostPorts": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/NotifyWatchResult" + } + }, + "description": "WatchAPIHostPorts watches the API server addresses." + }, + "WatchApplications": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/StringsWatchResult" + } + }, + "description": "WatchApplications starts a StringsWatcher to watch applications\ndeployed to this model." + } + }, + "definitions": { + "APIHostPortsResult": { + "type": "object", + "properties": { + "servers": { + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/definitions/HostPort" + } + } + } + }, + "additionalProperties": false, + "required": [ + "servers" + ] + }, + "Address": { + "type": "object", + "properties": { + "cidr": { + "type": "string" + }, + "config-type": { + "type": "string" + }, + "is-secondary": { + "type": "boolean" + }, + "scope": { + "type": "string" + }, + "space-id": { + "type": "string" + }, + "space-name": { + "type": "string" + }, + "type": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "value", + "type", + "scope" + ] + }, + "Charm": { + "type": "object", + "properties": { + "actions": { + "$ref": "#/definitions/CharmActions" + }, + "config": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmOption" + } + } + }, + "lxd-profile": { + "$ref": "#/definitions/CharmLXDProfile" + }, + "manifest": { + "$ref": "#/definitions/CharmManifest" + }, + "meta": { + "$ref": "#/definitions/CharmMeta" + }, + "metrics": { + "$ref": "#/definitions/CharmMetrics" + }, + "revision": { + "type": "integer" + }, + "url": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "revision", + "url", + "config" + ] + }, + "CharmActionSpec": { + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "params": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + } + }, + "additionalProperties": false, + "required": [ + "description", + "params" + ] + }, + "CharmActions": { + "type": "object", + "properties": { + "specs": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmActionSpec" + } + } + } + }, + "additionalProperties": false + }, + "CharmBase": { + "type": "object", + "properties": { + "architectures": { + "type": "array", + "items": { + "type": "string" + } + }, + "channel": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "additionalProperties": false + }, + "CharmContainer": { + "type": "object", + "properties": { + "mounts": { + "type": "array", + "items": { + "$ref": "#/definitions/CharmMount" + } + }, + "resource": { + "type": "string" + } + }, + "additionalProperties": false + }, + "CharmDeployment": { + "type": "object", + "properties": { + "min-version": { + "type": "string" + }, + "mode": { + "type": "string" + }, + "service": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "type", + "mode", + "service", + "min-version" + ] + }, + "CharmDevice": { + "type": "object", + "properties": { + "CountMax": { + "type": "integer" + }, + "CountMin": { + "type": "integer" + }, + "Description": { + "type": "string" + }, + "Name": { + "type": "string" + }, + "Type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "Name", + "Description", + "Type", + "CountMin", + "CountMax" + ] + }, + "CharmLXDProfile": { + "type": "object", + "properties": { + "config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "description": { + "type": "string" + }, + "devices": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + } + } + } + }, + "additionalProperties": false, + "required": [ + "config", + "description", + "devices" + ] + }, + "CharmManifest": { + "type": "object", + "properties": { + "bases": { + "type": "array", + "items": { + "$ref": "#/definitions/CharmBase" + } + } + }, + "additionalProperties": false + }, + "CharmMeta": { + "type": "object", + "properties": { + "assumes-expr": { + "$ref": "#/definitions/ExpressionTree" + }, + "categories": { + "type": "array", + "items": { + "type": "string" + } + }, + "containers": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmContainer" + } + } + }, + "deployment": { + "$ref": "#/definitions/CharmDeployment" + }, + "description": { + "type": "string" + }, + "devices": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmDevice" + } + } + }, + "extra-bindings": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "min-juju-version": { + "type": "string" + }, + "name": { + "type": "string" + }, + "payload-classes": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmPayloadClass" + } + } + }, + "peers": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmRelation" + } + } + }, + "provides": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmRelation" + } + } + }, + "requires": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmRelation" + } + } + }, + "resources": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmResourceMeta" + } + } + }, + "series": { + "type": "array", + "items": { + "type": "string" + } + }, + "storage": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmStorage" + } + } + }, + "subordinate": { + "type": "boolean" + }, + "summary": { + "type": "string" + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "terms": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "name", + "summary", + "description", + "subordinate" + ] + }, + "CharmMetric": { + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "type", + "description" + ] + }, + "CharmMetrics": { + "type": "object", + "properties": { + "metrics": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmMetric" + } + } + }, + "plan": { + "$ref": "#/definitions/CharmPlan" + } + }, + "additionalProperties": false, + "required": [ + "metrics", + "plan" + ] + }, + "CharmMount": { + "type": "object", + "properties": { + "location": { + "type": "string" + }, + "storage": { + "type": "string" + } + }, + "additionalProperties": false + }, + "CharmOption": { + "type": "object", + "properties": { + "default": { + "type": "object", + "additionalProperties": true + }, + "description": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "type" + ] + }, + "CharmPayloadClass": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "type" + ] + }, + "CharmPlan": { + "type": "object", + "properties": { + "required": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "required" + ] + }, + "CharmRelation": { + "type": "object", + "properties": { + "interface": { + "type": "string" + }, + "limit": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "optional": { + "type": "boolean" + }, + "role": { + "type": "string" + }, + "scope": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "role", + "interface", + "optional", + "limit", + "scope" + ] + }, + "CharmResourceMeta": { + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "type", + "path", + "description" + ] + }, + "CharmStorage": { + "type": "object", + "properties": { + "count-max": { + "type": "integer" + }, + "count-min": { + "type": "integer" + }, + "description": { + "type": "string" + }, + "location": { + "type": "string" + }, + "minimum-size": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "properties": { + "type": "array", + "items": { + "type": "string" + } + }, + "read-only": { + "type": "boolean" + }, + "shared": { + "type": "boolean" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "description", + "type", + "shared", + "read-only", + "count-min", + "count-max", + "minimum-size" + ] + }, + "CharmURL": { + "type": "object", + "properties": { + "url": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "url" + ] + }, + "DockerImageInfo": { + "type": "object", + "properties": { + "auth": { + "type": "string" + }, + "email": { + "type": "string" + }, + "identitytoken": { + "type": "string" + }, + "image-name": { + "type": "string" + }, + "password": { + "type": "string" + }, + "registrytoken": { + "type": "string" + }, + "repository": { + "type": "string" + }, + "serveraddress": { + "type": "string" + }, + "username": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "image-name" + ] + }, + "Entities": { + "type": "object", + "properties": { + "entities": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } + } + }, + "additionalProperties": false, + "required": [ + "entities" + ] + }, + "Entity": { + "type": "object", + "properties": { + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag" + ] + }, + "EntityPassword": { + "type": "object", + "properties": { + "password": { + "type": "string" + }, + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag", + "password" + ] + }, + "EntityPasswords": { + "type": "object", + "properties": { + "changes": { + "type": "array", + "items": { + "$ref": "#/definitions/EntityPassword" + } + } + }, + "additionalProperties": false, + "required": [ + "changes" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ErrorResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "ErrorResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "ExpressionTree": { + "type": "object", + "properties": { + "Expression": { + "type": "object", + "additionalProperties": true + } + }, + "additionalProperties": false, + "required": [ + "Expression" + ] + }, + "HostPort": { + "type": "object", + "properties": { + "Address": { + "$ref": "#/definitions/Address" + }, + "cidr": { + "type": "string" + }, + "config-type": { + "type": "string" + }, + "is-secondary": { + "type": "boolean" + }, + "port": { + "type": "integer" + }, + "scope": { + "type": "string" + }, + "space-id": { + "type": "string" + }, + "space-name": { + "type": "string" + }, + "type": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "value", + "type", + "scope", + "Address", + "port" + ] + }, + "IssueOperatorCertificateResult": { + "type": "object", + "properties": { + "ca-cert": { + "type": "string" + }, + "cert": { + "type": "string" + }, + "error": { + "$ref": "#/definitions/Error" + }, + "private-key": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "ca-cert", + "cert", + "private-key" + ] + }, + "IssueOperatorCertificateResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/IssueOperatorCertificateResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "KubernetesFilesystemAttachmentParams": { + "type": "object", + "properties": { + "mount-point": { + "type": "string" + }, + "provider": { + "type": "string" + }, + "read-only": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "provider" + ] + }, + "KubernetesFilesystemParams": { + "type": "object", + "properties": { + "attachment": { + "$ref": "#/definitions/KubernetesFilesystemAttachmentParams" + }, + "attributes": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "provider": { + "type": "string" + }, + "size": { + "type": "integer" + }, + "storagename": { + "type": "string" + }, + "tags": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + } + }, + "additionalProperties": false, + "required": [ + "storagename", + "size", + "provider" + ] + }, + "LifeResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "life": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "life" + ] + }, + "LifeResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/LifeResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "NotifyWatchResult": { + "type": "object", + "properties": { + "NotifyWatcherId": { + "type": "string" + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false, + "required": [ + "NotifyWatcherId" + ] + }, + "Number": { + "type": "object", + "properties": { + "Build": { + "type": "integer" + }, + "Major": { + "type": "integer" + }, + "Minor": { + "type": "integer" + }, + "Patch": { + "type": "integer" + }, + "Tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "Major", + "Minor", + "Tag", + "Patch", + "Build" + ] + }, + "OperatorProvisioningInfo": { + "type": "object", + "properties": { + "api-addresses": { + "type": "array", + "items": { + "type": "string" + } + }, + "base-image-details": { + "$ref": "#/definitions/DockerImageInfo" + }, + "charm-storage": { + "$ref": "#/definitions/KubernetesFilesystemParams" + }, + "error": { + "$ref": "#/definitions/Error" + }, + "image-details": { + "$ref": "#/definitions/DockerImageInfo" + }, + "tags": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "version": { + "$ref": "#/definitions/Number" + } + }, + "additionalProperties": false, + "required": [ + "image-details", + "base-image-details", + "version", + "api-addresses" + ] + }, + "OperatorProvisioningInfoResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/OperatorProvisioningInfo" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "StringResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "result" + ] + }, + "StringsResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "StringsWatchResult": { + "type": "object", + "properties": { + "changes": { + "type": "array", + "items": { + "type": "string" + } + }, + "error": { + "$ref": "#/definitions/Error" + }, + "watcher-id": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "watcher-id" + ] + } + } + } + }, + { + "Name": "CAASOperatorUpgrader", + "Description": "", + "Version": 1, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "UpgradeOperator": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/KubernetesUpgradeArg" + }, + "Result": { + "$ref": "#/definitions/ErrorResult" + } + }, + "description": "UpgradeOperator upgrades the operator for the specified agents." + } + }, + "definitions": { + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ErrorResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "KubernetesUpgradeArg": { + "type": "object", + "properties": { + "agent-tag": { + "type": "string" + }, + "version": { + "$ref": "#/definitions/Number" + } + }, + "additionalProperties": false, + "required": [ + "agent-tag", + "version" + ] + }, + "Number": { + "type": "object", + "properties": { + "Build": { + "type": "integer" + }, + "Major": { + "type": "integer" + }, + "Minor": { + "type": "integer" + }, + "Patch": { + "type": "integer" + }, + "Tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "Major", + "Minor", + "Tag", + "Patch", + "Build" + ] + } + } + } + }, + { + "Name": "CAASUnitProvisioner", + "Description": "", + "Version": 2, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "ApplicationCharmInfo": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entity" + }, + "Result": { + "$ref": "#/definitions/Charm" + } + }, + "description": "ApplicationCharmInfo returns information about an application's charm." + }, + "ApplicationsConfig": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ApplicationGetConfigResults" + } + }, + "description": "ApplicationsConfig returns the config for the specified applications." + }, + "ApplicationsScale": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/IntResults" + } + }, + "description": "ApplicationsScale returns the scaling info for specified applications in this model." + }, + "ApplicationsTrust": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/BoolResults" + } + }, + "description": "ApplicationsTrust returns the trust status for specified applications in this model." + }, + "CharmInfo": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/CharmURL" + }, + "Result": { + "$ref": "#/definitions/Charm" + } + }, + "description": "CharmInfo returns information about the requested charm." + }, + "ClearApplicationsResources": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "ClearApplicationsResources clears the flags which indicate\napplications still have resources in the cluster." + }, + "DeploymentMode": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/StringResults" + } + }, + "description": "DeploymentMode returns the deployment mode of the given applications' charms." + }, + "Life": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/LifeResults" + } + }, + "description": "Life returns the life status of every supplied entity, where available." + }, + "ProvisioningInfo": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/KubernetesProvisioningInfoResults" + } + }, + "description": "ProvisioningInfo returns the provisioning info for specified applications in this model." + }, + "SetOperatorStatus": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/SetStatus" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "SetOperatorStatus updates the operator status for each given application." + }, + "UpdateApplicationsService": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/UpdateApplicationServiceArgs" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "UpdateApplicationsService updates the Juju data model to reflect the given\nservice details of the specified application." + }, + "UpdateApplicationsUnits": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/UpdateApplicationUnitArgs" + }, + "Result": { + "$ref": "#/definitions/UpdateApplicationUnitResults" + } + }, + "description": "UpdateApplicationsUnits updates the Juju data model to reflect the given\nunits of the specified application." + }, + "Watch": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/NotifyWatchResults" + } + }, + "description": "Watch starts a NotifyWatcher for each entity given." + }, + "WatchApplications": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/StringsWatchResult" + } + }, + "description": "WatchApplications starts a StringsWatcher to watch applications\ndeployed to this model." + }, + "WatchApplicationsScale": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/NotifyWatchResults" + } + }, + "description": "WatchApplicationsScale starts a NotifyWatcher to watch changes\nto the applications' scale." + }, + "WatchApplicationsTrustHash": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/StringsWatchResults" + } + }, + "description": "WatchApplicationsTrustHash starts a StringsWatcher to watch changes\nto the applications' trust status." + }, + "WatchPodSpec": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/NotifyWatchResults" + } + }, + "description": "WatchPodSpec starts a NotifyWatcher to watch changes to the\npod spec for specified units in this model." + } + }, + "definitions": { + "Address": { + "type": "object", + "properties": { + "cidr": { + "type": "string" + }, + "config-type": { + "type": "string" + }, + "is-secondary": { + "type": "boolean" + }, + "scope": { + "type": "string" + }, + "space-id": { + "type": "string" + }, + "space-name": { + "type": "string" + }, + "type": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "value", + "type", + "scope" + ] + }, + "ApplicationGetConfigResults": { + "type": "object", + "properties": { + "Results": { + "type": "array", + "items": { + "$ref": "#/definitions/ConfigResult" + } + } + }, + "additionalProperties": false, + "required": [ + "Results" + ] + }, + "ApplicationUnitInfo": { + "type": "object", + "properties": { + "provider-id": { + "type": "string" + }, + "unit-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "provider-id", + "unit-tag" + ] + }, + "ApplicationUnitParams": { + "type": "object", + "properties": { + "address": { + "type": "string" + }, + "data": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "filesystem-info": { + "type": "array", + "items": { + "$ref": "#/definitions/KubernetesFilesystemInfo" + } + }, + "info": { + "type": "string" + }, + "ports": { + "type": "array", + "items": { + "type": "string" + } + }, + "provider-id": { + "type": "string" + }, + "stateful": { + "type": "boolean" + }, + "status": { + "type": "string" + }, + "unit-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "provider-id", + "unit-tag", + "address", + "ports", + "status", + "info" + ] + }, + "BoolResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "result" + ] + }, + "BoolResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/BoolResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "Charm": { + "type": "object", + "properties": { + "actions": { + "$ref": "#/definitions/CharmActions" + }, + "config": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmOption" + } + } + }, + "lxd-profile": { + "$ref": "#/definitions/CharmLXDProfile" + }, + "manifest": { + "$ref": "#/definitions/CharmManifest" + }, + "meta": { + "$ref": "#/definitions/CharmMeta" + }, + "metrics": { + "$ref": "#/definitions/CharmMetrics" + }, + "revision": { + "type": "integer" + }, + "url": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "revision", + "url", + "config" + ] + }, + "CharmActionSpec": { + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "params": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + } + }, + "additionalProperties": false, + "required": [ + "description", + "params" + ] + }, + "CharmActions": { + "type": "object", + "properties": { + "specs": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmActionSpec" + } + } + } + }, + "additionalProperties": false + }, + "CharmBase": { + "type": "object", + "properties": { + "architectures": { + "type": "array", + "items": { + "type": "string" + } + }, + "channel": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "additionalProperties": false + }, + "CharmContainer": { + "type": "object", + "properties": { + "mounts": { + "type": "array", + "items": { + "$ref": "#/definitions/CharmMount" + } + }, + "resource": { + "type": "string" + } + }, + "additionalProperties": false + }, + "CharmDeployment": { + "type": "object", + "properties": { + "min-version": { + "type": "string" + }, + "mode": { + "type": "string" + }, + "service": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "type", + "mode", + "service", + "min-version" + ] + }, + "CharmDevice": { + "type": "object", + "properties": { + "CountMax": { + "type": "integer" + }, + "CountMin": { + "type": "integer" + }, + "Description": { + "type": "string" + }, + "Name": { + "type": "string" + }, + "Type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "Name", + "Description", + "Type", + "CountMin", + "CountMax" + ] + }, + "CharmLXDProfile": { + "type": "object", + "properties": { + "config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "description": { + "type": "string" + }, + "devices": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + } + } + } + }, + "additionalProperties": false, + "required": [ + "config", + "description", + "devices" + ] + }, + "CharmManifest": { + "type": "object", + "properties": { + "bases": { + "type": "array", + "items": { + "$ref": "#/definitions/CharmBase" + } + } + }, + "additionalProperties": false + }, + "CharmMeta": { + "type": "object", + "properties": { + "assumes-expr": { + "$ref": "#/definitions/ExpressionTree" + }, + "categories": { + "type": "array", + "items": { + "type": "string" + } + }, + "containers": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmContainer" + } + } + }, + "deployment": { + "$ref": "#/definitions/CharmDeployment" + }, + "description": { + "type": "string" + }, + "devices": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmDevice" + } + } + }, + "extra-bindings": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "min-juju-version": { + "type": "string" + }, + "name": { + "type": "string" + }, + "payload-classes": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmPayloadClass" + } + } + }, + "peers": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmRelation" + } + } + }, + "provides": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmRelation" + } + } + }, + "requires": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmRelation" + } + } + }, + "resources": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmResourceMeta" + } + } + }, + "series": { + "type": "array", + "items": { + "type": "string" + } + }, + "storage": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmStorage" + } + } + }, + "subordinate": { + "type": "boolean" + }, + "summary": { + "type": "string" + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "terms": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "name", + "summary", + "description", + "subordinate" + ] + }, + "CharmMetric": { + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "type", + "description" + ] + }, + "CharmMetrics": { + "type": "object", + "properties": { + "metrics": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmMetric" + } + } + }, + "plan": { + "$ref": "#/definitions/CharmPlan" + } + }, + "additionalProperties": false, + "required": [ + "metrics", + "plan" + ] + }, + "CharmMount": { + "type": "object", + "properties": { + "location": { + "type": "string" + }, + "storage": { + "type": "string" + } + }, + "additionalProperties": false + }, + "CharmOption": { + "type": "object", + "properties": { + "default": { + "type": "object", + "additionalProperties": true + }, + "description": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "type" + ] + }, + "CharmPayloadClass": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "type" + ] + }, + "CharmPlan": { + "type": "object", + "properties": { + "required": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "required" + ] + }, + "CharmRelation": { + "type": "object", + "properties": { + "interface": { + "type": "string" + }, + "limit": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "optional": { + "type": "boolean" + }, + "role": { + "type": "string" + }, + "scope": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "role", + "interface", + "optional", + "limit", + "scope" + ] + }, + "CharmResourceMeta": { + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "type", + "path", + "description" + ] + }, + "CharmStorage": { + "type": "object", + "properties": { + "count-max": { + "type": "integer" + }, + "count-min": { + "type": "integer" + }, + "description": { + "type": "string" + }, + "location": { + "type": "string" + }, + "minimum-size": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "properties": { + "type": "array", + "items": { + "type": "string" + } + }, + "read-only": { + "type": "boolean" + }, + "shared": { + "type": "boolean" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "description", + "type", + "shared", + "read-only", + "count-min", + "count-max", + "minimum-size" + ] + }, + "CharmURL": { + "type": "object", + "properties": { + "url": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "url" + ] + }, + "ConfigResult": { + "type": "object", + "properties": { + "config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false, + "required": [ + "config" + ] + }, + "DockerImageInfo": { + "type": "object", + "properties": { + "auth": { + "type": "string" + }, + "email": { + "type": "string" + }, + "identitytoken": { + "type": "string" + }, + "image-name": { + "type": "string" + }, + "password": { + "type": "string" + }, + "registrytoken": { + "type": "string" + }, + "repository": { + "type": "string" + }, + "serveraddress": { + "type": "string" + }, + "username": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "image-name" + ] + }, + "Entities": { + "type": "object", + "properties": { + "entities": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } + } + }, + "additionalProperties": false, + "required": [ + "entities" + ] + }, + "Entity": { + "type": "object", + "properties": { + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag" + ] + }, + "EntityStatus": { + "type": "object", + "properties": { + "data": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "info": { + "type": "string" + }, + "since": { + "type": "string", + "format": "date-time" + }, + "status": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "status", + "info", + "since" + ] + }, + "EntityStatusArgs": { + "type": "object", + "properties": { + "data": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "info": { + "type": "string" + }, + "status": { + "type": "string" + }, + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag", + "status", + "info", + "data" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ErrorResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "ErrorResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "ExpressionTree": { + "type": "object", + "properties": { + "Expression": { + "type": "object", + "additionalProperties": true + } + }, + "additionalProperties": false, + "required": [ + "Expression" + ] + }, + "IntResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "result" + ] + }, + "IntResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/IntResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "KubernetesDeploymentInfo": { + "type": "object", + "properties": { + "deployment-type": { + "type": "string" + }, + "service-type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "deployment-type", + "service-type" + ] + }, + "KubernetesDeviceParams": { + "type": "object", + "properties": { + "Attributes": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "Count": { + "type": "integer" + }, + "Type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "Type", + "Count", + "Attributes" + ] + }, + "KubernetesFilesystemAttachmentParams": { + "type": "object", + "properties": { + "mount-point": { + "type": "string" + }, + "provider": { + "type": "string" + }, + "read-only": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "provider" + ] + }, + "KubernetesFilesystemInfo": { + "type": "object", + "properties": { + "data": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "filesystem-id": { + "type": "string" + }, + "info": { + "type": "string" + }, + "mount-point": { + "type": "string" + }, + "pool": { + "type": "string" + }, + "read-only": { + "type": "boolean" + }, + "size": { + "type": "integer" + }, + "status": { + "type": "string" + }, + "storagename": { + "type": "string" + }, + "volume": { + "$ref": "#/definitions/KubernetesVolumeInfo" + } + }, + "additionalProperties": false, + "required": [ + "storagename", + "pool", + "size", + "filesystem-id", + "status", + "info", + "volume" + ] + }, + "KubernetesFilesystemParams": { + "type": "object", + "properties": { + "attachment": { + "$ref": "#/definitions/KubernetesFilesystemAttachmentParams" + }, + "attributes": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "provider": { + "type": "string" + }, + "size": { + "type": "integer" + }, + "storagename": { + "type": "string" + }, + "tags": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + } + }, + "additionalProperties": false, + "required": [ + "storagename", + "size", + "provider" + ] + }, + "KubernetesProvisioningInfo": { + "type": "object", + "properties": { + "charm-modified-version": { + "type": "integer" + }, + "constraints": { + "$ref": "#/definitions/Value" + }, + "deployment-info": { + "$ref": "#/definitions/KubernetesDeploymentInfo" + }, + "devices": { + "type": "array", + "items": { + "$ref": "#/definitions/KubernetesDeviceParams" + } + }, + "filesystems": { + "type": "array", + "items": { + "$ref": "#/definitions/KubernetesFilesystemParams" + } + }, + "image-repo": { + "$ref": "#/definitions/DockerImageInfo" + }, + "pod-spec": { + "type": "string" + }, + "raw-k8s-spec": { + "type": "string" + }, + "tags": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "volumes": { + "type": "array", + "items": { + "$ref": "#/definitions/KubernetesVolumeParams" + } + } + }, + "additionalProperties": false, + "required": [ + "pod-spec", + "constraints" + ] + }, + "KubernetesProvisioningInfoResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "$ref": "#/definitions/KubernetesProvisioningInfo" + } + }, + "additionalProperties": false, + "required": [ + "result" + ] + }, + "KubernetesProvisioningInfoResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/KubernetesProvisioningInfoResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "KubernetesVolumeAttachmentParams": { + "type": "object", + "properties": { + "provider": { + "type": "string" + }, + "read-only": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "provider" + ] + }, + "KubernetesVolumeInfo": { + "type": "object", + "properties": { + "data": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "info": { + "type": "string" + }, + "persistent": { + "type": "boolean" + }, + "pool": { + "type": "string" + }, + "size": { + "type": "integer" + }, + "status": { + "type": "string" + }, + "volume-id": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "volume-id", + "size", + "persistent", + "status", + "info" + ] + }, + "KubernetesVolumeParams": { + "type": "object", + "properties": { + "attachment": { + "$ref": "#/definitions/KubernetesVolumeAttachmentParams" + }, + "attributes": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "provider": { + "type": "string" + }, + "size": { + "type": "integer" + }, + "storagename": { + "type": "string" + }, + "tags": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + } + }, + "additionalProperties": false, + "required": [ + "storagename", + "size", + "provider" + ] + }, + "LifeResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "life": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "life" + ] + }, + "LifeResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/LifeResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "NotifyWatchResult": { + "type": "object", + "properties": { + "NotifyWatcherId": { + "type": "string" + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false, + "required": [ + "NotifyWatcherId" + ] + }, + "NotifyWatchResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/NotifyWatchResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "SetStatus": { + "type": "object", + "properties": { + "entities": { + "type": "array", + "items": { + "$ref": "#/definitions/EntityStatusArgs" + } + } + }, + "additionalProperties": false, + "required": [ + "entities" + ] + }, + "StringResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "result" + ] + }, + "StringResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/StringResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "StringsWatchResult": { + "type": "object", + "properties": { + "changes": { + "type": "array", + "items": { + "type": "string" + } + }, + "error": { + "$ref": "#/definitions/Error" + }, + "watcher-id": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "watcher-id" + ] + }, + "StringsWatchResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/StringsWatchResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "UpdateApplicationServiceArg": { + "type": "object", + "properties": { + "addresses": { + "type": "array", + "items": { + "$ref": "#/definitions/Address" + } + }, + "application-tag": { + "type": "string" + }, + "generation": { + "type": "integer" + }, + "provider-id": { + "type": "string" + }, + "scale": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "application-tag", + "provider-id", + "addresses" + ] + }, + "UpdateApplicationServiceArgs": { + "type": "object", + "properties": { + "args": { + "type": "array", + "items": { + "$ref": "#/definitions/UpdateApplicationServiceArg" + } + } + }, + "additionalProperties": false, + "required": [ + "args" + ] + }, + "UpdateApplicationUnitArgs": { + "type": "object", + "properties": { + "args": { + "type": "array", + "items": { + "$ref": "#/definitions/UpdateApplicationUnits" + } + } + }, + "additionalProperties": false, + "required": [ + "args" + ] + }, + "UpdateApplicationUnitResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "info": { + "$ref": "#/definitions/UpdateApplicationUnitsInfo" + } + }, + "additionalProperties": false + }, + "UpdateApplicationUnitResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/UpdateApplicationUnitResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "UpdateApplicationUnits": { + "type": "object", + "properties": { + "application-tag": { + "type": "string" + }, + "generation": { + "type": "integer" + }, + "scale": { + "type": "integer" + }, + "status": { + "$ref": "#/definitions/EntityStatus" + }, + "units": { + "type": "array", + "items": { + "$ref": "#/definitions/ApplicationUnitParams" + } + } + }, + "additionalProperties": false, + "required": [ + "application-tag", + "units" + ] + }, + "UpdateApplicationUnitsInfo": { + "type": "object", + "properties": { + "units": { + "type": "array", + "items": { + "$ref": "#/definitions/ApplicationUnitInfo" + } + } + }, + "additionalProperties": false, + "required": [ + "units" + ] + }, + "Value": { + "type": "object", + "properties": { + "allocate-public-ip": { + "type": "boolean" + }, + "arch": { + "type": "string" + }, + "container": { + "type": "string" + }, + "cores": { + "type": "integer" + }, + "cpu-power": { + "type": "integer" + }, + "image-id": { + "type": "string" + }, + "instance-role": { + "type": "string" + }, + "instance-type": { + "type": "string" + }, + "mem": { + "type": "integer" + }, + "root-disk": { + "type": "integer" + }, + "root-disk-source": { + "type": "string" + }, + "spaces": { + "type": "array", + "items": { + "type": "string" + } + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "virt-type": { + "type": "string" + }, + "zones": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + } + } + } + }, + { + "Name": "CharmDownloader", + "Description": "CharmDownloaderAPI implements an API for watching the charms collection for\nany entries that have not been yet downloaded to the blobstore and for\ntriggering their download.", + "Version": 1, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "DownloadApplicationCharms": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "DownloadApplicationCharms iterates the list of provided applications and\ndownloads any referenced charms that have not yet been persisted to the\nblob store." + }, + "WatchApplicationsWithPendingCharms": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/StringsWatchResult" + } + }, + "description": "WatchApplicationsWithPendingCharms registers and returns a watcher instance\nthat reports the ID of applications that reference a charm which has not yet\nbeen downloaded." + } + }, + "definitions": { + "Entities": { + "type": "object", + "properties": { + "entities": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } + } + }, + "additionalProperties": false, + "required": [ + "entities" + ] + }, + "Entity": { + "type": "object", + "properties": { + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ErrorResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "ErrorResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "StringsWatchResult": { + "type": "object", + "properties": { + "changes": { + "type": "array", + "items": { + "type": "string" + } + }, + "error": { + "$ref": "#/definitions/Error" + }, + "watcher-id": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "watcher-id" + ] + } + } + } + }, + { + "Name": "CharmRevisionUpdater", + "Description": "CharmRevisionUpdaterAPI implements the CharmRevisionUpdater interface and is the concrete\nimplementation of the api end point.", + "Version": 2, + "AvailableTo": [ + "controller-machine-agent" + ], + "Schema": { + "type": "object", + "properties": { + "UpdateLatestRevisions": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/ErrorResult" + } + }, + "description": "UpdateLatestRevisions retrieves the latest revision information from the charm store for all deployed charms\nand records this information in state." + } + }, + "definitions": { + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ErrorResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + } + } + } + }, + { + "Name": "Charms", + "Description": "APIv7 provides the Charms API facade for version 7.\nv7 guarantees SupportedBases will be provided in ResolveCharms", + "Version": 7, + "AvailableTo": [ + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "AddCharm": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/AddCharmWithOrigin" + }, + "Result": { + "$ref": "#/definitions/CharmOriginResult" + } + }, + "description": "AddCharm adds the given charm URL (which must include revision) to the\nenvironment, if it does not exist yet. Local charms are not supported,\nonly charm store and charm hub URLs. See also AddLocalCharm()." + }, + "CharmInfo": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/CharmURL" + }, + "Result": { + "$ref": "#/definitions/Charm" + } + }, + "description": "CharmInfo returns information about the requested charm." + }, + "CheckCharmPlacement": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ApplicationCharmPlacements" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "CheckCharmPlacement checks if a charm is allowed to be placed with in a\ngiven application." + }, + "GetDownloadInfos": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/CharmURLAndOrigins" + }, + "Result": { + "$ref": "#/definitions/DownloadInfoResults" + } + }, + "description": "GetDownloadInfos attempts to get the bundle corresponding to the charm url\nand origin." + }, + "IsMetered": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/CharmURL" + }, + "Result": { + "$ref": "#/definitions/IsMeteredResult" + } + }, + "description": "IsMetered returns whether or not the charm is metered.\nTODO (cderici) only used for metered charms in cmd MeteredDeployAPI,\nkept for client compatibility, remove in juju 4.0" + }, + "List": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/CharmsList" + }, + "Result": { + "$ref": "#/definitions/CharmsListResult" + } + }, + "description": "List returns a list of charm URLs currently in the state.\nIf supplied parameter contains any names, the result will\nbe filtered to return only the charms with supplied names." + }, + "ListCharmResources": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/CharmURLAndOrigins" + }, + "Result": { + "$ref": "#/definitions/CharmResourcesResults" + } + }, + "description": "ListCharmResources returns a series of resources for a given charm." + }, + "ResolveCharms": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ResolveCharmsWithChannel" + }, + "Result": { + "$ref": "#/definitions/ResolveCharmWithChannelResults" + } + }, + "description": "ResolveCharms resolves the given charm URLs with an optionally specified\npreferred channel. Channel provided via CharmOrigin." + } + }, + "definitions": { + "AddCharmWithOrigin": { + "type": "object", + "properties": { + "charm-origin": { + "$ref": "#/definitions/CharmOrigin" + }, + "force": { + "type": "boolean" + }, + "url": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "url", + "charm-origin", + "force" + ] + }, + "ApplicationCharmPlacement": { + "type": "object", + "properties": { + "application": { + "type": "string" + }, + "charm-url": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "application", + "charm-url" + ] + }, + "ApplicationCharmPlacements": { + "type": "object", + "properties": { + "placements": { + "type": "array", + "items": { + "$ref": "#/definitions/ApplicationCharmPlacement" + } + } + }, + "additionalProperties": false, + "required": [ + "placements" + ] + }, + "Base": { + "type": "object", + "properties": { + "channel": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "channel" + ] + }, + "Charm": { + "type": "object", + "properties": { + "actions": { + "$ref": "#/definitions/CharmActions" + }, + "config": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmOption" + } + } + }, + "lxd-profile": { + "$ref": "#/definitions/CharmLXDProfile" + }, + "manifest": { + "$ref": "#/definitions/CharmManifest" + }, + "meta": { + "$ref": "#/definitions/CharmMeta" + }, + "metrics": { + "$ref": "#/definitions/CharmMetrics" + }, + "revision": { + "type": "integer" + }, + "url": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "revision", + "url", + "config" + ] + }, + "CharmActionSpec": { + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "params": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + } + }, + "additionalProperties": false, + "required": [ + "description", + "params" + ] + }, + "CharmActions": { + "type": "object", + "properties": { + "specs": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmActionSpec" + } + } + } + }, + "additionalProperties": false + }, + "CharmBase": { + "type": "object", + "properties": { + "architectures": { + "type": "array", + "items": { + "type": "string" + } + }, + "channel": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "additionalProperties": false + }, + "CharmContainer": { + "type": "object", + "properties": { + "mounts": { + "type": "array", + "items": { + "$ref": "#/definitions/CharmMount" + } + }, + "resource": { + "type": "string" + } + }, + "additionalProperties": false + }, + "CharmDeployment": { + "type": "object", + "properties": { + "min-version": { + "type": "string" + }, + "mode": { + "type": "string" + }, + "service": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "type", + "mode", + "service", + "min-version" + ] + }, + "CharmDevice": { + "type": "object", + "properties": { + "CountMax": { + "type": "integer" + }, + "CountMin": { + "type": "integer" + }, + "Description": { + "type": "string" + }, + "Name": { + "type": "string" + }, + "Type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "Name", + "Description", + "Type", + "CountMin", + "CountMax" + ] + }, + "CharmLXDProfile": { + "type": "object", + "properties": { + "config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "description": { + "type": "string" + }, + "devices": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + } + } + } + }, + "additionalProperties": false, + "required": [ + "config", + "description", + "devices" + ] + }, + "CharmManifest": { + "type": "object", + "properties": { + "bases": { + "type": "array", + "items": { + "$ref": "#/definitions/CharmBase" + } + } + }, + "additionalProperties": false + }, + "CharmMeta": { + "type": "object", + "properties": { + "assumes-expr": { + "$ref": "#/definitions/ExpressionTree" + }, + "categories": { + "type": "array", + "items": { + "type": "string" + } + }, + "containers": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmContainer" + } + } + }, + "deployment": { + "$ref": "#/definitions/CharmDeployment" + }, + "description": { + "type": "string" + }, + "devices": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmDevice" + } + } + }, + "extra-bindings": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "min-juju-version": { + "type": "string" + }, + "name": { + "type": "string" + }, + "payload-classes": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmPayloadClass" + } + } + }, + "peers": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmRelation" + } + } + }, + "provides": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmRelation" + } + } + }, + "requires": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmRelation" + } + } + }, + "resources": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmResourceMeta" + } + } + }, + "series": { + "type": "array", + "items": { + "type": "string" + } + }, + "storage": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmStorage" + } + } + }, + "subordinate": { + "type": "boolean" + }, + "summary": { + "type": "string" + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "terms": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "name", + "summary", + "description", + "subordinate" + ] + }, + "CharmMetric": { + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "type", + "description" + ] + }, + "CharmMetrics": { + "type": "object", + "properties": { + "metrics": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/CharmMetric" + } + } + }, + "plan": { + "$ref": "#/definitions/CharmPlan" + } + }, + "additionalProperties": false, + "required": [ + "metrics", + "plan" + ] + }, + "CharmMount": { + "type": "object", + "properties": { + "location": { + "type": "string" + }, + "storage": { + "type": "string" + } + }, + "additionalProperties": false + }, + "CharmOption": { + "type": "object", + "properties": { + "default": { + "type": "object", + "additionalProperties": true + }, + "description": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "type" + ] + }, + "CharmOrigin": { + "type": "object", + "properties": { + "architecture": { + "type": "string" + }, + "base": { + "$ref": "#/definitions/Base" + }, + "branch": { + "type": "string" + }, + "hash": { + "type": "string" + }, + "id": { + "type": "string" + }, + "instance-key": { + "type": "string" + }, + "revision": { + "type": "integer" + }, + "risk": { + "type": "string" + }, + "source": { + "type": "string" + }, + "track": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "source", + "type", + "id" + ] + }, + "CharmOriginResult": { + "type": "object", + "properties": { + "charm-origin": { + "$ref": "#/definitions/CharmOrigin" + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false, + "required": [ + "charm-origin" + ] + }, + "CharmPayloadClass": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "type" + ] + }, + "CharmPlan": { + "type": "object", + "properties": { + "required": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "required" + ] + }, + "CharmRelation": { + "type": "object", + "properties": { + "interface": { + "type": "string" + }, + "limit": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "optional": { + "type": "boolean" + }, + "role": { + "type": "string" + }, + "scope": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "role", + "interface", + "optional", + "limit", + "scope" + ] + }, + "CharmResource": { + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "fingerprint": { + "type": "array", + "items": { + "type": "integer" + } + }, + "name": { + "type": "string" + }, + "origin": { + "type": "string" + }, + "path": { + "type": "string" + }, + "revision": { + "type": "integer" + }, + "size": { + "type": "integer" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "type", + "path", + "origin", + "revision", + "fingerprint", + "size" + ] + }, + "CharmResourceMeta": { + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "type", + "path", + "description" + ] + }, + "CharmResourceResult": { + "type": "object", + "properties": { + "CharmResource": { + "$ref": "#/definitions/CharmResource" + }, + "ErrorResult": { + "$ref": "#/definitions/ErrorResult" + }, + "description": { + "type": "string" + }, + "error": { + "$ref": "#/definitions/Error" + }, + "fingerprint": { + "type": "array", + "items": { + "type": "integer" + } + }, + "name": { + "type": "string" + }, + "origin": { + "type": "string" + }, + "path": { + "type": "string" + }, + "revision": { + "type": "integer" + }, + "size": { + "type": "integer" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "ErrorResult", + "name", + "type", + "path", + "origin", + "revision", + "fingerprint", + "size", + "CharmResource" + ] + }, + "CharmResourcesResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/definitions/CharmResourceResult" + } + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "CharmStorage": { + "type": "object", + "properties": { + "count-max": { + "type": "integer" + }, + "count-min": { + "type": "integer" + }, + "description": { + "type": "string" + }, + "location": { + "type": "string" + }, + "minimum-size": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "properties": { + "type": "array", + "items": { + "type": "string" + } + }, + "read-only": { + "type": "boolean" + }, + "shared": { + "type": "boolean" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "description", + "type", + "shared", + "read-only", + "count-min", + "count-max", + "minimum-size" + ] + }, + "CharmURL": { + "type": "object", + "properties": { + "url": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "url" + ] + }, + "CharmURLAndOrigin": { + "type": "object", + "properties": { + "charm-origin": { + "$ref": "#/definitions/CharmOrigin" + }, + "charm-url": { + "type": "string" + }, + "macaroon": { + "$ref": "#/definitions/Macaroon" + } + }, + "additionalProperties": false, + "required": [ + "charm-url", + "charm-origin" + ] + }, + "CharmURLAndOrigins": { + "type": "object", + "properties": { + "entities": { + "type": "array", + "items": { + "$ref": "#/definitions/CharmURLAndOrigin" + } + } + }, + "additionalProperties": false, + "required": [ + "entities" + ] + }, + "CharmsList": { + "type": "object", + "properties": { + "names": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "names" + ] + }, + "CharmsListResult": { + "type": "object", + "properties": { + "charm-urls": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "charm-urls" + ] + }, + "DownloadInfoResult": { + "type": "object", + "properties": { + "charm-origin": { + "$ref": "#/definitions/CharmOrigin" + }, + "url": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "url", + "charm-origin" + ] + }, + "DownloadInfoResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/DownloadInfoResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ErrorResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "ErrorResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "ExpressionTree": { + "type": "object", + "properties": { + "Expression": { + "type": "object", + "additionalProperties": true + } + }, + "additionalProperties": false, + "required": [ + "Expression" + ] + }, + "IsMeteredResult": { + "type": "object", + "properties": { + "metered": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "metered" + ] + }, + "Macaroon": { + "type": "object", + "additionalProperties": false + }, + "ResolveCharmWithChannel": { + "type": "object", + "properties": { + "charm-origin": { + "$ref": "#/definitions/CharmOrigin" + }, + "reference": { + "type": "string" + }, + "switch-charm": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "reference", + "charm-origin" + ] + }, + "ResolveCharmWithChannelResult": { + "type": "object", + "properties": { + "charm-origin": { + "$ref": "#/definitions/CharmOrigin" + }, + "error": { + "$ref": "#/definitions/Error" + }, + "supported-bases": { + "type": "array", + "items": { + "$ref": "#/definitions/Base" + } + }, + "url": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "url", + "charm-origin", + "supported-bases" + ] + }, + "ResolveCharmWithChannelResults": { + "type": "object", + "properties": { + "Results": { + "type": "array", + "items": { + "$ref": "#/definitions/ResolveCharmWithChannelResult" + } + } + }, + "additionalProperties": false, + "required": [ + "Results" + ] + }, + "ResolveCharmsWithChannel": { + "type": "object", + "properties": { + "macaroon": { + "$ref": "#/definitions/Macaroon" + }, + "resolve": { + "type": "array", + "items": { + "$ref": "#/definitions/ResolveCharmWithChannel" + } + } + }, + "additionalProperties": false, + "required": [ + "resolve" + ] + } + } + } + }, + { + "Name": "Cleaner", + "Description": "CleanerAPI implements the API used by the cleaner worker.", + "Version": 2, + "AvailableTo": [ + "controller-machine-agent" + ], + "Schema": { + "type": "object", + "properties": { + "Cleanup": { + "type": "object", + "description": "Cleanup triggers a state cleanup" + }, + "WatchCleanups": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/NotifyWatchResult" + } + }, + "description": "WatchCleanups watches for cleanups to be performed in state." + } + }, + "definitions": { + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "NotifyWatchResult": { + "type": "object", + "properties": { + "NotifyWatcherId": { + "type": "string" + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false, + "required": [ + "NotifyWatcherId" + ] + } + } + } + }, + { + "Name": "Client", + "Description": "Client serves client-specific API methods.", + "Version": 7, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "FindTools": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/FindToolsParams" + }, + "Result": { + "$ref": "#/definitions/FindToolsResult" + } + }, + "description": "FindTools returns a List containing all tools matching the given parameters.\nTODO(juju 3.1) - remove, used by 2.9 client only" + }, + "FullStatus": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/StatusParams" + }, + "Result": { + "$ref": "#/definitions/FullStatus" + } + }, + "description": "FullStatus gives the information needed for juju status over the api" + }, + "StatusHistory": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/StatusHistoryRequests" + }, + "Result": { + "$ref": "#/definitions/StatusHistoryResults" + } + }, + "description": "StatusHistory returns a slice of past statuses for several entities." + }, + "WatchAll": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/AllWatcherId" + } + }, + "description": "WatchAll initiates a watcher for entities in the connected model." + } + }, + "definitions": { + "AllWatcherId": { + "type": "object", + "properties": { + "watcher-id": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "watcher-id" + ] + }, + "ApplicationOfferStatus": { + "type": "object", + "properties": { + "active-connected-count": { + "type": "integer" + }, + "application-name": { + "type": "string" + }, + "charm": { + "type": "string" + }, + "endpoints": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/RemoteEndpoint" + } + } + }, + "err": { + "$ref": "#/definitions/Error" + }, + "offer-name": { + "type": "string" + }, + "total-connected-count": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "offer-name", + "application-name", + "charm", + "endpoints", + "active-connected-count", + "total-connected-count" + ] + }, + "ApplicationStatus": { + "type": "object", + "properties": { + "base": { + "$ref": "#/definitions/Base" + }, + "can-upgrade-to": { + "type": "string" + }, + "charm": { + "type": "string" + }, + "charm-channel": { + "type": "string" + }, + "charm-profile": { + "type": "string" + }, + "charm-version": { + "type": "string" + }, + "endpoint-bindings": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "err": { + "$ref": "#/definitions/Error" + }, + "exposed": { + "type": "boolean" + }, + "exposed-endpoints": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/ExposedEndpoint" + } + } + }, + "int": { + "type": "integer" + }, + "life": { + "type": "string" + }, + "meter-statuses": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/MeterStatus" + } + } + }, + "provider-id": { + "type": "string" + }, + "public-address": { + "type": "string" + }, + "relations": { + "type": "object", + "patternProperties": { + ".*": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "status": { + "$ref": "#/definitions/DetailedStatus" + }, + "subordinate-to": { + "type": "array", + "items": { + "type": "string" + } + }, + "units": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/UnitStatus" + } + } + }, + "workload-version": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "charm", + "charm-version", + "charm-profile", + "base", + "exposed", + "life", + "relations", + "can-upgrade-to", + "subordinate-to", + "units", + "meter-statuses", + "status", + "workload-version", + "endpoint-bindings", + "public-address" + ] + }, + "Base": { + "type": "object", + "properties": { + "channel": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "channel" + ] + }, + "Binary": { + "type": "object", + "properties": { + "Arch": { + "type": "string" + }, + "Build": { + "type": "integer" + }, + "Major": { + "type": "integer" + }, + "Minor": { + "type": "integer" + }, + "Number": { + "$ref": "#/definitions/Number" + }, + "Patch": { + "type": "integer" + }, + "Release": { + "type": "string" + }, + "Tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "Major", + "Minor", + "Tag", + "Patch", + "Build", + "Number", + "Release", + "Arch" + ] + }, + "BranchStatus": { + "type": "object", + "properties": { + "assigned-units": { + "type": "object", + "patternProperties": { + ".*": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "created": { + "type": "integer" + }, + "created-by": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "assigned-units", + "created", + "created-by" + ] + }, + "DetailedStatus": { + "type": "object", + "properties": { + "data": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "err": { + "$ref": "#/definitions/Error" + }, + "info": { + "type": "string" + }, + "kind": { + "type": "string" + }, + "life": { + "type": "string" + }, + "since": { + "type": "string", + "format": "date-time" + }, + "status": { + "type": "string" + }, + "version": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "status", + "info", + "data", + "since", + "kind", + "version", + "life" + ] + }, + "EndpointStatus": { + "type": "object", + "properties": { + "application": { + "type": "string" + }, + "name": { + "type": "string" + }, + "role": { + "type": "string" + }, + "subordinate": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "application", + "name", + "role", + "subordinate" + ] + }, + "EntityStatus": { + "type": "object", + "properties": { + "data": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "info": { + "type": "string" + }, + "since": { + "type": "string", + "format": "date-time" + }, + "status": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "status", + "info", + "since" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ExposedEndpoint": { + "type": "object", + "properties": { + "expose-to-cidrs": { + "type": "array", + "items": { + "type": "string" + } + }, + "expose-to-spaces": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "FilesystemAttachmentDetails": { + "type": "object", + "properties": { + "FilesystemAttachmentInfo": { + "$ref": "#/definitions/FilesystemAttachmentInfo" + }, + "life": { + "type": "string" + }, + "mount-point": { + "type": "string" + }, + "read-only": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "FilesystemAttachmentInfo" + ] + }, + "FilesystemAttachmentInfo": { + "type": "object", + "properties": { + "mount-point": { + "type": "string" + }, + "read-only": { + "type": "boolean" + } + }, + "additionalProperties": false + }, + "FilesystemDetails": { + "type": "object", + "properties": { + "filesystem-tag": { + "type": "string" + }, + "info": { + "$ref": "#/definitions/FilesystemInfo" + }, + "life": { + "type": "string" + }, + "machine-attachments": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/FilesystemAttachmentDetails" + } + } + }, + "status": { + "$ref": "#/definitions/EntityStatus" + }, + "storage": { + "$ref": "#/definitions/StorageDetails" + }, + "unit-attachments": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/FilesystemAttachmentDetails" + } + } + }, + "volume-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "filesystem-tag", + "info", + "status" + ] + }, + "FilesystemInfo": { + "type": "object", + "properties": { + "filesystem-id": { + "type": "string" + }, + "pool": { + "type": "string" + }, + "size": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "filesystem-id", + "pool", + "size" + ] + }, + "FindToolsParams": { + "type": "object", + "properties": { + "agentstream": { + "type": "string" + }, + "arch": { + "type": "string" + }, + "major": { + "type": "integer" + }, + "number": { + "$ref": "#/definitions/Number" + }, + "os-type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "number", + "major", + "arch", + "os-type", + "agentstream" + ] + }, + "FindToolsResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "list": { + "type": "array", + "items": { + "$ref": "#/definitions/Tools" + } + } + }, + "additionalProperties": false, + "required": [ + "list" + ] + }, + "FullStatus": { + "type": "object", + "properties": { + "applications": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/ApplicationStatus" + } + } + }, + "branches": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/BranchStatus" + } + } + }, + "controller-timestamp": { + "type": "string", + "format": "date-time" + }, + "filesystems": { + "type": "array", + "items": { + "$ref": "#/definitions/FilesystemDetails" + } + }, + "machines": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/MachineStatus" + } + } + }, + "model": { + "$ref": "#/definitions/ModelStatusInfo" + }, + "offers": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/ApplicationOfferStatus" + } + } + }, + "relations": { + "type": "array", + "items": { + "$ref": "#/definitions/RelationStatus" + } + }, + "remote-applications": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/RemoteApplicationStatus" + } + } + }, + "storage": { + "type": "array", + "items": { + "$ref": "#/definitions/StorageDetails" + } + }, + "volumes": { + "type": "array", + "items": { + "$ref": "#/definitions/VolumeDetails" + } + } + }, + "additionalProperties": false, + "required": [ + "model", + "machines", + "applications", + "remote-applications", + "offers", + "relations", + "controller-timestamp", + "branches" + ] + }, + "History": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "statuses": { + "type": "array", + "items": { + "$ref": "#/definitions/DetailedStatus" + } + } + }, + "additionalProperties": false, + "required": [ + "statuses" + ] + }, + "LXDProfile": { + "type": "object", + "properties": { + "config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "description": { + "type": "string" + }, + "devices": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + } + } + } + }, + "additionalProperties": false, + "required": [ + "config", + "description", + "devices" + ] + }, + "MachineStatus": { + "type": "object", + "properties": { + "agent-status": { + "$ref": "#/definitions/DetailedStatus" + }, + "base": { + "$ref": "#/definitions/Base" + }, + "constraints": { + "type": "string" + }, + "containers": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/MachineStatus" + } + } + }, + "display-name": { + "type": "string" + }, + "dns-name": { + "type": "string" + }, + "hardware": { + "type": "string" + }, + "has-vote": { + "type": "boolean" + }, + "hostname": { + "type": "string" + }, + "id": { + "type": "string" + }, + "instance-id": { + "type": "string" + }, + "instance-status": { + "$ref": "#/definitions/DetailedStatus" + }, + "ip-addresses": { + "type": "array", + "items": { + "type": "string" + } + }, + "jobs": { + "type": "array", + "items": { + "type": "string" + } + }, + "lxd-profiles": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/LXDProfile" + } + } + }, + "modification-status": { + "$ref": "#/definitions/DetailedStatus" + }, + "network-interfaces": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/NetworkInterface" + } + } + }, + "primary-controller-machine": { + "type": "boolean" + }, + "wants-vote": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "agent-status", + "instance-status", + "modification-status", + "dns-name", + "instance-id", + "display-name", + "base", + "id", + "containers", + "constraints", + "hardware", + "jobs", + "has-vote", + "wants-vote" + ] + }, + "MeterStatus": { + "type": "object", + "properties": { + "color": { + "type": "string" + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "color", + "message" + ] + }, + "ModelStatusInfo": { + "type": "object", + "properties": { + "available-version": { + "type": "string" + }, + "cloud-tag": { + "type": "string" + }, + "meter-status": { + "$ref": "#/definitions/MeterStatus" + }, + "model-status": { + "$ref": "#/definitions/DetailedStatus" + }, + "name": { + "type": "string" + }, + "region": { + "type": "string" + }, + "sla": { + "type": "string" + }, + "type": { + "type": "string" + }, + "version": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "type", + "cloud-tag", + "version", + "available-version", + "model-status", + "meter-status", + "sla" + ] + }, + "NetworkInterface": { + "type": "object", + "properties": { + "dns-nameservers": { + "type": "array", + "items": { + "type": "string" + } + }, + "gateway": { + "type": "string" + }, + "ip-addresses": { + "type": "array", + "items": { + "type": "string" + } + }, + "is-up": { + "type": "boolean" + }, + "mac-address": { + "type": "string" + }, + "space": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "ip-addresses", + "mac-address", + "is-up" + ] + }, + "Number": { + "type": "object", + "properties": { + "Build": { + "type": "integer" + }, + "Major": { + "type": "integer" + }, + "Minor": { + "type": "integer" + }, + "Patch": { + "type": "integer" + }, + "Tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "Major", + "Minor", + "Tag", + "Patch", + "Build" + ] + }, + "RelationStatus": { + "type": "object", + "properties": { + "endpoints": { + "type": "array", + "items": { + "$ref": "#/definitions/EndpointStatus" + } + }, + "id": { + "type": "integer" + }, + "interface": { + "type": "string" + }, + "key": { + "type": "string" + }, + "scope": { + "type": "string" + }, + "status": { + "$ref": "#/definitions/DetailedStatus" + } + }, + "additionalProperties": false, + "required": [ + "id", + "key", + "interface", + "scope", + "endpoints", + "status" + ] + }, + "RemoteApplicationStatus": { + "type": "object", + "properties": { + "endpoints": { + "type": "array", + "items": { + "$ref": "#/definitions/RemoteEndpoint" + } + }, + "err": { + "$ref": "#/definitions/Error" + }, + "life": { + "type": "string" + }, + "offer-name": { + "type": "string" + }, + "offer-url": { + "type": "string" + }, + "relations": { + "type": "object", + "patternProperties": { + ".*": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "status": { + "$ref": "#/definitions/DetailedStatus" + } + }, + "additionalProperties": false, + "required": [ + "offer-url", + "offer-name", + "endpoints", + "life", + "relations", + "status" + ] + }, + "RemoteEndpoint": { + "type": "object", + "properties": { + "interface": { + "type": "string" + }, + "limit": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "role": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "role", + "interface", + "limit" + ] + }, + "StatusHistoryFilter": { + "type": "object", + "properties": { + "date": { + "type": "string", + "format": "date-time" + }, + "delta": { + "type": "integer" + }, + "exclude": { + "type": "array", + "items": { + "type": "string" + } + }, + "size": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "size", + "date", + "delta", + "exclude" + ] + }, + "StatusHistoryRequest": { + "type": "object", + "properties": { + "filter": { + "$ref": "#/definitions/StatusHistoryFilter" + }, + "historyKind": { + "type": "string" + }, + "size": { + "type": "integer" + }, + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "historyKind", + "size", + "filter", + "tag" + ] + }, + "StatusHistoryRequests": { + "type": "object", + "properties": { + "requests": { + "type": "array", + "items": { + "$ref": "#/definitions/StatusHistoryRequest" + } + } + }, + "additionalProperties": false, + "required": [ + "requests" + ] + }, + "StatusHistoryResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "history": { + "$ref": "#/definitions/History" + } + }, + "additionalProperties": false, + "required": [ + "history" + ] + }, + "StatusHistoryResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/StatusHistoryResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "StatusParams": { + "type": "object", + "properties": { + "include-storage": { + "type": "boolean" + }, + "patterns": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "patterns" + ] + }, + "StorageAttachmentDetails": { + "type": "object", + "properties": { + "life": { + "type": "string" + }, + "location": { + "type": "string" + }, + "machine-tag": { + "type": "string" + }, + "storage-tag": { + "type": "string" + }, + "unit-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "storage-tag", + "unit-tag", + "machine-tag" + ] + }, + "StorageDetails": { + "type": "object", + "properties": { + "attachments": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/StorageAttachmentDetails" + } + } + }, + "kind": { + "type": "integer" + }, + "life": { + "type": "string" + }, + "owner-tag": { + "type": "string" + }, + "persistent": { + "type": "boolean" + }, + "status": { + "$ref": "#/definitions/EntityStatus" + }, + "storage-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "storage-tag", + "owner-tag", + "kind", + "status", + "persistent" + ] + }, + "Tools": { + "type": "object", + "properties": { + "sha256": { + "type": "string" + }, + "size": { + "type": "integer" + }, + "url": { + "type": "string" + }, + "version": { + "$ref": "#/definitions/Binary" + } + }, + "additionalProperties": false, + "required": [ + "version", + "url", + "size" + ] + }, + "UnitStatus": { + "type": "object", + "properties": { + "address": { + "type": "string" + }, + "agent-status": { + "$ref": "#/definitions/DetailedStatus" + }, + "charm": { + "type": "string" + }, + "leader": { + "type": "boolean" + }, + "machine": { + "type": "string" + }, + "opened-ports": { + "type": "array", + "items": { + "type": "string" + } + }, + "provider-id": { + "type": "string" + }, + "public-address": { + "type": "string" + }, + "subordinates": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/UnitStatus" + } + } + }, + "workload-status": { + "$ref": "#/definitions/DetailedStatus" + }, + "workload-version": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "agent-status", + "workload-status", + "workload-version", + "machine", + "opened-ports", + "public-address", + "charm", + "subordinates" + ] + }, + "VolumeAttachmentDetails": { + "type": "object", + "properties": { + "VolumeAttachmentInfo": { + "$ref": "#/definitions/VolumeAttachmentInfo" + }, + "bus-address": { + "type": "string" + }, + "device-link": { + "type": "string" + }, + "device-name": { + "type": "string" + }, + "life": { + "type": "string" + }, + "plan-info": { + "$ref": "#/definitions/VolumeAttachmentPlanInfo" + }, + "read-only": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "VolumeAttachmentInfo" + ] + }, + "VolumeAttachmentInfo": { + "type": "object", + "properties": { + "bus-address": { + "type": "string" + }, + "device-link": { + "type": "string" + }, + "device-name": { + "type": "string" + }, + "plan-info": { + "$ref": "#/definitions/VolumeAttachmentPlanInfo" + }, + "read-only": { + "type": "boolean" + } + }, + "additionalProperties": false + }, + "VolumeAttachmentPlanInfo": { + "type": "object", + "properties": { + "device-attributes": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "device-type": { + "type": "string" + } + }, + "additionalProperties": false + }, + "VolumeDetails": { + "type": "object", + "properties": { + "info": { + "$ref": "#/definitions/VolumeInfo" + }, + "life": { + "type": "string" + }, + "machine-attachments": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/VolumeAttachmentDetails" + } + } + }, + "status": { + "$ref": "#/definitions/EntityStatus" + }, + "storage": { + "$ref": "#/definitions/StorageDetails" + }, + "unit-attachments": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/VolumeAttachmentDetails" + } + } + }, + "volume-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "volume-tag", + "info", + "status" + ] + }, + "VolumeInfo": { + "type": "object", + "properties": { + "hardware-id": { + "type": "string" + }, + "persistent": { + "type": "boolean" + }, + "pool": { + "type": "string" + }, + "size": { + "type": "integer" + }, + "volume-id": { + "type": "string" + }, + "wwn": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "volume-id", + "size", + "persistent" + ] + } + } + } + }, + { + "Name": "Cloud", + "Description": "CloudAPI implements the cloud interface and is the concrete implementation\nof the api end point.", + "Version": 7, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "controller-user" + ], + "Schema": { + "type": "object", + "properties": { + "AddCloud": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/AddCloudArgs" + } + }, + "description": "AddCloud adds a new cloud, different from the one managed by the controller." + }, + "AddCredentials": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/TaggedCredentials" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "AddCredentials adds new credentials.\nIn contrast to UpdateCredentials() below, the new credentials can be\nfor a cloud that the controller does not manage (this is required\nfor CAAS models)" + }, + "CheckCredentialsModels": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/TaggedCredentials" + }, + "Result": { + "$ref": "#/definitions/UpdateCredentialResults" + } + }, + "description": "CheckCredentialsModels validates supplied cloud credentials' content against\nmodels that currently use these credentials.\nIf there are any models that are using a credential and these models or their\ncloud instances are not going to be accessible with corresponding credential,\nthere will be detailed validation errors per model.\nThere's no Juju API client which uses this, but JAAS does," + }, + "Cloud": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/CloudResults" + } + }, + "description": "Cloud returns the cloud definitions for the specified clouds." + }, + "CloudInfo": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/CloudInfoResults" + } + }, + "description": "CloudInfo returns information about the specified clouds." + }, + "Clouds": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/CloudsResult" + } + }, + "description": "Clouds returns the definitions of all clouds supported by the controller\nthat the logged in user can see." + }, + "Credential": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/CloudCredentialResults" + } + }, + "description": "Credential returns the specified cloud credential for each tag, minus secrets." + }, + "CredentialContents": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/CloudCredentialArgs" + }, + "Result": { + "$ref": "#/definitions/CredentialContentResults" + } + }, + "description": "CredentialContents returns the specified cloud credentials,\nincluding the secrets if requested.\nIf no specific credential name/cloud was passed in, all credentials for this user\nare returned.\nOnly credential owner can see its contents as well as what models use it.\nController admin has no special superpowers here and is treated the same as all other users." + }, + "InstanceTypes": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/CloudInstanceTypesConstraints" + }, + "Result": { + "$ref": "#/definitions/InstanceTypesResults" + } + }, + "description": "InstanceTypes returns instance type information for the cloud and region\nin which the current model is deployed." + }, + "ListCloudInfo": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ListCloudsRequest" + }, + "Result": { + "$ref": "#/definitions/ListCloudInfoResults" + } + }, + "description": "ListCloudInfo returns clouds that the specified user has access to.\nController admins (superuser) can list clouds for any user.\nOther users can only ask about their own clouds." + }, + "ModifyCloudAccess": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ModifyCloudAccessRequest" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "ModifyCloudAccess changes the model access granted to users." + }, + "RemoveClouds": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "RemoveClouds removes the specified clouds from the controller.\nIf a cloud is in use (has models deployed to it), the removal will fail." + }, + "RevokeCredentialsCheckModels": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/RevokeCredentialArgs" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "RevokeCredentialsCheckModels revokes a set of cloud credentials.\nIf the credentials are used by any of the models, the credential deletion will be aborted.\nIf credential-in-use needs to be revoked nonetheless, this method allows the use of force." + }, + "UpdateCloud": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/UpdateCloudArgs" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "UpdateCloud updates an existing cloud that the controller knows about." + }, + "UpdateCredentialsCheckModels": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/UpdateCredentialArgs" + }, + "Result": { + "$ref": "#/definitions/UpdateCredentialResults" + } + }, + "description": "UpdateCredentialsCheckModels updates a set of cloud credentials' content.\nIf there are any models that are using a credential and these models\nare not going to be visible with updated credential content,\nthere will be detailed validation errors per model. Such model errors are returned\nseparately and do not contribute to the overall method error status.\nController admins can 'force' an update of the credential\nregardless of whether it is deemed valid or not." + }, + "UserCredentials": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/UserClouds" + }, + "Result": { + "$ref": "#/definitions/StringsResults" + } + }, + "description": "UserCredentials returns the cloud credentials for a set of users." + } + }, + "definitions": { + "AddCloudArgs": { + "type": "object", + "properties": { + "cloud": { + "$ref": "#/definitions/Cloud" + }, + "force": { + "type": "boolean" + }, + "name": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "cloud", + "name" + ] + }, + "Cloud": { + "type": "object", + "properties": { + "auth-types": { + "type": "array", + "items": { + "type": "string" + } + }, + "ca-certificates": { + "type": "array", + "items": { + "type": "string" + } + }, + "config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "endpoint": { + "type": "string" + }, + "host-cloud-region": { + "type": "string" + }, + "identity-endpoint": { + "type": "string" + }, + "is-controller-cloud": { + "type": "boolean" + }, + "region-config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + } + } + }, + "regions": { + "type": "array", + "items": { + "$ref": "#/definitions/CloudRegion" + } + }, + "skip-tls-verify": { + "type": "boolean" + }, + "storage-endpoint": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "type" + ] + }, + "CloudCredential": { + "type": "object", + "properties": { + "attrs": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "auth-type": { + "type": "string" + }, + "redacted": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "auth-type" + ] + }, + "CloudCredentialArg": { + "type": "object", + "properties": { + "cloud-name": { + "type": "string" + }, + "credential-name": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "cloud-name", + "credential-name" + ] + }, + "CloudCredentialArgs": { + "type": "object", + "properties": { + "credentials": { + "type": "array", + "items": { + "$ref": "#/definitions/CloudCredentialArg" + } + }, + "include-secrets": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "include-secrets" + ] + }, + "CloudCredentialResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "$ref": "#/definitions/CloudCredential" + } + }, + "additionalProperties": false + }, + "CloudCredentialResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/CloudCredentialResult" + } + } + }, + "additionalProperties": false + }, + "CloudDetails": { + "type": "object", + "properties": { + "auth-types": { + "type": "array", + "items": { + "type": "string" + } + }, + "endpoint": { + "type": "string" + }, + "identity-endpoint": { + "type": "string" + }, + "regions": { + "type": "array", + "items": { + "$ref": "#/definitions/CloudRegion" + } + }, + "storage-endpoint": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "type" + ] + }, + "CloudInfo": { + "type": "object", + "properties": { + "CloudDetails": { + "$ref": "#/definitions/CloudDetails" + }, + "users": { + "type": "array", + "items": { + "$ref": "#/definitions/CloudUserInfo" + } + } + }, + "additionalProperties": false, + "required": [ + "CloudDetails", + "users" + ] + }, + "CloudInfoResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "$ref": "#/definitions/CloudInfo" + } + }, + "additionalProperties": false + }, + "CloudInfoResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/CloudInfoResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "CloudInstanceTypesConstraint": { + "type": "object", + "properties": { + "cloud-tag": { + "type": "string" + }, + "constraints": { + "$ref": "#/definitions/Value" + }, + "region": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "cloud-tag", + "region" + ] + }, + "CloudInstanceTypesConstraints": { + "type": "object", + "properties": { + "constraints": { + "type": "array", + "items": { + "$ref": "#/definitions/CloudInstanceTypesConstraint" + } + } + }, + "additionalProperties": false, + "required": [ + "constraints" + ] + }, + "CloudRegion": { + "type": "object", + "properties": { + "endpoint": { + "type": "string" + }, + "identity-endpoint": { + "type": "string" + }, + "name": { + "type": "string" + }, + "storage-endpoint": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name" + ] + }, + "CloudResult": { + "type": "object", + "properties": { + "cloud": { + "$ref": "#/definitions/Cloud" + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "CloudResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/CloudResult" + } + } + }, + "additionalProperties": false + }, + "CloudUserInfo": { + "type": "object", + "properties": { + "access": { + "type": "string" + }, + "display-name": { + "type": "string" + }, + "user": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "user", + "display-name", + "access" + ] + }, + "CloudsResult": { + "type": "object", + "properties": { + "clouds": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/Cloud" + } + } + } + }, + "additionalProperties": false + }, + "ControllerCredentialInfo": { + "type": "object", + "properties": { + "content": { + "$ref": "#/definitions/CredentialContent" + }, + "models": { + "type": "array", + "items": { + "$ref": "#/definitions/ModelAccess" + } + } + }, + "additionalProperties": false + }, + "CredentialContent": { + "type": "object", + "properties": { + "attrs": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "auth-type": { + "type": "string" + }, + "cloud": { + "type": "string" + }, + "name": { + "type": "string" + }, + "valid": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "name", + "cloud", + "auth-type" + ] + }, + "CredentialContentResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "$ref": "#/definitions/ControllerCredentialInfo" + } + }, + "additionalProperties": false + }, + "CredentialContentResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/CredentialContentResult" + } + } + }, + "additionalProperties": false + }, + "Entities": { + "type": "object", + "properties": { + "entities": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } + } + }, + "additionalProperties": false, + "required": [ + "entities" + ] + }, + "Entity": { + "type": "object", + "properties": { + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ErrorResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "ErrorResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "InstanceType": { + "type": "object", + "properties": { + "arches": { + "type": "array", + "items": { + "type": "string" + } + }, + "cost": { + "type": "integer" + }, + "cpu-cores": { + "type": "integer" + }, + "memory": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "root-disk": { + "type": "integer" + }, + "virt-type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "arches", + "cpu-cores", + "memory" + ] + }, + "InstanceTypesResult": { + "type": "object", + "properties": { + "cost-currency": { + "type": "string" + }, + "cost-divisor": { + "type": "integer" + }, + "cost-unit": { + "type": "string" + }, + "error": { + "$ref": "#/definitions/Error" + }, + "instance-types": { + "type": "array", + "items": { + "$ref": "#/definitions/InstanceType" + } + } + }, + "additionalProperties": false + }, + "InstanceTypesResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/InstanceTypesResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "ListCloudInfo": { + "type": "object", + "properties": { + "CloudDetails": { + "$ref": "#/definitions/CloudDetails" + }, + "user-access": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "CloudDetails", + "user-access" + ] + }, + "ListCloudInfoResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "$ref": "#/definitions/ListCloudInfo" + } + }, + "additionalProperties": false + }, + "ListCloudInfoResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ListCloudInfoResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "ListCloudsRequest": { + "type": "object", + "properties": { + "all": { + "type": "boolean" + }, + "user-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "user-tag" + ] + }, + "ModelAccess": { + "type": "object", + "properties": { + "access": { + "type": "string" + }, + "model": { + "type": "string" + } + }, + "additionalProperties": false + }, + "ModifyCloudAccess": { + "type": "object", + "properties": { + "access": { + "type": "string" + }, + "action": { + "type": "string" + }, + "cloud-tag": { + "type": "string" + }, + "user-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "user-tag", + "cloud-tag", + "action", + "access" + ] + }, + "ModifyCloudAccessRequest": { + "type": "object", + "properties": { + "changes": { + "type": "array", + "items": { + "$ref": "#/definitions/ModifyCloudAccess" + } + } + }, + "additionalProperties": false, + "required": [ + "changes" + ] + }, + "RevokeCredentialArg": { + "type": "object", + "properties": { + "force": { + "type": "boolean" + }, + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag", + "force" + ] + }, + "RevokeCredentialArgs": { + "type": "object", + "properties": { + "credentials": { + "type": "array", + "items": { + "$ref": "#/definitions/RevokeCredentialArg" + } + } + }, + "additionalProperties": false, + "required": [ + "credentials" + ] + }, + "StringsResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "StringsResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/StringsResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "TaggedCredential": { + "type": "object", + "properties": { + "credential": { + "$ref": "#/definitions/CloudCredential" + }, + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag", + "credential" + ] + }, + "TaggedCredentials": { + "type": "object", + "properties": { + "credentials": { + "type": "array", + "items": { + "$ref": "#/definitions/TaggedCredential" + } + } + }, + "additionalProperties": false + }, + "UpdateCloudArgs": { + "type": "object", + "properties": { + "clouds": { + "type": "array", + "items": { + "$ref": "#/definitions/AddCloudArgs" + } + } + }, + "additionalProperties": false, + "required": [ + "clouds" + ] + }, + "UpdateCredentialArgs": { + "type": "object", + "properties": { + "credentials": { + "type": "array", + "items": { + "$ref": "#/definitions/TaggedCredential" + } + }, + "force": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "credentials", + "force" + ] + }, + "UpdateCredentialModelResult": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResult" + } + }, + "name": { + "type": "string" + }, + "uuid": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uuid", + "name" + ] + }, + "UpdateCredentialResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "models": { + "type": "array", + "items": { + "$ref": "#/definitions/UpdateCredentialModelResult" + } + }, + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag" + ] + }, + "UpdateCredentialResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/UpdateCredentialResult" + } + } + }, + "additionalProperties": false + }, + "UserCloud": { + "type": "object", + "properties": { + "cloud-tag": { + "type": "string" + }, + "user-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "user-tag", + "cloud-tag" + ] + }, + "UserClouds": { + "type": "object", + "properties": { + "user-clouds": { + "type": "array", + "items": { + "$ref": "#/definitions/UserCloud" + } + } + }, + "additionalProperties": false + }, + "Value": { + "type": "object", + "properties": { + "allocate-public-ip": { + "type": "boolean" + }, + "arch": { + "type": "string" + }, + "container": { + "type": "string" + }, + "cores": { + "type": "integer" + }, + "cpu-power": { + "type": "integer" + }, + "image-id": { + "type": "string" + }, + "instance-role": { + "type": "string" + }, + "instance-type": { + "type": "string" + }, + "mem": { + "type": "integer" + }, + "root-disk": { + "type": "integer" + }, + "root-disk-source": { + "type": "string" + }, + "spaces": { + "type": "array", + "items": { + "type": "string" + } + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "virt-type": { + "type": "string" + }, + "zones": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + } + } + } + }, + { + "Name": "Controller", + "Description": "ControllerAPI provides the Controller API.", + "Version": 11, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "controller-user" + ], + "Schema": { + "type": "object", + "properties": { + "AllModels": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/UserModelList" + } + }, + "description": "AllModels allows controller administrators to get the list of all the\nmodels in the controller." + }, + "CloudSpec": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/CloudSpecResults" + } + }, + "description": "CloudSpec returns the model's cloud spec." + }, + "ConfigSet": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ControllerConfigSet" + } + }, + "description": "ConfigSet changes the value of specified controller configuration\nsettings. Only some settings can be changed after bootstrap.\nSettings that aren't specified in the params are left unchanged." + }, + "ControllerAPIInfoForModels": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ControllerAPIInfoResults" + } + }, + "description": "ControllerAPIInfoForModels returns the controller api connection details for the specified models." + }, + "ControllerConfig": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/ControllerConfigResult" + } + }, + "description": "ControllerConfig returns the controller's configuration." + }, + "ControllerVersion": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/ControllerVersionResults" + } + }, + "description": "ControllerVersion returns the version information associated with this\ncontroller binary.\n\nNOTE: the implementation intentionally does not check for SuperuserAccess\nas the Version is known even to users with login access." + }, + "DashboardConnectionInfo": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/DashboardConnectionInfo" + } + }, + "description": "DashboardConnectionInfo returns the connection information for a client to\nconnect to the Juju Dashboard including any proxying information." + }, + "DestroyController": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/DestroyControllerArgs" + } + }, + "description": "DestroyController destroys the controller.\n\nIf the args specify the destruction of the models, this method will\nattempt to do so. Otherwise, if the controller has any non-empty,\nnon-Dead hosted models, then an error with the code\nparams.CodeHasHostedModels will be transmitted." + }, + "GetCloudSpec": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ModelTag" + }, + "Result": { + "$ref": "#/definitions/CloudSpecResult" + } + }, + "description": "GetCloudSpec constructs the CloudSpec for a validated and authorized model." + }, + "GetControllerAccess": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/UserAccessResults" + } + }, + "description": "GetControllerAccess returns the level of access the specified users\nhave on the controller." + }, + "HostedModelConfigs": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/HostedModelConfigsResults" + } + }, + "description": "HostedModelConfigs returns all the information that the client needs in\norder to connect directly with the host model's provider and destroy it\ndirectly." + }, + "IdentityProviderURL": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/StringResult" + } + }, + "description": "IdentityProviderURL returns the URL of the configured external identity\nprovider for this controller or an empty string if no external identity\nprovider has been configured when the controller was bootstrapped.\n\nNOTE: the implementation intentionally does not check for SuperuserAccess\nas the URL is known even to users with login access." + }, + "InitiateMigration": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/InitiateMigrationArgs" + }, + "Result": { + "$ref": "#/definitions/InitiateMigrationResults" + } + }, + "description": "InitiateMigration attempts to begin the migration of one or\nmore models to other controllers." + }, + "ListBlockedModels": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/ModelBlockInfoList" + } + }, + "description": "ListBlockedModels returns a list of all models on the controller\nwhich have a block in place. The resulting slice is sorted by model\nname, then owner. Callers must be controller administrators to retrieve the\nlist." + }, + "ModelConfig": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/ModelConfigResults" + } + }, + "description": "ModelConfig returns the model config for the controller\nmodel. For information on the current model, use\nclient.ModelGet" + }, + "ModelStatus": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ModelStatusResults" + } + }, + "description": "ModelStatus returns a summary of the model." + }, + "ModifyControllerAccess": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ModifyControllerAccessRequest" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "ModifyControllerAccess changes the model access granted to users." + }, + "MongoVersion": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/StringResult" + } + }, + "description": "MongoVersion allows the introspection of the mongo version per controller" + }, + "RemoveBlocks": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/RemoveBlocksArgs" + } + }, + "description": "RemoveBlocks removes all the blocks in the controller." + }, + "WatchAllModelSummaries": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/SummaryWatcherID" + } + }, + "description": "WatchAllModelSummaries starts watching the summary updates from the cache.\nThis method is superuser access only, and watches all models in the\ncontroller." + }, + "WatchAllModels": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/AllWatcherId" + } + }, + "description": "WatchAllModels starts watching events for all models in the\ncontroller. The returned AllWatcherId should be used with Next on the\nAllModelWatcher endpoint to receive deltas." + }, + "WatchCloudSpecsChanges": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/NotifyWatchResults" + } + }, + "description": "WatchCloudSpecsChanges returns a watcher for cloud spec changes." + }, + "WatchModelSummaries": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/SummaryWatcherID" + } + }, + "description": "WatchModelSummaries starts watching the summary updates from the cache.\nOnly models that the user has access to are returned." + } + }, + "definitions": { + "AllWatcherId": { + "type": "object", + "properties": { + "watcher-id": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "watcher-id" + ] + }, + "CloudCredential": { + "type": "object", + "properties": { + "attrs": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "auth-type": { + "type": "string" + }, + "redacted": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "auth-type" + ] + }, + "CloudSpec": { + "type": "object", + "properties": { + "cacertificates": { + "type": "array", + "items": { + "type": "string" + } + }, + "credential": { + "$ref": "#/definitions/CloudCredential" + }, + "endpoint": { + "type": "string" + }, + "identity-endpoint": { + "type": "string" + }, + "is-controller-cloud": { + "type": "boolean" + }, + "name": { + "type": "string" + }, + "region": { + "type": "string" + }, + "skip-tls-verify": { + "type": "boolean" + }, + "storage-endpoint": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "type", + "name" + ] + }, + "CloudSpecResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "$ref": "#/definitions/CloudSpec" + } + }, + "additionalProperties": false + }, + "CloudSpecResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/CloudSpecResult" + } + } + }, + "additionalProperties": false + }, + "ConfigValue": { + "type": "object", + "properties": { + "source": { + "type": "string" + }, + "value": { + "type": "object", + "additionalProperties": true + } + }, + "additionalProperties": false, + "required": [ + "value", + "source" + ] + }, + "ControllerAPIInfoResult": { + "type": "object", + "properties": { + "addresses": { + "type": "array", + "items": { + "type": "string" + } + }, + "cacert": { + "type": "string" + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false, + "required": [ + "addresses", + "cacert" + ] + }, + "ControllerAPIInfoResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ControllerAPIInfoResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "ControllerConfigResult": { + "type": "object", + "properties": { + "config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + } + }, + "additionalProperties": false, + "required": [ + "config" + ] + }, + "ControllerConfigSet": { + "type": "object", + "properties": { + "config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + } + }, + "additionalProperties": false, + "required": [ + "config" + ] + }, + "ControllerVersionResults": { + "type": "object", + "properties": { + "git-commit": { + "type": "string" + }, + "version": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "version", + "git-commit" + ] + }, + "DashboardConnectionInfo": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "proxy-connection": { + "$ref": "#/definitions/Proxy" + }, + "ssh-connection": { + "$ref": "#/definitions/DashboardConnectionSSHTunnel" + } + }, + "additionalProperties": false, + "required": [ + "proxy-connection", + "ssh-connection" + ] + }, + "DashboardConnectionSSHTunnel": { + "type": "object", + "properties": { + "entity": { + "type": "string" + }, + "host": { + "type": "string" + }, + "model": { + "type": "string" + }, + "port": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "host", + "port" + ] + }, + "DestroyControllerArgs": { + "type": "object", + "properties": { + "destroy-models": { + "type": "boolean" + }, + "destroy-storage": { + "type": "boolean" + }, + "force": { + "type": "boolean" + }, + "max-wait": { + "type": "integer" + }, + "model-timeout": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "destroy-models" + ] + }, + "Entities": { + "type": "object", + "properties": { + "entities": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } + } + }, + "additionalProperties": false, + "required": [ + "entities" + ] + }, + "Entity": { + "type": "object", + "properties": { + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ErrorResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "ErrorResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "HostedModelConfig": { + "type": "object", + "properties": { + "cloud-spec": { + "$ref": "#/definitions/CloudSpec" + }, + "config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "error": { + "$ref": "#/definitions/Error" + }, + "name": { + "type": "string" + }, + "owner": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "owner" + ] + }, + "HostedModelConfigsResults": { + "type": "object", + "properties": { + "models": { + "type": "array", + "items": { + "$ref": "#/definitions/HostedModelConfig" + } + } + }, + "additionalProperties": false, + "required": [ + "models" + ] + }, + "InitiateMigrationArgs": { + "type": "object", + "properties": { + "specs": { + "type": "array", + "items": { + "$ref": "#/definitions/MigrationSpec" + } + } + }, + "additionalProperties": false, + "required": [ + "specs" + ] + }, + "InitiateMigrationResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "migration-id": { + "type": "string" + }, + "model-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "model-tag", + "migration-id" + ] + }, + "InitiateMigrationResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/InitiateMigrationResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "MachineHardware": { + "type": "object", + "properties": { + "arch": { + "type": "string" + }, + "availability-zone": { + "type": "string" + }, + "cores": { + "type": "integer" + }, + "cpu-power": { + "type": "integer" + }, + "mem": { + "type": "integer" + }, + "root-disk": { + "type": "integer" + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "virt-type": { + "type": "string" + } + }, + "additionalProperties": false + }, + "MigrationSpec": { + "type": "object", + "properties": { + "model-tag": { + "type": "string" + }, + "target-info": { + "$ref": "#/definitions/MigrationTargetInfo" + } + }, + "additionalProperties": false, + "required": [ + "model-tag", + "target-info" + ] + }, + "MigrationTargetInfo": { + "type": "object", + "properties": { + "addrs": { + "type": "array", + "items": { + "type": "string" + } + }, + "auth-tag": { + "type": "string" + }, + "ca-cert": { + "type": "string" + }, + "controller-alias": { + "type": "string" + }, + "controller-tag": { + "type": "string" + }, + "macaroons": { + "type": "string" + }, + "password": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "controller-tag", + "addrs", + "ca-cert", + "auth-tag" + ] + }, + "Model": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "owner-tag": { + "type": "string" + }, + "type": { + "type": "string" + }, + "uuid": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "uuid", + "type", + "owner-tag" + ] + }, + "ModelApplicationInfo": { + "type": "object", + "properties": { + "name": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name" + ] + }, + "ModelBlockInfo": { + "type": "object", + "properties": { + "blocks": { + "type": "array", + "items": { + "type": "string" + } + }, + "model-uuid": { + "type": "string" + }, + "name": { + "type": "string" + }, + "owner-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "model-uuid", + "owner-tag", + "blocks" + ] + }, + "ModelBlockInfoList": { + "type": "object", + "properties": { + "models": { + "type": "array", + "items": { + "$ref": "#/definitions/ModelBlockInfo" + } + } + }, + "additionalProperties": false + }, + "ModelConfigResults": { + "type": "object", + "properties": { + "config": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/ConfigValue" + } + } + } + }, + "additionalProperties": false, + "required": [ + "config" + ] + }, + "ModelFilesystemInfo": { + "type": "object", + "properties": { + "detachable": { + "type": "boolean" + }, + "id": { + "type": "string" + }, + "message": { + "type": "string" + }, + "provider-id": { + "type": "string" + }, + "status": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "id" + ] + }, + "ModelMachineInfo": { + "type": "object", + "properties": { + "display-name": { + "type": "string" + }, + "ha-primary": { + "type": "boolean" + }, + "hardware": { + "$ref": "#/definitions/MachineHardware" + }, + "has-vote": { + "type": "boolean" + }, + "id": { + "type": "string" + }, + "instance-id": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "string" + }, + "wants-vote": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "id" + ] + }, + "ModelStatus": { + "type": "object", + "properties": { + "application-count": { + "type": "integer" + }, + "applications": { + "type": "array", + "items": { + "$ref": "#/definitions/ModelApplicationInfo" + } + }, + "error": { + "$ref": "#/definitions/Error" + }, + "filesystems": { + "type": "array", + "items": { + "$ref": "#/definitions/ModelFilesystemInfo" + } + }, + "hosted-machine-count": { + "type": "integer" + }, + "life": { + "type": "string" + }, + "machines": { + "type": "array", + "items": { + "$ref": "#/definitions/ModelMachineInfo" + } + }, + "model-tag": { + "type": "string" + }, + "owner-tag": { + "type": "string" + }, + "type": { + "type": "string" + }, + "unit-count": { + "type": "integer" + }, + "volumes": { + "type": "array", + "items": { + "$ref": "#/definitions/ModelVolumeInfo" + } + } + }, + "additionalProperties": false, + "required": [ + "model-tag", + "life", + "type", + "hosted-machine-count", + "application-count", + "unit-count", + "owner-tag" + ] + }, + "ModelStatusResults": { + "type": "object", + "properties": { + "models": { + "type": "array", + "items": { + "$ref": "#/definitions/ModelStatus" + } + } + }, + "additionalProperties": false, + "required": [ + "models" + ] + }, + "ModelTag": { + "type": "object", + "additionalProperties": false + }, + "ModelVolumeInfo": { + "type": "object", + "properties": { + "detachable": { + "type": "boolean" + }, + "id": { + "type": "string" + }, + "message": { + "type": "string" + }, + "provider-id": { + "type": "string" + }, + "status": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "id" + ] + }, + "ModifyControllerAccess": { + "type": "object", + "properties": { + "access": { + "type": "string" + }, + "action": { + "type": "string" + }, + "user-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "user-tag", + "action", + "access" + ] + }, + "ModifyControllerAccessRequest": { + "type": "object", + "properties": { + "changes": { + "type": "array", + "items": { + "$ref": "#/definitions/ModifyControllerAccess" + } + } + }, + "additionalProperties": false, + "required": [ + "changes" + ] + }, + "NotifyWatchResult": { + "type": "object", + "properties": { + "NotifyWatcherId": { + "type": "string" + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false, + "required": [ + "NotifyWatcherId" + ] + }, + "NotifyWatchResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/NotifyWatchResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "Proxy": { + "type": "object", + "properties": { + "config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "config", + "type" + ] + }, + "RemoveBlocksArgs": { + "type": "object", + "properties": { + "all": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "all" + ] + }, + "StringResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "result" + ] + }, + "SummaryWatcherID": { + "type": "object", + "properties": { + "watcher-id": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "watcher-id" + ] + }, + "UserAccess": { + "type": "object", + "properties": { + "access": { + "type": "string" + }, + "user-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "user-tag", + "access" + ] + }, + "UserAccessResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "$ref": "#/definitions/UserAccess" + } + }, + "additionalProperties": false + }, + "UserAccessResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/UserAccessResult" + } + } + }, + "additionalProperties": false + }, + "UserModel": { + "type": "object", + "properties": { + "last-connection": { + "type": "string", + "format": "date-time" + }, + "model": { + "$ref": "#/definitions/Model" + } + }, + "additionalProperties": false, + "required": [ + "model", + "last-connection" + ] + }, + "UserModelList": { + "type": "object", + "properties": { + "user-models": { + "type": "array", + "items": { + "$ref": "#/definitions/UserModel" + } + } + }, + "additionalProperties": false, + "required": [ + "user-models" + ] + } + } + } + }, + { + "Name": "CredentialManager", + "Description": "", + "Version": 1, + "AvailableTo": [ + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "InvalidateModelCredential": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/InvalidateCredentialArg" + }, + "Result": { + "$ref": "#/definitions/ErrorResult" + } + }, + "description": "InvalidateModelCredential marks the cloud credential for this model as invalid." + } + }, + "definitions": { + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ErrorResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "InvalidateCredentialArg": { + "type": "object", + "properties": { + "reason": { + "type": "string" + } + }, + "additionalProperties": false + } + } + } + }, + { + "Name": "CredentialValidator", + "Description": "", + "Version": 2, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "InvalidateModelCredential": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/InvalidateCredentialArg" + }, + "Result": { + "$ref": "#/definitions/ErrorResult" + } + }, + "description": "InvalidateModelCredential marks the cloud credential for this model as invalid." + }, + "ModelCredential": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/ModelCredential" + } + }, + "description": "ModelCredential returns cloud credential information for a model." + }, + "WatchCredential": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entity" + }, + "Result": { + "$ref": "#/definitions/NotifyWatchResult" + } + }, + "description": "WatchCredential returns a NotifyWatcher that observes\nchanges to a given cloud credential." + }, + "WatchModelCredential": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/NotifyWatchResult" + } + }, + "description": "WatchModelCredential returns a NotifyWatcher that watches what cloud credential a model uses." + } + }, + "definitions": { + "Entity": { + "type": "object", + "properties": { + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ErrorResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "InvalidateCredentialArg": { + "type": "object", + "properties": { + "reason": { + "type": "string" + } + }, + "additionalProperties": false + }, + "ModelCredential": { + "type": "object", + "properties": { + "credential-tag": { + "type": "string" + }, + "exists": { + "type": "boolean" + }, + "model-tag": { + "type": "string" + }, + "valid": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "model-tag", + "credential-tag" + ] + }, + "NotifyWatchResult": { + "type": "object", + "properties": { + "NotifyWatcherId": { + "type": "string" + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false, + "required": [ + "NotifyWatcherId" + ] + } + } + } + }, + { + "Name": "CrossController", + "Description": "CrossControllerAPI provides access to the CrossModelRelations API facade.", + "Version": 1, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "controller-user" + ], + "Schema": { + "type": "object", + "properties": { + "ControllerInfo": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/ControllerAPIInfoResults" + } + }, + "description": "ControllerInfo returns the API info for the controller." + }, + "WatchControllerInfo": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/NotifyWatchResults" + } + }, + "description": "WatchControllerInfo creates a watcher that notifies when the API info\nfor the controller changes." + } + }, + "definitions": { + "ControllerAPIInfoResult": { + "type": "object", + "properties": { + "addresses": { + "type": "array", + "items": { + "type": "string" + } + }, + "cacert": { + "type": "string" + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false, + "required": [ + "addresses", + "cacert" + ] + }, + "ControllerAPIInfoResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ControllerAPIInfoResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "NotifyWatchResult": { + "type": "object", + "properties": { + "NotifyWatcherId": { + "type": "string" + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false, + "required": [ + "NotifyWatcherId" + ] + }, + "NotifyWatchResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/NotifyWatchResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + } + } + } + }, + { + "Name": "CrossModelRelations", + "Description": "CrossModelRelationsAPI provides access to the CrossModelRelations API facade.", + "Version": 3, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "PublishIngressNetworkChanges": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/IngressNetworksChanges" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "PublishIngressNetworkChanges publishes changes to the required\ningress addresses to the model hosting the offer in the relation." + }, + "PublishRelationChanges": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/RemoteRelationsChanges" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "PublishRelationChanges publishes relation changes to the\nmodel hosting the remote application involved in the relation." + }, + "RegisterRemoteRelations": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/RegisterRemoteRelationArgs" + }, + "Result": { + "$ref": "#/definitions/RegisterRemoteRelationResults" + } + }, + "description": "RegisterRemoteRelations sets up the model to participate\nin the specified relations. This operation is idempotent." + }, + "WatchConsumedSecretsChanges": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/WatchRemoteSecretChangesArgs" + }, + "Result": { + "$ref": "#/definitions/SecretRevisionWatchResults" + } + }, + "description": "WatchConsumedSecretsChanges returns a watcher which notifies of changes to any secrets\nfor the specified remote consumers." + }, + "WatchEgressAddressesForRelations": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/RemoteEntityArgs" + }, + "Result": { + "$ref": "#/definitions/StringsWatchResults" + } + }, + "description": "WatchEgressAddressesForRelations creates a watcher that notifies when addresses, from which\nconnections will originate for the relation, change.\nEach event contains the entire set of addresses which are required for ingress for the relation." + }, + "WatchOfferStatus": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/OfferArgs" + }, + "Result": { + "$ref": "#/definitions/OfferStatusWatchResults" + } + }, + "description": "WatchOfferStatus starts an OfferStatusWatcher for\nwatching the status of an offer." + }, + "WatchRelationChanges": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/RemoteEntityArgs" + }, + "Result": { + "$ref": "#/definitions/RemoteRelationWatchResults" + } + }, + "description": "WatchRelationChanges starts a RemoteRelationChangesWatcher for each\nspecified relation, returning the watcher IDs and initial values,\nor an error if the remote relations couldn't be watched." + }, + "WatchRelationsSuspendedStatus": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/RemoteEntityArgs" + }, + "Result": { + "$ref": "#/definitions/RelationStatusWatchResults" + } + }, + "description": "WatchRelationsSuspendedStatus starts a RelationStatusWatcher for\nwatching the life and suspended status of a relation." + } + }, + "definitions": { + "EntityStatus": { + "type": "object", + "properties": { + "data": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "info": { + "type": "string" + }, + "since": { + "type": "string", + "format": "date-time" + }, + "status": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "status", + "info", + "since" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ErrorResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "ErrorResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "IngressNetworksChangeEvent": { + "type": "object", + "properties": { + "bakery-version": { + "type": "integer" + }, + "ingress-required": { + "type": "boolean" + }, + "macaroons": { + "type": "array", + "items": { + "$ref": "#/definitions/Macaroon" + } + }, + "networks": { + "type": "array", + "items": { + "type": "string" + } + }, + "relation-token": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "relation-token", + "ingress-required" + ] + }, + "IngressNetworksChanges": { + "type": "object", + "properties": { + "changes": { + "type": "array", + "items": { + "$ref": "#/definitions/IngressNetworksChangeEvent" + } + } + }, + "additionalProperties": false + }, + "Macaroon": { + "type": "object", + "additionalProperties": false + }, + "OfferArg": { + "type": "object", + "properties": { + "bakery-version": { + "type": "integer" + }, + "macaroons": { + "type": "array", + "items": { + "$ref": "#/definitions/Macaroon" + } + }, + "offer-uuid": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "offer-uuid" + ] + }, + "OfferArgs": { + "type": "object", + "properties": { + "args": { + "type": "array", + "items": { + "$ref": "#/definitions/OfferArg" + } + } + }, + "additionalProperties": false, + "required": [ + "args" + ] + }, + "OfferStatusChange": { + "type": "object", + "properties": { + "offer-name": { + "type": "string" + }, + "status": { + "$ref": "#/definitions/EntityStatus" + } + }, + "additionalProperties": false, + "required": [ + "offer-name", + "status" + ] + }, + "OfferStatusWatchResult": { + "type": "object", + "properties": { + "changes": { + "type": "array", + "items": { + "$ref": "#/definitions/OfferStatusChange" + } + }, + "error": { + "$ref": "#/definitions/Error" + }, + "watcher-id": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "watcher-id", + "changes" + ] + }, + "OfferStatusWatchResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/OfferStatusWatchResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "RegisterRemoteRelationArg": { + "type": "object", + "properties": { + "application-token": { + "type": "string" + }, + "bakery-version": { + "type": "integer" + }, + "consume-version": { + "type": "integer" + }, + "local-endpoint-name": { + "type": "string" + }, + "macaroons": { + "type": "array", + "items": { + "$ref": "#/definitions/Macaroon" + } + }, + "offer-uuid": { + "type": "string" + }, + "relation-token": { + "type": "string" + }, + "remote-endpoint": { + "$ref": "#/definitions/RemoteEndpoint" + }, + "remote-space": { + "$ref": "#/definitions/RemoteSpace" + }, + "source-model-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "application-token", + "source-model-tag", + "relation-token", + "remote-endpoint", + "remote-space", + "offer-uuid", + "local-endpoint-name" + ] + }, + "RegisterRemoteRelationArgs": { + "type": "object", + "properties": { + "relations": { + "type": "array", + "items": { + "$ref": "#/definitions/RegisterRemoteRelationArg" + } + } + }, + "additionalProperties": false, + "required": [ + "relations" + ] + }, + "RegisterRemoteRelationResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "$ref": "#/definitions/RemoteRelationDetails" + } + }, + "additionalProperties": false + }, + "RegisterRemoteRelationResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/RegisterRemoteRelationResult" + } + } + }, + "additionalProperties": false + }, + "RelationLifeSuspendedStatusChange": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "life": { + "type": "string" + }, + "suspended": { + "type": "boolean" + }, + "suspended-reason": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "key", + "life", + "suspended", + "suspended-reason" + ] + }, + "RelationLifeSuspendedStatusWatchResult": { + "type": "object", + "properties": { + "changes": { + "type": "array", + "items": { + "$ref": "#/definitions/RelationLifeSuspendedStatusChange" + } + }, + "error": { + "$ref": "#/definitions/Error" + }, + "watcher-id": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "watcher-id", + "changes" + ] + }, + "RelationStatusWatchResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/RelationLifeSuspendedStatusWatchResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "RemoteEndpoint": { + "type": "object", + "properties": { + "interface": { + "type": "string" + }, + "limit": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "role": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "role", + "interface", + "limit" + ] + }, + "RemoteEntityArg": { + "type": "object", + "properties": { + "bakery-version": { + "type": "integer" + }, + "macaroons": { + "type": "array", + "items": { + "$ref": "#/definitions/Macaroon" + } + }, + "relation-token": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "relation-token" + ] + }, + "RemoteEntityArgs": { + "type": "object", + "properties": { + "args": { + "type": "array", + "items": { + "$ref": "#/definitions/RemoteEntityArg" + } + } + }, + "additionalProperties": false, + "required": [ + "args" + ] + }, + "RemoteRelationChangeEvent": { + "type": "object", + "properties": { + "application-settings": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "application-token": { + "type": "string" + }, + "bakery-version": { + "type": "integer" + }, + "changed-units": { + "type": "array", + "items": { + "$ref": "#/definitions/RemoteRelationUnitChange" + } + }, + "departed-units": { + "type": "array", + "items": { + "type": "integer" + } + }, + "force-cleanup": { + "type": "boolean" + }, + "life": { + "type": "string" + }, + "macaroons": { + "type": "array", + "items": { + "$ref": "#/definitions/Macaroon" + } + }, + "relation-token": { + "type": "string" + }, + "suspended": { + "type": "boolean" + }, + "suspended-reason": { + "type": "string" + }, + "unit-count": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "relation-token", + "application-token", + "life", + "unit-count" + ] + }, + "RemoteRelationDetails": { + "type": "object", + "properties": { + "bakery-version": { + "type": "integer" + }, + "macaroon": { + "$ref": "#/definitions/Macaroon" + }, + "relation-token": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "relation-token" + ] + }, + "RemoteRelationUnitChange": { + "type": "object", + "properties": { + "settings": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "unit-id": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "unit-id" + ] + }, + "RemoteRelationWatchResult": { + "type": "object", + "properties": { + "changes": { + "$ref": "#/definitions/RemoteRelationChangeEvent" + }, + "error": { + "$ref": "#/definitions/Error" + }, + "watcher-id": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "watcher-id", + "changes" + ] + }, + "RemoteRelationWatchResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/RemoteRelationWatchResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "RemoteRelationsChanges": { + "type": "object", + "properties": { + "changes": { + "type": "array", + "items": { + "$ref": "#/definitions/RemoteRelationChangeEvent" + } + } + }, + "additionalProperties": false + }, + "RemoteSpace": { + "type": "object", + "properties": { + "cloud-type": { + "type": "string" + }, + "name": { + "type": "string" + }, + "provider-attributes": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "provider-id": { + "type": "string" + }, + "subnets": { + "type": "array", + "items": { + "$ref": "#/definitions/Subnet" + } + } + }, + "additionalProperties": false, + "required": [ + "cloud-type", + "name", + "provider-id", + "provider-attributes", + "subnets" + ] + }, + "SecretRevisionChange": { + "type": "object", + "properties": { + "revision": { + "type": "integer" + }, + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri", + "revision" + ] + }, + "SecretRevisionWatchResult": { + "type": "object", + "properties": { + "changes": { + "type": "array", + "items": { + "$ref": "#/definitions/SecretRevisionChange" + } + }, + "error": { + "$ref": "#/definitions/Error" + }, + "watcher-id": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "watcher-id", + "changes" + ] + }, + "SecretRevisionWatchResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/SecretRevisionWatchResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "StringsWatchResult": { + "type": "object", + "properties": { + "changes": { + "type": "array", + "items": { + "type": "string" + } + }, + "error": { + "$ref": "#/definitions/Error" + }, + "watcher-id": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "watcher-id" + ] + }, + "StringsWatchResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/StringsWatchResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "Subnet": { + "type": "object", + "properties": { + "cidr": { + "type": "string" + }, + "life": { + "type": "string" + }, + "provider-id": { + "type": "string" + }, + "provider-network-id": { + "type": "string" + }, + "provider-space-id": { + "type": "string" + }, + "space-tag": { + "type": "string" + }, + "status": { + "type": "string" + }, + "vlan-tag": { + "type": "integer" + }, + "zones": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "cidr", + "vlan-tag", + "life", + "space-tag", + "zones" + ] + }, + "WatchRemoteSecretChangesArg": { + "type": "object", + "properties": { + "application-token": { + "type": "string" + }, + "bakery-version": { + "type": "integer" + }, + "macaroons": { + "type": "array", + "items": { + "$ref": "#/definitions/Macaroon" + } + }, + "relation-token": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "application-token", + "relation-token" + ] + }, + "WatchRemoteSecretChangesArgs": { + "type": "object", + "properties": { + "relations": { + "type": "array", + "items": { + "$ref": "#/definitions/WatchRemoteSecretChangesArg" + } + } + }, + "additionalProperties": false, + "required": [ + "relations" + ] + } + } + } + }, + { + "Name": "CrossModelSecrets", + "Description": "CrossModelSecretsAPI provides access to the CrossModelSecrets API facade.", + "Version": 1, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "GetSecretAccessScope": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/GetRemoteSecretAccessArgs" + }, + "Result": { + "$ref": "#/definitions/StringResults" + } + }, + "description": "GetSecretAccessScope returns the tokens for the access scope of the specified secrets and consumers." + }, + "GetSecretContentInfo": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/GetRemoteSecretContentArgs" + }, + "Result": { + "$ref": "#/definitions/SecretContentResults" + } + }, + "description": "GetSecretContentInfo returns the secret values for the specified secrets." + } + }, + "definitions": { + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "GetRemoteSecretAccessArg": { + "type": "object", + "properties": { + "application-token": { + "type": "string" + }, + "unit-id": { + "type": "integer" + }, + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "application-token", + "unit-id", + "uri" + ] + }, + "GetRemoteSecretAccessArgs": { + "type": "object", + "properties": { + "relations": { + "type": "array", + "items": { + "$ref": "#/definitions/GetRemoteSecretAccessArg" + } + } + }, + "additionalProperties": false, + "required": [ + "relations" + ] + }, + "GetRemoteSecretContentArg": { + "type": "object", + "properties": { + "application-token": { + "type": "string" + }, + "bakery-version": { + "type": "integer" + }, + "macaroons": { + "type": "array", + "items": { + "$ref": "#/definitions/Macaroon" + } + }, + "peek": { + "type": "boolean" + }, + "refresh": { + "type": "boolean" + }, + "revision": { + "type": "integer" + }, + "source-controller-uuid": { + "type": "string" + }, + "unit-id": { + "type": "integer" + }, + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "source-controller-uuid", + "application-token", + "unit-id", + "uri" + ] + }, + "GetRemoteSecretContentArgs": { + "type": "object", + "properties": { + "relations": { + "type": "array", + "items": { + "$ref": "#/definitions/GetRemoteSecretContentArg" + } + } + }, + "additionalProperties": false, + "required": [ + "relations" + ] + }, + "Macaroon": { + "type": "object", + "additionalProperties": false + }, + "SecretBackendConfig": { + "type": "object", + "properties": { + "params": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "type" + ] + }, + "SecretBackendConfigResult": { + "type": "object", + "properties": { + "config": { + "$ref": "#/definitions/SecretBackendConfig" + }, + "draining": { + "type": "boolean" + }, + "model-controller": { + "type": "string" + }, + "model-name": { + "type": "string" + }, + "model-uuid": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "model-controller", + "model-uuid", + "model-name", + "draining" + ] + }, + "SecretContentParams": { + "type": "object", + "properties": { + "data": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "value-ref": { + "$ref": "#/definitions/SecretValueRef" + } + }, + "additionalProperties": false + }, + "SecretContentResult": { + "type": "object", + "properties": { + "backend-config": { + "$ref": "#/definitions/SecretBackendConfigResult" + }, + "content": { + "$ref": "#/definitions/SecretContentParams" + }, + "error": { + "$ref": "#/definitions/Error" + }, + "latest-revision": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "content" + ] + }, + "SecretContentResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/SecretContentResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "SecretValueRef": { + "type": "object", + "properties": { + "backend-id": { + "type": "string" + }, + "revision-id": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "backend-id", + "revision-id" + ] + }, + "StringResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "result" + ] + }, + "StringResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/StringResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + } + } + } + }, + { + "Name": "Deployer", + "Description": "DeployerAPI provides access to the Deployer API facade.", + "Version": 1, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent" + ], + "Schema": { + "type": "object", + "properties": { + "APIAddresses": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/StringsResult" + } + }, + "description": "APIAddresses returns the list of addresses used to connect to the API." + }, + "APIHostPorts": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/APIHostPortsResult" + } + }, + "description": "APIHostPorts returns the API server addresses." + }, + "ConnectionInfo": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/DeployerConnectionValues" + } + }, + "description": "ConnectionInfo returns all the address information that the\ndeployer task needs in one call." + }, + "Life": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/LifeResults" + } + }, + "description": "Life returns the life status of every supplied entity, where available." + }, + "ModelUUID": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/StringResult" + } + }, + "description": "ModelUUID returns the model UUID that this facade is deploying into.\nIt is implemented here directly as a result of removing it from\nembedded APIAddresser *without* bumping the facade version.\nIt should be blanked when this facade version is next incremented." + }, + "Remove": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "Remove removes every given entity from state, calling EnsureDead\nfirst, then Remove. It will fail if the entity is not present." + }, + "SetPasswords": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/EntityPasswords" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "SetPasswords sets the given password for each supplied entity, if possible." + }, + "SetStatus": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/SetStatus" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "SetStatus sets the status of the specified entities." + }, + "WatchAPIHostPorts": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/NotifyWatchResult" + } + }, + "description": "WatchAPIHostPorts watches the API server addresses." + }, + "WatchUnits": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/StringsWatchResults" + } + }, + "description": "WatchUnits starts a StringsWatcher to watch all units belonging to\nto any entity (machine or service) passed in args." + } + }, + "definitions": { + "APIHostPortsResult": { + "type": "object", + "properties": { + "servers": { + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/definitions/HostPort" + } + } + } + }, + "additionalProperties": false, + "required": [ + "servers" + ] + }, + "Address": { + "type": "object", + "properties": { + "cidr": { + "type": "string" + }, + "config-type": { + "type": "string" + }, + "is-secondary": { + "type": "boolean" + }, + "scope": { + "type": "string" + }, + "space-id": { + "type": "string" + }, + "space-name": { + "type": "string" + }, + "type": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "value", + "type", + "scope" + ] + }, + "DeployerConnectionValues": { + "type": "object", + "properties": { + "api-addresses": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "api-addresses" + ] + }, + "Entities": { + "type": "object", + "properties": { + "entities": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } + } + }, + "additionalProperties": false, + "required": [ + "entities" + ] + }, + "Entity": { + "type": "object", + "properties": { + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag" + ] + }, + "EntityPassword": { + "type": "object", + "properties": { + "password": { + "type": "string" + }, + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag", + "password" + ] + }, + "EntityPasswords": { + "type": "object", + "properties": { + "changes": { + "type": "array", + "items": { + "$ref": "#/definitions/EntityPassword" + } + } + }, + "additionalProperties": false, + "required": [ + "changes" + ] + }, + "EntityStatusArgs": { + "type": "object", + "properties": { + "data": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "info": { + "type": "string" + }, + "status": { + "type": "string" + }, + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag", + "status", + "info", + "data" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ErrorResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "ErrorResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "HostPort": { + "type": "object", + "properties": { + "Address": { + "$ref": "#/definitions/Address" + }, + "cidr": { + "type": "string" + }, + "config-type": { + "type": "string" + }, + "is-secondary": { + "type": "boolean" + }, + "port": { + "type": "integer" + }, + "scope": { + "type": "string" + }, + "space-id": { + "type": "string" + }, + "space-name": { + "type": "string" + }, + "type": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "value", + "type", + "scope", + "Address", + "port" + ] + }, + "LifeResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "life": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "life" + ] + }, + "LifeResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/LifeResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "NotifyWatchResult": { + "type": "object", + "properties": { + "NotifyWatcherId": { + "type": "string" + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false, + "required": [ + "NotifyWatcherId" + ] + }, + "SetStatus": { + "type": "object", + "properties": { + "entities": { + "type": "array", + "items": { + "$ref": "#/definitions/EntityStatusArgs" + } + } + }, + "additionalProperties": false, + "required": [ + "entities" + ] + }, + "StringResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "result" + ] + }, + "StringsResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "StringsWatchResult": { + "type": "object", + "properties": { + "changes": { + "type": "array", + "items": { + "type": "string" + } + }, + "error": { + "$ref": "#/definitions/Error" + }, + "watcher-id": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "watcher-id" + ] + }, + "StringsWatchResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/StringsWatchResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + } + } + } + }, + { + "Name": "DiskManager", + "Description": "DiskManagerAPI provides access to the DiskManager API facade.", + "Version": 2, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent" + ], + "Schema": { + "type": "object", + "properties": { + "SetMachineBlockDevices": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/SetMachineBlockDevices" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + } + } + }, + "definitions": { + "BlockDevice": { + "type": "object", + "properties": { + "BusAddress": { + "type": "string" + }, + "DeviceLinks": { + "type": "array", + "items": { + "type": "string" + } + }, + "DeviceName": { + "type": "string" + }, + "FilesystemType": { + "type": "string" + }, + "HardwareId": { + "type": "string" + }, + "InUse": { + "type": "boolean" + }, + "Label": { + "type": "string" + }, + "MountPoint": { + "type": "string" + }, + "SerialId": { + "type": "string" + }, + "Size": { + "type": "integer" + }, + "UUID": { + "type": "string" + }, + "WWN": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "DeviceName", + "DeviceLinks", + "Label", + "UUID", + "HardwareId", + "WWN", + "BusAddress", + "Size", + "FilesystemType", + "InUse", + "MountPoint", + "SerialId" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ErrorResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "ErrorResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "MachineBlockDevices": { + "type": "object", + "properties": { + "block-devices": { + "type": "array", + "items": { + "$ref": "#/definitions/BlockDevice" + } + }, + "machine": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "machine" + ] + }, + "SetMachineBlockDevices": { + "type": "object", + "properties": { + "machine-block-devices": { + "type": "array", + "items": { + "$ref": "#/definitions/MachineBlockDevices" + } + } + }, + "additionalProperties": false, + "required": [ + "machine-block-devices" + ] + } + } + } + }, + { + "Name": "EntityWatcher", + "Description": "srvEntitiesWatcher defines the API for methods on a state.StringsWatcher.\nEach client has its own current set of watchers, stored in resources.\nsrvEntitiesWatcher notifies about changes for all entities of a given kind,\nsending the changes as a list of strings, which could be transformed\nfrom state entity ids to their corresponding entity tags.", + "Version": 2, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "Next": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/EntitiesWatchResult" + } + }, + "description": "Next returns when a change has occurred to an entity of the\ncollection being watched since the most recent call to Next\nor the Watch call that created the srvEntitiesWatcher." + }, + "Stop": { + "type": "object", + "description": "Stop stops the watcher." + } + }, + "definitions": { + "EntitiesWatchResult": { + "type": "object", + "properties": { + "changes": { + "type": "array", + "items": { + "type": "string" + } + }, + "error": { + "$ref": "#/definitions/Error" + }, + "watcher-id": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "watcher-id" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + } + } + } + }, + { + "Name": "EnvironUpgrader", + "Description": "", + "Version": 1, + "AvailableTo": [ + "controller-machine-agent" + ], + "Schema": { + "type": "object", + "properties": { + "ModelEnvironVersion": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/IntResults" + } + }, + "description": "ModelEnvironVersion returns the current version of the environ corresponding\nto each specified model." + }, + "ModelTargetEnvironVersion": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/IntResults" + } + }, + "description": "ModelTargetEnvironVersion returns the target version of the environ\ncorresponding to each specified model. The target version is the\nenviron provider's version." + }, + "SetModelEnvironVersion": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/SetModelEnvironVersions" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "SetModelEnvironVersion sets the current version of the environ corresponding\nto each specified model." + }, + "SetModelStatus": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/SetStatus" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "SetModelStatus sets the status of each given model." + }, + "WatchModelEnvironVersion": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/NotifyWatchResults" + } + }, + "description": "WatchModelEnvironVersion watches for changes to the environ version of the\nspecified models.\n\nNOTE(axw) this is currently implemented in terms of state.Model.Watch, so\nthe client may be notified of changes unrelated to the environ version." + } + }, + "definitions": { + "Entities": { + "type": "object", + "properties": { + "entities": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } + } + }, + "additionalProperties": false, + "required": [ + "entities" + ] + }, + "Entity": { + "type": "object", + "properties": { + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag" + ] + }, + "EntityStatusArgs": { + "type": "object", + "properties": { + "data": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "info": { + "type": "string" + }, + "status": { + "type": "string" + }, + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag", + "status", + "info", + "data" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ErrorResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "ErrorResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "IntResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "result" + ] + }, + "IntResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/IntResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "NotifyWatchResult": { + "type": "object", + "properties": { + "NotifyWatcherId": { + "type": "string" + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false, + "required": [ + "NotifyWatcherId" + ] + }, + "NotifyWatchResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/NotifyWatchResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "SetModelEnvironVersion": { + "type": "object", + "properties": { + "model-tag": { + "type": "string" + }, + "version": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "model-tag", + "version" + ] + }, + "SetModelEnvironVersions": { + "type": "object", + "properties": { + "models": { + "type": "array", + "items": { + "$ref": "#/definitions/SetModelEnvironVersion" + } + } + }, + "additionalProperties": false + }, + "SetStatus": { + "type": "object", + "properties": { + "entities": { + "type": "array", + "items": { + "$ref": "#/definitions/EntityStatusArgs" + } + } + }, + "additionalProperties": false, + "required": [ + "entities" + ] + } + } + } + }, + { + "Name": "ExternalControllerUpdater", + "Description": "ExternalControllerUpdaterAPI provides access to the CrossModelRelations API facade.", + "Version": 1, + "AvailableTo": [ + "controller-machine-agent" + ], + "Schema": { + "type": "object", + "properties": { + "ExternalControllerInfo": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ExternalControllerInfoResults" + } + }, + "description": "ExternalControllerInfo returns the info for the specified external controllers." + }, + "SetExternalControllerInfo": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/SetExternalControllersInfoParams" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "SetExternalControllerInfo saves the info for the specified external controllers." + }, + "WatchExternalControllers": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/StringsWatchResults" + } + }, + "description": "WatchExternalControllers watches for the addition and removal of external\ncontroller records to the local controller's database." + } + }, + "definitions": { + "Entities": { + "type": "object", + "properties": { + "entities": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } + } + }, + "additionalProperties": false, + "required": [ + "entities" + ] + }, + "Entity": { + "type": "object", + "properties": { + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ErrorResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "ErrorResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "ExternalControllerInfo": { + "type": "object", + "properties": { + "addrs": { + "type": "array", + "items": { + "type": "string" + } + }, + "ca-cert": { + "type": "string" + }, + "controller-alias": { + "type": "string" + }, + "controller-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "controller-tag", + "controller-alias", + "addrs", + "ca-cert" + ] + }, + "ExternalControllerInfoResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "$ref": "#/definitions/ExternalControllerInfo" + } + }, + "additionalProperties": false, + "required": [ + "result", + "error" + ] + }, + "ExternalControllerInfoResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ExternalControllerInfoResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "SetExternalControllerInfoParams": { + "type": "object", + "properties": { + "info": { + "$ref": "#/definitions/ExternalControllerInfo" + } + }, + "additionalProperties": false, + "required": [ + "info" + ] + }, + "SetExternalControllersInfoParams": { + "type": "object", + "properties": { + "controllers": { + "type": "array", + "items": { + "$ref": "#/definitions/SetExternalControllerInfoParams" + } + } + }, + "additionalProperties": false, + "required": [ + "controllers" + ] + }, + "StringsWatchResult": { + "type": "object", + "properties": { + "changes": { + "type": "array", + "items": { + "type": "string" + } + }, + "error": { + "$ref": "#/definitions/Error" + }, + "watcher-id": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "watcher-id" + ] + }, + "StringsWatchResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/StringsWatchResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + } + } + } + }, + { + "Name": "FanConfigurer", + "Description": "", + "Version": 1, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "FanConfig": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/FanConfigResult" + } + }, + "description": "FanConfig returns current FAN configuration." + }, + "WatchForFanConfigChanges": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/NotifyWatchResult" + } + }, + "description": "WatchForFanConfigChanges returns a NotifyWatcher that observes\nchanges to the FAN configuration.\nso we use the regular error return.\nTODO(wpk) 2017-09-21 We should use Model directly, and watch only for FanConfig changes." + } + }, + "definitions": { + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "FanConfigEntry": { + "type": "object", + "properties": { + "overlay": { + "type": "string" + }, + "underlay": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "underlay", + "overlay" + ] + }, + "FanConfigResult": { + "type": "object", + "properties": { + "fans": { + "type": "array", + "items": { + "$ref": "#/definitions/FanConfigEntry" + } + } + }, + "additionalProperties": false, + "required": [ + "fans" + ] + }, + "NotifyWatchResult": { + "type": "object", + "properties": { + "NotifyWatcherId": { + "type": "string" + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false, + "required": [ + "NotifyWatcherId" + ] + } + } + } + }, + { + "Name": "FilesystemAttachmentsWatcher", + "Description": "srvMachineStorageIdsWatcher defines the API wrapping a state.StringsWatcher\nwatching machine/storage attachments. This watcher notifies about storage\nentities (volumes/filesystems) being attached to and detached from machines.\n\nTODO(axw) state needs a new watcher, this is a bt of a hack. State watchers\ncould do with some deduplication of logic, and I don't want to add to that\nspaghetti right now.", + "Version": 2, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "Next": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/MachineStorageIdsWatchResult" + } + }, + "description": "Next returns when a change has occurred to an entity of the\ncollection being watched since the most recent call to Next\nor the Watch call that created the srvMachineStorageIdsWatcher." + }, + "Stop": { + "type": "object", + "description": "Stop stops the watcher." + } + }, + "definitions": { + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "MachineStorageId": { + "type": "object", + "properties": { + "attachment-tag": { + "type": "string" + }, + "machine-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "machine-tag", + "attachment-tag" + ] + }, + "MachineStorageIdsWatchResult": { + "type": "object", + "properties": { + "changes": { + "type": "array", + "items": { + "$ref": "#/definitions/MachineStorageId" + } + }, + "error": { + "$ref": "#/definitions/Error" + }, + "watcher-id": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "watcher-id", + "changes" + ] + } + } + } + }, + { + "Name": "Firewaller", + "Description": "FirewallerAPI provides access to the Firewaller API facade.", + "Version": 7, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "AreManuallyProvisioned": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/BoolResults" + } + }, + "description": "AreManuallyProvisioned returns whether each given entity is\nmanually provisioned or not. Only machine tags are accepted." + }, + "CloudSpec": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/CloudSpecResults" + } + }, + "description": "CloudSpec returns the model's cloud spec." + }, + "ControllerAPIInfoForModels": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ControllerAPIInfoResults" + } + }, + "description": "ControllerAPIInfoForModels returns the controller api connection details for the specified models." + }, + "ControllerConfig": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/ControllerConfigResult" + } + }, + "description": "ControllerConfig returns the controller's configuration." + }, + "GetAssignedMachine": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/StringResults" + } + }, + "description": "GetAssignedMachine returns the assigned machine tag (if any) for\neach given unit." + }, + "GetCloudSpec": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ModelTag" + }, + "Result": { + "$ref": "#/definitions/CloudSpecResult" + } + }, + "description": "GetCloudSpec constructs the CloudSpec for a validated and authorized model." + }, + "GetExposeInfo": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ExposeInfoResults" + } + }, + "description": "GetExposeInfo returns the expose flag and per-endpoint expose settings\nfor the specified applications." + }, + "InstanceId": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/StringResults" + } + }, + "description": "InstanceId returns the provider specific instance id for each given\nmachine or an CodeNotProvisioned error, if not set." + }, + "Life": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/LifeResults" + } + }, + "description": "Life returns the life status of every supplied entity, where available." + }, + "MacaroonForRelations": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/MacaroonResults" + } + }, + "description": "MacaroonForRelations returns the macaroon for the specified relations." + }, + "ModelConfig": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/ModelConfigResult" + } + }, + "description": "ModelConfig returns the current model's configuration." + }, + "ModelFirewallRules": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/IngressRulesResult" + } + }, + "description": "ModelFirewallRules returns the firewall rules that this model is\nconfigured to open" + }, + "OpenedMachinePortRanges": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/OpenMachinePortRangesResults" + } + }, + "description": "OpenedMachinePortRanges returns a list of the opened port ranges for the\nspecified machines where each result is broken down by unit. The list of\nopened ports for each unit is further grouped by endpoint name and includes\nthe subnet CIDRs that belong to the space that each endpoint is bound to." + }, + "SetRelationsStatus": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/SetStatus" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "SetRelationsStatus sets the status for the specified relations." + }, + "SpaceInfos": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/SpaceInfosParams" + }, + "Result": { + "$ref": "#/definitions/SpaceInfos" + } + }, + "description": "SpaceInfos returns a comprehensive representation of either all spaces or\na filtered subset of the known spaces and their associated subnet details." + }, + "Watch": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/NotifyWatchResults" + } + }, + "description": "Watch starts an NotifyWatcher for each given entity." + }, + "WatchCloudSpecsChanges": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/NotifyWatchResults" + } + }, + "description": "WatchCloudSpecsChanges returns a watcher for cloud spec changes." + }, + "WatchEgressAddressesForRelations": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/StringsWatchResults" + } + }, + "description": "WatchEgressAddressesForRelations creates a watcher that notifies when addresses, from which\nconnections will originate for the relation, change.\nEach event contains the entire set of addresses which are required for ingress for the relation." + }, + "WatchForModelConfigChanges": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/NotifyWatchResult" + } + }, + "description": "WatchForModelConfigChanges returns a NotifyWatcher that observes\nchanges to the model configuration.\nNote that although the NotifyWatchResult contains an Error field,\nit's not used because we are only returning a single watcher,\nso we use the regular error return." + }, + "WatchIngressAddressesForRelations": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/StringsWatchResults" + } + }, + "description": "WatchIngressAddressesForRelations creates a watcher that returns the ingress networks\nthat have been recorded against the specified relations." + }, + "WatchModelFirewallRules": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/NotifyWatchResult" + } + }, + "description": "WatchModelFirewallRules returns a NotifyWatcher that notifies of\npotential changes to a model's configured firewall rules" + }, + "WatchModelMachineStartTimes": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/StringsWatchResult" + } + }, + "description": "WatchModelMachineStartTimes watches the non-container machines in the model\nfor changes to the Life or AgentStartTime fields and reports them as a batch." + }, + "WatchModelMachines": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/StringsWatchResult" + } + }, + "description": "WatchModelMachines returns a StringsWatcher that notifies of\nchanges to the life cycles of the top level machines in the current\nmodel." + }, + "WatchOpenedPorts": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/StringsWatchResults" + } + }, + "description": "WatchOpenedPorts returns a new StringsWatcher for each given\nmodel tag." + }, + "WatchSubnets": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/StringsWatchResult" + } + }, + "description": "WatchSubnets returns a new StringsWatcher that watches the specified\nsubnet tags or all tags if no entities are specified." + }, + "WatchUnits": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/StringsWatchResults" + } + }, + "description": "WatchUnits starts a StringsWatcher to watch all units belonging to\nto any entity (machine or service) passed in args." + } + }, + "definitions": { + "BoolResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "result" + ] + }, + "BoolResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/BoolResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "CloudCredential": { + "type": "object", + "properties": { + "attrs": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "auth-type": { + "type": "string" + }, + "redacted": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "auth-type" + ] + }, + "CloudSpec": { + "type": "object", + "properties": { + "cacertificates": { + "type": "array", + "items": { + "type": "string" + } + }, + "credential": { + "$ref": "#/definitions/CloudCredential" + }, + "endpoint": { + "type": "string" + }, + "identity-endpoint": { + "type": "string" + }, + "is-controller-cloud": { + "type": "boolean" + }, + "name": { + "type": "string" + }, + "region": { + "type": "string" + }, + "skip-tls-verify": { + "type": "boolean" + }, + "storage-endpoint": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "type", + "name" + ] + }, + "CloudSpecResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "$ref": "#/definitions/CloudSpec" + } + }, + "additionalProperties": false + }, + "CloudSpecResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/CloudSpecResult" + } + } + }, + "additionalProperties": false + }, + "ControllerAPIInfoResult": { + "type": "object", + "properties": { + "addresses": { + "type": "array", + "items": { + "type": "string" + } + }, + "cacert": { + "type": "string" + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false, + "required": [ + "addresses", + "cacert" + ] + }, + "ControllerAPIInfoResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ControllerAPIInfoResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "ControllerConfigResult": { + "type": "object", + "properties": { + "config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + } + }, + "additionalProperties": false, + "required": [ + "config" + ] + }, + "Entities": { + "type": "object", + "properties": { + "entities": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } + } + }, + "additionalProperties": false, + "required": [ + "entities" + ] + }, + "Entity": { + "type": "object", + "properties": { + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag" + ] + }, + "EntityStatusArgs": { + "type": "object", + "properties": { + "data": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "info": { + "type": "string" + }, + "status": { + "type": "string" + }, + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag", + "status", + "info", + "data" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ErrorResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "ErrorResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "ExposeInfoResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "exposed": { + "type": "boolean" + }, + "exposed-endpoints": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/ExposedEndpoint" + } + } + } + }, + "additionalProperties": false + }, + "ExposeInfoResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ExposeInfoResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "ExposedEndpoint": { + "type": "object", + "properties": { + "expose-to-cidrs": { + "type": "array", + "items": { + "type": "string" + } + }, + "expose-to-spaces": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "FanConfigEntry": { + "type": "object", + "properties": { + "overlay": { + "type": "string" + }, + "underlay": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "underlay", + "overlay" + ] + }, + "IngressRule": { + "type": "object", + "properties": { + "port-range": { + "$ref": "#/definitions/PortRange" + }, + "source-cidrs": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "port-range", + "source-cidrs" + ] + }, + "IngressRulesResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "rules": { + "type": "array", + "items": { + "$ref": "#/definitions/IngressRule" + } + } + }, + "additionalProperties": false, + "required": [ + "rules" + ] + }, + "LifeResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "life": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "life" + ] + }, + "LifeResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/LifeResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "Macaroon": { + "type": "object", + "additionalProperties": false + }, + "MacaroonResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "$ref": "#/definitions/Macaroon" + } + }, + "additionalProperties": false + }, + "MacaroonResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/MacaroonResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "ModelConfigResult": { + "type": "object", + "properties": { + "config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + } + }, + "additionalProperties": false, + "required": [ + "config" + ] + }, + "ModelTag": { + "type": "object", + "additionalProperties": false + }, + "NotifyWatchResult": { + "type": "object", + "properties": { + "NotifyWatcherId": { + "type": "string" + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false, + "required": [ + "NotifyWatcherId" + ] + }, + "NotifyWatchResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/NotifyWatchResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "OpenMachinePortRangesResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "unit-port-ranges": { + "type": "object", + "patternProperties": { + ".*": { + "type": "array", + "items": { + "$ref": "#/definitions/OpenUnitPortRanges" + } + } + } + } + }, + "additionalProperties": false, + "required": [ + "unit-port-ranges" + ] + }, + "OpenMachinePortRangesResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/OpenMachinePortRangesResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "OpenUnitPortRanges": { + "type": "object", + "properties": { + "endpoint": { + "type": "string" + }, + "port-ranges": { + "type": "array", + "items": { + "$ref": "#/definitions/PortRange" + } + }, + "subnet-cidrs": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "port-ranges", + "subnet-cidrs" + ] + }, + "PortRange": { + "type": "object", + "properties": { + "from-port": { + "type": "integer" + }, + "protocol": { + "type": "string" + }, + "to-port": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "from-port", + "to-port", + "protocol" + ] + }, + "SetStatus": { + "type": "object", + "properties": { + "entities": { + "type": "array", + "items": { + "$ref": "#/definitions/EntityStatusArgs" + } + } + }, + "additionalProperties": false, + "required": [ + "entities" + ] + }, + "SpaceInfo": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "provider-id": { + "type": "string" + }, + "subnets": { + "type": "array", + "items": { + "$ref": "#/definitions/SubnetV3" + } + } + }, + "additionalProperties": false, + "required": [ + "id", + "name" + ] + }, + "SpaceInfos": { + "type": "object", + "properties": { + "space-infos": { + "type": "array", + "items": { + "$ref": "#/definitions/SpaceInfo" + } + } + }, + "additionalProperties": false + }, + "SpaceInfosParams": { + "type": "object", + "properties": { + "space-ids": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "StringResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "result" + ] + }, + "StringResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/StringResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "StringsWatchResult": { + "type": "object", + "properties": { + "changes": { + "type": "array", + "items": { + "type": "string" + } + }, + "error": { + "$ref": "#/definitions/Error" + }, + "watcher-id": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "watcher-id" + ] + }, + "StringsWatchResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/StringsWatchResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "Subnet": { + "type": "object", + "properties": { + "cidr": { + "type": "string" + }, + "life": { + "type": "string" + }, + "provider-id": { + "type": "string" + }, + "provider-network-id": { + "type": "string" + }, + "provider-space-id": { + "type": "string" + }, + "space-tag": { + "type": "string" + }, + "status": { + "type": "string" + }, + "vlan-tag": { + "type": "integer" + }, + "zones": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "cidr", + "vlan-tag", + "life", + "space-tag", + "zones" + ] + }, + "SubnetV2": { + "type": "object", + "properties": { + "Subnet": { + "$ref": "#/definitions/Subnet" + }, + "cidr": { + "type": "string" + }, + "id": { + "type": "string" + }, + "life": { + "type": "string" + }, + "provider-id": { + "type": "string" + }, + "provider-network-id": { + "type": "string" + }, + "provider-space-id": { + "type": "string" + }, + "space-tag": { + "type": "string" + }, + "status": { + "type": "string" + }, + "vlan-tag": { + "type": "integer" + }, + "zones": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "cidr", + "vlan-tag", + "life", + "space-tag", + "zones", + "Subnet" + ] + }, + "SubnetV3": { + "type": "object", + "properties": { + "Subnet": { + "$ref": "#/definitions/Subnet" + }, + "SubnetV2": { + "$ref": "#/definitions/SubnetV2" + }, + "cidr": { + "type": "string" + }, + "fan-info": { + "$ref": "#/definitions/FanConfigEntry" + }, + "id": { + "type": "string" + }, + "is-public": { + "type": "boolean" + }, + "life": { + "type": "string" + }, + "provider-id": { + "type": "string" + }, + "provider-network-id": { + "type": "string" + }, + "provider-space-id": { + "type": "string" + }, + "space-id": { + "type": "string" + }, + "space-tag": { + "type": "string" + }, + "status": { + "type": "string" + }, + "vlan-tag": { + "type": "integer" + }, + "zones": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "cidr", + "vlan-tag", + "life", + "space-tag", + "zones", + "Subnet", + "SubnetV2", + "space-id" + ] + } + } + } + }, + { + "Name": "HighAvailability", + "Description": "HighAvailabilityAPI implements the HighAvailability interface and is the concrete\nimplementation of the api end point.", + "Version": 2, + "AvailableTo": [ + "controller-user", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "EnableHA": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ControllersSpecs" + }, + "Result": { + "$ref": "#/definitions/ControllersChangeResults" + } + }, + "description": "EnableHA adds controller machines as necessary to ensure the\ncontroller has the number of machines specified." + } + }, + "definitions": { + "ControllersChangeResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "$ref": "#/definitions/ControllersChanges" + } + }, + "additionalProperties": false, + "required": [ + "result" + ] + }, + "ControllersChangeResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ControllersChangeResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "ControllersChanges": { + "type": "object", + "properties": { + "added": { + "type": "array", + "items": { + "type": "string" + } + }, + "converted": { + "type": "array", + "items": { + "type": "string" + } + }, + "maintained": { + "type": "array", + "items": { + "type": "string" + } + }, + "removed": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "ControllersSpec": { + "type": "object", + "properties": { + "constraints": { + "$ref": "#/definitions/Value" + }, + "num-controllers": { + "type": "integer" + }, + "placement": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "num-controllers" + ] + }, + "ControllersSpecs": { + "type": "object", + "properties": { + "specs": { + "type": "array", + "items": { + "$ref": "#/definitions/ControllersSpec" + } + } + }, + "additionalProperties": false, + "required": [ + "specs" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "Value": { + "type": "object", + "properties": { + "allocate-public-ip": { + "type": "boolean" + }, + "arch": { + "type": "string" + }, + "container": { + "type": "string" + }, + "cores": { + "type": "integer" + }, + "cpu-power": { + "type": "integer" + }, + "image-id": { + "type": "string" + }, + "instance-role": { + "type": "string" + }, + "instance-type": { + "type": "string" + }, + "mem": { + "type": "integer" + }, + "root-disk": { + "type": "integer" + }, + "root-disk-source": { + "type": "string" + }, + "spaces": { + "type": "array", + "items": { + "type": "string" + } + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "virt-type": { + "type": "string" + }, + "zones": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + } + } + } + }, + { + "Name": "HostKeyReporter", + "Description": "Facade implements the API required by the hostkeyreporter worker.", + "Version": 1, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "ReportKeys": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/SSHHostKeySet" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "ReportKeys sets the SSH host keys for one or more entities." + } + }, + "definitions": { + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ErrorResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "ErrorResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "SSHHostKeySet": { + "type": "object", + "properties": { + "entity-keys": { + "type": "array", + "items": { + "$ref": "#/definitions/SSHHostKeys" + } + } + }, + "additionalProperties": false, + "required": [ + "entity-keys" + ] + }, + "SSHHostKeys": { + "type": "object", + "properties": { + "public-keys": { + "type": "array", + "items": { + "type": "string" + } + }, + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag", + "public-keys" + ] + } + } + } + }, + { + "Name": "ImageMetadata", + "Description": "API is a dummy struct for compatibility.", + "Version": 3, + "AvailableTo": [ + "controller-machine-agent" + ], + "Schema": { + "type": "object", + "properties": { + "UpdateFromPublishedImages": { + "type": "object", + "description": "UpdateFromPublishedImages is now a no-op.\nIt is retained for compatibility." + } + } + } + }, + { + "Name": "ImageMetadataManager", + "Description": "API is the concrete implementation of the api end point\nfor loud image metadata manipulations.", + "Version": 1, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "Delete": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/MetadataImageIds" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "Delete deletes cloud image metadata for given image ids.\nIt supports bulk calls." + }, + "List": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ImageMetadataFilter" + }, + "Result": { + "$ref": "#/definitions/ListCloudImageMetadataResult" + } + }, + "description": "List returns all found cloud image metadata that satisfy\ngiven filter.\nReturned list contains metadata ordered by priority." + }, + "Save": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/MetadataSaveParams" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "Save stores given cloud image metadata.\nIt supports bulk calls." + } + }, + "definitions": { + "CloudImageMetadata": { + "type": "object", + "properties": { + "arch": { + "type": "string" + }, + "image-id": { + "type": "string" + }, + "priority": { + "type": "integer" + }, + "region": { + "type": "string" + }, + "root-storage-size": { + "type": "integer" + }, + "root-storage-type": { + "type": "string" + }, + "source": { + "type": "string" + }, + "stream": { + "type": "string" + }, + "version": { + "type": "string" + }, + "virt-type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "image-id", + "region", + "version", + "arch", + "source", + "priority" + ] + }, + "CloudImageMetadataList": { + "type": "object", + "properties": { + "metadata": { + "type": "array", + "items": { + "$ref": "#/definitions/CloudImageMetadata" + } + } + }, + "additionalProperties": false + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ErrorResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "ErrorResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "ImageMetadataFilter": { + "type": "object", + "properties": { + "arches": { + "type": "array", + "items": { + "type": "string" + } + }, + "region": { + "type": "string" + }, + "root-storage-type": { + "type": "string" + }, + "stream": { + "type": "string" + }, + "versions": { + "type": "array", + "items": { + "type": "string" + } + }, + "virt-type": { + "type": "string" + } + }, + "additionalProperties": false + }, + "ListCloudImageMetadataResult": { + "type": "object", + "properties": { + "result": { + "type": "array", + "items": { + "$ref": "#/definitions/CloudImageMetadata" + } + } + }, + "additionalProperties": false, + "required": [ + "result" + ] + }, + "MetadataImageIds": { + "type": "object", + "properties": { + "image-ids": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "image-ids" + ] + }, + "MetadataSaveParams": { + "type": "object", + "properties": { + "metadata": { + "type": "array", + "items": { + "$ref": "#/definitions/CloudImageMetadataList" + } + } + }, + "additionalProperties": false + } + } + } + }, + { + "Name": "InstanceMutater", + "Description": "", + "Version": 3, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent" + ], + "Schema": { + "type": "object", + "properties": { + "CharmProfilingInfo": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entity" + }, + "Result": { + "$ref": "#/definitions/CharmProfilingInfoResult" + } + }, + "description": "CharmProfilingInfo returns info to update lxd profiles on the machine. If\nthe machine is not provisioned, no profile change info will be returned,\nnor will an error." + }, + "ContainerType": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entity" + }, + "Result": { + "$ref": "#/definitions/ContainerTypeResult" + } + }, + "description": "ContainerType returns the container type of a machine." + }, + "Life": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/LifeResults" + } + }, + "description": "Life returns the life status of every supplied entity, where available." + }, + "SetCharmProfiles": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/SetProfileArgs" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "SetCharmProfiles records the given slice of charm profile names." + }, + "SetModificationStatus": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/SetStatus" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "SetModificationStatus updates the instance whilst changes are occurring. This\nis different from SetStatus and SetInstanceStatus, by the fact this holds\ninformation about the ongoing changes that are happening to instances.\nConsider LXD Profile updates that can modify a instance, but may not cause\nthe instance to be placed into a error state. This modification status\nserves the purpose of highlighting that to the operator.\nOnly machine tags are accepted." + }, + "WatchContainers": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entity" + }, + "Result": { + "$ref": "#/definitions/StringsWatchResult" + } + }, + "description": "WatchContainers starts a watcher to track Containers on a given\nmachine." + }, + "WatchLXDProfileVerificationNeeded": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/NotifyWatchResults" + } + }, + "description": "WatchLXDProfileVerificationNeeded starts a watcher to track Applications with\nLXD Profiles." + }, + "WatchMachines": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/StringsWatchResult" + } + }, + "description": "WatchMachines starts a watcher to track machines.\nWatchMachines does not consume the initial event of the watch response, as\nthat returns the initial set of machines that are currently available." + }, + "WatchModelMachines": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/StringsWatchResult" + } + }, + "description": "WatchModelMachines starts a watcher to track machines, but not containers.\nWatchModelMachines does not consume the initial event of the watch response, as\nthat returns the initial set of machines that are currently available." + } + }, + "definitions": { + "CharmLXDProfile": { + "type": "object", + "properties": { + "config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "description": { + "type": "string" + }, + "devices": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + } + } + } + }, + "additionalProperties": false, + "required": [ + "config", + "description", + "devices" + ] + }, + "CharmProfilingInfoResult": { + "type": "object", + "properties": { + "current-profiles": { + "type": "array", + "items": { + "type": "string" + } + }, + "error": { + "$ref": "#/definitions/Error" + }, + "instance-id": { + "type": "string" + }, + "model-name": { + "type": "string" + }, + "profile-changes": { + "type": "array", + "items": { + "$ref": "#/definitions/ProfileInfoResult" + } + } + }, + "additionalProperties": false, + "required": [ + "instance-id", + "model-name", + "profile-changes", + "current-profiles", + "error" + ] + }, + "ContainerTypeResult": { + "type": "object", + "properties": { + "container-type": { + "type": "string" + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false, + "required": [ + "container-type", + "error" + ] + }, + "Entities": { + "type": "object", + "properties": { + "entities": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } + } + }, + "additionalProperties": false, + "required": [ + "entities" + ] + }, + "Entity": { + "type": "object", + "properties": { + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag" + ] + }, + "EntityStatusArgs": { + "type": "object", + "properties": { + "data": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "info": { + "type": "string" + }, + "status": { + "type": "string" + }, + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag", + "status", + "info", + "data" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ErrorResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "ErrorResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "LifeResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "life": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "life" + ] + }, + "LifeResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/LifeResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "NotifyWatchResult": { + "type": "object", + "properties": { + "NotifyWatcherId": { + "type": "string" + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false, + "required": [ + "NotifyWatcherId" + ] + }, + "NotifyWatchResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/NotifyWatchResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "ProfileInfoResult": { + "type": "object", + "properties": { + "application-name": { + "type": "string" + }, + "error": { + "$ref": "#/definitions/Error" + }, + "profile": { + "$ref": "#/definitions/CharmLXDProfile" + }, + "revision": { + "type": "integer" + } + }, + "additionalProperties": false + }, + "SetProfileArg": { + "type": "object", + "properties": { + "entity": { + "$ref": "#/definitions/Entity" + }, + "profiles": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "entity", + "profiles" + ] + }, + "SetProfileArgs": { + "type": "object", + "properties": { + "args": { + "type": "array", + "items": { + "$ref": "#/definitions/SetProfileArg" + } + } + }, + "additionalProperties": false, + "required": [ + "args" + ] + }, + "SetStatus": { + "type": "object", + "properties": { + "entities": { + "type": "array", + "items": { + "$ref": "#/definitions/EntityStatusArgs" + } + } + }, + "additionalProperties": false, + "required": [ + "entities" + ] + }, + "StringsWatchResult": { + "type": "object", + "properties": { + "changes": { + "type": "array", + "items": { + "type": "string" + } + }, + "error": { + "$ref": "#/definitions/Error" + }, + "watcher-id": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "watcher-id" + ] + } + } + } + }, + { + "Name": "InstancePoller", + "Description": "InstancePollerAPI provides access to the InstancePoller API facade.", + "Version": 4, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "AreManuallyProvisioned": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/BoolResults" + } + }, + "description": "AreManuallyProvisioned returns whether each given entity is\nmanually provisioned or not. Only machine tags are accepted." + }, + "InstanceId": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/StringResults" + } + }, + "description": "InstanceId returns the provider specific instance id for each given\nmachine or an CodeNotProvisioned error, if not set." + }, + "InstanceStatus": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/StatusResults" + } + }, + "description": "InstanceStatus returns the instance status for each given entity.\nOnly machine tags are accepted." + }, + "Life": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/LifeResults" + } + }, + "description": "Life returns the life status of every supplied entity, where available." + }, + "ModelConfig": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/ModelConfigResult" + } + }, + "description": "ModelConfig returns the current model's configuration." + }, + "ProviderAddresses": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/MachineAddressesResults" + } + }, + "description": "ProviderAddresses returns the list of all known provider addresses\nfor each given entity. Only machine tags are accepted." + }, + "SetInstanceStatus": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/SetStatus" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "SetInstanceStatus updates the instance status for each given entity.\nOnly machine tags are accepted." + }, + "SetProviderAddresses": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/SetMachinesAddresses" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "SetProviderAddresses updates the list of known provider addresses\nfor each given entity. Only machine tags are accepted." + }, + "SetProviderNetworkConfig": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/SetProviderNetworkConfig" + }, + "Result": { + "$ref": "#/definitions/SetProviderNetworkConfigResults" + } + }, + "description": "SetProviderNetworkConfig updates the provider addresses for one or more\nmachines.\n\nWhat's more, if the client request includes provider-specific IDs (e.g.\nnetwork, subnet or address IDs), this method will also iterate any present\nlink layer devices (and their addresses) and merge in any missing\nprovider-specific information." + }, + "Status": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/StatusResults" + } + }, + "description": "Status returns the status of each given entity." + }, + "WatchForModelConfigChanges": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/NotifyWatchResult" + } + }, + "description": "WatchForModelConfigChanges returns a NotifyWatcher that observes\nchanges to the model configuration.\nNote that although the NotifyWatchResult contains an Error field,\nit's not used because we are only returning a single watcher,\nso we use the regular error return." + }, + "WatchModelMachineStartTimes": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/StringsWatchResult" + } + }, + "description": "WatchModelMachineStartTimes watches the non-container machines in the model\nfor changes to the Life or AgentStartTime fields and reports them as a batch." + }, + "WatchModelMachines": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/StringsWatchResult" + } + }, + "description": "WatchModelMachines returns a StringsWatcher that notifies of\nchanges to the life cycles of the top level machines in the current\nmodel." + } + }, + "definitions": { + "Address": { + "type": "object", + "properties": { + "cidr": { + "type": "string" + }, + "config-type": { + "type": "string" + }, + "is-secondary": { + "type": "boolean" + }, + "scope": { + "type": "string" + }, + "space-id": { + "type": "string" + }, + "space-name": { + "type": "string" + }, + "type": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "value", + "type", + "scope" + ] + }, + "BoolResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "result" + ] + }, + "BoolResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/BoolResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "Entities": { + "type": "object", + "properties": { + "entities": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } + } + }, + "additionalProperties": false, + "required": [ + "entities" + ] + }, + "Entity": { + "type": "object", + "properties": { + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag" + ] + }, + "EntityStatusArgs": { + "type": "object", + "properties": { + "data": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "info": { + "type": "string" + }, + "status": { + "type": "string" + }, + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag", + "status", + "info", + "data" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ErrorResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "ErrorResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "LifeResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "life": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "life" + ] + }, + "LifeResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/LifeResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "MachineAddresses": { + "type": "object", + "properties": { + "addresses": { + "type": "array", + "items": { + "$ref": "#/definitions/Address" + } + }, + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag", + "addresses" + ] + }, + "MachineAddressesResult": { + "type": "object", + "properties": { + "addresses": { + "type": "array", + "items": { + "$ref": "#/definitions/Address" + } + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false, + "required": [ + "addresses" + ] + }, + "MachineAddressesResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/MachineAddressesResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "ModelConfigResult": { + "type": "object", + "properties": { + "config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + } + }, + "additionalProperties": false, + "required": [ + "config" + ] + }, + "NetworkConfig": { + "type": "object", + "properties": { + "address": { + "type": "string" + }, + "addresses": { + "type": "array", + "items": { + "$ref": "#/definitions/Address" + } + }, + "cidr": { + "type": "string" + }, + "config-type": { + "type": "string" + }, + "device-index": { + "type": "integer" + }, + "disabled": { + "type": "boolean" + }, + "dns-search-domains": { + "type": "array", + "items": { + "type": "string" + } + }, + "dns-servers": { + "type": "array", + "items": { + "type": "string" + } + }, + "gateway-address": { + "type": "string" + }, + "interface-name": { + "type": "string" + }, + "interface-type": { + "type": "string" + }, + "is-default-gateway": { + "type": "boolean" + }, + "mac-address": { + "type": "string" + }, + "mtu": { + "type": "integer" + }, + "no-auto-start": { + "type": "boolean" + }, + "origin": { + "type": "string" + }, + "parent-interface-name": { + "type": "string" + }, + "provider-address-id": { + "type": "string" + }, + "provider-id": { + "type": "string" + }, + "provider-network-id": { + "type": "string" + }, + "provider-space-id": { + "type": "string" + }, + "provider-subnet-id": { + "type": "string" + }, + "provider-vlan-id": { + "type": "string" + }, + "routes": { + "type": "array", + "items": { + "$ref": "#/definitions/NetworkRoute" + } + }, + "shadow-addresses": { + "type": "array", + "items": { + "$ref": "#/definitions/Address" + } + }, + "virtual-port-type": { + "type": "string" + }, + "vlan-tag": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "device-index", + "mac-address", + "cidr", + "mtu", + "provider-id", + "provider-network-id", + "provider-subnet-id", + "provider-space-id", + "provider-address-id", + "provider-vlan-id", + "vlan-tag", + "interface-name", + "parent-interface-name", + "interface-type", + "disabled" + ] + }, + "NetworkRoute": { + "type": "object", + "properties": { + "destination-cidr": { + "type": "string" + }, + "gateway-ip": { + "type": "string" + }, + "metric": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "destination-cidr", + "gateway-ip", + "metric" + ] + }, + "NotifyWatchResult": { + "type": "object", + "properties": { + "NotifyWatcherId": { + "type": "string" + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false, + "required": [ + "NotifyWatcherId" + ] + }, + "ProviderNetworkConfig": { + "type": "object", + "properties": { + "config": { + "type": "array", + "items": { + "$ref": "#/definitions/NetworkConfig" + } + }, + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag", + "config" + ] + }, + "SetMachinesAddresses": { + "type": "object", + "properties": { + "machine-addresses": { + "type": "array", + "items": { + "$ref": "#/definitions/MachineAddresses" + } + } + }, + "additionalProperties": false, + "required": [ + "machine-addresses" + ] + }, + "SetProviderNetworkConfig": { + "type": "object", + "properties": { + "args": { + "type": "array", + "items": { + "$ref": "#/definitions/ProviderNetworkConfig" + } + } + }, + "additionalProperties": false, + "required": [ + "args" + ] + }, + "SetProviderNetworkConfigResult": { + "type": "object", + "properties": { + "addresses": { + "type": "array", + "items": { + "$ref": "#/definitions/Address" + } + }, + "error": { + "$ref": "#/definitions/Error" + }, + "modified": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "addresses", + "modified" + ] + }, + "SetProviderNetworkConfigResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/SetProviderNetworkConfigResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "SetStatus": { + "type": "object", + "properties": { + "entities": { + "type": "array", + "items": { + "$ref": "#/definitions/EntityStatusArgs" + } + } + }, + "additionalProperties": false, + "required": [ + "entities" + ] + }, + "StatusResult": { + "type": "object", + "properties": { + "data": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "error": { + "$ref": "#/definitions/Error" + }, + "id": { + "type": "string" + }, + "info": { + "type": "string" + }, + "life": { + "type": "string" + }, + "since": { + "type": "string", + "format": "date-time" + }, + "status": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "id", + "life", + "status", + "info", + "data", + "since" + ] + }, + "StatusResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/StatusResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "StringResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "result" + ] + }, + "StringResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/StringResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "StringsWatchResult": { + "type": "object", + "properties": { + "changes": { + "type": "array", + "items": { + "type": "string" + } + }, + "error": { + "$ref": "#/definitions/Error" + }, + "watcher-id": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "watcher-id" + ] + } + } + } + }, + { + "Name": "KeyManager", + "Description": "KeyManagerAPI provides api endpoints for manipulating ssh keys", + "Version": 1, + "AvailableTo": [ + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "AddKeys": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ModifyUserSSHKeys" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "AddKeys adds new authorised ssh keys for the specified user." + }, + "DeleteKeys": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ModifyUserSSHKeys" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "DeleteKeys deletes the authorised ssh keys for the specified user." + }, + "ImportKeys": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ModifyUserSSHKeys" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "ImportKeys imports new authorised ssh keys from the specified key ids for the specified user." + }, + "ListKeys": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ListSSHKeys" + }, + "Result": { + "$ref": "#/definitions/StringsResults" + } + }, + "description": "ListKeys returns the authorised ssh keys for the specified users." + } + }, + "definitions": { + "Entities": { + "type": "object", + "properties": { + "entities": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } + } + }, + "additionalProperties": false, + "required": [ + "entities" + ] + }, + "Entity": { + "type": "object", + "properties": { + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ErrorResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "ErrorResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "ListSSHKeys": { + "type": "object", + "properties": { + "entities": { + "$ref": "#/definitions/Entities" + }, + "mode": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "entities", + "mode" + ] + }, + "ModifyUserSSHKeys": { + "type": "object", + "properties": { + "ssh-keys": { + "type": "array", + "items": { + "type": "string" + } + }, + "user": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "user", + "ssh-keys" + ] + }, + "StringsResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "StringsResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/StringsResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + } + } + } + }, + { + "Name": "KeyUpdater", + "Description": "KeyUpdaterAPI implements the KeyUpdater interface and is the concrete\nimplementation of the api end point.", + "Version": 1, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent" + ], + "Schema": { + "type": "object", + "properties": { + "AuthorisedKeys": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/StringsResults" + } + }, + "description": "AuthorisedKeys reports the authorised ssh keys for the specified machines.\nThe current implementation relies on global authorised keys being stored in the model config.\nThis will change as new user management and authorisation functionality is added." + }, + "WatchAuthorisedKeys": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/NotifyWatchResults" + } + }, + "description": "WatchAuthorisedKeys starts a watcher to track changes to the authorised ssh keys\nfor the specified machines.\nThe current implementation relies on global authorised keys being stored in the model config.\nThis will change as new user management and authorisation functionality is added." + } + }, + "definitions": { + "Entities": { + "type": "object", + "properties": { + "entities": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } + } + }, + "additionalProperties": false, + "required": [ + "entities" + ] + }, + "Entity": { + "type": "object", + "properties": { + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "NotifyWatchResult": { + "type": "object", + "properties": { + "NotifyWatcherId": { + "type": "string" + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false, + "required": [ + "NotifyWatcherId" + ] + }, + "NotifyWatchResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/NotifyWatchResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "StringsResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "StringsResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/StringsResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + } + } + } + }, + { + "Name": "LeadershipService", + "Description": "LeadershipService implements a variant of leadership.Claimer for consumption\nover the API.", + "Version": 2, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "BlockUntilLeadershipReleased": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ApplicationTag" + }, + "Result": { + "$ref": "#/definitions/ErrorResult" + } + }, + "description": "BlockUntilLeadershipReleased blocks the caller until leadership is\nreleased for the given service." + }, + "ClaimLeadership": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ClaimLeadershipBulkParams" + }, + "Result": { + "$ref": "#/definitions/ClaimLeadershipBulkResults" + } + }, + "description": "ClaimLeadership makes a leadership claim with the given parameters." + } + }, + "definitions": { + "ApplicationTag": { + "type": "object", + "properties": { + "Name": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "Name" + ] + }, + "ClaimLeadershipBulkParams": { + "type": "object", + "properties": { + "params": { + "type": "array", + "items": { + "$ref": "#/definitions/ClaimLeadershipParams" + } + } + }, + "additionalProperties": false, + "required": [ + "params" + ] + }, + "ClaimLeadershipBulkResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "ClaimLeadershipParams": { + "type": "object", + "properties": { + "application-tag": { + "type": "string" + }, + "duration": { + "type": "number" + }, + "unit-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "application-tag", + "unit-tag", + "duration" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ErrorResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + } + } + } + }, + { + "Name": "LifeFlag", + "Description": "", + "Version": 1, + "AvailableTo": [ + "controller-machine-agent" + ], + "Schema": { + "type": "object", + "properties": { + "Life": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/LifeResults" + } + }, + "description": "Life returns the life status of every supplied entity, where available." + }, + "Watch": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/NotifyWatchResults" + } + }, + "description": "Watch starts an NotifyWatcher for each given entity." + } + }, + "definitions": { + "Entities": { + "type": "object", + "properties": { + "entities": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } + } + }, + "additionalProperties": false, + "required": [ + "entities" + ] + }, + "Entity": { + "type": "object", + "properties": { + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "LifeResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "life": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "life" + ] + }, + "LifeResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/LifeResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "NotifyWatchResult": { + "type": "object", + "properties": { + "NotifyWatcherId": { + "type": "string" + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false, + "required": [ + "NotifyWatcherId" + ] + }, + "NotifyWatchResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/NotifyWatchResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + } + } + } + }, + { + "Name": "LogForwarding", + "Description": "LogForwardingAPI is the concrete implementation of the api end point.", + "Version": 1, + "AvailableTo": [ + "controller-machine-agent" + ], + "Schema": { + "type": "object", + "properties": { + "GetLastSent": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/LogForwardingGetLastSentParams" + }, + "Result": { + "$ref": "#/definitions/LogForwardingGetLastSentResults" + } + }, + "description": "GetLastSent is a bulk call that gets the log forwarding \"last sent\"\nrecord ID for each requested target." + }, + "SetLastSent": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/LogForwardingSetLastSentParams" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "SetLastSent is a bulk call that sets the log forwarding \"last sent\"\nrecord ID for each requested target." + } + }, + "definitions": { + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ErrorResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "ErrorResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "LogForwardingGetLastSentParams": { + "type": "object", + "properties": { + "ids": { + "type": "array", + "items": { + "$ref": "#/definitions/LogForwardingID" + } + } + }, + "additionalProperties": false, + "required": [ + "ids" + ] + }, + "LogForwardingGetLastSentResult": { + "type": "object", + "properties": { + "err": { + "$ref": "#/definitions/Error" + }, + "record-id": { + "type": "integer" + }, + "record-timestamp": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "record-id", + "record-timestamp", + "err" + ] + }, + "LogForwardingGetLastSentResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/LogForwardingGetLastSentResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "LogForwardingID": { + "type": "object", + "properties": { + "model": { + "type": "string" + }, + "sink": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "model", + "sink" + ] + }, + "LogForwardingSetLastSentParam": { + "type": "object", + "properties": { + "LogForwardingID": { + "$ref": "#/definitions/LogForwardingID" + }, + "model": { + "type": "string" + }, + "record-id": { + "type": "integer" + }, + "record-timestamp": { + "type": "integer" + }, + "sink": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "model", + "sink", + "LogForwardingID", + "record-id", + "record-timestamp" + ] + }, + "LogForwardingSetLastSentParams": { + "type": "object", + "properties": { + "params": { + "type": "array", + "items": { + "$ref": "#/definitions/LogForwardingSetLastSentParam" + } + } + }, + "additionalProperties": false, + "required": [ + "params" + ] + } + } + } + }, + { + "Name": "Logger", + "Description": "LoggerAPI implements the Logger interface and is the concrete\nimplementation of the api end point.", + "Version": 1, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "LoggingConfig": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/StringResults" + } + }, + "description": "LoggingConfig reports the logging configuration for the agents specified." + }, + "WatchLoggingConfig": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/NotifyWatchResults" + } + }, + "description": "WatchLoggingConfig starts a watcher to track changes to the logging config\nfor the agents specified.. Unfortunately the current infrastructure makes\nwatching parts of the config non-trivial, so currently any change to the\nconfig will cause the watcher to notify the client." + } + }, + "definitions": { + "Entities": { + "type": "object", + "properties": { + "entities": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } + } + }, + "additionalProperties": false, + "required": [ + "entities" + ] + }, + "Entity": { + "type": "object", + "properties": { + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "NotifyWatchResult": { + "type": "object", + "properties": { + "NotifyWatcherId": { + "type": "string" + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false, + "required": [ + "NotifyWatcherId" + ] + }, + "NotifyWatchResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/NotifyWatchResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "StringResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "result" + ] + }, + "StringResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/StringResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + } + } + } + }, + { + "Name": "MachineActions", + "Description": "Facade implements the machineactions interface and is the concrete\nimplementation of the api end point.", + "Version": 1, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent" + ], + "Schema": { + "type": "object", + "properties": { + "Actions": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ActionResults" + } + }, + "description": "Actions returns the Actions by Tags passed and ensures that the machine asking\nfor them is the machine that has the actions" + }, + "BeginActions": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "BeginActions marks the actions represented by the passed in Tags as running." + }, + "FinishActions": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ActionExecutionResults" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "FinishActions saves the result of a completed Action" + }, + "RunningActions": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ActionsByReceivers" + } + }, + "description": "RunningActions lists the actions running for the entities passed in.\nIf we end up needing more than ListRunning at some point we could follow/abstract\nwhat's done in the client actions package." + }, + "WatchActionNotifications": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/StringsWatchResults" + } + }, + "description": "WatchActionNotifications returns a StringsWatcher for observing\nincoming action calls to a machine." + } + }, + "definitions": { + "Action": { + "type": "object", + "properties": { + "execution-group": { + "type": "string" + }, + "name": { + "type": "string" + }, + "parallel": { + "type": "boolean" + }, + "parameters": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "receiver": { + "type": "string" + }, + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag", + "receiver", + "name" + ] + }, + "ActionExecutionResult": { + "type": "object", + "properties": { + "action-tag": { + "type": "string" + }, + "message": { + "type": "string" + }, + "results": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "status": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "action-tag", + "status" + ] + }, + "ActionExecutionResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ActionExecutionResult" + } + } + }, + "additionalProperties": false + }, + "ActionMessage": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + } + }, + "additionalProperties": false, + "required": [ + "timestamp", + "message" + ] + }, + "ActionResult": { + "type": "object", + "properties": { + "action": { + "$ref": "#/definitions/Action" + }, + "completed": { + "type": "string", + "format": "date-time" + }, + "enqueued": { + "type": "string", + "format": "date-time" + }, + "error": { + "$ref": "#/definitions/Error" + }, + "log": { + "type": "array", + "items": { + "$ref": "#/definitions/ActionMessage" + } + }, + "message": { + "type": "string" + }, + "output": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "started": { + "type": "string", + "format": "date-time" + }, + "status": { + "type": "string" + } + }, + "additionalProperties": false + }, + "ActionResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ActionResult" + } + } + }, + "additionalProperties": false + }, + "ActionsByReceiver": { + "type": "object", + "properties": { + "actions": { + "type": "array", + "items": { + "$ref": "#/definitions/ActionResult" + } + }, + "error": { + "$ref": "#/definitions/Error" + }, + "receiver": { + "type": "string" + } + }, + "additionalProperties": false + }, + "ActionsByReceivers": { + "type": "object", + "properties": { + "actions": { + "type": "array", + "items": { + "$ref": "#/definitions/ActionsByReceiver" + } + } + }, + "additionalProperties": false + }, + "Entities": { + "type": "object", + "properties": { + "entities": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } + } + }, + "additionalProperties": false, + "required": [ + "entities" + ] + }, + "Entity": { + "type": "object", + "properties": { + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ErrorResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "ErrorResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "StringsWatchResult": { + "type": "object", + "properties": { + "changes": { + "type": "array", + "items": { + "type": "string" + } + }, + "error": { + "$ref": "#/definitions/Error" + }, + "watcher-id": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "watcher-id" + ] + }, + "StringsWatchResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/StringsWatchResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + } + } + } + }, + { + "Name": "MachineManager", + "Description": "MachineManagerAPI provides access to the MachineManager API facade.", + "Version": 10, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "AddMachines": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/AddMachines" + }, + "Result": { + "$ref": "#/definitions/AddMachinesResults" + } + }, + "description": "AddMachines adds new machines with the supplied parameters.\nThe args will contain Base info." + }, + "DestroyMachineWithParams": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/DestroyMachinesParams" + }, + "Result": { + "$ref": "#/definitions/DestroyMachineResults" + } + }, + "description": "DestroyMachineWithParams removes a set of machines from the model." + }, + "GetUpgradeSeriesMessages": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/UpgradeSeriesNotificationParams" + }, + "Result": { + "$ref": "#/definitions/StringsResults" + } + }, + "description": "GetUpgradeSeriesMessages returns all new messages associated with upgrade\nseries events. Messages that have already been retrieved once are not\nreturned by this method." + }, + "InstanceTypes": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ModelInstanceTypesConstraints" + }, + "Result": { + "$ref": "#/definitions/InstanceTypesResults" + } + }, + "description": "InstanceTypes returns instance type information for the cloud and region\nin which the current model is deployed." + }, + "ProvisioningScript": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ProvisioningScriptParams" + }, + "Result": { + "$ref": "#/definitions/ProvisioningScriptResult" + } + }, + "description": "ProvisioningScript returns a shell script that, when run,\nprovisions a machine agent on the machine executing the script." + }, + "RetryProvisioning": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/RetryProvisioningArgs" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "RetryProvisioning marks a provisioning error as transient on the machines." + }, + "UpgradeSeriesComplete": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/UpdateChannelArg" + }, + "Result": { + "$ref": "#/definitions/ErrorResult" + } + }, + "description": "UpgradeSeriesComplete marks a machine as having completed a managed series\nupgrade." + }, + "UpgradeSeriesPrepare": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/UpdateChannelArg" + }, + "Result": { + "$ref": "#/definitions/ErrorResult" + } + }, + "description": "UpgradeSeriesPrepare prepares a machine for a OS series upgrade." + }, + "UpgradeSeriesValidate": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/UpdateChannelArgs" + }, + "Result": { + "$ref": "#/definitions/UpgradeSeriesUnitsResults" + } + }, + "description": "UpgradeSeriesValidate validates that the incoming arguments correspond to a\nvalid series upgrade for the target machine.\nIf they do, a list of the machine's current units is returned for use in\nsoliciting user confirmation of the command." + }, + "WatchUpgradeSeriesNotifications": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/NotifyWatchResults" + } + }, + "description": "WatchUpgradeSeriesNotifications returns a watcher that fires on upgrade\nseries events." + } + }, + "definitions": { + "AddMachineParams": { + "type": "object", + "properties": { + "addresses": { + "type": "array", + "items": { + "$ref": "#/definitions/Address" + } + }, + "base": { + "$ref": "#/definitions/Base" + }, + "constraints": { + "$ref": "#/definitions/Value" + }, + "container-type": { + "type": "string" + }, + "disks": { + "type": "array", + "items": { + "$ref": "#/definitions/Constraints" + } + }, + "hardware-characteristics": { + "$ref": "#/definitions/HardwareCharacteristics" + }, + "instance-id": { + "type": "string" + }, + "jobs": { + "type": "array", + "items": { + "type": "string" + } + }, + "nonce": { + "type": "string" + }, + "parent-id": { + "type": "string" + }, + "placement": { + "$ref": "#/definitions/Placement" + } + }, + "additionalProperties": false, + "required": [ + "constraints", + "jobs", + "parent-id", + "container-type", + "instance-id", + "nonce", + "hardware-characteristics", + "addresses" + ] + }, + "AddMachines": { + "type": "object", + "properties": { + "params": { + "type": "array", + "items": { + "$ref": "#/definitions/AddMachineParams" + } + } + }, + "additionalProperties": false, + "required": [ + "params" + ] + }, + "AddMachinesResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "machine": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "machine" + ] + }, + "AddMachinesResults": { + "type": "object", + "properties": { + "machines": { + "type": "array", + "items": { + "$ref": "#/definitions/AddMachinesResult" + } + } + }, + "additionalProperties": false, + "required": [ + "machines" + ] + }, + "Address": { + "type": "object", + "properties": { + "cidr": { + "type": "string" + }, + "config-type": { + "type": "string" + }, + "is-secondary": { + "type": "boolean" + }, + "scope": { + "type": "string" + }, + "space-id": { + "type": "string" + }, + "space-name": { + "type": "string" + }, + "type": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "value", + "type", + "scope" + ] + }, + "Base": { + "type": "object", + "properties": { + "channel": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "channel" + ] + }, + "Constraints": { + "type": "object", + "properties": { + "Count": { + "type": "integer" + }, + "Pool": { + "type": "string" + }, + "Size": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "Pool", + "Size", + "Count" + ] + }, + "DestroyMachineInfo": { + "type": "object", + "properties": { + "destroyed-containers": { + "type": "array", + "items": { + "$ref": "#/definitions/DestroyMachineResult" + } + }, + "destroyed-storage": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } + }, + "destroyed-units": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } + }, + "detached-storage": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } + }, + "machine-id": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "machine-id" + ] + }, + "DestroyMachineResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "info": { + "$ref": "#/definitions/DestroyMachineInfo" + } + }, + "additionalProperties": false + }, + "DestroyMachineResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/DestroyMachineResult" + } + } + }, + "additionalProperties": false + }, + "DestroyMachinesParams": { + "type": "object", + "properties": { + "dry-run": { + "type": "boolean" + }, + "force": { + "type": "boolean" + }, + "keep": { + "type": "boolean" + }, + "machine-tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "max-wait": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "machine-tags" + ] + }, + "Entities": { + "type": "object", + "properties": { + "entities": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } + } + }, + "additionalProperties": false, + "required": [ + "entities" + ] + }, + "Entity": { + "type": "object", + "properties": { + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ErrorResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "ErrorResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "HardwareCharacteristics": { + "type": "object", + "properties": { + "arch": { + "type": "string" + }, + "availability-zone": { + "type": "string" + }, + "cpu-cores": { + "type": "integer" + }, + "cpu-power": { + "type": "integer" + }, + "mem": { + "type": "integer" + }, + "root-disk": { + "type": "integer" + }, + "root-disk-source": { + "type": "string" + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "virt-type": { + "type": "string" + } + }, + "additionalProperties": false + }, + "InstanceType": { + "type": "object", + "properties": { + "arches": { + "type": "array", + "items": { + "type": "string" + } + }, + "cost": { + "type": "integer" + }, + "cpu-cores": { + "type": "integer" + }, + "memory": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "root-disk": { + "type": "integer" + }, + "virt-type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "arches", + "cpu-cores", + "memory" + ] + }, + "InstanceTypesResult": { + "type": "object", + "properties": { + "cost-currency": { + "type": "string" + }, + "cost-divisor": { + "type": "integer" + }, + "cost-unit": { + "type": "string" + }, + "error": { + "$ref": "#/definitions/Error" + }, + "instance-types": { + "type": "array", + "items": { + "$ref": "#/definitions/InstanceType" + } + } + }, + "additionalProperties": false + }, + "InstanceTypesResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/InstanceTypesResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "ModelInstanceTypesConstraint": { + "type": "object", + "properties": { + "value": { + "$ref": "#/definitions/Value" + } + }, + "additionalProperties": false + }, + "ModelInstanceTypesConstraints": { + "type": "object", + "properties": { + "constraints": { + "type": "array", + "items": { + "$ref": "#/definitions/ModelInstanceTypesConstraint" + } + } + }, + "additionalProperties": false, + "required": [ + "constraints" + ] + }, + "NotifyWatchResult": { + "type": "object", + "properties": { + "NotifyWatcherId": { + "type": "string" + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false, + "required": [ + "NotifyWatcherId" + ] + }, + "NotifyWatchResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/NotifyWatchResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "Placement": { + "type": "object", + "properties": { + "directive": { + "type": "string" + }, + "scope": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "scope", + "directive" + ] + }, + "ProvisioningScriptParams": { + "type": "object", + "properties": { + "data-dir": { + "type": "string" + }, + "disable-package-commands": { + "type": "boolean" + }, + "machine-id": { + "type": "string" + }, + "nonce": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "machine-id", + "nonce", + "data-dir", + "disable-package-commands" + ] + }, + "ProvisioningScriptResult": { + "type": "object", + "properties": { + "script": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "script" + ] + }, + "RetryProvisioningArgs": { + "type": "object", + "properties": { + "all": { + "type": "boolean" + }, + "machines": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "all" + ] + }, + "StringsResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "StringsResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/StringsResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "UpdateChannelArg": { + "type": "object", + "properties": { + "channel": { + "type": "string" + }, + "force": { + "type": "boolean" + }, + "tag": { + "$ref": "#/definitions/Entity" + } + }, + "additionalProperties": false, + "required": [ + "tag", + "force", + "channel" + ] + }, + "UpdateChannelArgs": { + "type": "object", + "properties": { + "args": { + "type": "array", + "items": { + "$ref": "#/definitions/UpdateChannelArg" + } + } + }, + "additionalProperties": false, + "required": [ + "args" + ] + }, + "UpgradeSeriesNotificationParam": { + "type": "object", + "properties": { + "entity": { + "$ref": "#/definitions/Entity" + }, + "watcher-id": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "entity", + "watcher-id" + ] + }, + "UpgradeSeriesNotificationParams": { + "type": "object", + "properties": { + "params": { + "type": "array", + "items": { + "$ref": "#/definitions/UpgradeSeriesNotificationParam" + } + } + }, + "additionalProperties": false, + "required": [ + "params" + ] + }, + "UpgradeSeriesUnitsResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "unit-names": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "unit-names" + ] + }, + "UpgradeSeriesUnitsResults": { + "type": "object", + "properties": { + "Results": { + "type": "array", + "items": { + "$ref": "#/definitions/UpgradeSeriesUnitsResult" + } + } + }, + "additionalProperties": false, + "required": [ + "Results" + ] + }, + "Value": { + "type": "object", + "properties": { + "allocate-public-ip": { + "type": "boolean" + }, + "arch": { + "type": "string" + }, + "container": { + "type": "string" + }, + "cores": { + "type": "integer" + }, + "cpu-power": { + "type": "integer" + }, + "image-id": { + "type": "string" + }, + "instance-role": { + "type": "string" + }, + "instance-type": { + "type": "string" + }, + "mem": { + "type": "integer" + }, + "root-disk": { + "type": "integer" + }, + "root-disk-source": { + "type": "string" + }, + "spaces": { + "type": "array", + "items": { + "type": "string" + } + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "virt-type": { + "type": "string" + }, + "zones": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + } + } + } + }, + { + "Name": "MachineUndertaker", + "Description": "API implements the API facade used by the machine undertaker.", + "Version": 1, + "AvailableTo": [ + "controller-machine-agent" + ], + "Schema": { + "type": "object", + "properties": { + "AllMachineRemovals": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/EntitiesResults" + } + }, + "description": "AllMachineRemovals returns tags for all of the machines that have\nbeen marked for removal in the requested model." + }, + "CompleteMachineRemovals": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + } + }, + "description": "CompleteMachineRemovals removes the specified machines from the\nmodel database. It should only be called once any provider-level\ncleanup has been done for those machines." + }, + "GetMachineProviderInterfaceInfo": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ProviderInterfaceInfoResults" + } + }, + "description": "GetMachineProviderInterfaceInfo returns the provider details for\nall network interfaces attached to the machines requested." + }, + "WatchMachineRemovals": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/NotifyWatchResults" + } + }, + "description": "WatchMachineRemovals returns a watcher that will signal each time a\nmachine is marked for removal." + } + }, + "definitions": { + "Entities": { + "type": "object", + "properties": { + "entities": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } + } + }, + "additionalProperties": false, + "required": [ + "entities" + ] + }, + "EntitiesResult": { + "type": "object", + "properties": { + "entities": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false, + "required": [ + "entities" + ] + }, + "EntitiesResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/EntitiesResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "Entity": { + "type": "object", + "properties": { + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "NotifyWatchResult": { + "type": "object", + "properties": { + "NotifyWatcherId": { + "type": "string" + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false, + "required": [ + "NotifyWatcherId" + ] + }, + "NotifyWatchResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/NotifyWatchResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "ProviderInterfaceInfo": { + "type": "object", + "properties": { + "interface-name": { + "type": "string" + }, + "mac-address": { + "type": "string" + }, + "provider-id": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "interface-name", + "mac-address", + "provider-id" + ] + }, + "ProviderInterfaceInfoResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "interfaces": { + "type": "array", + "items": { + "$ref": "#/definitions/ProviderInterfaceInfo" + } + }, + "machine-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "machine-tag", + "interfaces" + ] + }, + "ProviderInterfaceInfoResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ProviderInterfaceInfoResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + } + } + } + }, + { + "Name": "Machiner", + "Description": "MachinerAPI implements the API used by the machiner worker.", + "Version": 5, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "APIAddresses": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/StringsResult" + } + }, + "description": "APIAddresses returns the list of addresses used to connect to the API." + }, + "APIHostPorts": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/APIHostPortsResult" + } + }, + "description": "APIHostPorts returns the API server addresses." + }, + "EnsureDead": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "EnsureDead calls EnsureDead on each given entity from state. It\nwill fail if the entity is not present. If it's Alive, nothing will\nhappen (see state/EnsureDead() for units or machines)." + }, + "Jobs": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/JobsResults" + } + }, + "description": "Jobs returns the jobs assigned to the given entities." + }, + "Life": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/LifeResults" + } + }, + "description": "Life returns the life status of every supplied entity, where available." + }, + "RecordAgentStartInformation": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/RecordAgentStartInformationArgs" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "RecordAgentStartInformation syncs the machine model with information\nreported by a machine agent when it starts." + }, + "RecordAgentStartTime": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "RecordAgentStartTime updates the agent start time field in the machine doc." + }, + "SetMachineAddresses": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/SetMachinesAddresses" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + } + }, + "SetObservedNetworkConfig": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/SetMachineNetworkConfig" + } + }, + "description": "SetObservedNetworkConfig reads the network config for the machine\nidentified by the input args.\nThis config is merged with the new network config supplied in the\nsame args and updated if it has changed." + }, + "SetStatus": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/SetStatus" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "SetStatus sets the status of each given entity." + }, + "Watch": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/NotifyWatchResults" + } + }, + "description": "Watch starts an NotifyWatcher for each given entity." + }, + "WatchAPIHostPorts": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/NotifyWatchResult" + } + }, + "description": "WatchAPIHostPorts watches the API server addresses." + } + }, + "definitions": { + "APIHostPortsResult": { + "type": "object", + "properties": { + "servers": { + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/definitions/HostPort" + } + } + } + }, + "additionalProperties": false, + "required": [ + "servers" + ] + }, + "Address": { + "type": "object", + "properties": { + "cidr": { + "type": "string" + }, + "config-type": { + "type": "string" + }, + "is-secondary": { + "type": "boolean" + }, + "scope": { + "type": "string" + }, + "space-id": { + "type": "string" + }, + "space-name": { + "type": "string" + }, + "type": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "value", + "type", + "scope" + ] + }, + "Entities": { + "type": "object", + "properties": { + "entities": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } + } + }, + "additionalProperties": false, + "required": [ + "entities" + ] + }, + "Entity": { + "type": "object", + "properties": { + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag" + ] + }, + "EntityStatusArgs": { + "type": "object", + "properties": { + "data": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "info": { + "type": "string" + }, + "status": { + "type": "string" + }, + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag", + "status", + "info", + "data" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ErrorResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "ErrorResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "HostPort": { + "type": "object", + "properties": { + "Address": { + "$ref": "#/definitions/Address" + }, + "cidr": { + "type": "string" + }, + "config-type": { + "type": "string" + }, + "is-secondary": { + "type": "boolean" + }, + "port": { + "type": "integer" + }, + "scope": { + "type": "string" + }, + "space-id": { + "type": "string" + }, + "space-name": { + "type": "string" + }, + "type": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "value", + "type", + "scope", + "Address", + "port" + ] + }, + "JobsResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "jobs": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "jobs" + ] + }, + "JobsResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/JobsResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "LifeResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "life": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "life" + ] + }, + "LifeResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/LifeResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "MachineAddresses": { + "type": "object", + "properties": { + "addresses": { + "type": "array", + "items": { + "$ref": "#/definitions/Address" + } + }, + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag", + "addresses" + ] + }, + "NetworkConfig": { + "type": "object", + "properties": { + "address": { + "type": "string" + }, + "addresses": { + "type": "array", + "items": { + "$ref": "#/definitions/Address" + } + }, + "cidr": { + "type": "string" + }, + "config-type": { + "type": "string" + }, + "device-index": { + "type": "integer" + }, + "disabled": { + "type": "boolean" + }, + "dns-search-domains": { + "type": "array", + "items": { + "type": "string" + } + }, + "dns-servers": { + "type": "array", + "items": { + "type": "string" + } + }, + "gateway-address": { + "type": "string" + }, + "interface-name": { + "type": "string" + }, + "interface-type": { + "type": "string" + }, + "is-default-gateway": { + "type": "boolean" + }, + "mac-address": { + "type": "string" + }, + "mtu": { + "type": "integer" + }, + "no-auto-start": { + "type": "boolean" + }, + "origin": { + "type": "string" + }, + "parent-interface-name": { + "type": "string" + }, + "provider-address-id": { + "type": "string" + }, + "provider-id": { + "type": "string" + }, + "provider-network-id": { + "type": "string" + }, + "provider-space-id": { + "type": "string" + }, + "provider-subnet-id": { + "type": "string" + }, + "provider-vlan-id": { + "type": "string" + }, + "routes": { + "type": "array", + "items": { + "$ref": "#/definitions/NetworkRoute" + } + }, + "shadow-addresses": { + "type": "array", + "items": { + "$ref": "#/definitions/Address" + } + }, + "virtual-port-type": { + "type": "string" + }, + "vlan-tag": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "device-index", + "mac-address", + "cidr", + "mtu", + "provider-id", + "provider-network-id", + "provider-subnet-id", + "provider-space-id", + "provider-address-id", + "provider-vlan-id", + "vlan-tag", + "interface-name", + "parent-interface-name", + "interface-type", + "disabled" + ] + }, + "NetworkRoute": { + "type": "object", + "properties": { + "destination-cidr": { + "type": "string" + }, + "gateway-ip": { + "type": "string" + }, + "metric": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "destination-cidr", + "gateway-ip", + "metric" + ] + }, + "NotifyWatchResult": { + "type": "object", + "properties": { + "NotifyWatcherId": { + "type": "string" + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false, + "required": [ + "NotifyWatcherId" + ] + }, + "NotifyWatchResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/NotifyWatchResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "RecordAgentStartInformationArg": { + "type": "object", + "properties": { + "hostname": { + "type": "string" + }, + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag" + ] + }, + "RecordAgentStartInformationArgs": { + "type": "object", + "properties": { + "args": { + "type": "array", + "items": { + "$ref": "#/definitions/RecordAgentStartInformationArg" + } + } + }, + "additionalProperties": false, + "required": [ + "args" + ] + }, + "SetMachineNetworkConfig": { + "type": "object", + "properties": { + "config": { + "type": "array", + "items": { + "$ref": "#/definitions/NetworkConfig" + } + }, + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag", + "config" + ] + }, + "SetMachinesAddresses": { + "type": "object", + "properties": { + "machine-addresses": { + "type": "array", + "items": { + "$ref": "#/definitions/MachineAddresses" + } + } + }, + "additionalProperties": false, + "required": [ + "machine-addresses" + ] + }, + "SetStatus": { + "type": "object", + "properties": { + "entities": { + "type": "array", + "items": { + "$ref": "#/definitions/EntityStatusArgs" + } + } + }, + "additionalProperties": false, + "required": [ + "entities" + ] + }, + "StringsResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + } + } + } + }, + { + "Name": "MeterStatus", + "Description": "MeterStatusAPI implements the MeterStatus interface and is the concrete\nimplementation of the API endpoint. Additionally, it embeds\ncommon.UnitStateAPI to allow meter status workers to access their\ncontroller-backed internal state.", + "Version": 2, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "GetMeterStatus": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/MeterStatusResults" + } + }, + "description": "GetMeterStatus returns meter status information for each unit." + }, + "SetState": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/SetUnitStateArgs" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "SetState sets the state persisted by the charm running in this unit\nand the state internal to the uniter for this unit." + }, + "State": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/UnitStateResults" + } + }, + "description": "State returns the state persisted by the charm running in this unit\nand the state internal to the uniter for this unit." + }, + "WatchMeterStatus": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/NotifyWatchResults" + } + }, + "description": "WatchMeterStatus returns a NotifyWatcher for observing changes\nto each unit's meter status." + } + }, + "definitions": { + "Entities": { + "type": "object", + "properties": { + "entities": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } + } + }, + "additionalProperties": false, + "required": [ + "entities" + ] + }, + "Entity": { + "type": "object", + "properties": { + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ErrorResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "ErrorResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "MeterStatusResult": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "error": { + "$ref": "#/definitions/Error" + }, + "info": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "code", + "info" + ] + }, + "MeterStatusResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/MeterStatusResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "NotifyWatchResult": { + "type": "object", + "properties": { + "NotifyWatcherId": { + "type": "string" + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false, + "required": [ + "NotifyWatcherId" + ] + }, + "NotifyWatchResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/NotifyWatchResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "SetUnitStateArg": { + "type": "object", + "properties": { + "charm-state": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "meter-status-state": { + "type": "string" + }, + "relation-state": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "secret-state": { + "type": "string" + }, + "storage-state": { + "type": "string" + }, + "tag": { + "type": "string" + }, + "uniter-state": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag" + ] + }, + "SetUnitStateArgs": { + "type": "object", + "properties": { + "args": { + "type": "array", + "items": { + "$ref": "#/definitions/SetUnitStateArg" + } + } + }, + "additionalProperties": false, + "required": [ + "args" + ] + }, + "UnitStateResult": { + "type": "object", + "properties": { + "charm-state": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "error": { + "$ref": "#/definitions/Error" + }, + "meter-status-state": { + "type": "string" + }, + "relation-state": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "secret-state": { + "type": "string" + }, + "storage-state": { + "type": "string" + }, + "uniter-state": { + "type": "string" + } + }, + "additionalProperties": false + }, + "UnitStateResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/UnitStateResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + } + } + } + }, + { + "Name": "MetricsAdder", + "Description": "MetricsAdderAPI implements the metrics adder interface and is the concrete\nimplementation of the API end point.", + "Version": 2, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent" + ], + "Schema": { + "type": "object", + "properties": { + "AddMetricBatches": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/MetricBatchParams" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "AddMetricBatches implements the MetricsAdder interface." + } + }, + "definitions": { + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ErrorResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "ErrorResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "Metric": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "labels": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "time": { + "type": "string", + "format": "date-time" + }, + "value": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "key", + "value", + "time" + ] + }, + "MetricBatch": { + "type": "object", + "properties": { + "charm-url": { + "type": "string" + }, + "created": { + "type": "string", + "format": "date-time" + }, + "metrics": { + "type": "array", + "items": { + "$ref": "#/definitions/Metric" + } + }, + "uuid": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uuid", + "charm-url", + "created", + "metrics" + ] + }, + "MetricBatchParam": { + "type": "object", + "properties": { + "batch": { + "$ref": "#/definitions/MetricBatch" + }, + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag", + "batch" + ] + }, + "MetricBatchParams": { + "type": "object", + "properties": { + "batches": { + "type": "array", + "items": { + "$ref": "#/definitions/MetricBatchParam" + } + } + }, + "additionalProperties": false, + "required": [ + "batches" + ] + } + } + } + }, + { + "Name": "MetricsDebug", + "Description": "MetricsDebugAPI implements the metricsdebug interface and is the concrete\nimplementation of the api end point.", + "Version": 2, + "AvailableTo": [ + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "GetMetrics": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/MetricResults" + } + }, + "description": "GetMetrics returns all metrics stored by the state server." + }, + "SetMeterStatus": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/MeterStatusParams" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "SetMeterStatus sets meter statuses for entities." + } + }, + "definitions": { + "Entities": { + "type": "object", + "properties": { + "entities": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } + } + }, + "additionalProperties": false, + "required": [ + "entities" + ] + }, + "Entity": { + "type": "object", + "properties": { + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag" + ] + }, + "EntityMetrics": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "metrics": { + "type": "array", + "items": { + "$ref": "#/definitions/MetricResult" + } + } + }, + "additionalProperties": false + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ErrorResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "ErrorResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "MeterStatusParam": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "string" + }, + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag", + "code" + ] + }, + "MeterStatusParams": { + "type": "object", + "properties": { + "statues": { + "type": "array", + "items": { + "$ref": "#/definitions/MeterStatusParam" + } + } + }, + "additionalProperties": false, + "required": [ + "statues" + ] + }, + "MetricResult": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "labels": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "time": { + "type": "string", + "format": "date-time" + }, + "unit": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "time", + "key", + "value", + "unit", + "labels" + ] + }, + "MetricResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/EntityMetrics" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + } + } + } + }, + { + "Name": "MetricsManager", + "Description": "MetricsManagerAPI implements the metrics manager interface and is the concrete\nimplementation of the api end point.", + "Version": 1, + "AvailableTo": [ + "controller-machine-agent" + ], + "Schema": { + "type": "object", + "properties": { + "AddJujuMachineMetrics": { + "type": "object", + "description": "AddJujuMachineMetrics adds a metric that counts the number of\nnon-container machines in the current model." + }, + "CleanupOldMetrics": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "CleanupOldMetrics removes old metrics from the collection.\nThe single arg params is expected to contain and model uuid.\nEven though the call will delete all metrics across models\nit serves to validate that the connection has access to at least one model." + }, + "SendMetrics": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "SendMetrics will send any unsent metrics onto the metric collection service." + } + }, + "definitions": { + "Entities": { + "type": "object", + "properties": { + "entities": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } + } + }, + "additionalProperties": false, + "required": [ + "entities" + ] + }, + "Entity": { + "type": "object", + "properties": { + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ErrorResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "ErrorResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + } + } + } + }, + { + "Name": "MigrationFlag", + "Description": "Facade lets clients watch and get models' migration phases.", + "Version": 1, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "Phase": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/PhaseResults" + } + }, + "description": "Phase returns the current migration phase or an error for every\nsupplied entity." + }, + "Watch": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/NotifyWatchResults" + } + }, + "description": "Watch returns an id for use with the NotifyWatcher facade, or an\nerror, for every supplied entity." + } + }, + "definitions": { + "Entities": { + "type": "object", + "properties": { + "entities": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } + } + }, + "additionalProperties": false, + "required": [ + "entities" + ] + }, + "Entity": { + "type": "object", + "properties": { + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "NotifyWatchResult": { + "type": "object", + "properties": { + "NotifyWatcherId": { + "type": "string" + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false, + "required": [ + "NotifyWatcherId" + ] + }, + "NotifyWatchResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/NotifyWatchResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "PhaseResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "phase": { + "type": "string" + } + }, + "additionalProperties": false + }, + "PhaseResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/PhaseResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + } + } + } + }, + { + "Name": "MigrationMaster", + "Description": "API implements the API required for the model migration\nmaster worker.", + "Version": 3, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "Export": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/SerializedModel" + } + }, + "description": "Export serializes the model associated with the API connection." + }, + "MigrationStatus": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/MasterMigrationStatus" + } + }, + "description": "MigrationStatus returns the details and progress of the latest\nmodel migration." + }, + "MinionReportTimeout": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/StringResult" + } + }, + "description": "MinionReportTimeout returns the configuration value for this controller that\nindicates how long the migration master worker should wait for minions to\nreported on phases of a migration." + }, + "MinionReports": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/MinionReports" + } + }, + "description": "MinionReports returns details of the reports made by migration\nminions to the controller for the current migration phase." + }, + "ModelInfo": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/MigrationModelInfo" + } + }, + "description": "ModelInfo returns essential information about the model to be\nmigrated." + }, + "Prechecks": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/PrechecksArgs" + } + }, + "description": "Prechecks performs pre-migration checks on the model and\n(source) controller." + }, + "ProcessRelations": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ProcessRelations" + } + }, + "description": "ProcessRelations processes any relations that need updating after an export.\nThis should help fix any remoteApplications that have been migrated." + }, + "Reap": { + "type": "object", + "description": "Reap removes all documents for the model associated with the API\nconnection." + }, + "SetPhase": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/SetMigrationPhaseArgs" + } + }, + "description": "SetPhase sets the phase of the active model migration. The provided\nphase must be a valid phase value, for example QUIESCE\" or\n\"ABORT\". See the core/migration package for the complete list." + }, + "SetStatusMessage": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/SetMigrationStatusMessageArgs" + } + }, + "description": "SetStatusMessage sets a human readable status message containing\ninformation about the migration's progress. This will be shown in\nstatus output shown to the end user." + }, + "SourceControllerInfo": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/MigrationSourceInfo" + } + }, + "description": "SourceControllerInfo returns the details required to connect to\nthe source controller for model migration." + }, + "Watch": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/NotifyWatchResult" + } + }, + "description": "Watch starts watching for an active migration for the model\nassociated with the API connection. The returned id should be used\nwith the NotifyWatcher facade to receive events." + }, + "WatchMinionReports": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/NotifyWatchResult" + } + }, + "description": "WatchMinionReports sets up a watcher which reports when a report\nfor a migration minion has arrived." + } + }, + "definitions": { + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "MasterMigrationStatus": { + "type": "object", + "properties": { + "migration-id": { + "type": "string" + }, + "phase": { + "type": "string" + }, + "phase-changed-time": { + "type": "string", + "format": "date-time" + }, + "spec": { + "$ref": "#/definitions/MigrationSpec" + } + }, + "additionalProperties": false, + "required": [ + "spec", + "migration-id", + "phase", + "phase-changed-time" + ] + }, + "MigrationModelInfo": { + "type": "object", + "properties": { + "agent-version": { + "$ref": "#/definitions/Number" + }, + "controller-agent-version": { + "$ref": "#/definitions/Number" + }, + "facade-versions": { + "type": "object", + "patternProperties": { + ".*": { + "type": "array", + "items": { + "type": "integer" + } + } + } + }, + "name": { + "type": "string" + }, + "owner-tag": { + "type": "string" + }, + "uuid": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uuid", + "name", + "owner-tag", + "agent-version", + "controller-agent-version" + ] + }, + "MigrationSourceInfo": { + "type": "object", + "properties": { + "addrs": { + "type": "array", + "items": { + "type": "string" + } + }, + "ca-cert": { + "type": "string" + }, + "controller-alias": { + "type": "string" + }, + "controller-tag": { + "type": "string" + }, + "local-related-models": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "local-related-models", + "controller-tag", + "addrs", + "ca-cert" + ] + }, + "MigrationSpec": { + "type": "object", + "properties": { + "model-tag": { + "type": "string" + }, + "target-info": { + "$ref": "#/definitions/MigrationTargetInfo" + } + }, + "additionalProperties": false, + "required": [ + "model-tag", + "target-info" + ] + }, + "MigrationTargetInfo": { + "type": "object", + "properties": { + "addrs": { + "type": "array", + "items": { + "type": "string" + } + }, + "auth-tag": { + "type": "string" + }, + "ca-cert": { + "type": "string" + }, + "controller-alias": { + "type": "string" + }, + "controller-tag": { + "type": "string" + }, + "macaroons": { + "type": "string" + }, + "password": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "controller-tag", + "addrs", + "ca-cert", + "auth-tag" + ] + }, + "MinionReports": { + "type": "object", + "properties": { + "failed": { + "type": "array", + "items": { + "type": "string" + } + }, + "migration-id": { + "type": "string" + }, + "phase": { + "type": "string" + }, + "success-count": { + "type": "integer" + }, + "unknown-count": { + "type": "integer" + }, + "unknown-sample": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "migration-id", + "phase", + "success-count", + "unknown-count", + "unknown-sample", + "failed" + ] + }, + "NotifyWatchResult": { + "type": "object", + "properties": { + "NotifyWatcherId": { + "type": "string" + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false, + "required": [ + "NotifyWatcherId" + ] + }, + "Number": { + "type": "object", + "properties": { + "Build": { + "type": "integer" + }, + "Major": { + "type": "integer" + }, + "Minor": { + "type": "integer" + }, + "Patch": { + "type": "integer" + }, + "Tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "Major", + "Minor", + "Tag", + "Patch", + "Build" + ] + }, + "PrechecksArgs": { + "type": "object", + "properties": { + "target-controller-version": { + "$ref": "#/definitions/Number" + } + }, + "additionalProperties": false, + "required": [ + "target-controller-version" + ] + }, + "ProcessRelations": { + "type": "object", + "properties": { + "controller-alias": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "controller-alias" + ] + }, + "SerializedModel": { + "type": "object", + "properties": { + "bytes": { + "type": "array", + "items": { + "type": "integer" + } + }, + "charms": { + "type": "array", + "items": { + "type": "string" + } + }, + "resources": { + "type": "array", + "items": { + "$ref": "#/definitions/SerializedModelResource" + } + }, + "tools": { + "type": "array", + "items": { + "$ref": "#/definitions/SerializedModelTools" + } + } + }, + "additionalProperties": false, + "required": [ + "bytes", + "charms", + "tools", + "resources" + ] + }, + "SerializedModelResource": { + "type": "object", + "properties": { + "application": { + "type": "string" + }, + "application-revision": { + "$ref": "#/definitions/SerializedModelResourceRevision" + }, + "charmstore-revision": { + "$ref": "#/definitions/SerializedModelResourceRevision" + }, + "name": { + "type": "string" + }, + "unit-revisions": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/SerializedModelResourceRevision" + } + } + } + }, + "additionalProperties": false, + "required": [ + "application", + "name", + "application-revision", + "charmstore-revision", + "unit-revisions" + ] + }, + "SerializedModelResourceRevision": { + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "fingerprint": { + "type": "string" + }, + "origin": { + "type": "string" + }, + "path": { + "type": "string" + }, + "revision": { + "type": "integer" + }, + "size": { + "type": "integer" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "type": { + "type": "string" + }, + "username": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "revision", + "type", + "path", + "description", + "origin", + "fingerprint", + "size", + "timestamp" + ] + }, + "SerializedModelTools": { + "type": "object", + "properties": { + "uri": { + "type": "string" + }, + "version": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "version", + "uri" + ] + }, + "SetMigrationPhaseArgs": { + "type": "object", + "properties": { + "phase": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "phase" + ] + }, + "SetMigrationStatusMessageArgs": { + "type": "object", + "properties": { + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message" + ] + }, + "StringResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "result" + ] + } + } + } + }, + { + "Name": "MigrationMinion", + "Description": "API implements the API required for the model migration\nmaster worker.", + "Version": 1, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "Report": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/MinionReport" + } + }, + "description": "Report allows a migration minion to submit whether it succeeded or\nfailed for a specific migration phase." + }, + "Watch": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/NotifyWatchResult" + } + }, + "description": "Watch starts watching for status updates for a migration attempt\nfor the model. It will report when a migration starts and when its\nstatus changes (including when it finishes). An initial event will\nbe fired if there has ever been a migration attempt for the model.\n\nThe MigrationStatusWatcher facade must be used to receive events\nfrom the watcher." + } + }, + "definitions": { + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "MinionReport": { + "type": "object", + "properties": { + "migration-id": { + "type": "string" + }, + "phase": { + "type": "string" + }, + "success": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "migration-id", + "phase", + "success" + ] + }, + "NotifyWatchResult": { + "type": "object", + "properties": { + "NotifyWatcherId": { + "type": "string" + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false, + "required": [ + "NotifyWatcherId" + ] + } + } + } + }, + { + "Name": "MigrationStatusWatcher", + "Description": "", + "Version": 1, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "Next": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/MigrationStatus" + } + }, + "description": "Next returns when the status for a model migration for the\nassociated model changes. The current details for the active\nmigration are returned." + }, + "Stop": { + "type": "object", + "description": "Stop stops the watcher." + } + }, + "definitions": { + "MigrationStatus": { + "type": "object", + "properties": { + "attempt": { + "type": "integer" + }, + "migration-id": { + "type": "string" + }, + "phase": { + "type": "string" + }, + "source-api-addrs": { + "type": "array", + "items": { + "type": "string" + } + }, + "source-ca-cert": { + "type": "string" + }, + "target-api-addrs": { + "type": "array", + "items": { + "type": "string" + } + }, + "target-ca-cert": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "migration-id", + "attempt", + "phase", + "source-api-addrs", + "source-ca-cert", + "target-api-addrs", + "target-ca-cert" + ] + } + } + } + }, + { + "Name": "MigrationTarget", + "Description": "API implements the API required for the model migration\nmaster worker when communicating with the target controller.", + "Version": 3, + "AvailableTo": [ + "controller-user" + ], + "Schema": { + "type": "object", + "properties": { + "Abort": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ModelArgs" + } + }, + "description": "Abort removes the specified model from the database. It is an error to\nattempt to Abort a model that has a migration mode other than importing." + }, + "Activate": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ActivateModelArgs" + } + }, + "description": "Activate sets the migration mode of the model to \"none\", meaning it\nis ready for use. It is an error to attempt to Abort a model that\nhas a migration mode other than importing. It also adds any required\nexternal controller records for those controllers hosting offers used\nby the model." + }, + "AdoptResources": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/AdoptResourcesArgs" + } + }, + "description": "AdoptResources asks the cloud provider to update the controller\ntags for a model's resources. This prevents the resources from\nbeing destroyed if the source controller is destroyed after the\nmodel is migrated away." + }, + "CACert": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/BytesResult" + } + }, + "description": "CACert returns the certificate used to validate the state connection." + }, + "CheckMachines": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ModelArgs" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "CheckMachines compares the machines in state with the ones reported\nby the provider and reports any discrepancies." + }, + "Import": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/SerializedModel" + } + }, + "description": "Import takes a serialized Juju model, deserializes it, and\nrecreates it in the receiving controller." + }, + "LatestLogTime": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ModelArgs" + }, + "Result": { + "type": "string", + "format": "date-time" + } + }, + "description": "LatestLogTime returns the time of the most recent log record\nreceived by the logtransfer endpoint. This can be used as the start\npoint for streaming logs from the source if the transfer was\ninterrupted.\n\nFor performance reasons, not every time is tracked, so if the\ntarget controller died during the transfer the latest log time\nmight be up to 2 minutes earlier. If the transfer was interrupted\nin some other way (like the source controller going away or a\nnetwork partition) the time will be up-to-date.\n\nLog messages are assumed to be sent in time order (which is how\ndebug-log emits them). If that isn't the case then this mechanism\ncan't be used to avoid duplicates when logtransfer is restarted.\n\nReturns the zero time if no logs have been transferred." + }, + "Prechecks": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/MigrationModelInfo" + } + }, + "description": "Prechecks ensure that the target controller is ready to accept a\nmodel migration." + } + }, + "definitions": { + "ActivateModelArgs": { + "type": "object", + "properties": { + "controller-alias": { + "type": "string" + }, + "controller-tag": { + "type": "string" + }, + "cross-model-uuids": { + "type": "array", + "items": { + "type": "string" + } + }, + "model-tag": { + "type": "string" + }, + "source-api-addrs": { + "type": "array", + "items": { + "type": "string" + } + }, + "source-ca-cert": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "model-tag", + "controller-tag", + "source-api-addrs", + "source-ca-cert", + "cross-model-uuids" + ] + }, + "AdoptResourcesArgs": { + "type": "object", + "properties": { + "model-tag": { + "type": "string" + }, + "source-controller-version": { + "$ref": "#/definitions/Number" + } + }, + "additionalProperties": false, + "required": [ + "model-tag", + "source-controller-version" + ] + }, + "BytesResult": { + "type": "object", + "properties": { + "result": { + "type": "array", + "items": { + "type": "integer" + } + } + }, + "additionalProperties": false, + "required": [ + "result" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ErrorResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "ErrorResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "MigrationModelInfo": { + "type": "object", + "properties": { + "agent-version": { + "$ref": "#/definitions/Number" + }, + "controller-agent-version": { + "$ref": "#/definitions/Number" + }, + "facade-versions": { + "type": "object", + "patternProperties": { + ".*": { + "type": "array", + "items": { + "type": "integer" + } + } + } + }, + "name": { + "type": "string" + }, + "owner-tag": { + "type": "string" + }, + "uuid": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uuid", + "name", + "owner-tag", + "agent-version", + "controller-agent-version" + ] + }, + "ModelArgs": { + "type": "object", + "properties": { + "model-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "model-tag" + ] + }, + "Number": { + "type": "object", + "properties": { + "Build": { + "type": "integer" + }, + "Major": { + "type": "integer" + }, + "Minor": { + "type": "integer" + }, + "Patch": { + "type": "integer" + }, + "Tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "Major", + "Minor", + "Tag", + "Patch", + "Build" + ] + }, + "SerializedModel": { + "type": "object", + "properties": { + "bytes": { + "type": "array", + "items": { + "type": "integer" + } + }, + "charms": { + "type": "array", + "items": { + "type": "string" + } + }, + "resources": { + "type": "array", + "items": { + "$ref": "#/definitions/SerializedModelResource" + } + }, + "tools": { + "type": "array", + "items": { + "$ref": "#/definitions/SerializedModelTools" + } + } + }, + "additionalProperties": false, + "required": [ + "bytes", + "charms", + "tools", + "resources" + ] + }, + "SerializedModelResource": { + "type": "object", + "properties": { + "application": { + "type": "string" + }, + "application-revision": { + "$ref": "#/definitions/SerializedModelResourceRevision" + }, + "charmstore-revision": { + "$ref": "#/definitions/SerializedModelResourceRevision" + }, + "name": { + "type": "string" + }, + "unit-revisions": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/SerializedModelResourceRevision" + } + } + } + }, + "additionalProperties": false, + "required": [ + "application", + "name", + "application-revision", + "charmstore-revision", + "unit-revisions" + ] + }, + "SerializedModelResourceRevision": { + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "fingerprint": { + "type": "string" + }, + "origin": { + "type": "string" + }, + "path": { + "type": "string" + }, + "revision": { + "type": "integer" + }, + "size": { + "type": "integer" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "type": { + "type": "string" + }, + "username": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "revision", + "type", + "path", + "description", + "origin", + "fingerprint", + "size", + "timestamp" + ] + }, + "SerializedModelTools": { + "type": "object", + "properties": { + "uri": { + "type": "string" + }, + "version": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "version", + "uri" + ] + } + } + } + }, + { + "Name": "ModelConfig", + "Description": "ModelConfigAPIV3 is currently the latest.", + "Version": 3, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "controller-user", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "GetModelConstraints": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/GetConstraintsResults" + } + }, + "description": "GetModelConstraints returns the constraints for the model." + }, + "ModelGet": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/ModelConfigResults" + } + }, + "description": "ModelGet implements the server-side part of the\nmodel-config CLI command." + }, + "ModelSet": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ModelSet" + } + }, + "description": "ModelSet implements the server-side part of the\nset-model-config CLI command." + }, + "ModelUnset": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ModelUnset" + } + }, + "description": "ModelUnset implements the server-side part of the\nset-model-config CLI command." + }, + "SLALevel": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/StringResult" + } + }, + "description": "SLALevel returns the current sla level for the model." + }, + "Sequences": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/ModelSequencesResult" + } + }, + "description": "Sequences returns the model's sequence names and next values." + }, + "SetModelConstraints": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/SetConstraints" + } + }, + "description": "SetModelConstraints sets the constraints for the model." + }, + "SetSLALevel": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ModelSLA" + } + }, + "description": "SetSLALevel sets the sla level on the model." + } + }, + "definitions": { + "ConfigValue": { + "type": "object", + "properties": { + "source": { + "type": "string" + }, + "value": { + "type": "object", + "additionalProperties": true + } + }, + "additionalProperties": false, + "required": [ + "value", + "source" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "GetConstraintsResults": { + "type": "object", + "properties": { + "constraints": { + "$ref": "#/definitions/Value" + } + }, + "additionalProperties": false, + "required": [ + "constraints" + ] + }, + "ModelConfigResults": { + "type": "object", + "properties": { + "config": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/ConfigValue" + } + } + } + }, + "additionalProperties": false, + "required": [ + "config" + ] + }, + "ModelSLA": { + "type": "object", + "properties": { + "ModelSLAInfo": { + "$ref": "#/definitions/ModelSLAInfo" + }, + "creds": { + "type": "array", + "items": { + "type": "integer" + } + }, + "level": { + "type": "string" + }, + "owner": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "level", + "owner", + "ModelSLAInfo", + "creds" + ] + }, + "ModelSLAInfo": { + "type": "object", + "properties": { + "level": { + "type": "string" + }, + "owner": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "level", + "owner" + ] + }, + "ModelSequencesResult": { + "type": "object", + "properties": { + "sequences": { + "type": "object", + "patternProperties": { + ".*": { + "type": "integer" + } + } + } + }, + "additionalProperties": false, + "required": [ + "sequences" + ] + }, + "ModelSet": { + "type": "object", + "properties": { + "config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + } + }, + "additionalProperties": false, + "required": [ + "config" + ] + }, + "ModelUnset": { + "type": "object", + "properties": { + "keys": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "keys" + ] + }, + "SetConstraints": { + "type": "object", + "properties": { + "application": { + "type": "string" + }, + "constraints": { + "$ref": "#/definitions/Value" + } + }, + "additionalProperties": false, + "required": [ + "application", + "constraints" + ] + }, + "StringResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "result" + ] + }, + "Value": { + "type": "object", + "properties": { + "allocate-public-ip": { + "type": "boolean" + }, + "arch": { + "type": "string" + }, + "container": { + "type": "string" + }, + "cores": { + "type": "integer" + }, + "cpu-power": { + "type": "integer" + }, + "image-id": { + "type": "string" + }, + "instance-role": { + "type": "string" + }, + "instance-type": { + "type": "string" + }, + "mem": { + "type": "integer" + }, + "root-disk": { + "type": "integer" + }, + "root-disk-source": { + "type": "string" + }, + "spaces": { + "type": "array", + "items": { + "type": "string" + } + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "virt-type": { + "type": "string" + }, + "zones": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + } + } + } + }, + { + "Name": "ModelGeneration", + "Description": "API is the concrete implementation of the API endpoint.", + "Version": 4, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "AbortBranch": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/BranchArg" + }, + "Result": { + "$ref": "#/definitions/ErrorResult" + } + }, + "description": "AbortBranch aborts the input branch, marking it complete. However no\nchanges are made applicable to the whole model. No units may be assigned\nto the branch when aborting." + }, + "AddBranch": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/BranchArg" + }, + "Result": { + "$ref": "#/definitions/ErrorResult" + } + }, + "description": "AddBranch adds a new branch with the input name to the model." + }, + "BranchInfo": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/BranchInfoArgs" + }, + "Result": { + "$ref": "#/definitions/BranchResults" + } + }, + "description": "BranchInfo will return details of branch identified by the input argument,\nincluding units on the branch and the configuration disjoint with the\nmaster generation.\nAn error is returned if no in-flight branch matching in input is found." + }, + "CommitBranch": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/BranchArg" + }, + "Result": { + "$ref": "#/definitions/IntResult" + } + }, + "description": "CommitBranch commits the input branch, making its changes applicable to\nthe whole model and marking it complete." + }, + "HasActiveBranch": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/BranchArg" + }, + "Result": { + "$ref": "#/definitions/BoolResult" + } + }, + "description": "HasActiveBranch returns a true result if the input model has an \"in-flight\"\nbranch matching the input name." + }, + "ListCommits": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/BranchResults" + } + }, + "description": "ListCommits will return the commits, hence only branches with generation_id higher than 0" + }, + "ShowCommit": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/GenerationId" + }, + "Result": { + "$ref": "#/definitions/GenerationResult" + } + }, + "description": "ShowCommit will return details a commit given by its generationId\nAn error is returned if either no branch can be found corresponding to the generation id.\nOr the generation id given is below 1." + }, + "TrackBranch": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/BranchTrackArg" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "TrackBranch marks the input units and/or applications as tracking the input\nbranch, causing them to realise changes made under that branch." + } + }, + "definitions": { + "BoolResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "result" + ] + }, + "BranchArg": { + "type": "object", + "properties": { + "branch": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "branch" + ] + }, + "BranchInfoArgs": { + "type": "object", + "properties": { + "branches": { + "type": "array", + "items": { + "type": "string" + } + }, + "detailed": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "branches", + "detailed" + ] + }, + "BranchResults": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "generations": { + "type": "array", + "items": { + "$ref": "#/definitions/Generation" + } + } + }, + "additionalProperties": false, + "required": [ + "generations" + ] + }, + "BranchTrackArg": { + "type": "object", + "properties": { + "branch": { + "type": "string" + }, + "entities": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } + }, + "num-units": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "branch", + "entities" + ] + }, + "Entity": { + "type": "object", + "properties": { + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ErrorResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "ErrorResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "Generation": { + "type": "object", + "properties": { + "applications": { + "type": "array", + "items": { + "$ref": "#/definitions/GenerationApplication" + } + }, + "branch": { + "type": "string" + }, + "completed": { + "type": "integer" + }, + "completed-by": { + "type": "string" + }, + "created": { + "type": "integer" + }, + "created-by": { + "type": "string" + }, + "generation-id": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "branch", + "created", + "created-by", + "applications" + ] + }, + "GenerationApplication": { + "type": "object", + "properties": { + "application": { + "type": "string" + }, + "config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "pending": { + "type": "array", + "items": { + "type": "string" + } + }, + "progress": { + "type": "string" + }, + "tracking": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "application", + "progress", + "config" + ] + }, + "GenerationId": { + "type": "object", + "properties": { + "generation-id": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "generation-id" + ] + }, + "GenerationResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "generation": { + "$ref": "#/definitions/Generation" + } + }, + "additionalProperties": false, + "required": [ + "generation" + ] + }, + "IntResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "result" + ] + } + } + } + }, + { + "Name": "ModelManager", + "Description": "ModelManagerAPI implements the model manager interface and is\nthe concrete implementation of the api end point.", + "Version": 9, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "controller-user" + ], + "Schema": { + "type": "object", + "properties": { + "ChangeModelCredential": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ChangeModelCredentialsParams" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "ChangeModelCredential changes cloud credential reference for models.\nThese new cloud credentials must already exist on the controller." + }, + "CreateModel": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ModelCreateArgs" + }, + "Result": { + "$ref": "#/definitions/ModelInfo" + } + }, + "description": "CreateModel creates a new model using the account and\nmodel config specified in the args." + }, + "DestroyModels": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/DestroyModelsParams" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "DestroyModels will try to destroy the specified models.\nIf there is a block on destruction, this method will return an error.\nFrom ModelManager v7 onwards, DestroyModels gains 'force' and 'max-wait' parameters." + }, + "DumpModels": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/DumpModelRequest" + }, + "Result": { + "$ref": "#/definitions/StringResults" + } + }, + "description": "DumpModels will export the models into the database agnostic\nrepresentation. The user needs to either be a controller admin, or have\nadmin privileges on the model itself." + }, + "DumpModelsDB": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/MapResults" + } + }, + "description": "DumpModelsDB will gather all documents from all model collections\nfor the specified model. The map result contains a map of collection\nnames to lists of documents represented as maps." + }, + "ListModelSummaries": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ModelSummariesRequest" + }, + "Result": { + "$ref": "#/definitions/ModelSummaryResults" + } + }, + "description": "ListModelSummaries returns models that the specified user\nhas access to in the current server. Controller admins (superuser)\ncan list models for any user. Other users\ncan only ask about their own models." + }, + "ListModels": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entity" + }, + "Result": { + "$ref": "#/definitions/UserModelList" + } + }, + "description": "ListModels returns the models that the specified user\nhas access to in the current server. Controller admins (superuser)\ncan list models for any user. Other users\ncan only ask about their own models." + }, + "ModelDefaultsForClouds": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ModelDefaultsResults" + } + }, + "description": "ModelDefaultsForClouds returns the default config values for the specified\nclouds." + }, + "ModelInfo": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ModelInfoResults" + } + }, + "description": "ModelInfo returns information about the specified models." + }, + "ModelStatus": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ModelStatusResults" + } + }, + "description": "ModelStatus returns a summary of the model." + }, + "ModifyModelAccess": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ModifyModelAccessRequest" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "ModifyModelAccess changes the model access granted to users." + }, + "SetModelDefaults": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/SetModelDefaults" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "SetModelDefaults writes new values for the specified default model settings." + }, + "UnsetModelDefaults": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/UnsetModelDefaults" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "UnsetModelDefaults removes the specified default model settings." + } + }, + "definitions": { + "ChangeModelCredentialParams": { + "type": "object", + "properties": { + "credential-tag": { + "type": "string" + }, + "model-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "model-tag", + "credential-tag" + ] + }, + "ChangeModelCredentialsParams": { + "type": "object", + "properties": { + "model-credentials": { + "type": "array", + "items": { + "$ref": "#/definitions/ChangeModelCredentialParams" + } + } + }, + "additionalProperties": false, + "required": [ + "model-credentials" + ] + }, + "DestroyModelParams": { + "type": "object", + "properties": { + "destroy-storage": { + "type": "boolean" + }, + "force": { + "type": "boolean" + }, + "max-wait": { + "type": "integer" + }, + "model-tag": { + "type": "string" + }, + "timeout": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "model-tag" + ] + }, + "DestroyModelsParams": { + "type": "object", + "properties": { + "models": { + "type": "array", + "items": { + "$ref": "#/definitions/DestroyModelParams" + } + } + }, + "additionalProperties": false, + "required": [ + "models" + ] + }, + "DumpModelRequest": { + "type": "object", + "properties": { + "entities": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } + }, + "simplified": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "entities", + "simplified" + ] + }, + "Entities": { + "type": "object", + "properties": { + "entities": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } + } + }, + "additionalProperties": false, + "required": [ + "entities" + ] + }, + "Entity": { + "type": "object", + "properties": { + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag" + ] + }, + "EntityStatus": { + "type": "object", + "properties": { + "data": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "info": { + "type": "string" + }, + "since": { + "type": "string", + "format": "date-time" + }, + "status": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "status", + "info", + "since" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ErrorResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "ErrorResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "MachineHardware": { + "type": "object", + "properties": { + "arch": { + "type": "string" + }, + "availability-zone": { + "type": "string" + }, + "cores": { + "type": "integer" + }, + "cpu-power": { + "type": "integer" + }, + "mem": { + "type": "integer" + }, + "root-disk": { + "type": "integer" + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "virt-type": { + "type": "string" + } + }, + "additionalProperties": false + }, + "MapResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + } + }, + "additionalProperties": false, + "required": [ + "result" + ] + }, + "MapResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/MapResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "Model": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "owner-tag": { + "type": "string" + }, + "type": { + "type": "string" + }, + "uuid": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "uuid", + "type", + "owner-tag" + ] + }, + "ModelApplicationInfo": { + "type": "object", + "properties": { + "name": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name" + ] + }, + "ModelCreateArgs": { + "type": "object", + "properties": { + "cloud-tag": { + "type": "string" + }, + "config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "credential": { + "type": "string" + }, + "name": { + "type": "string" + }, + "owner-tag": { + "type": "string" + }, + "region": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "owner-tag" + ] + }, + "ModelDefaultValues": { + "type": "object", + "properties": { + "cloud-region": { + "type": "string" + }, + "cloud-tag": { + "type": "string" + }, + "config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + } + }, + "additionalProperties": false, + "required": [ + "config" + ] + }, + "ModelDefaults": { + "type": "object", + "properties": { + "controller": { + "type": "object", + "additionalProperties": true + }, + "default": { + "type": "object", + "additionalProperties": true + }, + "regions": { + "type": "array", + "items": { + "$ref": "#/definitions/RegionDefaults" + } + } + }, + "additionalProperties": false + }, + "ModelDefaultsResult": { + "type": "object", + "properties": { + "config": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/ModelDefaults" + } + } + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false, + "required": [ + "config" + ] + }, + "ModelDefaultsResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ModelDefaultsResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "ModelEntityCount": { + "type": "object", + "properties": { + "count": { + "type": "integer" + }, + "entity": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "entity", + "count" + ] + }, + "ModelFilesystemInfo": { + "type": "object", + "properties": { + "detachable": { + "type": "boolean" + }, + "id": { + "type": "string" + }, + "message": { + "type": "string" + }, + "provider-id": { + "type": "string" + }, + "status": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "id" + ] + }, + "ModelInfo": { + "type": "object", + "properties": { + "agent-version": { + "$ref": "#/definitions/Number" + }, + "cloud-credential-tag": { + "type": "string" + }, + "cloud-credential-validity": { + "type": "boolean" + }, + "cloud-region": { + "type": "string" + }, + "cloud-tag": { + "type": "string" + }, + "controller-uuid": { + "type": "string" + }, + "default-base": { + "type": "string" + }, + "default-series": { + "type": "string" + }, + "is-controller": { + "type": "boolean" + }, + "life": { + "type": "string" + }, + "machines": { + "type": "array", + "items": { + "$ref": "#/definitions/ModelMachineInfo" + } + }, + "migration": { + "$ref": "#/definitions/ModelMigrationStatus" + }, + "name": { + "type": "string" + }, + "owner-tag": { + "type": "string" + }, + "provider-type": { + "type": "string" + }, + "secret-backends": { + "type": "array", + "items": { + "$ref": "#/definitions/SecretBackendResult" + } + }, + "sla": { + "$ref": "#/definitions/ModelSLAInfo" + }, + "status": { + "$ref": "#/definitions/EntityStatus" + }, + "supported-features": { + "type": "array", + "items": { + "$ref": "#/definitions/SupportedFeature" + } + }, + "type": { + "type": "string" + }, + "users": { + "type": "array", + "items": { + "$ref": "#/definitions/ModelUserInfo" + } + }, + "uuid": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "type", + "uuid", + "controller-uuid", + "is-controller", + "cloud-tag", + "owner-tag", + "life", + "users", + "machines", + "secret-backends", + "sla", + "agent-version" + ] + }, + "ModelInfoResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "$ref": "#/definitions/ModelInfo" + } + }, + "additionalProperties": false + }, + "ModelInfoResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ModelInfoResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "ModelMachineInfo": { + "type": "object", + "properties": { + "display-name": { + "type": "string" + }, + "ha-primary": { + "type": "boolean" + }, + "hardware": { + "$ref": "#/definitions/MachineHardware" + }, + "has-vote": { + "type": "boolean" + }, + "id": { + "type": "string" + }, + "instance-id": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "string" + }, + "wants-vote": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "id" + ] + }, + "ModelMigrationStatus": { + "type": "object", + "properties": { + "end": { + "type": "string", + "format": "date-time" + }, + "start": { + "type": "string", + "format": "date-time" + }, + "status": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "status", + "start" + ] + }, + "ModelSLAInfo": { + "type": "object", + "properties": { + "level": { + "type": "string" + }, + "owner": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "level", + "owner" + ] + }, + "ModelStatus": { + "type": "object", + "properties": { + "application-count": { + "type": "integer" + }, + "applications": { + "type": "array", + "items": { + "$ref": "#/definitions/ModelApplicationInfo" + } + }, + "error": { + "$ref": "#/definitions/Error" + }, + "filesystems": { + "type": "array", + "items": { + "$ref": "#/definitions/ModelFilesystemInfo" + } + }, + "hosted-machine-count": { + "type": "integer" + }, + "life": { + "type": "string" + }, + "machines": { + "type": "array", + "items": { + "$ref": "#/definitions/ModelMachineInfo" + } + }, + "model-tag": { + "type": "string" + }, + "owner-tag": { + "type": "string" + }, + "type": { + "type": "string" + }, + "unit-count": { + "type": "integer" + }, + "volumes": { + "type": "array", + "items": { + "$ref": "#/definitions/ModelVolumeInfo" + } + } + }, + "additionalProperties": false, + "required": [ + "model-tag", + "life", + "type", + "hosted-machine-count", + "application-count", + "unit-count", + "owner-tag" + ] + }, + "ModelStatusResults": { + "type": "object", + "properties": { + "models": { + "type": "array", + "items": { + "$ref": "#/definitions/ModelStatus" + } + } + }, + "additionalProperties": false, + "required": [ + "models" + ] + }, + "ModelSummariesRequest": { + "type": "object", + "properties": { + "all": { + "type": "boolean" + }, + "user-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "user-tag" + ] + }, + "ModelSummary": { + "type": "object", + "properties": { + "agent-version": { + "$ref": "#/definitions/Number" + }, + "cloud-credential-tag": { + "type": "string" + }, + "cloud-region": { + "type": "string" + }, + "cloud-tag": { + "type": "string" + }, + "controller-uuid": { + "type": "string" + }, + "counts": { + "type": "array", + "items": { + "$ref": "#/definitions/ModelEntityCount" + } + }, + "default-series": { + "type": "string" + }, + "is-controller": { + "type": "boolean" + }, + "last-connection": { + "type": "string", + "format": "date-time" + }, + "life": { + "type": "string" + }, + "migration": { + "$ref": "#/definitions/ModelMigrationStatus" + }, + "name": { + "type": "string" + }, + "owner-tag": { + "type": "string" + }, + "provider-type": { + "type": "string" + }, + "sla": { + "$ref": "#/definitions/ModelSLAInfo" + }, + "status": { + "$ref": "#/definitions/EntityStatus" + }, + "type": { + "type": "string" + }, + "user-access": { + "type": "string" + }, + "uuid": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "uuid", + "type", + "controller-uuid", + "is-controller", + "cloud-tag", + "owner-tag", + "life", + "user-access", + "last-connection", + "counts", + "sla", + "agent-version" + ] + }, + "ModelSummaryResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "$ref": "#/definitions/ModelSummary" + } + }, + "additionalProperties": false + }, + "ModelSummaryResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ModelSummaryResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "ModelUnsetKeys": { + "type": "object", + "properties": { + "cloud-region": { + "type": "string" + }, + "cloud-tag": { + "type": "string" + }, + "keys": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "keys" + ] + }, + "ModelUserInfo": { + "type": "object", + "properties": { + "access": { + "type": "string" + }, + "display-name": { + "type": "string" + }, + "last-connection": { + "type": "string", + "format": "date-time" + }, + "model-tag": { + "type": "string" + }, + "user": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "model-tag", + "user", + "display-name", + "last-connection", + "access" + ] + }, + "ModelVolumeInfo": { + "type": "object", + "properties": { + "detachable": { + "type": "boolean" + }, + "id": { + "type": "string" + }, + "message": { + "type": "string" + }, + "provider-id": { + "type": "string" + }, + "status": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "id" + ] + }, + "ModifyModelAccess": { + "type": "object", + "properties": { + "access": { + "type": "string" + }, + "action": { + "type": "string" + }, + "model-tag": { + "type": "string" + }, + "user-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "user-tag", + "action", + "access", + "model-tag" + ] + }, + "ModifyModelAccessRequest": { + "type": "object", + "properties": { + "changes": { + "type": "array", + "items": { + "$ref": "#/definitions/ModifyModelAccess" + } + } + }, + "additionalProperties": false, + "required": [ + "changes" + ] + }, + "Number": { + "type": "object", + "properties": { + "Build": { + "type": "integer" + }, + "Major": { + "type": "integer" + }, + "Minor": { + "type": "integer" + }, + "Patch": { + "type": "integer" + }, + "Tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "Major", + "Minor", + "Tag", + "Patch", + "Build" + ] + }, + "RegionDefaults": { + "type": "object", + "properties": { + "region-name": { + "type": "string" + }, + "value": { + "type": "object", + "additionalProperties": true + } + }, + "additionalProperties": false, + "required": [ + "region-name", + "value" + ] + }, + "SecretBackend": { + "type": "object", + "properties": { + "backend-type": { + "type": "string" + }, + "config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "name": { + "type": "string" + }, + "token-rotate-interval": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "name", + "backend-type", + "config" + ] + }, + "SecretBackendResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "id": { + "type": "string" + }, + "message": { + "type": "string" + }, + "num-secrets": { + "type": "integer" + }, + "result": { + "$ref": "#/definitions/SecretBackend" + }, + "status": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "result", + "id", + "num-secrets", + "status" + ] + }, + "SetModelDefaults": { + "type": "object", + "properties": { + "config": { + "type": "array", + "items": { + "$ref": "#/definitions/ModelDefaultValues" + } + } + }, + "additionalProperties": false, + "required": [ + "config" + ] + }, + "StringResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "result" + ] + }, + "StringResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/StringResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "SupportedFeature": { + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "name": { + "type": "string" + }, + "version": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "description" + ] + }, + "UnsetModelDefaults": { + "type": "object", + "properties": { + "keys": { + "type": "array", + "items": { + "$ref": "#/definitions/ModelUnsetKeys" + } + } + }, + "additionalProperties": false, + "required": [ + "keys" + ] + }, + "UserModel": { + "type": "object", + "properties": { + "last-connection": { + "type": "string", + "format": "date-time" + }, + "model": { + "$ref": "#/definitions/Model" + } + }, + "additionalProperties": false, + "required": [ + "model", + "last-connection" + ] + }, + "UserModelList": { + "type": "object", + "properties": { + "user-models": { + "type": "array", + "items": { + "$ref": "#/definitions/UserModel" + } + } + }, + "additionalProperties": false, + "required": [ + "user-models" + ] + } + } + } + }, + { + "Name": "ModelSummaryWatcher", + "Description": "SrvModelSummaryWatcher defines the API methods on a ModelSummaryWatcher.", + "Version": 1, + "AvailableTo": [ + "controller-user" + ], + "Schema": { + "type": "object", + "properties": { + "Next": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/SummaryWatcherNextResults" + } + }, + "description": "Next will return the current state of everything on the first call\nand subsequent calls will return just those model summaries that have\nchanged." + }, + "Stop": { + "type": "object", + "description": "Stop stops the watcher." + } + }, + "definitions": { + "ModelAbstract": { + "type": "object", + "properties": { + "admins": { + "type": "array", + "items": { + "type": "string" + } + }, + "annotations": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "cloud": { + "type": "string" + }, + "controller": { + "type": "string" + }, + "credential": { + "type": "string" + }, + "messages": { + "type": "array", + "items": { + "$ref": "#/definitions/ModelSummaryMessage" + } + }, + "name": { + "type": "string" + }, + "region": { + "type": "string" + }, + "removed": { + "type": "boolean" + }, + "size": { + "$ref": "#/definitions/ModelSummarySize" + }, + "status": { + "type": "string" + }, + "uuid": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uuid" + ] + }, + "ModelSummaryMessage": { + "type": "object", + "properties": { + "agent": { + "type": "string" + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "agent", + "message" + ] + }, + "ModelSummarySize": { + "type": "object", + "properties": { + "applications": { + "type": "integer" + }, + "containers": { + "type": "integer" + }, + "machines": { + "type": "integer" + }, + "relations": { + "type": "integer" + }, + "units": { + "type": "integer" + } + }, + "additionalProperties": false + }, + "SummaryWatcherNextResults": { + "type": "object", + "properties": { + "models": { + "type": "array", + "items": { + "$ref": "#/definitions/ModelAbstract" + } + } + }, + "additionalProperties": false, + "required": [ + "models" + ] + } + } + } + }, + { + "Name": "ModelUpgrader", + "Description": "ModelUpgraderAPI implements the model upgrader interface and is\nthe concrete implementation of the api end point.", + "Version": 1, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "controller-user" + ], + "Schema": { + "type": "object", + "properties": { + "AbortModelUpgrade": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ModelParam" + } + }, + "description": "AbortModelUpgrade aborts and archives the model upgrade\nsynchronisation record, if any." + }, + "UpgradeModel": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/UpgradeModelParams" + }, + "Result": { + "$ref": "#/definitions/UpgradeModelResult" + } + }, + "description": "UpgradeModel upgrades a model." + } + }, + "definitions": { + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ModelParam": { + "type": "object", + "properties": { + "model-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "model-tag" + ] + }, + "Number": { + "type": "object", + "properties": { + "Build": { + "type": "integer" + }, + "Major": { + "type": "integer" + }, + "Minor": { + "type": "integer" + }, + "Patch": { + "type": "integer" + }, + "Tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "Major", + "Minor", + "Tag", + "Patch", + "Build" + ] + }, + "UpgradeModelParams": { + "type": "object", + "properties": { + "agent-stream": { + "type": "string" + }, + "dry-run": { + "type": "boolean" + }, + "ignore-agent-versions": { + "type": "boolean" + }, + "model-tag": { + "type": "string" + }, + "target-version": { + "$ref": "#/definitions/Number" + } + }, + "additionalProperties": false, + "required": [ + "model-tag", + "target-version" + ] + }, + "UpgradeModelResult": { + "type": "object", + "properties": { + "chosen-version": { + "$ref": "#/definitions/Number" + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false, + "required": [ + "chosen-version" + ] + } + } + } + }, + { + "Name": "NotifyWatcher", + "Description": "srvNotifyWatcher defines the API access to methods on a NotifyWatcher.\nEach client has its own current set of watchers, stored in resources.", + "Version": 1, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "controller-user", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "Next": { + "type": "object", + "description": "Next returns when a change has occurred to the\nentity being watched since the most recent call to Next\nor the Watch call that created the NotifyWatcher." + }, + "Stop": { + "type": "object", + "description": "Stop stops the watcher." + } + } + } + }, + { + "Name": "OfferStatusWatcher", + "Description": "srvOfferStatusWatcher defines the API wrapping a crossmodelrelations.OfferStatusWatcher.", + "Version": 1, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "Next": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/OfferStatusWatchResult" + } + }, + "description": "Next returns when a change has occurred to an entity of the\ncollection being watched since the most recent call to Next\nor the Watch call that created the srvOfferStatusWatcher." + }, + "Stop": { + "type": "object", + "description": "Stop stops the watcher." + } + }, + "definitions": { + "EntityStatus": { + "type": "object", + "properties": { + "data": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "info": { + "type": "string" + }, + "since": { + "type": "string", + "format": "date-time" + }, + "status": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "status", + "info", + "since" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "OfferStatusChange": { + "type": "object", + "properties": { + "offer-name": { + "type": "string" + }, + "status": { + "$ref": "#/definitions/EntityStatus" + } + }, + "additionalProperties": false, + "required": [ + "offer-name", + "status" + ] + }, + "OfferStatusWatchResult": { + "type": "object", + "properties": { + "changes": { + "type": "array", + "items": { + "$ref": "#/definitions/OfferStatusChange" + } + }, + "error": { + "$ref": "#/definitions/Error" + }, + "watcher-id": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "watcher-id", + "changes" + ] + } + } + } + }, + { + "Name": "Payloads", + "Description": "API serves payload-specific API methods.", + "Version": 1, + "AvailableTo": [ + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "List": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/PayloadListArgs" + }, + "Result": { + "$ref": "#/definitions/PayloadListResults" + } + }, + "description": "List builds the list of payloads being tracked for\nthe given unit and IDs. If no IDs are provided then all tracked\npayloads for the unit are returned." + } + }, + "definitions": { + "Payload": { + "type": "object", + "properties": { + "class": { + "type": "string" + }, + "id": { + "type": "string" + }, + "labels": { + "type": "array", + "items": { + "type": "string" + } + }, + "machine": { + "type": "string" + }, + "status": { + "type": "string" + }, + "type": { + "type": "string" + }, + "unit": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "class", + "type", + "id", + "status", + "labels", + "unit", + "machine" + ] + }, + "PayloadListArgs": { + "type": "object", + "properties": { + "patterns": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "patterns" + ] + }, + "PayloadListResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/Payload" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + } + } + } + }, + { + "Name": "PayloadsHookContext", + "Description": "UnitFacade serves payload-specific API methods.", + "Version": 1, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "List": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/PayloadResults" + } + }, + "description": "List builds the list of payload being tracked for\nthe given unit and IDs. If no IDs are provided then all tracked\npayloads for the unit are returned." + }, + "LookUp": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/LookUpPayloadArgs" + }, + "Result": { + "$ref": "#/definitions/PayloadResults" + } + }, + "description": "LookUp identifies the payload with the provided name and raw ID." + }, + "SetStatus": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/SetPayloadStatusArgs" + }, + "Result": { + "$ref": "#/definitions/PayloadResults" + } + }, + "description": "SetStatus sets the raw status of a payload." + }, + "Track": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/TrackPayloadArgs" + }, + "Result": { + "$ref": "#/definitions/PayloadResults" + } + }, + "description": "Track stores a payload to be tracked in state." + }, + "Untrack": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/PayloadResults" + } + }, + "description": "Untrack marks the identified payload as no longer being tracked." + } + }, + "definitions": { + "Entities": { + "type": "object", + "properties": { + "entities": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } + } + }, + "additionalProperties": false, + "required": [ + "entities" + ] + }, + "Entity": { + "type": "object", + "properties": { + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "LookUpPayloadArg": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "id" + ] + }, + "LookUpPayloadArgs": { + "type": "object", + "properties": { + "args": { + "type": "array", + "items": { + "$ref": "#/definitions/LookUpPayloadArg" + } + } + }, + "additionalProperties": false, + "required": [ + "args" + ] + }, + "Payload": { + "type": "object", + "properties": { + "class": { + "type": "string" + }, + "id": { + "type": "string" + }, + "labels": { + "type": "array", + "items": { + "type": "string" + } + }, + "machine": { + "type": "string" + }, + "status": { + "type": "string" + }, + "type": { + "type": "string" + }, + "unit": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "class", + "type", + "id", + "status", + "labels", + "unit", + "machine" + ] + }, + "PayloadResult": { + "type": "object", + "properties": { + "Entity": { + "$ref": "#/definitions/Entity" + }, + "error": { + "$ref": "#/definitions/Error" + }, + "not-found": { + "type": "boolean" + }, + "payload": { + "$ref": "#/definitions/Payload" + }, + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag", + "Entity", + "payload", + "not-found" + ] + }, + "PayloadResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/PayloadResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "SetPayloadStatusArg": { + "type": "object", + "properties": { + "Entity": { + "$ref": "#/definitions/Entity" + }, + "status": { + "type": "string" + }, + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag", + "Entity", + "status" + ] + }, + "SetPayloadStatusArgs": { + "type": "object", + "properties": { + "args": { + "type": "array", + "items": { + "$ref": "#/definitions/SetPayloadStatusArg" + } + } + }, + "additionalProperties": false, + "required": [ + "args" + ] + }, + "TrackPayloadArgs": { + "type": "object", + "properties": { + "payloads": { + "type": "array", + "items": { + "$ref": "#/definitions/Payload" + } + } + }, + "additionalProperties": false, + "required": [ + "payloads" + ] + } + } + } + }, + { + "Name": "Pinger", + "Description": "pinger describes a resource that can be pinged and stopped.", + "Version": 1, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "controller-user", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "Ping": { + "type": "object" + }, + "Stop": { + "type": "object" + } + } + } + }, + { + "Name": "Provisioner", + "Description": "ProvisionerAPIV11 provides v10 of the provisioner facade.\nIt relies on agent-set origin when calling SetHostMachineNetworkConfig.", + "Version": 11, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent" + ], + "Schema": { + "type": "object", + "properties": { + "APIAddresses": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/StringsResult" + } + }, + "description": "APIAddresses returns the list of addresses used to connect to the API." + }, + "APIHostPorts": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/APIHostPortsResult" + } + }, + "description": "APIHostPorts returns the API server addresses." + }, + "AvailabilityZone": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/StringResults" + } + }, + "description": "AvailabilityZone returns a provider-specific availability zone for each given machine entity" + }, + "CACert": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/BytesResult" + } + }, + "description": "CACert returns the certificate used to validate the state connection." + }, + "Constraints": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ConstraintsResults" + } + }, + "description": "Constraints returns the constraints for each given machine entity." + }, + "ContainerConfig": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/ContainerConfig" + } + }, + "description": "ContainerConfig returns information from the model config that is\nneeded for container cloud-init." + }, + "ContainerManagerConfig": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ContainerManagerConfigParams" + }, + "Result": { + "$ref": "#/definitions/ContainerManagerConfig" + } + }, + "description": "ContainerManagerConfig returns information from the model config that is\nneeded for configuring the container manager." + }, + "ControllerAPIInfoForModels": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ControllerAPIInfoResults" + } + }, + "description": "ControllerAPIInfoForModels returns the controller api connection details for the specified models." + }, + "ControllerConfig": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/ControllerConfigResult" + } + }, + "description": "ControllerConfig returns the controller's configuration." + }, + "DistributionGroup": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/DistributionGroupResults" + } + }, + "description": "DistributionGroup returns, for each given machine entity,\na slice of instance.Ids that belong to the same distribution\ngroup as that machine. This information may be used to\ndistribute instances for high availability." + }, + "DistributionGroupByMachineId": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/StringsResults" + } + }, + "description": "DistributionGroupByMachineId returns, for each given machine entity,\na slice of machine.Ids that belong to the same distribution\ngroup as that machine. This information may be used to\ndistribute instances for high availability." + }, + "EnsureDead": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "EnsureDead calls EnsureDead on each given entity from state. It\nwill fail if the entity is not present. If it's Alive, nothing will\nhappen (see state/EnsureDead() for units or machines)." + }, + "FindTools": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/FindToolsParams" + }, + "Result": { + "$ref": "#/definitions/FindToolsResult" + } + }, + "description": "FindTools returns a List containing all tools matching the given parameters." + }, + "GetContainerInterfaceInfo": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/MachineNetworkConfigResults" + } + }, + "description": "GetContainerInterfaceInfo returns information to configure networking for a\ncontainer. It accepts container tags as arguments." + }, + "GetContainerProfileInfo": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ContainerProfileResults" + } + }, + "description": "GetContainerProfileInfo returns information to configure a lxd profile(s) for a\ncontainer based on the charms deployed to the container. It accepts container\ntags as arguments. Unlike machineLXDProfileNames which has the environ\nwrite the lxd profiles and returns the names of profiles already written." + }, + "HostChangesForContainers": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/HostNetworkChangeResults" + } + }, + "description": "HostChangesForContainers returns the set of changes that need to be done\nto the host machine to prepare it for the containers to be created.\nPass in a list of the containers that you want the changes for." + }, + "InstanceId": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/StringResults" + } + }, + "description": "InstanceId returns the provider specific instance id for each given\nmachine or an CodeNotProvisioned error, if not set." + }, + "InstanceStatus": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/StatusResults" + } + }, + "description": "InstanceStatus returns the instance status for each given entity.\nOnly machine tags are accepted." + }, + "KeepInstance": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/BoolResults" + } + }, + "description": "KeepInstance returns the keep-instance value for each given machine entity." + }, + "Life": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/LifeResults" + } + }, + "description": "Life returns the life status of every supplied entity, where available." + }, + "MachinesWithTransientErrors": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/StatusResults" + } + }, + "description": "MachinesWithTransientErrors returns status data for machines with provisioning\nerrors which are transient." + }, + "MarkMachinesForRemoval": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "MarkMachinesForRemoval indicates that the specified machines are\nready to have any provider-level resources cleaned up and then be\nremoved." + }, + "ModelConfig": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/ModelConfigResult" + } + }, + "description": "ModelConfig returns the current model's configuration." + }, + "ModelUUID": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/StringResult" + } + }, + "description": "ModelUUID returns the model UUID that the current connection is for." + }, + "PrepareContainerInterfaceInfo": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/MachineNetworkConfigResults" + } + }, + "description": "PrepareContainerInterfaceInfo allocates an address and returns information to\nconfigure networking for a container. It accepts container tags as arguments." + }, + "ProvisioningInfo": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ProvisioningInfoResults" + } + }, + "description": "ProvisioningInfo returns the provisioning information for each given machine entity.\nIt supports all positive space constraints." + }, + "ReleaseContainerAddresses": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "ReleaseContainerAddresses finds addresses allocated to a container and marks\nthem as Dead, to be released and removed. It accepts container tags as\narguments." + }, + "Remove": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "Remove removes every given entity from state, calling EnsureDead\nfirst, then Remove. It will fail if the entity is not present." + }, + "SetCharmProfiles": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/SetProfileArgs" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "SetCharmProfiles records the given slice of charm profile names." + }, + "SetHostMachineNetworkConfig": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/SetMachineNetworkConfig" + } + } + }, + "SetInstanceInfo": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/InstancesInfo" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "SetInstanceInfo sets the provider specific machine id, nonce,\nmetadata and network info for each given machine. Once set, the\ninstance id cannot be changed." + }, + "SetInstanceStatus": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/SetStatus" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "SetInstanceStatus updates the instance status for each given\nentity. Only machine tags are accepted." + }, + "SetModificationStatus": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/SetStatus" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "SetModificationStatus updates the instance whilst changes are occurring. This\nis different from SetStatus and SetInstanceStatus, by the fact this holds\ninformation about the ongoing changes that are happening to instances.\nConsider LXD Profile updates that can modify a instance, but may not cause\nthe instance to be placed into a error state. This modification status\nserves the purpose of highlighting that to the operator.\nOnly machine tags are accepted." + }, + "SetObservedNetworkConfig": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/SetMachineNetworkConfig" + } + }, + "description": "SetObservedNetworkConfig reads the network config for the machine\nidentified by the input args.\nThis config is merged with the new network config supplied in the\nsame args and updated if it has changed." + }, + "SetPasswords": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/EntityPasswords" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "SetPasswords sets the given password for each supplied entity, if possible." + }, + "SetStatus": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/SetStatus" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "SetStatus sets the status of each given entity." + }, + "SetSupportedContainers": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/MachineContainersParams" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "SetSupportedContainers updates the list of containers supported by the machines passed in args." + }, + "Status": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/StatusResults" + } + }, + "description": "Status returns the status of each given entity." + }, + "SupportedContainers": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/MachineContainerResults" + } + }, + "description": "SupportedContainers returns the list of containers supported by the machines passed in args." + }, + "Tools": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ToolsResults" + } + }, + "description": "Tools finds the tools necessary for the given agents." + }, + "WatchAPIHostPorts": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/NotifyWatchResult" + } + }, + "description": "WatchAPIHostPorts watches the API server addresses." + }, + "WatchAllContainers": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/WatchContainers" + }, + "Result": { + "$ref": "#/definitions/StringsWatchResults" + } + }, + "description": "WatchAllContainers starts a StringsWatcher to watch all containers deployed to\nany machine passed in args." + }, + "WatchContainers": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/WatchContainers" + }, + "Result": { + "$ref": "#/definitions/StringsWatchResults" + } + }, + "description": "WatchContainers starts a StringsWatcher to watch containers deployed to\nany machine passed in args." + }, + "WatchForModelConfigChanges": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/NotifyWatchResult" + } + }, + "description": "WatchForModelConfigChanges returns a NotifyWatcher that observes\nchanges to the model configuration.\nNote that although the NotifyWatchResult contains an Error field,\nit's not used because we are only returning a single watcher,\nso we use the regular error return." + }, + "WatchMachineErrorRetry": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/NotifyWatchResult" + } + }, + "description": "WatchMachineErrorRetry returns a NotifyWatcher that notifies when\nthe provisioner should retry provisioning machines with transient errors." + }, + "WatchModelMachineStartTimes": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/StringsWatchResult" + } + }, + "description": "WatchModelMachineStartTimes watches the non-container machines in the model\nfor changes to the Life or AgentStartTime fields and reports them as a batch." + }, + "WatchModelMachines": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/StringsWatchResult" + } + }, + "description": "WatchModelMachines returns a StringsWatcher that notifies of\nchanges to the life cycles of the top level machines in the current\nmodel." + } + }, + "definitions": { + "APIHostPortsResult": { + "type": "object", + "properties": { + "servers": { + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/definitions/HostPort" + } + } + } + }, + "additionalProperties": false, + "required": [ + "servers" + ] + }, + "Address": { + "type": "object", + "properties": { + "cidr": { + "type": "string" + }, + "config-type": { + "type": "string" + }, + "is-secondary": { + "type": "boolean" + }, + "scope": { + "type": "string" + }, + "space-id": { + "type": "string" + }, + "space-name": { + "type": "string" + }, + "type": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "value", + "type", + "scope" + ] + }, + "Base": { + "type": "object", + "properties": { + "channel": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "channel" + ] + }, + "Binary": { + "type": "object", + "properties": { + "Arch": { + "type": "string" + }, + "Build": { + "type": "integer" + }, + "Major": { + "type": "integer" + }, + "Minor": { + "type": "integer" + }, + "Number": { + "$ref": "#/definitions/Number" + }, + "Patch": { + "type": "integer" + }, + "Release": { + "type": "string" + }, + "Tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "Major", + "Minor", + "Tag", + "Patch", + "Build", + "Number", + "Release", + "Arch" + ] + }, + "BoolResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "result" + ] + }, + "BoolResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/BoolResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "BytesResult": { + "type": "object", + "properties": { + "result": { + "type": "array", + "items": { + "type": "integer" + } + } + }, + "additionalProperties": false, + "required": [ + "result" + ] + }, + "CharmLXDProfile": { + "type": "object", + "properties": { + "config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "description": { + "type": "string" + }, + "devices": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + } + } + } + }, + "additionalProperties": false, + "required": [ + "config", + "description", + "devices" + ] + }, + "CloudImageMetadata": { + "type": "object", + "properties": { + "arch": { + "type": "string" + }, + "image-id": { + "type": "string" + }, + "priority": { + "type": "integer" + }, + "region": { + "type": "string" + }, + "root-storage-size": { + "type": "integer" + }, + "root-storage-type": { + "type": "string" + }, + "source": { + "type": "string" + }, + "stream": { + "type": "string" + }, + "version": { + "type": "string" + }, + "virt-type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "image-id", + "region", + "version", + "arch", + "source", + "priority" + ] + }, + "ConstraintsResult": { + "type": "object", + "properties": { + "constraints": { + "$ref": "#/definitions/Value" + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false, + "required": [ + "constraints" + ] + }, + "ConstraintsResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ConstraintsResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "ContainerConfig": { + "type": "object", + "properties": { + "UpdateBehavior": { + "$ref": "#/definitions/UpdateBehavior" + }, + "apt-mirror": { + "type": "string" + }, + "apt-proxy": { + "$ref": "#/definitions/Settings" + }, + "authorized-keys": { + "type": "string" + }, + "cloudinit-userdata": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "container-inherit-properties": { + "type": "string" + }, + "juju-proxy": { + "$ref": "#/definitions/Settings" + }, + "legacy-proxy": { + "$ref": "#/definitions/Settings" + }, + "provider-type": { + "type": "string" + }, + "snap-proxy": { + "$ref": "#/definitions/Settings" + }, + "snap-store-assertions": { + "type": "string" + }, + "snap-store-proxy-id": { + "type": "string" + }, + "snap-store-proxy-url": { + "type": "string" + }, + "ssl-hostname-verification": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "provider-type", + "authorized-keys", + "ssl-hostname-verification", + "legacy-proxy", + "juju-proxy", + "apt-proxy", + "snap-proxy", + "snap-store-assertions", + "snap-store-proxy-id", + "snap-store-proxy-url", + "UpdateBehavior" + ] + }, + "ContainerLXDProfile": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "profile": { + "$ref": "#/definitions/CharmLXDProfile" + } + }, + "additionalProperties": false, + "required": [ + "profile", + "name" + ] + }, + "ContainerManagerConfig": { + "type": "object", + "properties": { + "config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + } + }, + "additionalProperties": false, + "required": [ + "config" + ] + }, + "ContainerManagerConfigParams": { + "type": "object", + "properties": { + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "type" + ] + }, + "ContainerProfileResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "lxd-profiles": { + "type": "array", + "items": { + "$ref": "#/definitions/ContainerLXDProfile" + } + } + }, + "additionalProperties": false + }, + "ContainerProfileResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ContainerProfileResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "ControllerAPIInfoResult": { + "type": "object", + "properties": { + "addresses": { + "type": "array", + "items": { + "type": "string" + } + }, + "cacert": { + "type": "string" + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false, + "required": [ + "addresses", + "cacert" + ] + }, + "ControllerAPIInfoResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ControllerAPIInfoResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "ControllerConfigResult": { + "type": "object", + "properties": { + "config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + } + }, + "additionalProperties": false, + "required": [ + "config" + ] + }, + "DeviceBridgeInfo": { + "type": "object", + "properties": { + "bridge-name": { + "type": "string" + }, + "host-device-name": { + "type": "string" + }, + "mac-address": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "host-device-name", + "bridge-name", + "mac-address" + ] + }, + "DistributionGroupResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "result" + ] + }, + "DistributionGroupResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/DistributionGroupResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "Entities": { + "type": "object", + "properties": { + "entities": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } + } + }, + "additionalProperties": false, + "required": [ + "entities" + ] + }, + "Entity": { + "type": "object", + "properties": { + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag" + ] + }, + "EntityPassword": { + "type": "object", + "properties": { + "password": { + "type": "string" + }, + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag", + "password" + ] + }, + "EntityPasswords": { + "type": "object", + "properties": { + "changes": { + "type": "array", + "items": { + "$ref": "#/definitions/EntityPassword" + } + } + }, + "additionalProperties": false, + "required": [ + "changes" + ] + }, + "EntityStatusArgs": { + "type": "object", + "properties": { + "data": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "info": { + "type": "string" + }, + "status": { + "type": "string" + }, + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag", + "status", + "info", + "data" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ErrorResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "ErrorResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "FindToolsParams": { + "type": "object", + "properties": { + "agentstream": { + "type": "string" + }, + "arch": { + "type": "string" + }, + "major": { + "type": "integer" + }, + "number": { + "$ref": "#/definitions/Number" + }, + "os-type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "number", + "major", + "arch", + "os-type", + "agentstream" + ] + }, + "FindToolsResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "list": { + "type": "array", + "items": { + "$ref": "#/definitions/Tools" + } + } + }, + "additionalProperties": false, + "required": [ + "list" + ] + }, + "HardwareCharacteristics": { + "type": "object", + "properties": { + "arch": { + "type": "string" + }, + "availability-zone": { + "type": "string" + }, + "cpu-cores": { + "type": "integer" + }, + "cpu-power": { + "type": "integer" + }, + "mem": { + "type": "integer" + }, + "root-disk": { + "type": "integer" + }, + "root-disk-source": { + "type": "string" + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "virt-type": { + "type": "string" + } + }, + "additionalProperties": false + }, + "HostNetworkChange": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "new-bridges": { + "type": "array", + "items": { + "$ref": "#/definitions/DeviceBridgeInfo" + } + }, + "reconfigure-delay": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "new-bridges", + "reconfigure-delay" + ] + }, + "HostNetworkChangeResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/HostNetworkChange" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "HostPort": { + "type": "object", + "properties": { + "Address": { + "$ref": "#/definitions/Address" + }, + "cidr": { + "type": "string" + }, + "config-type": { + "type": "string" + }, + "is-secondary": { + "type": "boolean" + }, + "port": { + "type": "integer" + }, + "scope": { + "type": "string" + }, + "space-id": { + "type": "string" + }, + "space-name": { + "type": "string" + }, + "type": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "value", + "type", + "scope", + "Address", + "port" + ] + }, + "InstanceInfo": { + "type": "object", + "properties": { + "characteristics": { + "$ref": "#/definitions/HardwareCharacteristics" + }, + "charm-profiles": { + "type": "array", + "items": { + "type": "string" + } + }, + "display-name": { + "type": "string" + }, + "instance-id": { + "type": "string" + }, + "network-config": { + "type": "array", + "items": { + "$ref": "#/definitions/NetworkConfig" + } + }, + "nonce": { + "type": "string" + }, + "tag": { + "type": "string" + }, + "volume-attachments": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/VolumeAttachmentInfo" + } + } + }, + "volumes": { + "type": "array", + "items": { + "$ref": "#/definitions/Volume" + } + } + }, + "additionalProperties": false, + "required": [ + "tag", + "instance-id", + "display-name", + "nonce", + "characteristics", + "volumes", + "volume-attachments", + "network-config", + "charm-profiles" + ] + }, + "InstancesInfo": { + "type": "object", + "properties": { + "machines": { + "type": "array", + "items": { + "$ref": "#/definitions/InstanceInfo" + } + } + }, + "additionalProperties": false, + "required": [ + "machines" + ] + }, + "LifeResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "life": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "life" + ] + }, + "LifeResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/LifeResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "MachineContainerResult": { + "type": "object", + "properties": { + "container-types": { + "type": "array", + "items": { + "type": "string" + } + }, + "determined": { + "type": "boolean" + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false, + "required": [ + "container-types", + "determined" + ] + }, + "MachineContainerResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/MachineContainerResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "MachineContainers": { + "type": "object", + "properties": { + "container-types": { + "type": "array", + "items": { + "type": "string" + } + }, + "machine-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "machine-tag", + "container-types" + ] + }, + "MachineContainersParams": { + "type": "object", + "properties": { + "params": { + "type": "array", + "items": { + "$ref": "#/definitions/MachineContainers" + } + } + }, + "additionalProperties": false, + "required": [ + "params" + ] + }, + "MachineNetworkConfigResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "info": { + "type": "array", + "items": { + "$ref": "#/definitions/NetworkConfig" + } + } + }, + "additionalProperties": false, + "required": [ + "info" + ] + }, + "MachineNetworkConfigResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/MachineNetworkConfigResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "ModelConfigResult": { + "type": "object", + "properties": { + "config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + } + }, + "additionalProperties": false, + "required": [ + "config" + ] + }, + "NetworkConfig": { + "type": "object", + "properties": { + "address": { + "type": "string" + }, + "addresses": { + "type": "array", + "items": { + "$ref": "#/definitions/Address" + } + }, + "cidr": { + "type": "string" + }, + "config-type": { + "type": "string" + }, + "device-index": { + "type": "integer" + }, + "disabled": { + "type": "boolean" + }, + "dns-search-domains": { + "type": "array", + "items": { + "type": "string" + } + }, + "dns-servers": { + "type": "array", + "items": { + "type": "string" + } + }, + "gateway-address": { + "type": "string" + }, + "interface-name": { + "type": "string" + }, + "interface-type": { + "type": "string" + }, + "is-default-gateway": { + "type": "boolean" + }, + "mac-address": { + "type": "string" + }, + "mtu": { + "type": "integer" + }, + "no-auto-start": { + "type": "boolean" + }, + "origin": { + "type": "string" + }, + "parent-interface-name": { + "type": "string" + }, + "provider-address-id": { + "type": "string" + }, + "provider-id": { + "type": "string" + }, + "provider-network-id": { + "type": "string" + }, + "provider-space-id": { + "type": "string" + }, + "provider-subnet-id": { + "type": "string" + }, + "provider-vlan-id": { + "type": "string" + }, + "routes": { + "type": "array", + "items": { + "$ref": "#/definitions/NetworkRoute" + } + }, + "shadow-addresses": { + "type": "array", + "items": { + "$ref": "#/definitions/Address" + } + }, + "virtual-port-type": { + "type": "string" + }, + "vlan-tag": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "device-index", + "mac-address", + "cidr", + "mtu", + "provider-id", + "provider-network-id", + "provider-subnet-id", + "provider-space-id", + "provider-address-id", + "provider-vlan-id", + "vlan-tag", + "interface-name", + "parent-interface-name", + "interface-type", + "disabled" + ] + }, + "NetworkRoute": { + "type": "object", + "properties": { + "destination-cidr": { + "type": "string" + }, + "gateway-ip": { + "type": "string" + }, + "metric": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "destination-cidr", + "gateway-ip", + "metric" + ] + }, + "NotifyWatchResult": { + "type": "object", + "properties": { + "NotifyWatcherId": { + "type": "string" + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false, + "required": [ + "NotifyWatcherId" + ] + }, + "Number": { + "type": "object", + "properties": { + "Build": { + "type": "integer" + }, + "Major": { + "type": "integer" + }, + "Minor": { + "type": "integer" + }, + "Patch": { + "type": "integer" + }, + "Tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "Major", + "Minor", + "Tag", + "Patch", + "Build" + ] + }, + "ProvisioningInfo": { + "type": "object", + "properties": { + "ProvisioningNetworkTopology": { + "$ref": "#/definitions/ProvisioningNetworkTopology" + }, + "base": { + "$ref": "#/definitions/Base" + }, + "charm-lxd-profiles": { + "type": "array", + "items": { + "type": "string" + } + }, + "cloudinit-userdata": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "constraints": { + "$ref": "#/definitions/Value" + }, + "controller-config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "endpoint-bindings": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "image-metadata": { + "type": "array", + "items": { + "$ref": "#/definitions/CloudImageMetadata" + } + }, + "jobs": { + "type": "array", + "items": { + "type": "string" + } + }, + "placement": { + "type": "string" + }, + "root-disk": { + "$ref": "#/definitions/VolumeParams" + }, + "space-subnets": { + "type": "object", + "patternProperties": { + ".*": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "subnet-zones": { + "type": "object", + "patternProperties": { + ".*": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "tags": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "volume-attachments": { + "type": "array", + "items": { + "$ref": "#/definitions/VolumeAttachmentParams" + } + }, + "volumes": { + "type": "array", + "items": { + "$ref": "#/definitions/VolumeParams" + } + } + }, + "additionalProperties": false, + "required": [ + "constraints", + "base", + "placement", + "jobs", + "subnet-zones", + "space-subnets", + "ProvisioningNetworkTopology" + ] + }, + "ProvisioningInfoResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "$ref": "#/definitions/ProvisioningInfo" + } + }, + "additionalProperties": false, + "required": [ + "result" + ] + }, + "ProvisioningInfoResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ProvisioningInfoResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "ProvisioningNetworkTopology": { + "type": "object", + "properties": { + "space-subnets": { + "type": "object", + "patternProperties": { + ".*": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "subnet-zones": { + "type": "object", + "patternProperties": { + ".*": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + }, + "additionalProperties": false, + "required": [ + "subnet-zones", + "space-subnets" + ] + }, + "SetMachineNetworkConfig": { + "type": "object", + "properties": { + "config": { + "type": "array", + "items": { + "$ref": "#/definitions/NetworkConfig" + } + }, + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag", + "config" + ] + }, + "SetProfileArg": { + "type": "object", + "properties": { + "entity": { + "$ref": "#/definitions/Entity" + }, + "profiles": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "entity", + "profiles" + ] + }, + "SetProfileArgs": { + "type": "object", + "properties": { + "args": { + "type": "array", + "items": { + "$ref": "#/definitions/SetProfileArg" + } + } + }, + "additionalProperties": false, + "required": [ + "args" + ] + }, + "SetStatus": { + "type": "object", + "properties": { + "entities": { + "type": "array", + "items": { + "$ref": "#/definitions/EntityStatusArgs" + } + } + }, + "additionalProperties": false, + "required": [ + "entities" + ] + }, + "Settings": { + "type": "object", + "properties": { + "AutoNoProxy": { + "type": "string" + }, + "Ftp": { + "type": "string" + }, + "Http": { + "type": "string" + }, + "Https": { + "type": "string" + }, + "NoProxy": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "Http", + "Https", + "Ftp", + "NoProxy", + "AutoNoProxy" + ] + }, + "StatusResult": { + "type": "object", + "properties": { + "data": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "error": { + "$ref": "#/definitions/Error" + }, + "id": { + "type": "string" + }, + "info": { + "type": "string" + }, + "life": { + "type": "string" + }, + "since": { + "type": "string", + "format": "date-time" + }, + "status": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "id", + "life", + "status", + "info", + "data", + "since" + ] + }, + "StatusResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/StatusResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "StringResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "result" + ] + }, + "StringResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/StringResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "StringsResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "StringsResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/StringsResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "StringsWatchResult": { + "type": "object", + "properties": { + "changes": { + "type": "array", + "items": { + "type": "string" + } + }, + "error": { + "$ref": "#/definitions/Error" + }, + "watcher-id": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "watcher-id" + ] + }, + "StringsWatchResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/StringsWatchResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "Tools": { + "type": "object", + "properties": { + "sha256": { + "type": "string" + }, + "size": { + "type": "integer" + }, + "url": { + "type": "string" + }, + "version": { + "$ref": "#/definitions/Binary" + } + }, + "additionalProperties": false, + "required": [ + "version", + "url", + "size" + ] + }, + "ToolsResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "tools": { + "type": "array", + "items": { + "$ref": "#/definitions/Tools" + } + } + }, + "additionalProperties": false, + "required": [ + "tools" + ] + }, + "ToolsResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ToolsResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "UpdateBehavior": { + "type": "object", + "properties": { + "enable-os-refresh-update": { + "type": "boolean" + }, + "enable-os-upgrade": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "enable-os-refresh-update", + "enable-os-upgrade" + ] + }, + "Value": { + "type": "object", + "properties": { + "allocate-public-ip": { + "type": "boolean" + }, + "arch": { + "type": "string" + }, + "container": { + "type": "string" + }, + "cores": { + "type": "integer" + }, + "cpu-power": { + "type": "integer" + }, + "image-id": { + "type": "string" + }, + "instance-role": { + "type": "string" + }, + "instance-type": { + "type": "string" + }, + "mem": { + "type": "integer" + }, + "root-disk": { + "type": "integer" + }, + "root-disk-source": { + "type": "string" + }, + "spaces": { + "type": "array", + "items": { + "type": "string" + } + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "virt-type": { + "type": "string" + }, + "zones": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "Volume": { + "type": "object", + "properties": { + "info": { + "$ref": "#/definitions/VolumeInfo" + }, + "volume-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "volume-tag", + "info" + ] + }, + "VolumeAttachmentInfo": { + "type": "object", + "properties": { + "bus-address": { + "type": "string" + }, + "device-link": { + "type": "string" + }, + "device-name": { + "type": "string" + }, + "plan-info": { + "$ref": "#/definitions/VolumeAttachmentPlanInfo" + }, + "read-only": { + "type": "boolean" + } + }, + "additionalProperties": false + }, + "VolumeAttachmentParams": { + "type": "object", + "properties": { + "instance-id": { + "type": "string" + }, + "machine-tag": { + "type": "string" + }, + "provider": { + "type": "string" + }, + "read-only": { + "type": "boolean" + }, + "volume-id": { + "type": "string" + }, + "volume-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "volume-tag", + "machine-tag", + "provider" + ] + }, + "VolumeAttachmentPlanInfo": { + "type": "object", + "properties": { + "device-attributes": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "device-type": { + "type": "string" + } + }, + "additionalProperties": false + }, + "VolumeInfo": { + "type": "object", + "properties": { + "hardware-id": { + "type": "string" + }, + "persistent": { + "type": "boolean" + }, + "pool": { + "type": "string" + }, + "size": { + "type": "integer" + }, + "volume-id": { + "type": "string" + }, + "wwn": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "volume-id", + "size", + "persistent" ] }, - "ApplicationCharmRelations": { + "VolumeParams": { "type": "object", "properties": { - "application": { + "attachment": { + "$ref": "#/definitions/VolumeAttachmentParams" + }, + "attributes": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "provider": { + "type": "string" + }, + "size": { + "type": "integer" + }, + "tags": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "volume-tag": { "type": "string" } }, "additionalProperties": false, "required": [ - "application" + "volume-tag", + "size", + "provider" ] }, - "ApplicationCharmRelationsResults": { + "WatchContainer": { "type": "object", "properties": { - "charm-relations": { + "container-type": { + "type": "string" + }, + "machine-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "machine-tag", + "container-type" + ] + }, + "WatchContainers": { + "type": "object", + "properties": { + "params": { "type": "array", "items": { - "type": "string" + "$ref": "#/definitions/WatchContainer" } } }, "additionalProperties": false, "required": [ - "charm-relations" + "params" ] + } + } + } + }, + { + "Name": "ProxyUpdater", + "Description": "API provides the ProxyUpdater version 2 facade.", + "Version": 2, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "ProxyConfig": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ProxyConfigResults" + } + }, + "description": "ProxyConfig returns the proxy settings for the current model." }, - "ApplicationConfigUnsetArgs": { + "WatchForProxyConfigAndAPIHostPortChanges": { "type": "object", "properties": { - "Args": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/NotifyWatchResults" + } + }, + "description": "WatchForProxyConfigAndAPIHostPortChanges watches for changes to the proxy and api host port settings." + } + }, + "definitions": { + "Entities": { + "type": "object", + "properties": { + "entities": { "type": "array", "items": { - "$ref": "#/definitions/ApplicationUnset" + "$ref": "#/definitions/Entity" } } }, "additionalProperties": false, "required": [ - "Args" + "entities" ] }, - "ApplicationConstraint": { + "Entity": { "type": "object", "properties": { - "constraints": { - "$ref": "#/definitions/Value" - }, - "error": { - "$ref": "#/definitions/Error" + "tag": { + "type": "string" } }, "additionalProperties": false, "required": [ - "constraints" + "tag" ] }, - "ApplicationDeploy": { + "Error": { "type": "object", "properties": { - "Force": { - "type": "boolean" + "code": { + "type": "string" }, - "application": { + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "NotifyWatchResult": { + "type": "object", + "properties": { + "NotifyWatcherId": { "type": "string" }, - "attach-storage": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false, + "required": [ + "NotifyWatcherId" + ] + }, + "NotifyWatchResults": { + "type": "object", + "properties": { + "results": { "type": "array", "items": { - "type": "string" + "$ref": "#/definitions/NotifyWatchResult" } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "ProxyConfig": { + "type": "object", + "properties": { + "ftp": { + "type": "string" }, - "channel": { + "http": { "type": "string" }, - "charm-origin": { - "$ref": "#/definitions/CharmOrigin" + "https": { + "type": "string" }, - "charm-url": { + "no-proxy": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "http", + "https", + "ftp", + "no-proxy" + ] + }, + "ProxyConfigResult": { + "type": "object", + "properties": { + "apt-mirror": { "type": "string" }, - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } + "apt-proxy-settings": { + "$ref": "#/definitions/ProxyConfig" }, - "config-yaml": { - "type": "string" + "error": { + "$ref": "#/definitions/Error" }, - "constraints": { - "$ref": "#/definitions/Value" + "juju-proxy-settings": { + "$ref": "#/definitions/ProxyConfig" }, - "devices": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/Constraints" - } - } + "legacy-proxy-settings": { + "$ref": "#/definitions/ProxyConfig" }, - "endpoint-bindings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } + "snap-proxy-settings": { + "$ref": "#/definitions/ProxyConfig" }, - "num-units": { - "type": "integer" + "snap-store-assertions": { + "type": "string" }, - "placement": { + "snap-store-id": { + "type": "string" + }, + "snap-store-proxy-url": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "legacy-proxy-settings", + "juju-proxy-settings" + ] + }, + "ProxyConfigResults": { + "type": "object", + "properties": { + "results": { "type": "array", "items": { - "$ref": "#/definitions/Placement" + "$ref": "#/definitions/ProxyConfigResult" } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + } + } + } + }, + { + "Name": "Reboot", + "Description": "RebootAPI provides access to the Upgrader API facade.", + "Version": 2, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent" + ], + "Schema": { + "type": "object", + "properties": { + "ClearReboot": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" }, - "policy": { - "type": "string" + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "ClearReboot will clear the reboot flag on provided machines, if it exists." + }, + "GetRebootAction": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" }, - "resources": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } + "Result": { + "$ref": "#/definitions/RebootActionResults" + } + }, + "description": "GetRebootAction returns the action a machine agent should take.\nIf a reboot flag is set on the machine, then that machine is\nexpected to reboot (params.ShouldReboot).\na reboot flag set on the machine parent or grandparent, will\ncause the machine to shutdown (params.ShouldShutdown).\nIf no reboot flag is set, the machine should do nothing (params.ShouldDoNothing)." + }, + "RequestReboot": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" }, - "storage": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/Constraints" - } + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "RequestReboot sets the reboot flag on the provided machines" + }, + "WatchForRebootEvent": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/NotifyWatchResult" + } + }, + "description": "WatchForRebootEvent starts a watcher to track if there is a new\nreboot request on the machines ID or any of its parents (in case we are a container)." + } + }, + "definitions": { + "Entities": { + "type": "object", + "properties": { + "entities": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" } } }, "additionalProperties": false, "required": [ - "application", - "charm-url", - "channel", - "num-units", - "config-yaml", - "constraints", - "Force" + "entities" ] }, - "ApplicationExpose": { + "Entity": { "type": "object", "properties": { - "application": { + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { "type": "string" }, - "exposed-endpoints": { + "info": { "type": "object", "patternProperties": { ".*": { - "$ref": "#/definitions/ExposedEndpoint" + "type": "object", + "additionalProperties": true } } + }, + "message": { + "type": "string" } }, "additionalProperties": false, "required": [ - "application" + "message", + "code" ] }, - "ApplicationGet": { + "ErrorResult": { "type": "object", "properties": { - "application": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "ErrorResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "NotifyWatchResult": { + "type": "object", + "properties": { + "NotifyWatcherId": { "type": "string" }, - "branch": { - "type": "string" + "error": { + "$ref": "#/definitions/Error" } }, "additionalProperties": false, "required": [ - "application", - "branch" + "NotifyWatcherId" ] }, - "ApplicationGetArgs": { + "RebootActionResult": { "type": "object", "properties": { - "args": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "type": "string" + } + }, + "additionalProperties": false + }, + "RebootActionResults": { + "type": "object", + "properties": { + "results": { "type": "array", "items": { - "$ref": "#/definitions/ApplicationGet" + "$ref": "#/definitions/RebootActionResult" + } + } + }, + "additionalProperties": false + } + } + } + }, + { + "Name": "RelationStatusWatcher", + "Description": "srvRelationStatusWatcher defines the API wrapping a state.RelationStatusWatcher.", + "Version": 1, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "Next": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/RelationLifeSuspendedStatusWatchResult" + } + }, + "description": "Next returns when a change has occurred to an entity of the\ncollection being watched since the most recent call to Next\nor the Watch call that created the srvRelationStatusWatcher." + }, + "Stop": { + "type": "object", + "description": "Stop stops the watcher." + } + }, + "definitions": { + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } } + }, + "message": { + "type": "string" } }, "additionalProperties": false, "required": [ - "args" + "message", + "code" ] }, - "ApplicationGetConfigResults": { + "RelationLifeSuspendedStatusChange": { "type": "object", "properties": { - "Results": { - "type": "array", - "items": { - "$ref": "#/definitions/ConfigResult" - } + "key": { + "type": "string" + }, + "life": { + "type": "string" + }, + "suspended": { + "type": "boolean" + }, + "suspended-reason": { + "type": "string" } }, "additionalProperties": false, "required": [ - "Results" + "key", + "life", + "suspended", + "suspended-reason" ] }, - "ApplicationGetConstraintsResults": { + "RelationLifeSuspendedStatusWatchResult": { "type": "object", "properties": { - "results": { + "changes": { "type": "array", "items": { - "$ref": "#/definitions/ApplicationConstraint" + "$ref": "#/definitions/RelationLifeSuspendedStatusChange" } + }, + "error": { + "$ref": "#/definitions/Error" + }, + "watcher-id": { + "type": "string" } }, "additionalProperties": false, "required": [ - "results" + "watcher-id", + "changes" ] + } + } + } + }, + { + "Name": "RelationUnitsWatcher", + "Description": "srvRelationUnitsWatcher defines the API wrapping a state.RelationUnitsWatcher.\nIt notifies about units entering and leaving the scope of a RelationUnit,\nand changes to the settings of those units known to have entered.", + "Version": 1, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "Next": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/RelationUnitsWatchResult" + } + }, + "description": "Next returns when a change has occurred to an entity of the\ncollection being watched since the most recent call to Next\nor the Watch call that created the srvRelationUnitsWatcher." }, - "ApplicationGetResults": { + "Stop": { + "type": "object", + "description": "Stop stops the watcher." + } + }, + "definitions": { + "Error": { "type": "object", "properties": { - "application": { + "code": { "type": "string" }, - "application-config": { + "info": { "type": "object", "patternProperties": { ".*": { @@ -1833,503 +37416,591 @@ } } }, - "base": { - "$ref": "#/definitions/Base" - }, - "channel": { - "type": "string" - }, - "charm": { + "message": { "type": "string" - }, - "config": { + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "RelationUnitsChange": { + "type": "object", + "properties": { + "app-changed": { "type": "object", "patternProperties": { ".*": { - "type": "object", - "additionalProperties": true + "type": "integer" } } }, - "constraints": { - "$ref": "#/definitions/Value" - }, - "endpoint-bindings": { + "changed": { "type": "object", "patternProperties": { ".*": { - "type": "string" + "$ref": "#/definitions/UnitSettings" } } - } - }, - "additionalProperties": false, - "required": [ - "application", - "charm", - "config", - "constraints", - "base", - "channel" - ] - }, - "ApplicationInfoResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" }, - "result": { - "$ref": "#/definitions/ApplicationResult" - } - }, - "additionalProperties": false - }, - "ApplicationInfoResults": { - "type": "object", - "properties": { - "results": { + "departed": { "type": "array", "items": { - "$ref": "#/definitions/ApplicationInfoResult" + "type": "string" } } }, "additionalProperties": false, "required": [ - "results" + "changed" ] }, - "ApplicationMergeBindings": { + "RelationUnitsWatchResult": { "type": "object", "properties": { - "application-tag": { - "type": "string" + "changes": { + "$ref": "#/definitions/RelationUnitsChange" }, - "bindings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } + "error": { + "$ref": "#/definitions/Error" }, - "force": { - "type": "boolean" + "watcher-id": { + "type": "string" } }, "additionalProperties": false, "required": [ - "application-tag", - "bindings", - "force" + "watcher-id", + "changes" ] }, - "ApplicationMergeBindingsArgs": { + "UnitSettings": { "type": "object", "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/ApplicationMergeBindings" - } + "version": { + "type": "integer" } }, "additionalProperties": false, "required": [ - "args" + "version" ] + } + } + } + }, + { + "Name": "RemoteRelationWatcher", + "Description": "srvRemoteRelationWatcher defines the API wrapping a\nstate.RelationUnitsWatcher but serving the events it emits as\nfully-expanded params.RemoteRelationChangeEvents so they can be\nused across model/controller boundaries.", + "Version": 1, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "Next": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/RemoteRelationWatchResult" + } + } }, - "ApplicationMetricCredential": { + "Stop": { + "type": "object", + "description": "Stop stops the watcher." + } + }, + "definitions": { + "Error": { "type": "object", "properties": { - "application": { + "code": { "type": "string" }, - "metrics-credentials": { - "type": "array", - "items": { - "type": "integer" + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } } + }, + "message": { + "type": "string" } }, "additionalProperties": false, "required": [ - "application", - "metrics-credentials" + "message", + "code" ] }, - "ApplicationMetricCredentials": { + "Macaroon": { "type": "object", - "properties": { - "creds": { - "type": "array", - "items": { - "$ref": "#/definitions/ApplicationMetricCredential" - } - } - }, - "additionalProperties": false, - "required": [ - "creds" - ] + "additionalProperties": false }, - "ApplicationOfferDetails": { + "RemoteRelationChangeEvent": { "type": "object", "properties": { - "application-description": { - "type": "string" - }, - "bindings": { + "application-settings": { "type": "object", "patternProperties": { ".*": { - "type": "string" + "type": "object", + "additionalProperties": true } } }, - "endpoints": { + "application-token": { + "type": "string" + }, + "bakery-version": { + "type": "integer" + }, + "changed-units": { "type": "array", "items": { - "$ref": "#/definitions/RemoteEndpoint" + "$ref": "#/definitions/RemoteRelationUnitChange" } }, - "offer-name": { - "type": "string" - }, - "offer-url": { - "type": "string" + "departed-units": { + "type": "array", + "items": { + "type": "integer" + } }, - "offer-uuid": { - "type": "string" + "force-cleanup": { + "type": "boolean" }, - "source-model-tag": { + "life": { "type": "string" }, - "spaces": { + "macaroons": { "type": "array", "items": { - "$ref": "#/definitions/RemoteSpace" + "$ref": "#/definitions/Macaroon" } }, - "users": { - "type": "array", - "items": { - "$ref": "#/definitions/OfferUserDetails" - } + "relation-token": { + "type": "string" + }, + "suspended": { + "type": "boolean" + }, + "suspended-reason": { + "type": "string" + }, + "unit-count": { + "type": "integer" } }, "additionalProperties": false, "required": [ - "source-model-tag", - "offer-uuid", - "offer-url", - "offer-name", - "application-description" + "relation-token", + "application-token", + "life", + "unit-count" ] }, - "ApplicationResult": { + "RemoteRelationUnitChange": { "type": "object", "properties": { - "base": { - "$ref": "#/definitions/Base" - }, - "channel": { - "type": "string" - }, - "charm": { - "type": "string" - }, - "constraints": { - "$ref": "#/definitions/Value" - }, - "endpoint-bindings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "exposed": { - "type": "boolean" - }, - "exposed-endpoints": { + "settings": { "type": "object", "patternProperties": { ".*": { - "$ref": "#/definitions/ExposedEndpoint" + "type": "object", + "additionalProperties": true } } }, - "life": { - "type": "string" - }, - "principal": { - "type": "boolean" + "unit-id": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "unit-id" + ] + }, + "RemoteRelationWatchResult": { + "type": "object", + "properties": { + "changes": { + "$ref": "#/definitions/RemoteRelationChangeEvent" }, - "remote": { - "type": "boolean" + "error": { + "$ref": "#/definitions/Error" }, - "tag": { + "watcher-id": { "type": "string" } }, "additionalProperties": false, "required": [ - "tag", - "principal", - "exposed", - "remote", - "life" + "watcher-id", + "changes" ] + } + } + } + }, + { + "Name": "RemoteRelations", + "Description": "API provides access to the remote relations API facade.", + "Version": 2, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "ConsumeRemoteRelationChanges": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/RemoteRelationsChanges" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "ConsumeRemoteRelationChanges consumes changes to settings originating\nfrom the remote/offering side of relations." }, - "ApplicationSetCharm": { + "ConsumeRemoteSecretChanges": { "type": "object", "properties": { - "application": { - "type": "string" + "Params": { + "$ref": "#/definitions/LatestSecretRevisionChanges" }, - "channel": { - "type": "string" + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "ConsumeRemoteSecretChanges updates the local model with secret revision changes\noriginating from the remote/offering model." + }, + "ControllerAPIInfoForModels": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" }, - "charm-origin": { - "$ref": "#/definitions/CharmOrigin" + "Result": { + "$ref": "#/definitions/ControllerAPIInfoResults" + } + }, + "description": "ControllerAPIInfoForModels returns the controller api connection details for the specified models." + }, + "ControllerConfig": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/ControllerConfigResult" + } + }, + "description": "ControllerConfig returns the controller's configuration." + }, + "ExportEntities": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" }, - "charm-url": { - "type": "string" + "Result": { + "$ref": "#/definitions/TokenResults" + } + }, + "description": "ExportEntities allocates unique, remote entity IDs for the given entities in the local model." + }, + "GetTokens": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/GetTokenArgs" }, - "config-settings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } + "Result": { + "$ref": "#/definitions/StringResults" + } + }, + "description": "GetTokens returns the token associated with the entities with the given tags for the given models." + }, + "ImportRemoteEntities": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/RemoteEntityTokenArgs" }, - "config-settings-yaml": { - "type": "string" + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "ImportRemoteEntities adds entities to the remote entities collection with the specified opaque tokens." + }, + "Relations": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" }, - "endpoint-bindings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } + "Result": { + "$ref": "#/definitions/RemoteRelationResults" + } + }, + "description": "Relations returns information about the cross-model relations with the specified keys\nin the local model." + }, + "RemoteApplications": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" }, - "force": { - "type": "boolean" + "Result": { + "$ref": "#/definitions/RemoteApplicationResults" + } + }, + "description": "RemoteApplications returns the current state of the remote applications with\nthe specified names in the local model." + }, + "SaveMacaroons": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/EntityMacaroonArgs" }, - "force-base": { - "type": "boolean" + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "SaveMacaroons saves the macaroons for the given entities." + }, + "SetRemoteApplicationsStatus": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/SetStatus" }, - "force-units": { - "type": "boolean" + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "SetRemoteApplicationsStatus sets the status for the specified remote applications." + }, + "UpdateControllersForModels": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/UpdateControllersForModelsParams" }, - "generation": { - "type": "string" + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "UpdateControllersForModels changes the external controller records for the\nassociated model entities. This is used when the remote relations worker gets\nredirected following migration of an offering model." + }, + "WatchLocalRelationChanges": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" }, - "resource-ids": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } + "Result": { + "$ref": "#/definitions/RemoteRelationWatchResults" + } + }, + "description": "WatchLocalRelationChanges starts a RemoteRelationWatcher for each\nspecified relation, returning the watcher IDs and initial values,\nor an error if the remote relations couldn't be watched." + }, + "WatchRemoteApplicationRelations": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" }, - "storage-constraints": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/StorageConstraints" - } + "Result": { + "$ref": "#/definitions/StringsWatchResults" + } + }, + "description": "WatchRemoteApplicationRelations starts a StringsWatcher for watching the relations of\neach specified application in the local model, and returns the watcher IDs\nand initial values, or an error if the services' relations could not be\nwatched." + }, + "WatchRemoteApplications": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/StringsWatchResult" + } + }, + "description": "WatchRemoteApplications starts a strings watcher that notifies of the addition,\nremoval, and lifecycle changes of remote applications in the model; and\nreturns the watcher ID and initial IDs of remote applications, or an error if\nwatching failed." + }, + "WatchRemoteRelations": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/StringsWatchResult" + } + }, + "description": "WatchRemoteRelations starts a strings watcher that notifies of the addition,\nremoval, and lifecycle changes of remote relations in the model; and\nreturns the watcher ID and initial IDs of remote relations, or an error if\nwatching failed." + } + }, + "definitions": { + "ControllerAPIInfoResult": { + "type": "object", + "properties": { + "addresses": { + "type": "array", + "items": { + "type": "string" } + }, + "cacert": { + "type": "string" + }, + "error": { + "$ref": "#/definitions/Error" } }, "additionalProperties": false, "required": [ - "application", - "generation", - "charm-url", - "channel", - "force", - "force-units", - "force-base" + "addresses", + "cacert" ] }, - "ApplicationUnexpose": { + "ControllerAPIInfoResults": { "type": "object", "properties": { - "application": { - "type": "string" - }, - "exposed-endpoints": { + "results": { "type": "array", "items": { - "type": "string" + "$ref": "#/definitions/ControllerAPIInfoResult" } } }, "additionalProperties": false, "required": [ - "application", - "exposed-endpoints" + "results" ] }, - "ApplicationUnset": { + "ControllerConfigResult": { "type": "object", "properties": { - "application": { - "type": "string" - }, - "branch": { - "type": "string" - }, - "options": { - "type": "array", - "items": { - "type": "string" + "config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } } } }, "additionalProperties": false, "required": [ - "application", - "branch", - "options" + "config" ] }, - "ApplicationsDeploy": { + "Entities": { "type": "object", "properties": { - "applications": { + "entities": { "type": "array", "items": { - "$ref": "#/definitions/ApplicationDeploy" + "$ref": "#/definitions/Entity" } } }, "additionalProperties": false, "required": [ - "applications" + "entities" ] }, - "Base": { + "Entity": { "type": "object", "properties": { - "channel": { - "type": "string" - }, - "name": { + "tag": { "type": "string" } }, "additionalProperties": false, "required": [ - "name", - "channel" + "tag" ] }, - "CharmOrigin": { + "EntityMacaroonArg": { "type": "object", "properties": { - "architecture": { - "type": "string" - }, - "base": { - "$ref": "#/definitions/Base" - }, - "branch": { - "type": "string" - }, - "hash": { - "type": "string" - }, - "id": { - "type": "string" - }, - "instance-key": { - "type": "string" - }, - "revision": { - "type": "integer" - }, - "risk": { - "type": "string" - }, - "source": { - "type": "string" - }, - "track": { - "type": "string" + "macaroon": { + "$ref": "#/definitions/Macaroon" }, - "type": { + "tag": { "type": "string" } }, "additionalProperties": false, "required": [ - "source", - "type", - "id" + "macaroon", + "tag" ] }, - "CharmRelation": { + "EntityMacaroonArgs": { "type": "object", "properties": { - "interface": { - "type": "string" - }, - "limit": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "optional": { - "type": "boolean" - }, - "role": { - "type": "string" - }, - "scope": { - "type": "string" + "Args": { + "type": "array", + "items": { + "$ref": "#/definitions/EntityMacaroonArg" + } } }, "additionalProperties": false, "required": [ - "name", - "role", - "interface", - "optional", - "limit", - "scope" + "Args" ] }, - "CharmURLOriginResult": { + "EntityStatusArgs": { "type": "object", "properties": { - "charm-origin": { - "$ref": "#/definitions/CharmOrigin" + "data": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } }, - "error": { - "$ref": "#/definitions/Error" + "info": { + "type": "string" }, - "url": { + "status": { + "type": "string" + }, + "tag": { "type": "string" } }, "additionalProperties": false, "required": [ - "url", - "charm-origin" + "tag", + "status", + "info", + "data" ] }, - "ConfigResult": { + "Error": { "type": "object", "properties": { - "config": { + "code": { + "type": "string" + }, + "info": { "type": "object", "patternProperties": { ".*": { @@ -2338,51 +38009,86 @@ } } }, + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ErrorResult": { + "type": "object", + "properties": { "error": { "$ref": "#/definitions/Error" } }, + "additionalProperties": false + }, + "ErrorResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResult" + } + } + }, "additionalProperties": false, "required": [ - "config" + "results" ] }, - "ConfigSet": { + "ExternalControllerInfo": { "type": "object", "properties": { - "application": { - "type": "string" - }, - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } + "addrs": { + "type": "array", + "items": { + "type": "string" } }, - "config-yaml": { + "ca-cert": { "type": "string" }, - "generation": { + "controller-alias": { + "type": "string" + }, + "controller-tag": { "type": "string" } }, "additionalProperties": false, "required": [ - "application", - "generation", - "config", - "config-yaml" + "controller-tag", + "controller-alias", + "addrs", + "ca-cert" ] }, - "ConfigSetArgs": { + "GetTokenArg": { + "type": "object", + "properties": { + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag" + ] + }, + "GetTokenArgs": { "type": "object", "properties": { "Args": { "type": "array", "items": { - "$ref": "#/definitions/ConfigSet" + "$ref": "#/definitions/GetTokenArg" } } }, @@ -2391,207 +38097,131 @@ "Args" ] }, - "Constraints": { + "LatestSecretRevisionChanges": { "type": "object", "properties": { - "Count": { - "type": "integer" - }, - "Pool": { - "type": "string" - }, - "Size": { - "type": "integer" + "changes": { + "type": "array", + "items": { + "$ref": "#/definitions/SecretRevisionChange" + } } }, "additionalProperties": false, "required": [ - "Pool", - "Size", - "Count" + "changes" ] }, - "ConsumeApplicationArg": { + "Macaroon": { + "type": "object", + "additionalProperties": false + }, + "RemoteApplication": { "type": "object", "properties": { - "ApplicationOfferDetails": { - "$ref": "#/definitions/ApplicationOfferDetails" + "consume-version": { + "type": "integer" }, - "application-alias": { - "type": "string" + "is-consumer-proxy": { + "type": "boolean" }, - "application-description": { + "life": { "type": "string" }, - "bindings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "endpoints": { - "type": "array", - "items": { - "$ref": "#/definitions/RemoteEndpoint" - } - }, - "external-controller": { - "$ref": "#/definitions/ExternalControllerInfo" - }, "macaroon": { "$ref": "#/definitions/Macaroon" }, - "offer-name": { + "model-uuid": { "type": "string" }, - "offer-url": { + "name": { "type": "string" }, "offer-uuid": { "type": "string" }, - "source-model-tag": { + "status": { "type": "string" - }, - "spaces": { - "type": "array", - "items": { - "$ref": "#/definitions/RemoteSpace" - } - }, - "users": { - "type": "array", - "items": { - "$ref": "#/definitions/OfferUserDetails" - } } }, "additionalProperties": false, "required": [ - "source-model-tag", + "name", "offer-uuid", - "offer-url", - "offer-name", - "application-description", - "ApplicationOfferDetails" + "model-uuid", + "is-consumer-proxy" ] }, - "ConsumeApplicationArgs": { + "RemoteApplicationResult": { "type": "object", "properties": { - "args": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "$ref": "#/definitions/RemoteApplication" + } + }, + "additionalProperties": false + }, + "RemoteApplicationResults": { + "type": "object", + "properties": { + "results": { "type": "array", "items": { - "$ref": "#/definitions/ConsumeApplicationArg" + "$ref": "#/definitions/RemoteApplicationResult" } } }, "additionalProperties": false }, - "DeployFromRepositoryArg": { + "RemoteEndpoint": { "type": "object", "properties": { - "ApplicationName": { + "interface": { "type": "string" }, - "AttachStorage": { - "type": "array", - "items": { - "type": "string" - } + "limit": { + "type": "integer" }, - "CharmName": { + "name": { "type": "string" }, - "ConfigYAML": { + "role": { "type": "string" - }, - "Cons": { - "$ref": "#/definitions/Value" - }, - "Devices": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/Constraints" - } - } - }, - "DryRun": { - "type": "boolean" - }, - "Placement": { - "type": "array", - "items": { - "$ref": "#/definitions/Placement" - } - }, - "Storage": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/Constraints" - } - } - }, - "Trust": { - "type": "boolean" - }, - "base": { - "$ref": "#/definitions/Base" - }, - "channel": { + } + }, + "additionalProperties": false, + "required": [ + "name", + "role", + "interface", + "limit" + ] + }, + "RemoteEntityTokenArg": { + "type": "object", + "properties": { + "tag": { "type": "string" }, - "endpoint-bindings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "force": { - "type": "boolean" - }, - "num-units": { - "type": "integer" - }, - "resources": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "revision": { - "type": "integer" + "token": { + "type": "string" } }, "additionalProperties": false, "required": [ - "CharmName", - "ApplicationName", - "AttachStorage", - "ConfigYAML", - "Cons", - "Devices", - "DryRun", - "Placement", - "Storage", - "Trust" + "tag" ] }, - "DeployFromRepositoryArgs": { + "RemoteEntityTokenArgs": { "type": "object", "properties": { "Args": { "type": "array", "items": { - "$ref": "#/definitions/DeployFromRepositoryArg" + "$ref": "#/definitions/RemoteEntityTokenArg" } } }, @@ -2600,359 +38230,559 @@ "Args" ] }, - "DeployFromRepositoryInfo": { + "RemoteRelation": { "type": "object", "properties": { - "architecture": { + "application-name": { "type": "string" }, - "base": { - "$ref": "#/definitions/Base" + "endpoint": { + "$ref": "#/definitions/RemoteEndpoint" }, - "channel": { + "id": { + "type": "integer" + }, + "key": { "type": "string" }, - "effective-channel": { + "life": { "type": "string" }, - "name": { + "remote-application-name": { "type": "string" }, - "revision": { + "remote-endpoint-name": { + "type": "string" + }, + "source-model-uuid": { + "type": "string" + }, + "suspended": { + "type": "boolean" + }, + "unit-count": { "type": "integer" } }, "additionalProperties": false, "required": [ - "architecture", - "channel", - "name", - "revision" + "life", + "suspended", + "id", + "key", + "application-name", + "endpoint", + "unit-count", + "remote-application-name", + "remote-endpoint-name", + "source-model-uuid" ] }, - "DeployFromRepositoryResult": { + "RemoteRelationChangeEvent": { "type": "object", "properties": { - "Errors": { + "application-settings": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "application-token": { + "type": "string" + }, + "bakery-version": { + "type": "integer" + }, + "changed-units": { "type": "array", "items": { - "$ref": "#/definitions/Error" + "$ref": "#/definitions/RemoteRelationUnitChange" } }, - "Info": { - "$ref": "#/definitions/DeployFromRepositoryInfo" + "departed-units": { + "type": "array", + "items": { + "type": "integer" + } }, - "PendingResourceUploads": { + "force-cleanup": { + "type": "boolean" + }, + "life": { + "type": "string" + }, + "macaroons": { "type": "array", "items": { - "$ref": "#/definitions/PendingResourceUpload" + "$ref": "#/definitions/Macaroon" } + }, + "relation-token": { + "type": "string" + }, + "suspended": { + "type": "boolean" + }, + "suspended-reason": { + "type": "string" + }, + "unit-count": { + "type": "integer" } }, "additionalProperties": false, "required": [ - "Errors", - "Info", - "PendingResourceUploads" + "relation-token", + "application-token", + "life", + "unit-count" ] }, - "DeployFromRepositoryResults": { + "RemoteRelationResult": { "type": "object", "properties": { - "Results": { - "type": "array", - "items": { - "$ref": "#/definitions/DeployFromRepositoryResult" - } + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "$ref": "#/definitions/RemoteRelation" } }, - "additionalProperties": false, - "required": [ - "Results" - ] + "additionalProperties": false }, - "DestroyApplicationInfo": { + "RemoteRelationResults": { "type": "object", "properties": { - "destroyed-storage": { - "type": "array", - "items": { - "$ref": "#/definitions/Entity" - } - }, - "destroyed-units": { - "type": "array", - "items": { - "$ref": "#/definitions/Entity" - } - }, - "detached-storage": { + "results": { "type": "array", "items": { - "$ref": "#/definitions/Entity" + "$ref": "#/definitions/RemoteRelationResult" } } }, - "additionalProperties": false + "additionalProperties": false, + "required": [ + "results" + ] }, - "DestroyApplicationParams": { + "RemoteRelationUnitChange": { "type": "object", "properties": { - "application-tag": { - "type": "string" - }, - "destroy-storage": { - "type": "boolean" - }, - "dry-run": { - "type": "boolean" - }, - "force": { - "type": "boolean" + "settings": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } }, - "max-wait": { + "unit-id": { "type": "integer" } }, "additionalProperties": false, "required": [ - "application-tag", - "force" + "unit-id" ] }, - "DestroyApplicationResult": { + "RemoteRelationWatchResult": { "type": "object", "properties": { + "changes": { + "$ref": "#/definitions/RemoteRelationChangeEvent" + }, "error": { "$ref": "#/definitions/Error" }, - "info": { - "$ref": "#/definitions/DestroyApplicationInfo" + "watcher-id": { + "type": "string" } }, - "additionalProperties": false + "additionalProperties": false, + "required": [ + "watcher-id", + "changes" + ] }, - "DestroyApplicationResults": { + "RemoteRelationWatchResults": { "type": "object", "properties": { "results": { "type": "array", "items": { - "$ref": "#/definitions/DestroyApplicationResult" + "$ref": "#/definitions/RemoteRelationWatchResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "RemoteRelationsChanges": { + "type": "object", + "properties": { + "changes": { + "type": "array", + "items": { + "$ref": "#/definitions/RemoteRelationChangeEvent" } } }, "additionalProperties": false }, - "DestroyApplicationsParams": { + "SecretRevisionChange": { "type": "object", "properties": { - "applications": { + "revision": { + "type": "integer" + }, + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri", + "revision" + ] + }, + "SetStatus": { + "type": "object", + "properties": { + "entities": { "type": "array", "items": { - "$ref": "#/definitions/DestroyApplicationParams" + "$ref": "#/definitions/EntityStatusArgs" } } }, "additionalProperties": false, "required": [ - "applications" + "entities" ] }, - "DestroyConsumedApplicationParams": { + "StringResult": { "type": "object", "properties": { - "application-tag": { - "type": "string" - }, - "force": { - "type": "boolean" + "error": { + "$ref": "#/definitions/Error" }, - "max-wait": { - "type": "integer" + "result": { + "type": "string" } }, "additionalProperties": false, "required": [ - "application-tag" + "result" ] }, - "DestroyConsumedApplicationsParams": { + "StringResults": { "type": "object", "properties": { - "applications": { + "results": { "type": "array", "items": { - "$ref": "#/definitions/DestroyConsumedApplicationParams" + "$ref": "#/definitions/StringResult" } } }, "additionalProperties": false, "required": [ - "applications" + "results" ] }, - "DestroyRelation": { + "StringsWatchResult": { "type": "object", "properties": { - "endpoints": { + "changes": { "type": "array", "items": { "type": "string" } }, - "force": { - "type": "boolean" - }, - "max-wait": { - "type": "integer" + "error": { + "$ref": "#/definitions/Error" }, - "relation-id": { - "type": "integer" + "watcher-id": { + "type": "string" } }, "additionalProperties": false, "required": [ - "relation-id" + "watcher-id" ] }, - "DestroyUnitInfo": { + "StringsWatchResults": { "type": "object", "properties": { - "destroyed-storage": { + "results": { "type": "array", "items": { - "$ref": "#/definitions/Entity" + "$ref": "#/definitions/StringsWatchResult" } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "TokenResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" }, - "detached-storage": { + "token": { + "type": "string" + } + }, + "additionalProperties": false + }, + "TokenResults": { + "type": "object", + "properties": { + "results": { "type": "array", "items": { - "$ref": "#/definitions/Entity" + "$ref": "#/definitions/TokenResult" } } }, "additionalProperties": false }, - "DestroyUnitParams": { + "UpdateControllerForModel": { "type": "object", "properties": { - "destroy-storage": { - "type": "boolean" - }, - "dry-run": { - "type": "boolean" - }, - "force": { - "type": "boolean" - }, - "max-wait": { - "type": "integer" + "info": { + "$ref": "#/definitions/ExternalControllerInfo" }, - "unit-tag": { + "model-tag": { "type": "string" } }, "additionalProperties": false, "required": [ - "unit-tag" + "model-tag", + "info" ] }, - "DestroyUnitResult": { + "UpdateControllersForModelsParams": { "type": "object", "properties": { - "error": { - "$ref": "#/definitions/Error" + "changes": { + "type": "array", + "items": { + "$ref": "#/definitions/UpdateControllerForModel" + } + } + }, + "additionalProperties": false, + "required": [ + "changes" + ] + } + } + } + }, + { + "Name": "Resources", + "Description": "API is the public API facade for resources.", + "Version": 3, + "AvailableTo": [ + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "AddPendingResources": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/AddPendingResourcesArgsV2" }, - "info": { - "$ref": "#/definitions/DestroyUnitInfo" + "Result": { + "$ref": "#/definitions/AddPendingResourcesResult" } }, - "additionalProperties": false + "description": "AddPendingResources adds the provided resources (info) to the Juju\nmodel in a pending state, meaning they are not available until\nresolved. Handles CharmHub and Local charms." }, - "DestroyUnitResults": { + "ListResources": { "type": "object", "properties": { - "results": { + "Params": { + "$ref": "#/definitions/ListResourcesArgs" + }, + "Result": { + "$ref": "#/definitions/ResourcesResults" + } + }, + "description": "ListResources returns the list of resources for the given application." + } + }, + "definitions": { + "AddPendingResourcesArgsV2": { + "type": "object", + "properties": { + "Entity": { + "$ref": "#/definitions/Entity" + }, + "charm-origin": { + "$ref": "#/definitions/CharmOrigin" + }, + "macaroon": { + "$ref": "#/definitions/Macaroon" + }, + "resources": { "type": "array", "items": { - "$ref": "#/definitions/DestroyUnitResult" + "$ref": "#/definitions/CharmResource" } + }, + "tag": { + "type": "string" + }, + "url": { + "type": "string" } }, - "additionalProperties": false + "additionalProperties": false, + "required": [ + "tag", + "Entity", + "url", + "charm-origin", + "macaroon", + "resources" + ] }, - "DestroyUnitsParams": { + "AddPendingResourcesResult": { "type": "object", "properties": { - "units": { + "ErrorResult": { + "$ref": "#/definitions/ErrorResult" + }, + "error": { + "$ref": "#/definitions/Error" + }, + "pending-ids": { "type": "array", "items": { - "$ref": "#/definitions/DestroyUnitParams" + "type": "string" } } }, "additionalProperties": false, "required": [ - "units" + "ErrorResult", + "pending-ids" ] }, - "EndpointRelationData": { + "Base": { "type": "object", "properties": { - "ApplicationData": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } + "channel": { + "type": "string" }, - "cross-model": { - "type": "boolean" + "name": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "channel" + ] + }, + "CharmOrigin": { + "type": "object", + "properties": { + "architecture": { + "type": "string" }, - "endpoint": { + "base": { + "$ref": "#/definitions/Base" + }, + "branch": { "type": "string" }, - "related-endpoint": { + "hash": { "type": "string" }, - "relation-id": { + "id": { + "type": "string" + }, + "instance-key": { + "type": "string" + }, + "revision": { "type": "integer" }, - "unit-relation-data": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/RelationData" - } - } + "risk": { + "type": "string" + }, + "source": { + "type": "string" + }, + "track": { + "type": "string" + }, + "type": { + "type": "string" } }, "additionalProperties": false, "required": [ - "relation-id", - "endpoint", - "cross-model", - "related-endpoint", - "ApplicationData", - "unit-relation-data" + "source", + "type", + "id" ] }, - "Entities": { + "CharmResource": { "type": "object", "properties": { - "entities": { + "description": { + "type": "string" + }, + "fingerprint": { "type": "array", "items": { - "$ref": "#/definitions/Entity" + "type": "integer" } + }, + "name": { + "type": "string" + }, + "origin": { + "type": "string" + }, + "path": { + "type": "string" + }, + "revision": { + "type": "integer" + }, + "size": { + "type": "integer" + }, + "type": { + "type": "string" } }, "additionalProperties": false, "required": [ - "entities" + "name", + "type", + "path", + "origin", + "revision", + "fingerprint", + "size" ] }, "Entity": { @@ -3001,133 +38831,254 @@ }, "additionalProperties": false }, - "ErrorResults": { + "ListResourcesArgs": { "type": "object", "properties": { - "results": { + "entities": { "type": "array", "items": { - "$ref": "#/definitions/ErrorResult" + "$ref": "#/definitions/Entity" } } }, "additionalProperties": false, "required": [ - "results" + "entities" ] }, - "ExposedEndpoint": { + "Macaroon": { + "type": "object", + "additionalProperties": false + }, + "Resource": { "type": "object", "properties": { - "expose-to-cidrs": { + "CharmResource": { + "$ref": "#/definitions/CharmResource" + }, + "application": { + "type": "string" + }, + "description": { + "type": "string" + }, + "fingerprint": { "type": "array", "items": { - "type": "string" + "type": "integer" } }, - "expose-to-spaces": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "origin": { + "type": "string" + }, + "path": { + "type": "string" + }, + "pending-id": { + "type": "string" + }, + "revision": { + "type": "integer" + }, + "size": { + "type": "integer" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "type": { + "type": "string" + }, + "username": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "type", + "path", + "origin", + "revision", + "fingerprint", + "size", + "CharmResource", + "id", + "pending-id", + "application", + "username", + "timestamp" + ] + }, + "ResourcesResult": { + "type": "object", + "properties": { + "ErrorResult": { + "$ref": "#/definitions/ErrorResult" + }, + "charm-store-resources": { "type": "array", "items": { - "type": "string" + "$ref": "#/definitions/CharmResource" + } + }, + "error": { + "$ref": "#/definitions/Error" + }, + "resources": { + "type": "array", + "items": { + "$ref": "#/definitions/Resource" + } + }, + "unit-resources": { + "type": "array", + "items": { + "$ref": "#/definitions/UnitResources" } } }, - "additionalProperties": false + "additionalProperties": false, + "required": [ + "ErrorResult", + "resources", + "charm-store-resources", + "unit-resources" + ] }, - "ExternalControllerInfo": { + "ResourcesResults": { "type": "object", "properties": { - "addrs": { + "results": { "type": "array", "items": { - "type": "string" + "$ref": "#/definitions/ResourcesResult" } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "UnitResources": { + "type": "object", + "properties": { + "Entity": { + "$ref": "#/definitions/Entity" }, - "ca-cert": { - "type": "string" + "download-progress": { + "type": "object", + "patternProperties": { + ".*": { + "type": "integer" + } + } }, - "controller-alias": { - "type": "string" + "resources": { + "type": "array", + "items": { + "$ref": "#/definitions/Resource" + } }, - "controller-tag": { + "tag": { "type": "string" } }, "additionalProperties": false, "required": [ - "controller-tag", - "controller-alias", - "addrs", - "ca-cert" + "tag", + "Entity", + "resources", + "download-progress" ] - }, - "Macaroon": { - "type": "object", - "additionalProperties": false - }, - "OfferUserDetails": { + } + } + } + }, + { + "Name": "ResourcesHookContext", + "Description": "UnitFacade is the resources portion of the uniter's API facade.", + "Version": 1, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "GetResourceInfo": { "type": "object", "properties": { - "access": { - "type": "string" - }, - "display-name": { - "type": "string" + "Params": { + "$ref": "#/definitions/ListUnitResourcesArgs" }, - "user": { - "type": "string" + "Result": { + "$ref": "#/definitions/UnitResourcesResult" } }, - "additionalProperties": false, - "required": [ - "user", - "display-name", - "access" - ] - }, - "PendingResourceUpload": { + "description": "GetResourceInfo returns the resource info for each of the given\nresource names (for the implicit application). If any one is missing then\nthe corresponding result is set with errors.NotFound." + } + }, + "definitions": { + "CharmResource": { "type": "object", "properties": { - "Filename": { + "description": { "type": "string" }, - "Name": { + "fingerprint": { + "type": "array", + "items": { + "type": "integer" + } + }, + "name": { "type": "string" }, - "Type": { + "origin": { "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Name", - "Filename", - "Type" - ] - }, - "Placement": { - "type": "object", - "properties": { - "directive": { + }, + "path": { "type": "string" }, - "scope": { + "revision": { + "type": "integer" + }, + "size": { + "type": "integer" + }, + "type": { "type": "string" } }, "additionalProperties": false, "required": [ - "scope", - "directive" + "name", + "type", + "path", + "origin", + "revision", + "fingerprint", + "size" ] }, - "RelationData": { + "Error": { "type": "object", "properties": { - "InScope": { - "type": "boolean" + "code": { + "type": "string" }, - "UnitData": { + "info": { "type": "object", "patternProperties": { ".*": { @@ -3135,292 +39086,265 @@ "additionalProperties": true } } + }, + "message": { + "type": "string" } }, "additionalProperties": false, "required": [ - "InScope", - "UnitData" + "message", + "code" ] }, - "RelationSuspendedArg": { + "ErrorResult": { "type": "object", "properties": { - "message": { - "type": "string" - }, - "relation-id": { - "type": "integer" - }, - "suspended": { - "type": "boolean" + "error": { + "$ref": "#/definitions/Error" } }, - "additionalProperties": false, - "required": [ - "relation-id", - "message", - "suspended" - ] + "additionalProperties": false }, - "RelationSuspendedArgs": { + "ListUnitResourcesArgs": { "type": "object", "properties": { - "args": { + "resource-names": { "type": "array", "items": { - "$ref": "#/definitions/RelationSuspendedArg" + "type": "string" } } }, "additionalProperties": false, "required": [ - "args" + "resource-names" ] }, - "RemoteEndpoint": { + "Resource": { "type": "object", "properties": { - "interface": { + "CharmResource": { + "$ref": "#/definitions/CharmResource" + }, + "application": { "type": "string" }, - "limit": { - "type": "integer" + "description": { + "type": "string" + }, + "fingerprint": { + "type": "array", + "items": { + "type": "integer" + } + }, + "id": { + "type": "string" }, "name": { "type": "string" }, - "role": { + "origin": { "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "role", - "interface", - "limit" - ] - }, - "RemoteSpace": { - "type": "object", - "properties": { - "cloud-type": { + }, + "path": { "type": "string" }, - "name": { + "pending-id": { "type": "string" }, - "provider-attributes": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } + "revision": { + "type": "integer" }, - "provider-id": { + "size": { + "type": "integer" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "type": { "type": "string" }, - "subnets": { - "type": "array", - "items": { - "$ref": "#/definitions/Subnet" - } + "username": { + "type": "string" } }, "additionalProperties": false, "required": [ - "cloud-type", "name", - "provider-id", - "provider-attributes", - "subnets" + "type", + "path", + "origin", + "revision", + "fingerprint", + "size", + "CharmResource", + "id", + "pending-id", + "application", + "username", + "timestamp" ] }, - "ScaleApplicationInfo": { + "UnitResourceResult": { "type": "object", "properties": { - "num-units": { - "type": "integer" + "ErrorResult": { + "$ref": "#/definitions/ErrorResult" + }, + "error": { + "$ref": "#/definitions/Error" + }, + "resource": { + "$ref": "#/definitions/Resource" } }, "additionalProperties": false, "required": [ - "num-units" + "ErrorResult", + "resource" ] }, - "ScaleApplicationParams": { + "UnitResourcesResult": { "type": "object", "properties": { - "application-tag": { - "type": "string" - }, - "force": { - "type": "boolean" + "ErrorResult": { + "$ref": "#/definitions/ErrorResult" }, - "scale": { - "type": "integer" + "error": { + "$ref": "#/definitions/Error" }, - "scale-change": { - "type": "integer" + "resources": { + "type": "array", + "items": { + "$ref": "#/definitions/UnitResourceResult" + } } }, "additionalProperties": false, "required": [ - "application-tag", - "scale", - "force" + "ErrorResult", + "resources" ] - }, - "ScaleApplicationResult": { + } + } + } + }, + { + "Name": "RetryStrategy", + "Description": "RetryStrategyAPI implements RetryStrategy", + "Version": 1, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "RetryStrategy": { "type": "object", "properties": { - "error": { - "$ref": "#/definitions/Error" + "Params": { + "$ref": "#/definitions/Entities" }, - "info": { - "$ref": "#/definitions/ScaleApplicationInfo" + "Result": { + "$ref": "#/definitions/RetryStrategyResults" } }, - "additionalProperties": false + "description": "RetryStrategy returns RetryStrategyResults that can be used by any code that uses\nto configure the retry timer that's currently in juju utils." }, - "ScaleApplicationResults": { + "WatchRetryStrategy": { "type": "object", "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ScaleApplicationResult" - } + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/NotifyWatchResults" } }, - "additionalProperties": false - }, - "ScaleApplicationsParams": { + "description": "WatchRetryStrategy watches for changes to the model. Currently we only allow\nchanges to the boolean that determines whether retries should be attempted or not." + } + }, + "definitions": { + "Entities": { "type": "object", "properties": { - "applications": { + "entities": { "type": "array", "items": { - "$ref": "#/definitions/ScaleApplicationParams" + "$ref": "#/definitions/Entity" } } }, "additionalProperties": false, "required": [ - "applications" + "entities" ] }, - "SetConstraints": { + "Entity": { "type": "object", "properties": { - "application": { + "tag": { "type": "string" - }, - "constraints": { - "$ref": "#/definitions/Value" } }, "additionalProperties": false, "required": [ - "application", - "constraints" + "tag" ] }, - "StorageConstraints": { + "Error": { "type": "object", "properties": { - "count": { - "type": "integer" - }, - "pool": { + "code": { "type": "string" }, - "size": { - "type": "integer" - } - }, - "additionalProperties": false - }, - "StringResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } }, - "result": { + "message": { "type": "string" } }, "additionalProperties": false, "required": [ - "result" + "message", + "code" ] }, - "Subnet": { + "NotifyWatchResult": { "type": "object", "properties": { - "cidr": { - "type": "string" - }, - "life": { - "type": "string" - }, - "provider-id": { - "type": "string" - }, - "provider-network-id": { - "type": "string" - }, - "provider-space-id": { - "type": "string" - }, - "space-tag": { - "type": "string" - }, - "status": { + "NotifyWatcherId": { "type": "string" }, - "vlan-tag": { - "type": "integer" - }, - "zones": { - "type": "array", - "items": { - "type": "string" - } + "error": { + "$ref": "#/definitions/Error" } }, "additionalProperties": false, "required": [ - "cidr", - "vlan-tag", - "life", - "space-tag", - "zones" + "NotifyWatcherId" ] }, - "UnitInfoResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/UnitResult" - } - }, - "additionalProperties": false - }, - "UnitInfoResults": { + "NotifyWatchResults": { "type": "object", "properties": { "results": { "type": "array", "items": { - "$ref": "#/definitions/UnitInfoResult" + "$ref": "#/definitions/NotifyWatchResult" } } }, @@ -3429,291 +39353,149 @@ "results" ] }, - "UnitResult": { + "RetryStrategy": { "type": "object", "properties": { - "address": { - "type": "string" - }, - "charm": { - "type": "string" - }, - "leader": { + "jitter-retry-time": { "type": "boolean" }, - "life": { - "type": "string" - }, - "machine": { - "type": "string" - }, - "opened-ports": { - "type": "array", - "items": { - "type": "string" - } - }, - "provider-id": { - "type": "string" - }, - "public-address": { - "type": "string" + "max-retry-time": { + "type": "integer" }, - "relation-data": { - "type": "array", - "items": { - "$ref": "#/definitions/EndpointRelationData" - } + "min-retry-time": { + "type": "integer" }, - "tag": { - "type": "string" + "retry-time-factor": { + "type": "integer" }, - "workload-version": { - "type": "string" + "should-retry": { + "type": "boolean" } }, "additionalProperties": false, "required": [ - "tag", - "workload-version", - "opened-ports", - "charm" + "should-retry", + "min-retry-time", + "max-retry-time", + "jitter-retry-time", + "retry-time-factor" ] }, - "UnitsResolved": { + "RetryStrategyResult": { "type": "object", "properties": { - "all": { - "type": "boolean" - }, - "retry": { - "type": "boolean" + "error": { + "$ref": "#/definitions/Error" }, - "tags": { - "$ref": "#/definitions/Entities" + "result": { + "$ref": "#/definitions/RetryStrategy" } }, "additionalProperties": false }, - "UpdateChannelArg": { - "type": "object", - "properties": { - "channel": { - "type": "string" - }, - "force": { - "type": "boolean" - }, - "tag": { - "$ref": "#/definitions/Entity" - } - }, - "additionalProperties": false, - "required": [ - "tag", - "force", - "channel" - ] - }, - "UpdateChannelArgs": { + "RetryStrategyResults": { "type": "object", "properties": { - "args": { + "results": { "type": "array", "items": { - "$ref": "#/definitions/UpdateChannelArg" + "$ref": "#/definitions/RetryStrategyResult" } } }, "additionalProperties": false, "required": [ - "args" + "results" ] - }, - "Value": { - "type": "object", - "properties": { - "allocate-public-ip": { - "type": "boolean" - }, - "arch": { - "type": "string" - }, - "container": { - "type": "string" - }, - "cores": { - "type": "integer" - }, - "cpu-power": { - "type": "integer" - }, - "image-id": { - "type": "string" - }, - "instance-role": { - "type": "string" - }, - "instance-type": { - "type": "string" - }, - "mem": { - "type": "integer" - }, - "root-disk": { - "type": "integer" - }, - "root-disk-source": { - "type": "string" - }, - "spaces": { - "type": "array", - "items": { - "type": "string" - } - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "virt-type": { - "type": "string" - }, - "zones": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false } } } }, { - "Name": "ApplicationOffers", - "Description": "OffersAPI implements the cross model interface and is the concrete\nimplementation of the api end point.", + "Name": "SSHClient", + "Description": "Facade implements the API required by the sshclient worker.", "Version": 4, "AvailableTo": [ "controller-machine-agent", "machine-agent", "unit-agent", - "controller-user" + "model-user" ], "Schema": { "type": "object", "properties": { - "ApplicationOffers": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/OfferURLs" - }, - "Result": { - "$ref": "#/definitions/ApplicationOffersResults" - } - }, - "description": "ApplicationOffers gets details about remote applications that match given URLs." - }, - "DestroyOffers": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/DestroyApplicationOffers" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "DestroyOffers removes the offers specified by the given URLs, forcing if necessary." - }, - "FindApplicationOffers": { + "AllAddresses": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/OfferFilters" + "$ref": "#/definitions/Entities" }, "Result": { - "$ref": "#/definitions/QueryApplicationOffersResults" + "$ref": "#/definitions/SSHAddressesResults" } }, - "description": "FindApplicationOffers gets details about remote applications that match given filter." + "description": "AllAddresses reports all addresses that might have SSH listening for each\nentity in args. The result is sorted with public addresses first.\nMachines and units are supported as entity types." }, - "GetConsumeDetails": { + "ModelCredentialForSSH": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/ConsumeOfferDetailsArg" - }, "Result": { - "$ref": "#/definitions/ConsumeOfferDetailsResults" + "$ref": "#/definitions/CloudSpecResult" } }, - "description": "GetConsumeDetails returns the details necessary to pass to another model\nto allow the specified args user to consume the offers represented by the args URLs." + "description": "ModelCredentialForSSH returns a cloud spec for ssh purpose.\nThis facade call is only used for k8s model." }, - "ListApplicationOffers": { + "PrivateAddress": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/OfferFilters" + "$ref": "#/definitions/Entities" }, "Result": { - "$ref": "#/definitions/QueryApplicationOffersResults" + "$ref": "#/definitions/SSHAddressResults" } }, - "description": "ListApplicationOffers gets deployed details about application offers that match given filter.\nThe results contain details about the deployed applications such as connection count." + "description": "PrivateAddress reports the preferred private network address for one or\nmore entities. Machines and units are supported." }, - "ModifyOfferAccess": { + "Proxy": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/ModifyOfferAccessRequest" - }, "Result": { - "$ref": "#/definitions/ErrorResults" + "$ref": "#/definitions/SSHProxyResult" } }, - "description": "ModifyOfferAccess changes the application offer access granted to users." + "description": "Proxy returns whether SSH connections should be proxied through the\ncontroller hosts for the model associated with the API connection." }, - "Offer": { + "PublicAddress": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/AddApplicationOffers" + "$ref": "#/definitions/Entities" }, "Result": { - "$ref": "#/definitions/ErrorResults" + "$ref": "#/definitions/SSHAddressResults" } }, - "description": "Offer makes application endpoints available for consumption at a specified URL." + "description": "PublicAddress reports the preferred public network address for one\nor more entities. Machines and units are supported." }, - "RemoteApplicationInfo": { + "PublicKeys": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/OfferURLs" + "$ref": "#/definitions/Entities" }, "Result": { - "$ref": "#/definitions/RemoteApplicationInfoResults" + "$ref": "#/definitions/SSHPublicKeysResults" } }, - "description": "RemoteApplicationInfo returns information about the requested remote application.\nThis call currently has no client side API, only there for the Dashboard at this stage." + "description": "PublicKeys returns the public SSH hosts for one or more\nentities. Machines and units are supported." } }, "definitions": { - "AddApplicationOffer": { + "CloudCredential": { "type": "object", "properties": { - "application-description": { - "type": "string" - }, - "application-name": { - "type": "string" - }, - "endpoints": { + "attrs": { "type": "object", "patternProperties": { ".*": { @@ -3721,298 +39503,303 @@ } } }, - "model-tag": { - "type": "string" - }, - "offer-name": { + "auth-type": { "type": "string" }, - "owner-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "model-tag", - "offer-name", - "application-name", - "application-description", - "endpoints" - ] - }, - "AddApplicationOffers": { - "type": "object", - "properties": { - "Offers": { + "redacted": { "type": "array", "items": { - "$ref": "#/definitions/AddApplicationOffer" + "type": "string" } } }, "additionalProperties": false, "required": [ - "Offers" + "auth-type" ] }, - "ApplicationOfferAdminDetails": { + "CloudSpec": { "type": "object", "properties": { - "ApplicationOfferDetails": { - "$ref": "#/definitions/ApplicationOfferDetails" + "cacertificates": { + "type": "array", + "items": { + "type": "string" + } }, - "application-description": { - "type": "string" + "credential": { + "$ref": "#/definitions/CloudCredential" }, - "application-name": { + "endpoint": { "type": "string" }, - "bindings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "charm-url": { + "identity-endpoint": { "type": "string" }, - "connections": { - "type": "array", - "items": { - "$ref": "#/definitions/OfferConnection" - } - }, - "endpoints": { - "type": "array", - "items": { - "$ref": "#/definitions/RemoteEndpoint" - } + "is-controller-cloud": { + "type": "boolean" }, - "offer-name": { + "name": { "type": "string" }, - "offer-url": { + "region": { "type": "string" }, - "offer-uuid": { - "type": "string" + "skip-tls-verify": { + "type": "boolean" }, - "source-model-tag": { + "storage-endpoint": { "type": "string" }, - "spaces": { - "type": "array", - "items": { - "$ref": "#/definitions/RemoteSpace" - } + "type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "type", + "name" + ] + }, + "CloudSpecResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" }, - "users": { + "result": { + "$ref": "#/definitions/CloudSpec" + } + }, + "additionalProperties": false + }, + "Entities": { + "type": "object", + "properties": { + "entities": { "type": "array", "items": { - "$ref": "#/definitions/OfferUserDetails" + "$ref": "#/definitions/Entity" } } }, "additionalProperties": false, "required": [ - "source-model-tag", - "offer-uuid", - "offer-url", - "offer-name", - "application-description", - "ApplicationOfferDetails", - "application-name", - "charm-url" + "entities" ] }, - "ApplicationOfferDetails": { + "Entity": { "type": "object", "properties": { - "application-description": { + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { "type": "string" }, - "bindings": { + "info": { "type": "object", "patternProperties": { ".*": { - "type": "string" + "type": "object", + "additionalProperties": true } } }, - "endpoints": { - "type": "array", - "items": { - "$ref": "#/definitions/RemoteEndpoint" - } - }, - "offer-name": { - "type": "string" - }, - "offer-url": { - "type": "string" - }, - "offer-uuid": { - "type": "string" - }, - "source-model-tag": { + "message": { "type": "string" - }, - "spaces": { - "type": "array", - "items": { - "$ref": "#/definitions/RemoteSpace" - } - }, - "users": { - "type": "array", - "items": { - "$ref": "#/definitions/OfferUserDetails" - } } }, "additionalProperties": false, "required": [ - "source-model-tag", - "offer-uuid", - "offer-url", - "offer-name", - "application-description" + "message", + "code" ] }, - "ApplicationOfferResult": { + "SSHAddressResult": { "type": "object", "properties": { + "address": { + "type": "string" + }, "error": { "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/ApplicationOfferAdminDetails" } }, "additionalProperties": false }, - "ApplicationOffersResults": { + "SSHAddressResults": { "type": "object", "properties": { "results": { "type": "array", "items": { - "$ref": "#/definitions/ApplicationOfferResult" + "$ref": "#/definitions/SSHAddressResult" } } }, - "additionalProperties": false + "additionalProperties": false, + "required": [ + "results" + ] }, - "ConsumeOfferDetails": { + "SSHAddressesResult": { "type": "object", "properties": { - "external-controller": { - "$ref": "#/definitions/ExternalControllerInfo" - }, - "macaroon": { - "$ref": "#/definitions/Macaroon" + "addresses": { + "type": "array", + "items": { + "type": "string" + } }, - "offer": { - "$ref": "#/definitions/ApplicationOfferDetails" + "error": { + "$ref": "#/definitions/Error" } }, - "additionalProperties": false + "additionalProperties": false, + "required": [ + "addresses" + ] }, - "ConsumeOfferDetailsArg": { + "SSHAddressesResults": { "type": "object", "properties": { - "offer-urls": { - "$ref": "#/definitions/OfferURLs" - }, - "user-tag": { - "type": "string" + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/SSHAddressesResult" + } } }, "additionalProperties": false, "required": [ - "offer-urls" + "results" ] }, - "ConsumeOfferDetailsResult": { + "SSHProxyResult": { "type": "object", "properties": { - "ConsumeOfferDetails": { - "$ref": "#/definitions/ConsumeOfferDetails" - }, - "error": { - "$ref": "#/definitions/Error" - }, - "external-controller": { - "$ref": "#/definitions/ExternalControllerInfo" - }, - "macaroon": { - "$ref": "#/definitions/Macaroon" - }, - "offer": { - "$ref": "#/definitions/ApplicationOfferDetails" + "use-proxy": { + "type": "boolean" } }, "additionalProperties": false, "required": [ - "ConsumeOfferDetails" + "use-proxy" ] }, - "ConsumeOfferDetailsResults": { + "SSHPublicKeysResult": { "type": "object", "properties": { - "results": { + "error": { + "$ref": "#/definitions/Error" + }, + "public-keys": { "type": "array", "items": { - "$ref": "#/definitions/ConsumeOfferDetailsResult" + "type": "string" } } }, "additionalProperties": false }, - "DestroyApplicationOffers": { + "SSHPublicKeysResults": { "type": "object", "properties": { - "force": { - "type": "boolean" - }, - "offer-urls": { + "results": { "type": "array", "items": { - "type": "string" + "$ref": "#/definitions/SSHPublicKeysResult" } } }, "additionalProperties": false, "required": [ - "offer-urls" + "results" ] + } + } + } + }, + { + "Name": "SecretBackends", + "Description": "SecretBackendsAPI is the server implementation for the SecretBackends facade.", + "Version": 1, + "AvailableTo": [ + "controller-user" + ], + "Schema": { + "type": "object", + "properties": { + "AddSecretBackends": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/AddSecretBackendArgs" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "AddSecretBackends adds new secret backends." }, - "EndpointFilterAttributes": { + "ListSecretBackends": { "type": "object", "properties": { - "interface": { - "type": "string" + "Params": { + "$ref": "#/definitions/ListSecretBackendsArgs" }, - "name": { - "type": "string" + "Result": { + "$ref": "#/definitions/ListSecretBackendsResults" + } + }, + "description": "ListSecretBackends lists available secret backends." + }, + "RemoveSecretBackends": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/RemoveSecretBackendArgs" }, - "role": { - "type": "string" + "Result": { + "$ref": "#/definitions/ErrorResults" } }, - "additionalProperties": false, - "required": [ - "role", - "interface", - "name" - ] + "description": "RemoveSecretBackends removes secret backends." }, - "EntityStatus": { + "UpdateSecretBackends": { "type": "object", "properties": { - "data": { + "Params": { + "$ref": "#/definitions/UpdateSecretBackendArgs" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "UpdateSecretBackends updates secret backends." + } + }, + "definitions": { + "AddSecretBackendArg": { + "type": "object", + "properties": { + "SecretBackend": { + "$ref": "#/definitions/SecretBackend" + }, + "backend-type": { + "type": "string" + }, + "config": { "type": "object", "patternProperties": { ".*": { @@ -4021,22 +39808,37 @@ } } }, - "info": { + "id": { "type": "string" }, - "since": { - "type": "string", - "format": "date-time" - }, - "status": { + "name": { "type": "string" + }, + "token-rotate-interval": { + "type": "integer" } }, "additionalProperties": false, "required": [ - "status", - "info", - "since" + "name", + "backend-type", + "config", + "SecretBackend" + ] + }, + "AddSecretBackendArgs": { + "type": "object", + "properties": { + "args": { + "type": "array", + "items": { + "$ref": "#/definitions/AddSecretBackendArg" + } + } + }, + "additionalProperties": false, + "required": [ + "args" ] }, "Error": { @@ -4085,289 +39887,263 @@ }, "additionalProperties": false, "required": [ - "results" + "results" + ] + }, + "ListSecretBackendsArgs": { + "type": "object", + "properties": { + "names": { + "type": "array", + "items": { + "type": "string" + } + }, + "reveal": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "names", + "reveal" + ] + }, + "ListSecretBackendsResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/SecretBackendResult" + } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "RemoveSecretBackendArg": { + "type": "object", + "properties": { + "force": { + "type": "boolean" + }, + "name": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name" ] }, - "ExternalControllerInfo": { + "RemoveSecretBackendArgs": { "type": "object", "properties": { - "addrs": { + "args": { "type": "array", "items": { - "type": "string" + "$ref": "#/definitions/RemoveSecretBackendArg" } - }, - "ca-cert": { - "type": "string" - }, - "controller-alias": { - "type": "string" - }, - "controller-tag": { - "type": "string" } }, "additionalProperties": false, "required": [ - "controller-tag", - "controller-alias", - "addrs", - "ca-cert" + "args" ] }, - "Macaroon": { - "type": "object", - "additionalProperties": false - }, - "ModifyOfferAccess": { + "SecretBackend": { "type": "object", "properties": { - "access": { + "backend-type": { "type": "string" }, - "action": { - "type": "string" + "config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } }, - "offer-url": { + "name": { "type": "string" }, - "user-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "user-tag", - "action", - "access", - "offer-url" - ] - }, - "ModifyOfferAccessRequest": { - "type": "object", - "properties": { - "changes": { - "type": "array", - "items": { - "$ref": "#/definitions/ModifyOfferAccess" - } + "token-rotate-interval": { + "type": "integer" } }, "additionalProperties": false, "required": [ - "changes" + "name", + "backend-type", + "config" ] }, - "OfferConnection": { + "SecretBackendResult": { "type": "object", "properties": { - "endpoint": { + "error": { + "$ref": "#/definitions/Error" + }, + "id": { "type": "string" }, - "ingress-subnets": { - "type": "array", - "items": { - "type": "string" - } + "message": { + "type": "string" }, - "relation-id": { + "num-secrets": { "type": "integer" }, - "source-model-tag": { - "type": "string" + "result": { + "$ref": "#/definitions/SecretBackend" }, "status": { - "$ref": "#/definitions/EntityStatus" - }, - "username": { "type": "string" } }, "additionalProperties": false, "required": [ - "source-model-tag", - "relation-id", - "username", - "endpoint", - "status", - "ingress-subnets" + "result", + "id", + "num-secrets", + "status" ] }, - "OfferFilter": { + "UpdateSecretBackendArg": { "type": "object", "properties": { - "allowed-users": { - "type": "array", - "items": { - "type": "string" + "config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } } }, - "application-description": { - "type": "string" + "force": { + "type": "boolean" }, - "application-name": { + "name": { "type": "string" }, - "application-user": { + "name-change": { "type": "string" }, - "connected-users": { + "reset": { "type": "array", "items": { "type": "string" } }, - "endpoints": { - "type": "array", - "items": { - "$ref": "#/definitions/EndpointFilterAttributes" - } - }, - "model-name": { - "type": "string" - }, - "offer-name": { - "type": "string" - }, - "owner-name": { - "type": "string" + "token-rotate-interval": { + "type": "integer" } }, "additionalProperties": false, "required": [ - "owner-name", - "model-name", - "offer-name", - "application-name", - "application-description", - "application-user", - "endpoints", - "connected-users", - "allowed-users" + "name", + "token-rotate-interval", + "config", + "reset" ] }, - "OfferFilters": { + "UpdateSecretBackendArgs": { "type": "object", "properties": { - "Filters": { + "args": { "type": "array", "items": { - "$ref": "#/definitions/OfferFilter" + "$ref": "#/definitions/UpdateSecretBackendArg" } } }, "additionalProperties": false, "required": [ - "Filters" + "args" ] - }, - "OfferURLs": { - "type": "object", - "properties": { - "bakery-version": { - "type": "integer" - }, - "offer-urls": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "OfferUserDetails": { + } + } + } + }, + { + "Name": "SecretBackendsManager", + "Description": "SecretBackendsManagerAPI is the implementation for the SecretsManager facade.", + "Version": 1, + "AvailableTo": [ + "controller-machine-agent" + ], + "Schema": { + "type": "object", + "properties": { + "RotateBackendTokens": { "type": "object", "properties": { - "access": { - "type": "string" - }, - "display-name": { - "type": "string" + "Params": { + "$ref": "#/definitions/RotateSecretBackendArgs" }, - "user": { - "type": "string" + "Result": { + "$ref": "#/definitions/ErrorResults" } }, - "additionalProperties": false, - "required": [ - "user", - "display-name", - "access" - ] + "description": "RotateBackendTokens rotates the tokens for the specified backends." }, - "QueryApplicationOffersResults": { + "WatchSecretBackendsRotateChanges": { "type": "object", "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ApplicationOfferAdminDetails" - } + "Result": { + "$ref": "#/definitions/SecretBackendRotateWatchResult" } }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "RemoteApplicationInfo": { + "description": "WatchSecretBackendsRotateChanges sets up a watcher to notify of changes to secret backend rotations." + } + }, + "definitions": { + "Error": { "type": "object", "properties": { - "description": { + "code": { "type": "string" }, - "endpoints": { - "type": "array", - "items": { - "$ref": "#/definitions/RemoteEndpoint" + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } } }, - "icon-url-path": { - "type": "string" - }, - "model-tag": { - "type": "string" - }, - "name": { - "type": "string" - }, - "offer-url": { - "type": "string" - }, - "source-model-label": { + "message": { "type": "string" } }, "additionalProperties": false, "required": [ - "model-tag", - "name", - "description", - "offer-url", - "endpoints", - "icon-url-path" + "message", + "code" ] }, - "RemoteApplicationInfoResult": { + "ErrorResult": { "type": "object", "properties": { "error": { "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/RemoteApplicationInfo" } }, "additionalProperties": false }, - "RemoteApplicationInfoResults": { + "ErrorResults": { "type": "object", "properties": { "results": { "type": "array", "items": { - "$ref": "#/definitions/RemoteApplicationInfoResult" + "$ref": "#/definitions/ErrorResult" } } }, @@ -4376,117 +40152,71 @@ "results" ] }, - "RemoteEndpoint": { + "RotateSecretBackendArgs": { "type": "object", "properties": { - "interface": { - "type": "string" - }, - "limit": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "role": { - "type": "string" + "backend-ids": { + "type": "array", + "items": { + "type": "string" + } } }, "additionalProperties": false, "required": [ - "name", - "role", - "interface", - "limit" + "backend-ids" ] }, - "RemoteSpace": { + "SecretBackendRotateChange": { "type": "object", "properties": { - "cloud-type": { - "type": "string" - }, - "name": { + "backend-name": { "type": "string" }, - "provider-attributes": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "provider-id": { + "id": { "type": "string" }, - "subnets": { - "type": "array", - "items": { - "$ref": "#/definitions/Subnet" - } + "next-trigger-time": { + "type": "string", + "format": "date-time" } }, "additionalProperties": false, "required": [ - "cloud-type", - "name", - "provider-id", - "provider-attributes", - "subnets" + "id", + "backend-name", + "next-trigger-time" ] }, - "Subnet": { + "SecretBackendRotateWatchResult": { "type": "object", "properties": { - "cidr": { - "type": "string" - }, - "life": { - "type": "string" - }, - "provider-id": { - "type": "string" - }, - "provider-network-id": { - "type": "string" - }, - "provider-space-id": { - "type": "string" - }, - "space-tag": { - "type": "string" - }, - "status": { - "type": "string" - }, - "vlan-tag": { - "type": "integer" - }, - "zones": { + "changes": { "type": "array", "items": { - "type": "string" + "$ref": "#/definitions/SecretBackendRotateChange" } + }, + "error": { + "$ref": "#/definitions/Error" + }, + "watcher-id": { + "type": "string" } }, "additionalProperties": false, "required": [ - "cidr", - "vlan-tag", - "life", - "space-tag", - "zones" + "watcher-id", + "changes" ] } } } }, { - "Name": "Backups", - "Description": "API provides backup-specific API methods.", - "Version": 3, + "Name": "SecretBackendsRotateWatcher", + "Description": "srvSecretBackendsRotateWatcher defines the API wrapping a SecretBackendsRotateWatcher.", + "Version": 1, "AvailableTo": [ "controller-machine-agent", "machine-agent", @@ -4496,157 +40226,95 @@ "Schema": { "type": "object", "properties": { - "Create": { + "Next": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/BackupsCreateArgs" - }, "Result": { - "$ref": "#/definitions/BackupsMetadataResult" + "$ref": "#/definitions/SecretBackendRotateWatchResult" } }, - "description": "Create is the API method that requests juju to create a new backup\nof its state." + "description": "Next returns when a change has occurred to an entity of the\ncollection being watched since the most recent call to Next\nor the Watch call that created the srvSecretRotationWatcher." + }, + "Stop": { + "type": "object", + "description": "Stop stops the watcher." } }, "definitions": { - "BackupsCreateArgs": { + "Error": { "type": "object", "properties": { - "no-download": { - "type": "boolean" + "code": { + "type": "string" }, - "notes": { + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { "type": "string" } }, "additionalProperties": false, "required": [ - "notes", - "no-download" + "message", + "code" ] }, - "BackupsMetadataResult": { + "SecretBackendRotateChange": { "type": "object", "properties": { - "base": { - "type": "string" - }, - "checksum": { - "type": "string" - }, - "checksum-format": { - "type": "string" - }, - "controller-machine-id": { - "type": "string" - }, - "controller-machine-inst-id": { - "type": "string" - }, - "controller-uuid": { - "type": "string" - }, - "filename": { - "type": "string" - }, - "finished": { - "type": "string", - "format": "date-time" - }, - "format-version": { - "type": "integer" - }, - "ha-nodes": { - "type": "integer" - }, - "hostname": { + "backend-name": { "type": "string" }, "id": { "type": "string" }, - "machine": { - "type": "string" - }, - "model": { - "type": "string" - }, - "notes": { - "type": "string" - }, - "size": { - "type": "integer" - }, - "started": { - "type": "string", - "format": "date-time" - }, - "stored": { + "next-trigger-time": { "type": "string", "format": "date-time" - }, - "version": { - "$ref": "#/definitions/Number" } }, "additionalProperties": false, "required": [ "id", - "checksum", - "checksum-format", - "size", - "stored", - "started", - "finished", - "notes", - "model", - "machine", - "hostname", - "version", - "base", - "filename", - "format-version", - "controller-uuid", - "controller-machine-id", - "controller-machine-inst-id", - "ha-nodes" + "backend-name", + "next-trigger-time" ] }, - "Number": { + "SecretBackendRotateWatchResult": { "type": "object", "properties": { - "Build": { - "type": "integer" - }, - "Major": { - "type": "integer" - }, - "Minor": { - "type": "integer" + "changes": { + "type": "array", + "items": { + "$ref": "#/definitions/SecretBackendRotateChange" + } }, - "Patch": { - "type": "integer" + "error": { + "$ref": "#/definitions/Error" }, - "Tag": { + "watcher-id": { "type": "string" } }, "additionalProperties": false, "required": [ - "Major", - "Minor", - "Tag", - "Patch", - "Build" + "watcher-id", + "changes" ] } } } }, { - "Name": "Block", - "Description": "API implements Block interface and is the concrete\nimplementation of the api end point.", + "Name": "Secrets", + "Description": "SecretsAPI is the backend for the Secrets facade.", "Version": 2, "AvailableTo": [ "model-user" @@ -4654,104 +40322,194 @@ "Schema": { "type": "object", "properties": { - "List": { + "CreateSecrets": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/CreateSecretArgs" + }, + "Result": { + "$ref": "#/definitions/StringResults" + } + }, + "description": "CreateSecrets creates new secrets." + }, + "GrantSecret": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/GrantRevokeUserSecretArg" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "GrantSecret grants access to a user secret." + }, + "ListSecrets": { "type": "object", "properties": { + "Params": { + "$ref": "#/definitions/ListSecretsArgs" + }, "Result": { - "$ref": "#/definitions/BlockResults" + "$ref": "#/definitions/ListSecretResults" } }, - "description": "List implements Block.List()." + "description": "ListSecrets lists available secrets." }, - "SwitchBlockOff": { + "RemoveSecrets": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/BlockSwitchParams" + "$ref": "#/definitions/DeleteSecretArgs" }, "Result": { - "$ref": "#/definitions/ErrorResult" + "$ref": "#/definitions/ErrorResults" } }, - "description": "SwitchBlockOff implements Block.SwitchBlockOff()." + "description": "RemoveSecrets remove user secret." }, - "SwitchBlockOn": { + "RevokeSecret": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/BlockSwitchParams" + "$ref": "#/definitions/GrantRevokeUserSecretArg" }, "Result": { - "$ref": "#/definitions/ErrorResult" + "$ref": "#/definitions/ErrorResults" } }, - "description": "SwitchBlockOn implements Block.SwitchBlockOn()." + "description": "RevokeSecret revokes access to a user secret." + }, + "UpdateSecrets": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/UpdateUserSecretArgs" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "UpdateSecrets creates new secrets." } }, "definitions": { - "Block": { + "AccessInfo": { "type": "object", "properties": { - "id": { - "type": "string" - }, - "message": { + "role": { "type": "string" }, - "tag": { + "scope-tag": { "type": "string" }, - "type": { + "target-tag": { "type": "string" } }, "additionalProperties": false, "required": [ - "id", - "tag", - "type" + "target-tag", + "scope-tag", + "role" ] }, - "BlockResult": { + "CreateSecretArg": { "type": "object", "properties": { - "error": { - "$ref": "#/definitions/Error" + "UpsertSecretArg": { + "$ref": "#/definitions/UpsertSecretArg" }, - "result": { - "$ref": "#/definitions/Block" + "content": { + "$ref": "#/definitions/SecretContentParams" + }, + "description": { + "type": "string" + }, + "expire-time": { + "type": "string", + "format": "date-time" + }, + "label": { + "type": "string" + }, + "owner-tag": { + "type": "string" + }, + "params": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "rotate-policy": { + "type": "string" + }, + "uri": { + "type": "string" } }, "additionalProperties": false, "required": [ - "result" + "UpsertSecretArg", + "owner-tag" ] }, - "BlockResults": { + "CreateSecretArgs": { "type": "object", "properties": { - "results": { + "args": { "type": "array", "items": { - "$ref": "#/definitions/BlockResult" + "$ref": "#/definitions/CreateSecretArg" } } }, - "additionalProperties": false + "additionalProperties": false, + "required": [ + "args" + ] }, - "BlockSwitchParams": { + "DeleteSecretArg": { "type": "object", "properties": { - "message": { + "label": { "type": "string" }, - "type": { + "revisions": { + "type": "array", + "items": { + "type": "integer" + } + }, + "uri": { "type": "string" } }, "additionalProperties": false, "required": [ - "type" + "uri", + "label" + ] + }, + "DeleteSecretArgs": { + "type": "object", + "properties": { + "args": { + "type": "array", + "items": { + "$ref": "#/definitions/DeleteSecretArg" + } + } + }, + "additionalProperties": false, + "required": [ + "args" ] }, "Error": { @@ -4787,182 +40545,297 @@ } }, "additionalProperties": false - } - } - } - }, - { - "Name": "Bundle", - "Description": "APIv6 provides the Bundle API facade for version 6. It is otherwise\nidentical to V5 with the exception that the V6 adds the support for\nmulti-part yaml handling to GetChanges and GetChangesMapArgs.", - "Version": 6, - "AvailableTo": [ - "controller-user", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "ExportBundle": { + }, + "ErrorResults": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/ExportBundleParams" - }, - "Result": { - "$ref": "#/definitions/StringResult" + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResult" + } } }, - "description": "ExportBundle exports the current model configuration as bundle." + "additionalProperties": false, + "required": [ + "results" + ] }, - "GetChanges": { + "GrantRevokeUserSecretArg": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/BundleChangesParams" + "applications": { + "type": "array", + "items": { + "type": "string" + } }, - "Result": { - "$ref": "#/definitions/BundleChangesResults" + "label": { + "type": "string" + }, + "uri": { + "type": "string" } }, - "description": "GetChanges returns the list of changes required to deploy the given bundle\ndata. The changes are sorted by requirements, so that they can be applied in\norder.\nGetChanges has been superseded in favour of GetChangesMapArgs. It's\npreferable to use that new method to add new functionality and move clients\naway from this one." + "additionalProperties": false, + "required": [ + "uri", + "label", + "applications" + ] }, - "GetChangesMapArgs": { + "ListSecretResult": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/BundleChangesParams" + "access": { + "type": "array", + "items": { + "$ref": "#/definitions/AccessInfo" + } }, - "Result": { - "$ref": "#/definitions/BundleChangesMapArgsResults" - } - }, - "description": "GetChangesMapArgs returns the list of changes required to deploy the given\nbundle data. The changes are sorted by requirements, so that they can be\napplied in order.\nV4 GetChangesMapArgs is not supported on anything less than v4" - } - }, - "definitions": { - "BundleChange": { - "type": "object", - "properties": { - "args": { + "create-time": { + "type": "string", + "format": "date-time" + }, + "description": { + "type": "string" + }, + "label": { + "type": "string" + }, + "latest-expire-time": { + "type": "string", + "format": "date-time" + }, + "latest-revision": { + "type": "integer" + }, + "next-rotate-time": { + "type": "string", + "format": "date-time" + }, + "owner-tag": { + "type": "string" + }, + "revisions": { "type": "array", "items": { - "type": "object", - "additionalProperties": true + "$ref": "#/definitions/SecretRevision" } }, - "id": { + "rotate-policy": { "type": "string" }, - "method": { + "update-time": { + "type": "string", + "format": "date-time" + }, + "uri": { "type": "string" }, - "requires": { + "value": { + "$ref": "#/definitions/SecretValueResult" + }, + "version": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "uri", + "version", + "owner-tag", + "latest-revision", + "create-time", + "update-time", + "revisions" + ] + }, + "ListSecretResults": { + "type": "object", + "properties": { + "results": { "type": "array", "items": { - "type": "string" + "$ref": "#/definitions/ListSecretResult" } } }, "additionalProperties": false, "required": [ - "id", - "method", - "args", - "requires" + "results" ] }, - "BundleChangesMapArgs": { + "ListSecretsArgs": { "type": "object", "properties": { - "args": { + "filter": { + "$ref": "#/definitions/SecretsFilter" + }, + "show-secrets": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "show-secrets", + "filter" + ] + }, + "SecretContentParams": { + "type": "object", + "properties": { + "data": { "type": "object", "patternProperties": { ".*": { - "type": "object", - "additionalProperties": true + "type": "string" } } }, - "id": { + "value-ref": { + "$ref": "#/definitions/SecretValueRef" + } + }, + "additionalProperties": false + }, + "SecretRevision": { + "type": "object", + "properties": { + "backend-name": { "type": "string" }, - "method": { + "create-time": { + "type": "string", + "format": "date-time" + }, + "expire-time": { + "type": "string", + "format": "date-time" + }, + "revision": { + "type": "integer" + }, + "update-time": { + "type": "string", + "format": "date-time" + }, + "value-ref": { + "$ref": "#/definitions/SecretValueRef" + } + }, + "additionalProperties": false, + "required": [ + "revision" + ] + }, + "SecretValueRef": { + "type": "object", + "properties": { + "backend-id": { "type": "string" }, - "requires": { - "type": "array", - "items": { - "type": "string" - } + "revision-id": { + "type": "string" } }, "additionalProperties": false, "required": [ - "id", - "method", - "args", - "requires" + "backend-id", + "revision-id" ] }, - "BundleChangesMapArgsResults": { + "SecretValueResult": { "type": "object", "properties": { - "changes": { - "type": "array", - "items": { - "$ref": "#/definitions/BundleChangesMapArgs" + "data": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } } }, - "errors": { - "type": "array", - "items": { - "type": "string" - } + "error": { + "$ref": "#/definitions/Error" } }, "additionalProperties": false }, - "BundleChangesParams": { + "SecretsFilter": { "type": "object", "properties": { - "bundleURL": { + "label": { "type": "string" }, - "yaml": { + "owner-tag": { + "type": "string" + }, + "revision": { + "type": "integer" + }, + "uri": { + "type": "string" + } + }, + "additionalProperties": false + }, + "StringResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { "type": "string" } }, "additionalProperties": false, "required": [ - "yaml", - "bundleURL" + "result" ] }, - "BundleChangesResults": { + "StringResults": { "type": "object", "properties": { - "changes": { - "type": "array", - "items": { - "$ref": "#/definitions/BundleChange" - } - }, - "errors": { + "results": { "type": "array", "items": { - "type": "string" + "$ref": "#/definitions/StringResult" } } }, - "additionalProperties": false + "additionalProperties": false, + "required": [ + "results" + ] }, - "Error": { + "UpdateUserSecretArg": { "type": "object", "properties": { - "code": { + "UpsertSecretArg": { + "$ref": "#/definitions/UpsertSecretArg" + }, + "auto-prune": { + "type": "boolean" + }, + "content": { + "$ref": "#/definitions/SecretContentParams" + }, + "description": { "type": "string" }, - "info": { + "existing-label": { + "type": "string" + }, + "expire-time": { + "type": "string", + "format": "date-time" + }, + "label": { + "type": "string" + }, + "params": { "type": "object", "patternProperties": { ".*": { @@ -4971,874 +40844,797 @@ } } }, - "message": { + "rotate-policy": { + "type": "string" + }, + "uri": { "type": "string" } }, "additionalProperties": false, "required": [ - "message", - "code" + "UpsertSecretArg", + "uri", + "existing-label" ] }, - "ExportBundleParams": { + "UpdateUserSecretArgs": { "type": "object", "properties": { - "include-charm-defaults": { - "type": "boolean" - }, - "include-series": { - "type": "boolean" + "args": { + "type": "array", + "items": { + "$ref": "#/definitions/UpdateUserSecretArg" + } } }, - "additionalProperties": false + "additionalProperties": false, + "required": [ + "args" + ] }, - "StringResult": { + "UpsertSecretArg": { "type": "object", "properties": { - "error": { - "$ref": "#/definitions/Error" + "content": { + "$ref": "#/definitions/SecretContentParams" }, - "result": { + "description": { + "type": "string" + }, + "expire-time": { + "type": "string", + "format": "date-time" + }, + "label": { + "type": "string" + }, + "params": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "rotate-policy": { "type": "string" } }, - "additionalProperties": false, - "required": [ - "result" - ] + "additionalProperties": false } } } }, { - "Name": "Charms", - "Description": "APIv7 provides the Charms API facade for version 7.\nv7 guarantees SupportedBases will be provided in ResolveCharms", - "Version": 7, + "Name": "SecretsDrain", + "Description": "SecretsDrainAPI is the implementation for the SecretsDrain facade.", + "Version": 1, "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", "model-user" ], "Schema": { "type": "object", "properties": { - "AddCharm": { + "ChangeSecretBackend": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/AddCharmWithOrigin" + "$ref": "#/definitions/ChangeSecretBackendArgs" }, "Result": { - "$ref": "#/definitions/CharmOriginResult" + "$ref": "#/definitions/ErrorResults" } }, - "description": "AddCharm adds the given charm URL (which must include revision) to the\nenvironment, if it does not exist yet. Local charms are not supported,\nonly charm store and charm hub URLs. See also AddLocalCharm()." + "description": "ChangeSecretBackend updates the backend for the specified secret after migration done." }, - "CharmInfo": { + "GetSecretsToDrain": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/CharmURL" - }, "Result": { - "$ref": "#/definitions/Charm" + "$ref": "#/definitions/ListSecretResults" } }, - "description": "CharmInfo returns information about the requested charm." + "description": "GetSecretsToDrain returns metadata for the secrets that need to be drained." }, - "CheckCharmPlacement": { + "WatchSecretBackendChanged": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/ApplicationCharmPlacements" - }, "Result": { - "$ref": "#/definitions/ErrorResults" + "$ref": "#/definitions/NotifyWatchResult" } }, - "description": "CheckCharmPlacement checks if a charm is allowed to be placed with in a\ngiven application." - }, - "GetDownloadInfos": { + "description": "WatchSecretBackendChanged sets up a watcher to notify of changes to the secret backend." + } + }, + "definitions": { + "AccessInfo": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/CharmURLAndOrigins" + "role": { + "type": "string" }, - "Result": { - "$ref": "#/definitions/DownloadInfoResults" + "scope-tag": { + "type": "string" + }, + "target-tag": { + "type": "string" } }, - "description": "GetDownloadInfos attempts to get the bundle corresponding to the charm url\nand origin." + "additionalProperties": false, + "required": [ + "target-tag", + "scope-tag", + "role" + ] }, - "IsMetered": { + "ChangeSecretBackendArg": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/CharmURL" + "content": { + "$ref": "#/definitions/SecretContentParams" }, - "Result": { - "$ref": "#/definitions/IsMeteredResult" + "revision": { + "type": "integer" + }, + "uri": { + "type": "string" } }, - "description": "IsMetered returns whether or not the charm is metered.\nTODO (cderici) only used for metered charms in cmd MeteredDeployAPI,\nkept for client compatibility, remove in juju 4.0" + "additionalProperties": false, + "required": [ + "uri", + "revision" + ] }, - "List": { + "ChangeSecretBackendArgs": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/CharmsList" - }, - "Result": { - "$ref": "#/definitions/CharmsListResult" + "args": { + "type": "array", + "items": { + "$ref": "#/definitions/ChangeSecretBackendArg" + } } }, - "description": "List returns a list of charm URLs currently in the state.\nIf supplied parameter contains any names, the result will\nbe filtered to return only the charms with supplied names." + "additionalProperties": false, + "required": [ + "args" + ] }, - "ListCharmResources": { + "Error": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/CharmURLAndOrigins" + "code": { + "type": "string" }, - "Result": { - "$ref": "#/definitions/CharmResourcesResults" + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "message": { + "type": "string" } }, - "description": "ListCharmResources returns a series of resources for a given charm." + "additionalProperties": false, + "required": [ + "message", + "code" + ] }, - "ResolveCharms": { + "ErrorResult": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/ResolveCharmsWithChannel" - }, - "Result": { - "$ref": "#/definitions/ResolveCharmWithChannelResults" + "error": { + "$ref": "#/definitions/Error" } }, - "description": "ResolveCharms resolves the given charm URLs with an optionally specified\npreferred channel. Channel provided via CharmOrigin." - } - }, - "definitions": { - "AddCharmWithOrigin": { + "additionalProperties": false + }, + "ErrorResults": { "type": "object", "properties": { - "charm-origin": { - "$ref": "#/definitions/CharmOrigin" - }, - "force": { - "type": "boolean" - }, - "url": { - "type": "string" + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResult" + } } }, "additionalProperties": false, "required": [ - "url", - "charm-origin", - "force" + "results" ] }, - "ApplicationCharmPlacement": { + "ListSecretResult": { "type": "object", "properties": { - "application": { + "access": { + "type": "array", + "items": { + "$ref": "#/definitions/AccessInfo" + } + }, + "create-time": { + "type": "string", + "format": "date-time" + }, + "description": { "type": "string" }, - "charm-url": { + "label": { + "type": "string" + }, + "latest-expire-time": { + "type": "string", + "format": "date-time" + }, + "latest-revision": { + "type": "integer" + }, + "next-rotate-time": { + "type": "string", + "format": "date-time" + }, + "owner-tag": { + "type": "string" + }, + "revisions": { + "type": "array", + "items": { + "$ref": "#/definitions/SecretRevision" + } + }, + "rotate-policy": { "type": "string" + }, + "update-time": { + "type": "string", + "format": "date-time" + }, + "uri": { + "type": "string" + }, + "value": { + "$ref": "#/definitions/SecretValueResult" + }, + "version": { + "type": "integer" } }, "additionalProperties": false, "required": [ - "application", - "charm-url" + "uri", + "version", + "owner-tag", + "latest-revision", + "create-time", + "update-time", + "revisions" ] }, - "ApplicationCharmPlacements": { + "ListSecretResults": { "type": "object", "properties": { - "placements": { + "results": { "type": "array", "items": { - "$ref": "#/definitions/ApplicationCharmPlacement" + "$ref": "#/definitions/ListSecretResult" } } }, "additionalProperties": false, "required": [ - "placements" + "results" ] }, - "Base": { + "NotifyWatchResult": { "type": "object", "properties": { - "channel": { + "NotifyWatcherId": { "type": "string" }, - "name": { - "type": "string" + "error": { + "$ref": "#/definitions/Error" } }, "additionalProperties": false, "required": [ - "name", - "channel" + "NotifyWatcherId" ] }, - "Charm": { + "SecretContentParams": { "type": "object", "properties": { - "actions": { - "$ref": "#/definitions/CharmActions" - }, - "config": { + "data": { "type": "object", "patternProperties": { ".*": { - "$ref": "#/definitions/CharmOption" + "type": "string" } } }, - "lxd-profile": { - "$ref": "#/definitions/CharmLXDProfile" - }, - "manifest": { - "$ref": "#/definitions/CharmManifest" + "value-ref": { + "$ref": "#/definitions/SecretValueRef" + } + }, + "additionalProperties": false + }, + "SecretRevision": { + "type": "object", + "properties": { + "backend-name": { + "type": "string" }, - "meta": { - "$ref": "#/definitions/CharmMeta" + "create-time": { + "type": "string", + "format": "date-time" }, - "metrics": { - "$ref": "#/definitions/CharmMetrics" + "expire-time": { + "type": "string", + "format": "date-time" }, "revision": { "type": "integer" }, - "url": { - "type": "string" + "update-time": { + "type": "string", + "format": "date-time" + }, + "value-ref": { + "$ref": "#/definitions/SecretValueRef" } }, "additionalProperties": false, "required": [ - "revision", - "url", - "config" + "revision" ] }, - "CharmActionSpec": { + "SecretValueRef": { "type": "object", "properties": { - "description": { + "backend-id": { "type": "string" }, - "params": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } + "revision-id": { + "type": "string" } }, "additionalProperties": false, "required": [ - "description", - "params" + "backend-id", + "revision-id" ] }, - "CharmActions": { + "SecretValueResult": { "type": "object", "properties": { - "specs": { + "data": { "type": "object", "patternProperties": { ".*": { - "$ref": "#/definitions/CharmActionSpec" + "type": "string" } } + }, + "error": { + "$ref": "#/definitions/Error" } }, "additionalProperties": false - }, - "CharmBase": { + } + } + } + }, + { + "Name": "SecretsManager", + "Description": "SecretsManagerAPI is the implementation for the SecretsManager facade.", + "Version": 2, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "CreateSecretURIs": { "type": "object", "properties": { - "architectures": { - "type": "array", - "items": { - "type": "string" - } - }, - "channel": { - "type": "string" + "Params": { + "$ref": "#/definitions/CreateSecretURIsArg" }, - "name": { - "type": "string" + "Result": { + "$ref": "#/definitions/StringResults" } }, - "additionalProperties": false + "description": "CreateSecretURIs creates new secret URIs." }, - "CharmContainer": { + "CreateSecrets": { "type": "object", "properties": { - "mounts": { - "type": "array", - "items": { - "$ref": "#/definitions/CharmMount" - } + "Params": { + "$ref": "#/definitions/CreateSecretArgs" }, - "resource": { - "type": "string" + "Result": { + "$ref": "#/definitions/StringResults" } }, - "additionalProperties": false + "description": "CreateSecrets creates new secrets." }, - "CharmDeployment": { + "GetConsumerSecretsRevisionInfo": { "type": "object", "properties": { - "min-version": { - "type": "string" - }, - "mode": { - "type": "string" - }, - "service": { - "type": "string" + "Params": { + "$ref": "#/definitions/GetSecretConsumerInfoArgs" }, - "type": { - "type": "string" + "Result": { + "$ref": "#/definitions/SecretConsumerInfoResults" } }, - "additionalProperties": false, - "required": [ - "type", - "mode", - "service", - "min-version" - ] + "description": "GetConsumerSecretsRevisionInfo returns the latest secret revisions for the specified secrets.\nThis facade method is used for remote watcher to get the latest secret revisions and labels for a secret changed hook." }, - "CharmDevice": { + "GetSecretBackendConfigs": { "type": "object", "properties": { - "CountMax": { - "type": "integer" - }, - "CountMin": { - "type": "integer" - }, - "Description": { - "type": "string" - }, - "Name": { - "type": "string" + "Params": { + "$ref": "#/definitions/SecretBackendArgs" }, - "Type": { - "type": "string" + "Result": { + "$ref": "#/definitions/SecretBackendConfigResults" } }, - "additionalProperties": false, - "required": [ - "Name", - "Description", - "Type", - "CountMin", - "CountMax" - ] + "description": "GetSecretBackendConfigs gets the config needed to create a client to secret backends." }, - "CharmLXDProfile": { + "GetSecretContentInfo": { "type": "object", "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "description": { - "type": "string" + "Params": { + "$ref": "#/definitions/GetSecretContentArgs" }, - "devices": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - } - } + "Result": { + "$ref": "#/definitions/SecretContentResults" } }, - "additionalProperties": false, - "required": [ - "config", - "description", - "devices" - ] + "description": "GetSecretContentInfo returns the secret values for the specified secrets." }, - "CharmManifest": { + "GetSecretMetadata": { "type": "object", "properties": { - "bases": { - "type": "array", - "items": { - "$ref": "#/definitions/CharmBase" - } + "Result": { + "$ref": "#/definitions/ListSecretResults" } }, - "additionalProperties": false + "description": "GetSecretMetadata returns metadata for the caller's secrets." }, - "CharmMeta": { + "GetSecretRevisionContentInfo": { "type": "object", "properties": { - "assumes-expr": { - "$ref": "#/definitions/ExpressionTree" - }, - "categories": { - "type": "array", - "items": { - "type": "string" - } - }, - "containers": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmContainer" - } - } - }, - "deployment": { - "$ref": "#/definitions/CharmDeployment" - }, - "description": { - "type": "string" - }, - "devices": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmDevice" - } - } - }, - "extra-bindings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "min-juju-version": { - "type": "string" - }, - "name": { - "type": "string" - }, - "payload-classes": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmPayloadClass" - } - } - }, - "peers": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmRelation" - } - } - }, - "provides": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmRelation" - } - } - }, - "requires": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmRelation" - } - } - }, - "resources": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmResourceMeta" - } - } + "Params": { + "$ref": "#/definitions/SecretRevisionArg" }, - "series": { - "type": "array", - "items": { - "type": "string" - } + "Result": { + "$ref": "#/definitions/SecretContentResults" + } + }, + "description": "GetSecretRevisionContentInfo returns the secret values for the specified secret revisions." + }, + "RemoveSecrets": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/DeleteSecretArgs" }, - "storage": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmStorage" - } - } + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "RemoveSecrets removes the specified secrets." + }, + "SecretsGrant": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/GrantRevokeSecretArgs" }, - "subordinate": { - "type": "boolean" + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "SecretsGrant grants access to a secret for the specified subjects." + }, + "SecretsRevoke": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/GrantRevokeSecretArgs" }, - "summary": { - "type": "string" + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "SecretsRevoke revokes access to a secret for the specified subjects." + }, + "SecretsRotated": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/SecretRotatedArgs" }, - "tags": { - "type": "array", - "items": { - "type": "string" - } + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "SecretsRotated records when secrets were last rotated." + }, + "UpdateSecrets": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/UpdateSecretArgs" }, - "terms": { - "type": "array", - "items": { - "type": "string" - } + "Result": { + "$ref": "#/definitions/ErrorResults" } }, - "additionalProperties": false, - "required": [ - "name", - "summary", - "description", - "subordinate" - ] + "description": "UpdateSecrets updates the specified secrets." }, - "CharmMetric": { + "WatchConsumedSecretsChanges": { "type": "object", "properties": { - "description": { - "type": "string" + "Params": { + "$ref": "#/definitions/Entities" }, - "type": { - "type": "string" + "Result": { + "$ref": "#/definitions/StringsWatchResults" } }, - "additionalProperties": false, - "required": [ - "type", - "description" - ] + "description": "WatchConsumedSecretsChanges sets up a watcher to notify of changes to secret revisions for the specified consumers." }, - "CharmMetrics": { + "WatchObsolete": { "type": "object", "properties": { - "metrics": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/CharmMetric" - } - } + "Params": { + "$ref": "#/definitions/Entities" }, - "plan": { - "$ref": "#/definitions/CharmPlan" + "Result": { + "$ref": "#/definitions/StringsWatchResult" } }, - "additionalProperties": false, - "required": [ - "metrics", - "plan" - ] + "description": "WatchObsolete returns a watcher for notifying when:\n - a secret owned by the entity is deleted\n - a secret revision owed by the entity no longer\n has any consumers\n\nObsolete revisions results are \"uri/revno\" and deleted\nsecret results are \"uri\"." }, - "CharmMount": { + "WatchSecretRevisionsExpiryChanges": { "type": "object", "properties": { - "location": { - "type": "string" + "Params": { + "$ref": "#/definitions/Entities" }, - "storage": { - "type": "string" + "Result": { + "$ref": "#/definitions/SecretTriggerWatchResult" } }, - "additionalProperties": false + "description": "WatchSecretRevisionsExpiryChanges sets up a watcher to notify of changes to secret revision expiry config." }, - "CharmOption": { + "WatchSecretsRotationChanges": { "type": "object", "properties": { - "default": { - "type": "object", - "additionalProperties": true + "Params": { + "$ref": "#/definitions/Entities" }, - "description": { + "Result": { + "$ref": "#/definitions/SecretTriggerWatchResult" + } + }, + "description": "WatchSecretsRotationChanges sets up a watcher to notify of changes to secret rotation config." + } + }, + "definitions": { + "AccessInfo": { + "type": "object", + "properties": { + "role": { "type": "string" }, - "type": { + "scope-tag": { + "type": "string" + }, + "target-tag": { "type": "string" } }, "additionalProperties": false, "required": [ - "type" + "target-tag", + "scope-tag", + "role" ] }, - "CharmOrigin": { + "CreateSecretArg": { "type": "object", "properties": { - "architecture": { - "type": "string" - }, - "base": { - "$ref": "#/definitions/Base" + "UpsertSecretArg": { + "$ref": "#/definitions/UpsertSecretArg" }, - "branch": { - "type": "string" + "content": { + "$ref": "#/definitions/SecretContentParams" }, - "hash": { + "description": { "type": "string" }, - "id": { - "type": "string" + "expire-time": { + "type": "string", + "format": "date-time" }, - "instance-key": { + "label": { "type": "string" }, - "revision": { - "type": "integer" - }, - "risk": { + "owner-tag": { "type": "string" }, - "source": { - "type": "string" + "params": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } }, - "track": { + "rotate-policy": { "type": "string" }, - "type": { + "uri": { "type": "string" } }, "additionalProperties": false, "required": [ - "source", - "type", - "id" + "UpsertSecretArg", + "owner-tag" ] }, - "CharmOriginResult": { + "CreateSecretArgs": { "type": "object", "properties": { - "charm-origin": { - "$ref": "#/definitions/CharmOrigin" - }, - "error": { - "$ref": "#/definitions/Error" + "args": { + "type": "array", + "items": { + "$ref": "#/definitions/CreateSecretArg" + } } }, "additionalProperties": false, "required": [ - "charm-origin" + "args" ] }, - "CharmPayloadClass": { + "CreateSecretURIsArg": { "type": "object", "properties": { - "name": { - "type": "string" - }, - "type": { - "type": "string" + "count": { + "type": "integer" } }, "additionalProperties": false, "required": [ - "name", - "type" + "count" ] }, - "CharmPlan": { + "DeleteSecretArg": { "type": "object", "properties": { - "required": { - "type": "boolean" + "label": { + "type": "string" + }, + "revisions": { + "type": "array", + "items": { + "type": "integer" + } + }, + "uri": { + "type": "string" } }, "additionalProperties": false, "required": [ - "required" + "uri", + "label" ] }, - "CharmRelation": { + "DeleteSecretArgs": { "type": "object", "properties": { - "interface": { - "type": "string" - }, - "limit": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "optional": { - "type": "boolean" - }, - "role": { - "type": "string" - }, - "scope": { - "type": "string" + "args": { + "type": "array", + "items": { + "$ref": "#/definitions/DeleteSecretArg" + } } }, "additionalProperties": false, "required": [ - "name", - "role", - "interface", - "optional", - "limit", - "scope" + "args" ] }, - "CharmResource": { + "Entities": { "type": "object", "properties": { - "description": { - "type": "string" - }, - "fingerprint": { + "entities": { "type": "array", "items": { - "type": "integer" + "$ref": "#/definitions/Entity" } - }, - "name": { - "type": "string" - }, - "origin": { - "type": "string" - }, - "path": { - "type": "string" - }, - "revision": { - "type": "integer" - }, - "size": { - "type": "integer" - }, - "type": { - "type": "string" } }, "additionalProperties": false, "required": [ - "name", - "type", - "path", - "origin", - "revision", - "fingerprint", - "size" + "entities" ] }, - "CharmResourceMeta": { + "Entity": { "type": "object", "properties": { - "description": { - "type": "string" - }, - "name": { - "type": "string" - }, - "path": { - "type": "string" - }, - "type": { + "tag": { "type": "string" } }, "additionalProperties": false, "required": [ - "name", - "type", - "path", - "description" + "tag" ] }, - "CharmResourceResult": { + "Error": { "type": "object", "properties": { - "CharmResource": { - "$ref": "#/definitions/CharmResource" - }, - "ErrorResult": { - "$ref": "#/definitions/ErrorResult" - }, - "description": { + "code": { "type": "string" }, - "error": { - "$ref": "#/definitions/Error" - }, - "fingerprint": { - "type": "array", - "items": { - "type": "integer" + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } } }, - "name": { - "type": "string" - }, - "origin": { - "type": "string" - }, - "path": { - "type": "string" - }, - "revision": { - "type": "integer" - }, - "size": { - "type": "integer" - }, - "type": { + "message": { "type": "string" } }, "additionalProperties": false, "required": [ - "ErrorResult", - "name", - "type", - "path", - "origin", - "revision", - "fingerprint", - "size", - "CharmResource" + "message", + "code" ] }, - "CharmResourcesResults": { + "ErrorResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "ErrorResults": { "type": "object", "properties": { "results": { "type": "array", "items": { - "type": "array", - "items": { - "$ref": "#/definitions/CharmResourceResult" - } + "$ref": "#/definitions/ErrorResult" } } }, @@ -5847,203 +41643,298 @@ "results" ] }, - "CharmStorage": { + "GetSecretConsumerInfoArgs": { "type": "object", "properties": { - "count-max": { - "type": "integer" - }, - "count-min": { - "type": "integer" - }, - "description": { - "type": "string" - }, - "location": { - "type": "string" - }, - "minimum-size": { - "type": "integer" - }, - "name": { + "consumer-tag": { "type": "string" }, - "properties": { + "uris": { "type": "array", "items": { "type": "string" } + } + }, + "additionalProperties": false, + "required": [ + "consumer-tag", + "uris" + ] + }, + "GetSecretContentArg": { + "type": "object", + "properties": { + "label": { + "type": "string" }, - "read-only": { + "peek": { "type": "boolean" }, - "shared": { + "refresh": { "type": "boolean" }, - "type": { + "uri": { "type": "string" } }, "additionalProperties": false, "required": [ - "name", - "description", - "type", - "shared", - "read-only", - "count-min", - "count-max", - "minimum-size" + "uri" ] }, - "CharmURL": { + "GetSecretContentArgs": { "type": "object", "properties": { - "url": { - "type": "string" + "args": { + "type": "array", + "items": { + "$ref": "#/definitions/GetSecretContentArg" + } } }, "additionalProperties": false, "required": [ - "url" + "args" ] }, - "CharmURLAndOrigin": { + "GrantRevokeSecretArg": { "type": "object", "properties": { - "charm-origin": { - "$ref": "#/definitions/CharmOrigin" + "role": { + "type": "string" }, - "charm-url": { + "scope-tag": { "type": "string" }, - "macaroon": { - "$ref": "#/definitions/Macaroon" + "subject-tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "uri": { + "type": "string" } }, "additionalProperties": false, "required": [ - "charm-url", - "charm-origin" + "uri", + "scope-tag", + "subject-tags", + "role" ] }, - "CharmURLAndOrigins": { + "GrantRevokeSecretArgs": { "type": "object", "properties": { - "entities": { + "args": { "type": "array", "items": { - "$ref": "#/definitions/CharmURLAndOrigin" + "$ref": "#/definitions/GrantRevokeSecretArg" + } + } + }, + "additionalProperties": false, + "required": [ + "args" + ] + }, + "ListSecretResult": { + "type": "object", + "properties": { + "access": { + "type": "array", + "items": { + "$ref": "#/definitions/AccessInfo" + } + }, + "create-time": { + "type": "string", + "format": "date-time" + }, + "description": { + "type": "string" + }, + "label": { + "type": "string" + }, + "latest-expire-time": { + "type": "string", + "format": "date-time" + }, + "latest-revision": { + "type": "integer" + }, + "next-rotate-time": { + "type": "string", + "format": "date-time" + }, + "owner-tag": { + "type": "string" + }, + "revisions": { + "type": "array", + "items": { + "$ref": "#/definitions/SecretRevision" } + }, + "rotate-policy": { + "type": "string" + }, + "update-time": { + "type": "string", + "format": "date-time" + }, + "uri": { + "type": "string" + }, + "value": { + "$ref": "#/definitions/SecretValueResult" + }, + "version": { + "type": "integer" } }, "additionalProperties": false, "required": [ - "entities" + "uri", + "version", + "owner-tag", + "latest-revision", + "create-time", + "update-time", + "revisions" ] }, - "CharmsList": { + "ListSecretResults": { "type": "object", "properties": { - "names": { + "results": { "type": "array", "items": { - "type": "string" + "$ref": "#/definitions/ListSecretResult" } } }, "additionalProperties": false, "required": [ - "names" + "results" ] }, - "CharmsListResult": { + "SecretBackendArgs": { "type": "object", "properties": { - "charm-urls": { + "backend-ids": { "type": "array", "items": { "type": "string" } + }, + "for-drain": { + "type": "boolean" } }, "additionalProperties": false, "required": [ - "charm-urls" + "for-drain", + "backend-ids" ] }, - "DownloadInfoResult": { + "SecretBackendConfig": { "type": "object", "properties": { - "charm-origin": { - "$ref": "#/definitions/CharmOrigin" + "params": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } }, - "url": { + "type": { "type": "string" } }, "additionalProperties": false, "required": [ - "url", - "charm-origin" + "type" ] }, - "DownloadInfoResults": { + "SecretBackendConfigResult": { "type": "object", "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/DownloadInfoResult" - } + "config": { + "$ref": "#/definitions/SecretBackendConfig" + }, + "draining": { + "type": "boolean" + }, + "model-controller": { + "type": "string" + }, + "model-name": { + "type": "string" + }, + "model-uuid": { + "type": "string" } }, "additionalProperties": false, "required": [ - "results" + "model-controller", + "model-uuid", + "model-name", + "draining" ] }, - "Error": { + "SecretBackendConfigResults": { "type": "object", "properties": { - "code": { + "active-id": { "type": "string" }, - "info": { + "results": { "type": "object", "patternProperties": { ".*": { - "type": "object", - "additionalProperties": true + "$ref": "#/definitions/SecretBackendConfigResult" } } - }, - "message": { - "type": "string" } }, "additionalProperties": false, "required": [ - "message", - "code" + "active-id" ] }, - "ErrorResult": { + "SecretConsumerInfoResult": { "type": "object", "properties": { "error": { "$ref": "#/definitions/Error" + }, + "label": { + "type": "string" + }, + "revision": { + "type": "integer" } }, - "additionalProperties": false + "additionalProperties": false, + "required": [ + "revision", + "label" + ] }, - "ErrorResults": { + "SecretConsumerInfoResults": { "type": "object", "properties": { "results": { "type": "array", "items": { - "$ref": "#/definitions/ErrorResult" + "$ref": "#/definitions/SecretConsumerInfoResult" } } }, @@ -6052,250 +41943,209 @@ "results" ] }, - "ExpressionTree": { + "SecretContentParams": { "type": "object", "properties": { - "Expression": { + "data": { "type": "object", - "additionalProperties": true + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "value-ref": { + "$ref": "#/definitions/SecretValueRef" + } + }, + "additionalProperties": false + }, + "SecretContentResult": { + "type": "object", + "properties": { + "backend-config": { + "$ref": "#/definitions/SecretBackendConfigResult" + }, + "content": { + "$ref": "#/definitions/SecretContentParams" + }, + "error": { + "$ref": "#/definitions/Error" + }, + "latest-revision": { + "type": "integer" } }, "additionalProperties": false, "required": [ - "Expression" + "content" ] }, - "IsMeteredResult": { + "SecretContentResults": { "type": "object", "properties": { - "metered": { - "type": "boolean" + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/SecretContentResult" + } } }, "additionalProperties": false, "required": [ - "metered" + "results" ] }, - "Macaroon": { - "type": "object", - "additionalProperties": false - }, - "ResolveCharmWithChannel": { + "SecretRevision": { "type": "object", "properties": { - "charm-origin": { - "$ref": "#/definitions/CharmOrigin" - }, - "reference": { + "backend-name": { "type": "string" }, - "switch-charm": { - "type": "boolean" + "create-time": { + "type": "string", + "format": "date-time" + }, + "expire-time": { + "type": "string", + "format": "date-time" + }, + "revision": { + "type": "integer" + }, + "update-time": { + "type": "string", + "format": "date-time" + }, + "value-ref": { + "$ref": "#/definitions/SecretValueRef" } }, "additionalProperties": false, "required": [ - "reference", - "charm-origin" + "revision" ] }, - "ResolveCharmWithChannelResult": { + "SecretRevisionArg": { "type": "object", "properties": { - "charm-origin": { - "$ref": "#/definitions/CharmOrigin" - }, - "error": { - "$ref": "#/definitions/Error" + "pending-delete": { + "type": "boolean" }, - "supported-bases": { + "revisions": { "type": "array", "items": { - "$ref": "#/definitions/Base" + "type": "integer" } }, - "url": { + "uri": { "type": "string" } }, "additionalProperties": false, "required": [ - "url", - "charm-origin", - "supported-bases" + "uri", + "revisions", + "pending-delete" ] }, - "ResolveCharmWithChannelResults": { + "SecretRotatedArg": { "type": "object", "properties": { - "Results": { - "type": "array", - "items": { - "$ref": "#/definitions/ResolveCharmWithChannelResult" - } + "original-revision": { + "type": "integer" + }, + "skip": { + "type": "boolean" + }, + "uri": { + "type": "string" } }, "additionalProperties": false, "required": [ - "Results" + "uri", + "original-revision", + "skip" ] }, - "ResolveCharmsWithChannel": { + "SecretRotatedArgs": { "type": "object", "properties": { - "macaroon": { - "$ref": "#/definitions/Macaroon" - }, - "resolve": { + "args": { "type": "array", "items": { - "$ref": "#/definitions/ResolveCharmWithChannel" + "$ref": "#/definitions/SecretRotatedArg" } } }, "additionalProperties": false, "required": [ - "resolve" + "args" ] - } - } - } - }, - { - "Name": "Client", - "Description": "Client serves client-specific API methods.", - "Version": 7, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "FindTools": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/FindToolsParams" - }, - "Result": { - "$ref": "#/definitions/FindToolsResult" - } - }, - "description": "FindTools returns a List containing all tools matching the given parameters.\nTODO(juju 3.1) - remove, used by 2.9 client only" }, - "FullStatus": { + "SecretTriggerChange": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/StatusParams" + "next-trigger-time": { + "type": "string", + "format": "date-time" }, - "Result": { - "$ref": "#/definitions/FullStatus" - } - }, - "description": "FullStatus gives the information needed for juju status over the api" - }, - "StatusHistory": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/StatusHistoryRequests" + "revision": { + "type": "integer" }, - "Result": { - "$ref": "#/definitions/StatusHistoryResults" + "uri": { + "type": "string" } }, - "description": "StatusHistory returns a slice of past statuses for several entities." + "additionalProperties": false, + "required": [ + "uri", + "next-trigger-time" + ] }, - "WatchAll": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/AllWatcherId" - } - }, - "description": "WatchAll initiates a watcher for entities in the connected model." - } - }, - "definitions": { - "AllWatcherId": { + "SecretTriggerWatchResult": { "type": "object", "properties": { + "changes": { + "type": "array", + "items": { + "$ref": "#/definitions/SecretTriggerChange" + } + }, + "error": { + "$ref": "#/definitions/Error" + }, "watcher-id": { "type": "string" } }, "additionalProperties": false, "required": [ - "watcher-id" + "watcher-id", + "changes" ] }, - "ApplicationOfferStatus": { + "SecretValueRef": { "type": "object", "properties": { - "active-connected-count": { - "type": "integer" - }, - "application-name": { - "type": "string" - }, - "charm": { + "backend-id": { "type": "string" }, - "endpoints": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/RemoteEndpoint" - } - } - }, - "err": { - "$ref": "#/definitions/Error" - }, - "offer-name": { + "revision-id": { "type": "string" - }, - "total-connected-count": { - "type": "integer" } }, "additionalProperties": false, "required": [ - "offer-name", - "application-name", - "charm", - "endpoints", - "active-connected-count", - "total-connected-count" + "backend-id", + "revision-id" ] }, - "ApplicationStatus": { + "SecretValueResult": { "type": "object", "properties": { - "base": { - "$ref": "#/definitions/Base" - }, - "can-upgrade-to": { - "type": "string" - }, - "charm": { - "type": "string" - }, - "charm-channel": { - "type": "string" - }, - "charm-profile": { - "type": "string" - }, - "charm-version": { - "type": "string" - }, - "endpoint-bindings": { + "data": { "type": "object", "patternProperties": { ".*": { @@ -6303,179 +42153,203 @@ } } }, - "err": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "StringResult": { + "type": "object", + "properties": { + "error": { "$ref": "#/definitions/Error" }, - "exposed": { - "type": "boolean" - }, - "exposed-endpoints": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/ExposedEndpoint" - } - } - }, - "int": { - "type": "integer" - }, - "life": { - "type": "string" - }, - "meter-statuses": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/MeterStatus" - } - } - }, - "provider-id": { - "type": "string" - }, - "public-address": { + "result": { "type": "string" - }, - "relations": { - "type": "object", - "patternProperties": { - ".*": { - "type": "array", - "items": { - "type": "string" - } - } + } + }, + "additionalProperties": false, + "required": [ + "result" + ] + }, + "StringResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/StringResult" } - }, - "status": { - "$ref": "#/definitions/DetailedStatus" - }, - "subordinate-to": { + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "StringsWatchResult": { + "type": "object", + "properties": { + "changes": { "type": "array", "items": { "type": "string" } }, - "units": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/UnitStatus" - } - } + "error": { + "$ref": "#/definitions/Error" }, - "workload-version": { + "watcher-id": { "type": "string" } }, "additionalProperties": false, "required": [ - "charm", - "charm-version", - "charm-profile", - "base", - "exposed", - "life", - "relations", - "can-upgrade-to", - "subordinate-to", - "units", - "meter-statuses", - "status", - "workload-version", - "endpoint-bindings", - "public-address" + "watcher-id" ] }, - "Base": { + "StringsWatchResults": { "type": "object", "properties": { - "channel": { - "type": "string" - }, - "name": { - "type": "string" + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/StringsWatchResult" + } } }, "additionalProperties": false, "required": [ - "name", - "channel" + "results" ] }, - "Binary": { + "UpdateSecretArg": { "type": "object", "properties": { - "Arch": { - "type": "string" + "UpsertSecretArg": { + "$ref": "#/definitions/UpsertSecretArg" }, - "Build": { - "type": "integer" + "content": { + "$ref": "#/definitions/SecretContentParams" }, - "Major": { - "type": "integer" + "description": { + "type": "string" }, - "Minor": { - "type": "integer" + "expire-time": { + "type": "string", + "format": "date-time" }, - "Number": { - "$ref": "#/definitions/Number" + "label": { + "type": "string" }, - "Patch": { - "type": "integer" + "params": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } }, - "Release": { + "rotate-policy": { "type": "string" }, - "Tag": { + "uri": { "type": "string" } }, "additionalProperties": false, "required": [ - "Major", - "Minor", - "Tag", - "Patch", - "Build", - "Number", - "Release", - "Arch" + "UpsertSecretArg", + "uri" ] }, - "BranchStatus": { + "UpdateSecretArgs": { + "type": "object", + "properties": { + "args": { + "type": "array", + "items": { + "$ref": "#/definitions/UpdateSecretArg" + } + } + }, + "additionalProperties": false, + "required": [ + "args" + ] + }, + "UpsertSecretArg": { "type": "object", "properties": { - "assigned-units": { + "content": { + "$ref": "#/definitions/SecretContentParams" + }, + "description": { + "type": "string" + }, + "expire-time": { + "type": "string", + "format": "date-time" + }, + "label": { + "type": "string" + }, + "params": { "type": "object", "patternProperties": { ".*": { - "type": "array", - "items": { - "type": "string" - } + "type": "object", + "additionalProperties": true } } }, - "created": { - "type": "integer" - }, - "created-by": { + "rotate-policy": { "type": "string" } }, - "additionalProperties": false, - "required": [ - "assigned-units", - "created", - "created-by" - ] + "additionalProperties": false + } + } + } + }, + { + "Name": "SecretsRevisionWatcher", + "Description": "srvSecretsRevisionWatcher defines the API wrapping a SecretsRevisionWatcher.", + "Version": 1, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "Next": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/SecretRevisionWatchResult" + } + }, + "description": "Next returns when a change has occurred to an entity of the\ncollection being watched since the most recent call to Next\nor the Watch call that created the srvSecretRotationWatcher." }, - "DetailedStatus": { + "Stop": { + "type": "object", + "description": "Stop stops the watcher." + } + }, + "definitions": { + "Error": { "type": "object", "properties": { - "data": { + "code": { + "type": "string" + }, + "info": { "type": "object", "patternProperties": { ".*": { @@ -6484,94 +42358,85 @@ } } }, - "err": { - "$ref": "#/definitions/Error" - }, - "info": { - "type": "string" - }, - "kind": { - "type": "string" - }, - "life": { - "type": "string" - }, - "since": { - "type": "string", - "format": "date-time" - }, - "status": { - "type": "string" - }, - "version": { + "message": { "type": "string" } }, "additionalProperties": false, "required": [ - "status", - "info", - "data", - "since", - "kind", - "version", - "life" + "message", + "code" ] }, - "EndpointStatus": { + "SecretRevisionChange": { "type": "object", "properties": { - "application": { - "type": "string" - }, - "name": { - "type": "string" + "revision": { + "type": "integer" }, - "role": { + "uri": { "type": "string" - }, - "subordinate": { - "type": "boolean" } }, "additionalProperties": false, "required": [ - "application", - "name", - "role", - "subordinate" + "uri", + "revision" ] }, - "EntityStatus": { + "SecretRevisionWatchResult": { "type": "object", "properties": { - "data": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } + "changes": { + "type": "array", + "items": { + "$ref": "#/definitions/SecretRevisionChange" } }, - "info": { - "type": "string" - }, - "since": { - "type": "string", - "format": "date-time" + "error": { + "$ref": "#/definitions/Error" }, - "status": { + "watcher-id": { "type": "string" } }, "additionalProperties": false, "required": [ - "status", - "info", - "since" + "watcher-id", + "changes" ] + } + } + } + }, + { + "Name": "SecretsTriggerWatcher", + "Description": "srvSecretTriggerWatcher defines the API wrapping a SecretsTriggerWatcher.", + "Version": 1, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "Next": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/SecretTriggerWatchResult" + } + }, + "description": "Next returns when a change has occurred to an entity of the\ncollection being watched since the most recent call to Next\nor the Watch call that created the srvSecretRotationWatcher." }, + "Stop": { + "type": "object", + "description": "Stop stops the watcher." + } + }, + "definitions": { "Error": { "type": "object", "properties": { @@ -6597,724 +42462,585 @@ "code" ] }, - "ExposedEndpoint": { + "SecretTriggerChange": { "type": "object", "properties": { - "expose-to-cidrs": { - "type": "array", - "items": { - "type": "string" - } + "next-trigger-time": { + "type": "string", + "format": "date-time" }, - "expose-to-spaces": { - "type": "array", - "items": { - "type": "string" - } + "revision": { + "type": "integer" + }, + "uri": { + "type": "string" } }, - "additionalProperties": false + "additionalProperties": false, + "required": [ + "uri", + "next-trigger-time" + ] }, - "FilesystemAttachmentDetails": { + "SecretTriggerWatchResult": { "type": "object", "properties": { - "FilesystemAttachmentInfo": { - "$ref": "#/definitions/FilesystemAttachmentInfo" + "changes": { + "type": "array", + "items": { + "$ref": "#/definitions/SecretTriggerChange" + } }, - "life": { - "type": "string" + "error": { + "$ref": "#/definitions/Error" }, - "mount-point": { + "watcher-id": { "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "watcher-id", + "changes" + ] + } + } + } + }, + { + "Name": "Singular", + "Description": "Facade allows controller machines to request exclusive rights to administer\nsome specific model or controller for a limited time.", + "Version": 2, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "Claim": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/SingularClaims" }, - "read-only": { - "type": "boolean" + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "Claim makes the supplied singular-controller lease requests. (In practice,\nany requests not for the connection's model or controller, or not on behalf\nof the connected ModelManager machine, will be rejected.)" + }, + "Wait": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "Wait waits for the singular-controller lease to expire for all supplied\nentities. (In practice, any requests that do not refer to the connection's\nmodel or controller will be rejected.)" + } + }, + "definitions": { + "Entities": { + "type": "object", + "properties": { + "entities": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } } }, "additionalProperties": false, "required": [ - "FilesystemAttachmentInfo" + "entities" ] }, - "FilesystemAttachmentInfo": { + "Entity": { "type": "object", "properties": { - "mount-point": { + "tag": { "type": "string" - }, - "read-only": { - "type": "boolean" } }, - "additionalProperties": false + "additionalProperties": false, + "required": [ + "tag" + ] }, - "FilesystemDetails": { + "Error": { "type": "object", "properties": { - "filesystem-tag": { + "code": { "type": "string" }, "info": { - "$ref": "#/definitions/FilesystemInfo" - }, - "life": { - "type": "string" - }, - "machine-attachments": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/FilesystemAttachmentDetails" - } - } - }, - "status": { - "$ref": "#/definitions/EntityStatus" - }, - "storage": { - "$ref": "#/definitions/StorageDetails" - }, - "unit-attachments": { "type": "object", "patternProperties": { ".*": { - "$ref": "#/definitions/FilesystemAttachmentDetails" + "type": "object", + "additionalProperties": true } } }, - "volume-tag": { + "message": { "type": "string" } }, "additionalProperties": false, "required": [ - "filesystem-tag", - "info", - "status" + "message", + "code" ] }, - "FilesystemInfo": { + "ErrorResult": { "type": "object", "properties": { - "filesystem-id": { - "type": "string" - }, - "pool": { - "type": "string" - }, - "size": { - "type": "integer" + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "ErrorResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResult" + } } }, "additionalProperties": false, "required": [ - "filesystem-id", - "pool", - "size" + "results" ] }, - "FindToolsParams": { + "SingularClaim": { "type": "object", "properties": { - "agentstream": { - "type": "string" - }, - "arch": { + "claimant-tag": { "type": "string" }, - "major": { + "duration": { "type": "integer" }, - "number": { - "$ref": "#/definitions/Number" - }, - "os-type": { + "entity-tag": { "type": "string" } }, "additionalProperties": false, "required": [ - "number", - "major", - "arch", - "os-type", - "agentstream" + "entity-tag", + "claimant-tag", + "duration" ] }, - "FindToolsResult": { + "SingularClaims": { "type": "object", "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "list": { + "claims": { "type": "array", "items": { - "$ref": "#/definitions/Tools" + "$ref": "#/definitions/SingularClaim" } } }, "additionalProperties": false, "required": [ - "list" + "claims" ] - }, - "FullStatus": { + } + } + } + }, + { + "Name": "Spaces", + "Description": "API provides the spaces API facade for version 6.", + "Version": 6, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "CreateSpaces": { "type": "object", "properties": { - "applications": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/ApplicationStatus" - } - } - }, - "branches": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/BranchStatus" - } - } - }, - "controller-timestamp": { - "type": "string", - "format": "date-time" + "Params": { + "$ref": "#/definitions/CreateSpacesParams" }, - "filesystems": { - "type": "array", - "items": { - "$ref": "#/definitions/FilesystemDetails" - } + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "CreateSpaces creates a new Juju network space, associating the\nspecified subnets with it (optional; can be empty)." + }, + "ListSpaces": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/ListSpacesResults" + } + }, + "description": "ListSpaces lists all the available spaces and their associated subnets." + }, + "MoveSubnets": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/MoveSubnetsParams" }, - "machines": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/MachineStatus" - } - } + "Result": { + "$ref": "#/definitions/MoveSubnetsResults" + } + }, + "description": "MoveSubnets ensures that the input subnets are in the input space." + }, + "ReloadSpaces": { + "type": "object", + "description": "ReloadSpaces refreshes spaces from substrate" + }, + "RemoveSpace": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/RemoveSpaceParams" }, - "model": { - "$ref": "#/definitions/ModelStatusInfo" + "Result": { + "$ref": "#/definitions/RemoveSpaceResults" + } + }, + "description": "RemoveSpace removes a space.\nReturns SpaceResults if entities/settings are found which makes the deletion not possible." + }, + "RenameSpace": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/RenameSpacesParams" }, - "offers": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/ApplicationOfferStatus" - } - } + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "RenameSpace renames a space." + }, + "ShowSpace": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" }, - "relations": { + "Result": { + "$ref": "#/definitions/ShowSpaceResults" + } + }, + "description": "ShowSpace shows the spaces for a set of given entities." + } + }, + "definitions": { + "CreateSpaceParams": { + "type": "object", + "properties": { + "cidrs": { "type": "array", "items": { - "$ref": "#/definitions/RelationStatus" + "type": "string" } }, - "remote-applications": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/RemoteApplicationStatus" - } - } + "provider-id": { + "type": "string" }, - "storage": { - "type": "array", - "items": { - "$ref": "#/definitions/StorageDetails" - } + "public": { + "type": "boolean" }, - "volumes": { + "space-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "cidrs", + "space-tag", + "public" + ] + }, + "CreateSpacesParams": { + "type": "object", + "properties": { + "spaces": { "type": "array", "items": { - "$ref": "#/definitions/VolumeDetails" + "$ref": "#/definitions/CreateSpaceParams" } } }, "additionalProperties": false, "required": [ - "model", - "machines", - "applications", - "remote-applications", - "offers", - "relations", - "controller-timestamp", - "branches" + "spaces" ] }, - "History": { + "Entities": { "type": "object", "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "statuses": { + "entities": { "type": "array", "items": { - "$ref": "#/definitions/DetailedStatus" + "$ref": "#/definitions/Entity" } } }, "additionalProperties": false, "required": [ - "statuses" + "entities" ] }, - "LXDProfile": { + "Entity": { "type": "object", "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "description": { + "tag": { "type": "string" - }, - "devices": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - } - } } }, "additionalProperties": false, "required": [ - "config", - "description", - "devices" + "tag" ] }, - "MachineStatus": { + "Error": { "type": "object", "properties": { - "agent-status": { - "$ref": "#/definitions/DetailedStatus" - }, - "base": { - "$ref": "#/definitions/Base" - }, - "constraints": { + "code": { "type": "string" }, - "containers": { + "info": { "type": "object", "patternProperties": { ".*": { - "$ref": "#/definitions/MachineStatus" + "type": "object", + "additionalProperties": true } } }, - "display-name": { - "type": "string" - }, - "dns-name": { - "type": "string" - }, - "hardware": { - "type": "string" - }, - "has-vote": { - "type": "boolean" - }, - "hostname": { - "type": "string" - }, - "id": { - "type": "string" - }, - "instance-id": { + "message": { "type": "string" - }, - "instance-status": { - "$ref": "#/definitions/DetailedStatus" - }, - "ip-addresses": { - "type": "array", - "items": { - "type": "string" - } - }, - "jobs": { - "type": "array", - "items": { - "type": "string" - } - }, - "lxd-profiles": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/LXDProfile" - } - } - }, - "modification-status": { - "$ref": "#/definitions/DetailedStatus" - }, - "network-interfaces": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/NetworkInterface" - } - } - }, - "primary-controller-machine": { - "type": "boolean" - }, - "wants-vote": { - "type": "boolean" } }, "additionalProperties": false, "required": [ - "agent-status", - "instance-status", - "modification-status", - "dns-name", - "instance-id", - "display-name", - "base", - "id", - "containers", - "constraints", - "hardware", - "jobs", - "has-vote", - "wants-vote" + "message", + "code" ] }, - "MeterStatus": { + "ErrorResult": { "type": "object", "properties": { - "color": { - "type": "string" - }, - "message": { - "type": "string" + "error": { + "$ref": "#/definitions/Error" } }, - "additionalProperties": false, - "required": [ - "color", - "message" - ] + "additionalProperties": false }, - "ModelStatusInfo": { + "ErrorResults": { "type": "object", "properties": { - "available-version": { - "type": "string" - }, - "cloud-tag": { - "type": "string" - }, - "meter-status": { - "$ref": "#/definitions/MeterStatus" - }, - "model-status": { - "$ref": "#/definitions/DetailedStatus" - }, - "name": { - "type": "string" - }, - "region": { - "type": "string" - }, - "sla": { - "type": "string" - }, - "type": { - "type": "string" - }, - "version": { - "type": "string" + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResult" + } } }, "additionalProperties": false, "required": [ - "name", - "type", - "cloud-tag", - "version", - "available-version", - "model-status", - "meter-status", - "sla" + "results" ] }, - "NetworkInterface": { + "ListSpacesResults": { "type": "object", "properties": { - "dns-nameservers": { - "type": "array", - "items": { - "type": "string" - } - }, - "gateway": { - "type": "string" - }, - "ip-addresses": { + "results": { "type": "array", "items": { - "type": "string" + "$ref": "#/definitions/Space" } - }, - "is-up": { - "type": "boolean" - }, - "mac-address": { - "type": "string" - }, - "space": { - "type": "string" } }, "additionalProperties": false, "required": [ - "ip-addresses", - "mac-address", - "is-up" + "results" ] }, - "Number": { + "MoveSubnetsParam": { "type": "object", "properties": { - "Build": { - "type": "integer" - }, - "Major": { - "type": "integer" - }, - "Minor": { - "type": "integer" - }, - "Patch": { - "type": "integer" + "force": { + "type": "boolean" }, - "Tag": { + "space-tag": { "type": "string" + }, + "subnets": { + "type": "array", + "items": { + "type": "string" + } } }, "additionalProperties": false, "required": [ - "Major", - "Minor", - "Tag", - "Patch", - "Build" + "subnets", + "space-tag", + "force" ] }, - "RelationStatus": { + "MoveSubnetsParams": { "type": "object", "properties": { - "endpoints": { + "args": { "type": "array", "items": { - "$ref": "#/definitions/EndpointStatus" + "$ref": "#/definitions/MoveSubnetsParam" } - }, - "id": { - "type": "integer" - }, - "interface": { - "type": "string" - }, - "key": { - "type": "string" - }, - "scope": { - "type": "string" - }, - "status": { - "$ref": "#/definitions/DetailedStatus" } }, "additionalProperties": false, "required": [ - "id", - "key", - "interface", - "scope", - "endpoints", - "status" + "args" ] }, - "RemoteApplicationStatus": { + "MoveSubnetsResult": { "type": "object", "properties": { - "endpoints": { + "error": { + "$ref": "#/definitions/Error" + }, + "moved-subnets": { "type": "array", "items": { - "$ref": "#/definitions/RemoteEndpoint" + "$ref": "#/definitions/MovedSubnet" } }, - "err": { - "$ref": "#/definitions/Error" - }, - "life": { - "type": "string" - }, - "offer-name": { - "type": "string" - }, - "offer-url": { + "new-space": { "type": "string" - }, - "relations": { - "type": "object", - "patternProperties": { - ".*": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "status": { - "$ref": "#/definitions/DetailedStatus" } }, "additionalProperties": false, "required": [ - "offer-url", - "offer-name", - "endpoints", - "life", - "relations", - "status" + "new-space" ] }, - "RemoteEndpoint": { + "MoveSubnetsResults": { "type": "object", "properties": { - "interface": { - "type": "string" - }, - "limit": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "role": { - "type": "string" + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/MoveSubnetsResult" + } } }, "additionalProperties": false, "required": [ - "name", - "role", - "interface", - "limit" + "results" ] }, - "StatusHistoryFilter": { + "MovedSubnet": { "type": "object", "properties": { - "date": { - "type": "string", - "format": "date-time" - }, - "delta": { - "type": "integer" + "cidr": { + "type": "string" }, - "exclude": { - "type": "array", - "items": { - "type": "string" - } + "old-space": { + "type": "string" }, - "size": { - "type": "integer" + "subnet": { + "type": "string" } }, "additionalProperties": false, "required": [ - "size", - "date", - "delta", - "exclude" + "subnet", + "old-space", + "cidr" ] }, - "StatusHistoryRequest": { + "RemoveSpaceParam": { "type": "object", "properties": { - "filter": { - "$ref": "#/definitions/StatusHistoryFilter" - }, - "historyKind": { - "type": "string" + "dry-run": { + "type": "boolean" }, - "size": { - "type": "integer" + "force": { + "type": "boolean" }, - "tag": { - "type": "string" + "space": { + "$ref": "#/definitions/Entity" } }, "additionalProperties": false, "required": [ - "historyKind", - "size", - "filter", - "tag" + "space" ] }, - "StatusHistoryRequests": { + "RemoveSpaceParams": { "type": "object", "properties": { - "requests": { + "space-param": { "type": "array", "items": { - "$ref": "#/definitions/StatusHistoryRequest" + "$ref": "#/definitions/RemoveSpaceParam" } } }, "additionalProperties": false, "required": [ - "requests" + "space-param" ] }, - "StatusHistoryResult": { + "RemoveSpaceResult": { "type": "object", "properties": { + "bindings": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } + }, + "constraints": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } + }, + "controller-settings": { + "type": "array", + "items": { + "type": "string" + } + }, "error": { "$ref": "#/definitions/Error" - }, - "history": { - "$ref": "#/definitions/History" } }, - "additionalProperties": false, - "required": [ - "history" - ] + "additionalProperties": false }, - "StatusHistoryResults": { + "RemoveSpaceResults": { "type": "object", "properties": { "results": { "type": "array", "items": { - "$ref": "#/definitions/StatusHistoryResult" + "$ref": "#/definitions/RemoveSpaceResult" } } }, @@ -7323,757 +43049,595 @@ "results" ] }, - "StatusParams": { + "RenameSpaceParams": { "type": "object", "properties": { - "include-storage": { - "type": "boolean" + "from-space-tag": { + "type": "string" }, - "patterns": { - "type": "array", - "items": { - "type": "string" - } + "to-space-tag": { + "type": "string" } }, "additionalProperties": false, "required": [ - "patterns" + "from-space-tag", + "to-space-tag" ] }, - "StorageAttachmentDetails": { + "RenameSpacesParams": { "type": "object", "properties": { - "life": { - "type": "string" - }, - "location": { - "type": "string" - }, - "machine-tag": { - "type": "string" - }, - "storage-tag": { - "type": "string" - }, - "unit-tag": { - "type": "string" + "changes": { + "type": "array", + "items": { + "$ref": "#/definitions/RenameSpaceParams" + } } }, "additionalProperties": false, "required": [ - "storage-tag", - "unit-tag", - "machine-tag" + "changes" ] }, - "StorageDetails": { + "ShowSpaceResult": { "type": "object", "properties": { - "attachments": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/StorageAttachmentDetails" - } + "applications": { + "type": "array", + "items": { + "type": "string" } }, - "kind": { - "type": "integer" - }, - "life": { - "type": "string" - }, - "owner-tag": { - "type": "string" - }, - "persistent": { - "type": "boolean" + "error": { + "$ref": "#/definitions/Error" }, - "status": { - "$ref": "#/definitions/EntityStatus" + "machine-count": { + "type": "integer" }, - "storage-tag": { - "type": "string" + "space": { + "$ref": "#/definitions/Space" } }, "additionalProperties": false, "required": [ - "storage-tag", - "owner-tag", - "kind", - "status", - "persistent" + "space", + "applications", + "machine-count" ] }, - "Tools": { + "ShowSpaceResults": { "type": "object", "properties": { - "sha256": { - "type": "string" - }, - "size": { - "type": "integer" - }, - "url": { - "type": "string" - }, - "version": { - "$ref": "#/definitions/Binary" + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ShowSpaceResult" + } } }, "additionalProperties": false, "required": [ - "version", - "url", - "size" + "results" ] }, - "UnitStatus": { + "Space": { "type": "object", "properties": { - "address": { - "type": "string" - }, - "agent-status": { - "$ref": "#/definitions/DetailedStatus" + "error": { + "$ref": "#/definitions/Error" }, - "charm": { + "id": { "type": "string" }, - "leader": { - "type": "boolean" - }, - "machine": { + "name": { "type": "string" }, - "opened-ports": { + "subnets": { "type": "array", "items": { - "type": "string" - } - }, - "provider-id": { - "type": "string" - }, - "public-address": { - "type": "string" - }, - "subordinates": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/UnitStatus" - } + "$ref": "#/definitions/Subnet" } - }, - "workload-status": { - "$ref": "#/definitions/DetailedStatus" - }, - "workload-version": { - "type": "string" } }, "additionalProperties": false, "required": [ - "agent-status", - "workload-status", - "workload-version", - "machine", - "opened-ports", - "public-address", - "charm", - "subordinates" + "id", + "name", + "subnets" ] }, - "VolumeAttachmentDetails": { + "Subnet": { "type": "object", "properties": { - "VolumeAttachmentInfo": { - "$ref": "#/definitions/VolumeAttachmentInfo" + "cidr": { + "type": "string" }, - "bus-address": { + "life": { "type": "string" }, - "device-link": { + "provider-id": { "type": "string" }, - "device-name": { + "provider-network-id": { "type": "string" }, - "life": { + "provider-space-id": { "type": "string" }, - "plan-info": { - "$ref": "#/definitions/VolumeAttachmentPlanInfo" + "space-tag": { + "type": "string" }, - "read-only": { - "type": "boolean" + "status": { + "type": "string" + }, + "vlan-tag": { + "type": "integer" + }, + "zones": { + "type": "array", + "items": { + "type": "string" + } } }, "additionalProperties": false, "required": [ - "VolumeAttachmentInfo" + "cidr", + "vlan-tag", + "life", + "space-tag", + "zones" ] - }, - "VolumeAttachmentInfo": { + } + } + } + }, + { + "Name": "StatusHistory", + "Description": "API is the concrete implementation of the Pruner endpoint.", + "Version": 2, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "ModelConfig": { "type": "object", "properties": { - "bus-address": { - "type": "string" - }, - "device-link": { - "type": "string" - }, - "device-name": { - "type": "string" - }, - "plan-info": { - "$ref": "#/definitions/VolumeAttachmentPlanInfo" - }, - "read-only": { - "type": "boolean" + "Result": { + "$ref": "#/definitions/ModelConfigResult" } }, - "additionalProperties": false + "description": "ModelConfig returns the current model's configuration." }, - "VolumeAttachmentPlanInfo": { + "Prune": { "type": "object", "properties": { - "device-attributes": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "device-type": { - "type": "string" + "Params": { + "$ref": "#/definitions/StatusHistoryPruneArgs" } }, - "additionalProperties": false + "description": "Prune endpoint removes status history entries until\nonly the ones newer than now - p.MaxHistoryTime remain and\nthe history is smaller than p.MaxHistoryMB." }, - "VolumeDetails": { + "WatchForModelConfigChanges": { "type": "object", "properties": { - "info": { - "$ref": "#/definitions/VolumeInfo" - }, - "life": { + "Result": { + "$ref": "#/definitions/NotifyWatchResult" + } + }, + "description": "WatchForModelConfigChanges returns a NotifyWatcher that observes\nchanges to the model configuration.\nNote that although the NotifyWatchResult contains an Error field,\nit's not used because we are only returning a single watcher,\nso we use the regular error return." + } + }, + "definitions": { + "Error": { + "type": "object", + "properties": { + "code": { "type": "string" }, - "machine-attachments": { + "info": { "type": "object", "patternProperties": { ".*": { - "$ref": "#/definitions/VolumeAttachmentDetails" + "type": "object", + "additionalProperties": true } } }, - "status": { - "$ref": "#/definitions/EntityStatus" - }, - "storage": { - "$ref": "#/definitions/StorageDetails" - }, - "unit-attachments": { + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "code" + ] + }, + "ModelConfigResult": { + "type": "object", + "properties": { + "config": { "type": "object", "patternProperties": { ".*": { - "$ref": "#/definitions/VolumeAttachmentDetails" + "type": "object", + "additionalProperties": true } } - }, - "volume-tag": { - "type": "string" } }, "additionalProperties": false, "required": [ - "volume-tag", - "info", - "status" + "config" ] }, - "VolumeInfo": { + "NotifyWatchResult": { "type": "object", "properties": { - "hardware-id": { - "type": "string" - }, - "persistent": { - "type": "boolean" - }, - "pool": { + "NotifyWatcherId": { "type": "string" }, - "size": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false, + "required": [ + "NotifyWatcherId" + ] + }, + "StatusHistoryPruneArgs": { + "type": "object", + "properties": { + "max-history-mb": { "type": "integer" }, - "volume-id": { - "type": "string" - }, - "wwn": { - "type": "string" + "max-history-time": { + "type": "integer" } }, "additionalProperties": false, "required": [ - "volume-id", - "size", - "persistent" + "max-history-time", + "max-history-mb" ] } } } }, { - "Name": "Cloud", - "Description": "CloudAPI implements the cloud interface and is the concrete implementation\nof the api end point.", - "Version": 7, + "Name": "Storage", + "Description": "StorageAPI implements the latest version (v6) of the Storage API.", + "Version": 6, "AvailableTo": [ "controller-machine-agent", "machine-agent", "unit-agent", - "controller-user" + "model-user" ], "Schema": { "type": "object", "properties": { - "AddCloud": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/AddCloudArgs" - } - }, - "description": "AddCloud adds a new cloud, different from the one managed by the controller." - }, - "AddCredentials": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/TaggedCredentials" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "AddCredentials adds new credentials.\nIn contrast to UpdateCredentials() below, the new credentials can be\nfor a cloud that the controller does not manage (this is required\nfor CAAS models)" - }, - "CheckCredentialsModels": { + "AddToUnit": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/TaggedCredentials" + "$ref": "#/definitions/StoragesAddParams" }, "Result": { - "$ref": "#/definitions/UpdateCredentialResults" + "$ref": "#/definitions/AddStorageResults" } }, - "description": "CheckCredentialsModels validates supplied cloud credentials' content against\nmodels that currently use these credentials.\nIf there are any models that are using a credential and these models or their\ncloud instances are not going to be accessible with corresponding credential,\nthere will be detailed validation errors per model.\nThere's no Juju API client which uses this, but JAAS does," + "description": "AddToUnit validates and creates additional storage instances for units.\nA \"CHANGE\" block can block this operation." }, - "Cloud": { + "Attach": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/Entities" + "$ref": "#/definitions/StorageAttachmentIds" }, "Result": { - "$ref": "#/definitions/CloudResults" + "$ref": "#/definitions/ErrorResults" } }, - "description": "Cloud returns the cloud definitions for the specified clouds." + "description": "Attach attaches existing storage instances to units.\nA \"CHANGE\" block can block this operation." }, - "CloudInfo": { + "CreatePool": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/Entities" + "$ref": "#/definitions/StoragePoolArgs" }, "Result": { - "$ref": "#/definitions/CloudInfoResults" - } - }, - "description": "CloudInfo returns information about the specified clouds." - }, - "Clouds": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/CloudsResult" + "$ref": "#/definitions/ErrorResults" } }, - "description": "Clouds returns the definitions of all clouds supported by the controller\nthat the logged in user can see." + "description": "CreatePool creates a new pool with specified parameters." }, - "Credential": { + "DetachStorage": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/Entities" + "$ref": "#/definitions/StorageDetachmentParams" }, "Result": { - "$ref": "#/definitions/CloudCredentialResults" + "$ref": "#/definitions/ErrorResults" } }, - "description": "Credential returns the specified cloud credential for each tag, minus secrets." + "description": "DetachStorage sets the specified storage attachments to Dying, unless they are\nalready Dying or Dead. Any associated, persistent storage will remain\nalive. This call can be forced." }, - "CredentialContents": { + "Import": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/CloudCredentialArgs" + "$ref": "#/definitions/BulkImportStorageParams" }, "Result": { - "$ref": "#/definitions/CredentialContentResults" + "$ref": "#/definitions/ImportStorageResults" } }, - "description": "CredentialContents returns the specified cloud credentials,\nincluding the secrets if requested.\nIf no specific credential name/cloud was passed in, all credentials for this user\nare returned.\nOnly credential owner can see its contents as well as what models use it.\nController admin has no special superpowers here and is treated the same as all other users." + "description": "Import imports existing storage into the model.\nA \"CHANGE\" block can block this operation." }, - "InstanceTypes": { + "ListFilesystems": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/CloudInstanceTypesConstraints" + "$ref": "#/definitions/FilesystemFilters" }, "Result": { - "$ref": "#/definitions/InstanceTypesResults" + "$ref": "#/definitions/FilesystemDetailsListResults" } }, - "description": "InstanceTypes returns instance type information for the cloud and region\nin which the current model is deployed." + "description": "ListFilesystems returns a list of filesystems in the environment matching\nthe provided filter. Each result describes a filesystem in detail, including\nthe filesystem's attachments." }, - "ListCloudInfo": { + "ListPools": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/ListCloudsRequest" + "$ref": "#/definitions/StoragePoolFilters" }, "Result": { - "$ref": "#/definitions/ListCloudInfoResults" + "$ref": "#/definitions/StoragePoolsResults" } }, - "description": "ListCloudInfo returns clouds that the specified user has access to.\nController admins (superuser) can list clouds for any user.\nOther users can only ask about their own clouds." + "description": "ListPools returns a list of pools.\nIf filter is provided, returned list only contains pools that match\nthe filter.\nPools can be filtered on names and provider types.\nIf both names and types are provided as filter,\npools that match either are returned.\nThis method lists union of pools and environment provider types.\nIf no filter is provided, all pools are returned." }, - "ModifyCloudAccess": { + "ListStorageDetails": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/ModifyCloudAccessRequest" + "$ref": "#/definitions/StorageFilters" }, "Result": { - "$ref": "#/definitions/ErrorResults" + "$ref": "#/definitions/StorageDetailsListResults" } }, - "description": "ModifyCloudAccess changes the model access granted to users." + "description": "ListStorageDetails returns storage matching a filter." }, - "RemoveClouds": { + "ListVolumes": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/Entities" + "$ref": "#/definitions/VolumeFilters" }, "Result": { - "$ref": "#/definitions/ErrorResults" + "$ref": "#/definitions/VolumeDetailsListResults" } }, - "description": "RemoveClouds removes the specified clouds from the controller.\nIf a cloud is in use (has models deployed to it), the removal will fail." + "description": "ListVolumes lists volumes with the given filters. Each filter produces\nan independent list of volumes, or an error if the filter is invalid\nor the volumes could not be listed." }, - "RevokeCredentialsCheckModels": { + "Remove": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/RevokeCredentialArgs" + "$ref": "#/definitions/RemoveStorage" }, "Result": { "$ref": "#/definitions/ErrorResults" } }, - "description": "RevokeCredentialsCheckModels revokes a set of cloud credentials.\nIf the credentials are used by any of the models, the credential deletion will be aborted.\nIf credential-in-use needs to be revoked nonetheless, this method allows the use of force." + "description": "Remove sets the specified storage entities to Dying, unless they are\nalready Dying or Dead, such that the storage will eventually be removed\nfrom the model. If the arguments specify that the storage should be\ndestroyed, then the associated cloud storage will be destroyed first;\notherwise it will only be released from Juju's control." }, - "UpdateCloud": { + "RemovePool": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/UpdateCloudArgs" + "$ref": "#/definitions/StoragePoolDeleteArgs" }, "Result": { "$ref": "#/definitions/ErrorResults" } }, - "description": "UpdateCloud updates an existing cloud that the controller knows about." + "description": "RemovePool deletes the named pool" }, - "UpdateCredentialsCheckModels": { + "StorageDetails": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/UpdateCredentialArgs" + "$ref": "#/definitions/Entities" }, "Result": { - "$ref": "#/definitions/UpdateCredentialResults" + "$ref": "#/definitions/StorageDetailsResults" } }, - "description": "UpdateCredentialsCheckModels updates a set of cloud credentials' content.\nIf there are any models that are using a credential and these models\nare not going to be visible with updated credential content,\nthere will be detailed validation errors per model. Such model errors are returned\nseparately and do not contribute to the overall method error status.\nController admins can 'force' an update of the credential\nregardless of whether it is deemed valid or not." + "description": "StorageDetails retrieves and returns detailed information about desired\nstorage identified by supplied tags. If specified storage cannot be\nretrieved, individual error is returned instead of storage information." }, - "UserCredentials": { + "UpdatePool": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/UserClouds" + "$ref": "#/definitions/StoragePoolArgs" }, "Result": { - "$ref": "#/definitions/StringsResults" + "$ref": "#/definitions/ErrorResults" } }, - "description": "UserCredentials returns the cloud credentials for a set of users." + "description": "UpdatePool deletes the named pool" } }, "definitions": { - "AddCloudArgs": { - "type": "object", - "properties": { - "cloud": { - "$ref": "#/definitions/Cloud" - }, - "force": { - "type": "boolean" - }, - "name": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "cloud", - "name" - ] - }, - "Cloud": { + "AddStorageDetails": { "type": "object", "properties": { - "auth-types": { - "type": "array", - "items": { - "type": "string" - } - }, - "ca-certificates": { + "storage-tags": { "type": "array", "items": { "type": "string" } - }, - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "endpoint": { - "type": "string" - }, - "host-cloud-region": { - "type": "string" - }, - "identity-endpoint": { - "type": "string" - }, - "is-controller-cloud": { - "type": "boolean" - }, - "region-config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - } - } - }, - "regions": { - "type": "array", - "items": { - "$ref": "#/definitions/CloudRegion" - } - }, - "skip-tls-verify": { - "type": "boolean" - }, - "storage-endpoint": { - "type": "string" - }, - "type": { - "type": "string" } }, "additionalProperties": false, "required": [ - "type" + "storage-tags" ] }, - "CloudCredential": { + "AddStorageResult": { "type": "object", "properties": { - "attrs": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "auth-type": { - "type": "string" + "error": { + "$ref": "#/definitions/Error" }, - "redacted": { - "type": "array", - "items": { - "type": "string" - } + "result": { + "$ref": "#/definitions/AddStorageDetails" } }, - "additionalProperties": false, - "required": [ - "auth-type" - ] + "additionalProperties": false }, - "CloudCredentialArg": { + "AddStorageResults": { "type": "object", "properties": { - "cloud-name": { - "type": "string" - }, - "credential-name": { - "type": "string" + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/AddStorageResult" + } } }, "additionalProperties": false, "required": [ - "cloud-name", - "credential-name" + "results" ] }, - "CloudCredentialArgs": { + "BulkImportStorageParams": { "type": "object", "properties": { - "credentials": { + "storage": { "type": "array", "items": { - "$ref": "#/definitions/CloudCredentialArg" + "$ref": "#/definitions/ImportStorageParams" } - }, - "include-secrets": { - "type": "boolean" } }, "additionalProperties": false, "required": [ - "include-secrets" + "storage" ] }, - "CloudCredentialResult": { + "Entities": { "type": "object", "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/CloudCredential" + "entities": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } } }, - "additionalProperties": false + "additionalProperties": false, + "required": [ + "entities" + ] }, - "CloudCredentialResults": { + "Entity": { "type": "object", "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/CloudCredentialResult" - } + "tag": { + "type": "string" } }, - "additionalProperties": false + "additionalProperties": false, + "required": [ + "tag" + ] }, - "CloudDetails": { + "EntityStatus": { "type": "object", "properties": { - "auth-types": { - "type": "array", - "items": { - "type": "string" + "data": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } } }, - "endpoint": { - "type": "string" - }, - "identity-endpoint": { + "info": { "type": "string" }, - "regions": { - "type": "array", - "items": { - "$ref": "#/definitions/CloudRegion" - } - }, - "storage-endpoint": { - "type": "string" + "since": { + "type": "string", + "format": "date-time" }, - "type": { + "status": { "type": "string" } }, "additionalProperties": false, "required": [ - "type" + "status", + "info", + "since" ] }, - "CloudInfo": { + "Error": { "type": "object", "properties": { - "CloudDetails": { - "$ref": "#/definitions/CloudDetails" + "code": { + "type": "string" }, - "users": { - "type": "array", - "items": { - "$ref": "#/definitions/CloudUserInfo" + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } } + }, + "message": { + "type": "string" } }, "additionalProperties": false, "required": [ - "CloudDetails", - "users" + "message", + "code" ] }, - "CloudInfoResult": { + "ErrorResult": { "type": "object", "properties": { "error": { "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/CloudInfo" } }, "additionalProperties": false }, - "CloudInfoResults": { + "ErrorResults": { "type": "object", "properties": { "results": { "type": "array", "items": { - "$ref": "#/definitions/CloudInfoResult" + "$ref": "#/definitions/ErrorResult" } } }, @@ -8082,207 +43646,248 @@ "results" ] }, - "CloudInstanceTypesConstraint": { + "FilesystemAttachmentDetails": { "type": "object", "properties": { - "cloud-tag": { - "type": "string" + "FilesystemAttachmentInfo": { + "$ref": "#/definitions/FilesystemAttachmentInfo" }, - "constraints": { - "$ref": "#/definitions/Value" + "life": { + "type": "string" }, - "region": { + "mount-point": { "type": "string" + }, + "read-only": { + "type": "boolean" } }, "additionalProperties": false, "required": [ - "cloud-tag", - "region" + "FilesystemAttachmentInfo" ] }, - "CloudInstanceTypesConstraints": { + "FilesystemAttachmentInfo": { "type": "object", "properties": { - "constraints": { - "type": "array", - "items": { - "$ref": "#/definitions/CloudInstanceTypesConstraint" - } + "mount-point": { + "type": "string" + }, + "read-only": { + "type": "boolean" } }, - "additionalProperties": false, - "required": [ - "constraints" - ] + "additionalProperties": false }, - "CloudRegion": { + "FilesystemDetails": { "type": "object", "properties": { - "endpoint": { + "filesystem-tag": { "type": "string" }, - "identity-endpoint": { - "type": "string" + "info": { + "$ref": "#/definitions/FilesystemInfo" }, - "name": { + "life": { "type": "string" }, - "storage-endpoint": { + "machine-attachments": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/FilesystemAttachmentDetails" + } + } + }, + "status": { + "$ref": "#/definitions/EntityStatus" + }, + "storage": { + "$ref": "#/definitions/StorageDetails" + }, + "unit-attachments": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/FilesystemAttachmentDetails" + } + } + }, + "volume-tag": { "type": "string" } }, "additionalProperties": false, "required": [ - "name" + "filesystem-tag", + "info", + "status" ] }, - "CloudResult": { + "FilesystemDetailsListResult": { "type": "object", "properties": { - "cloud": { - "$ref": "#/definitions/Cloud" - }, "error": { "$ref": "#/definitions/Error" + }, + "result": { + "type": "array", + "items": { + "$ref": "#/definitions/FilesystemDetails" + } } }, "additionalProperties": false }, - "CloudResults": { + "FilesystemDetailsListResults": { "type": "object", "properties": { "results": { "type": "array", "items": { - "$ref": "#/definitions/CloudResult" + "$ref": "#/definitions/FilesystemDetailsListResult" } } }, "additionalProperties": false }, - "CloudUserInfo": { + "FilesystemFilter": { "type": "object", "properties": { - "access": { - "type": "string" - }, - "display-name": { - "type": "string" - }, - "user": { - "type": "string" + "machines": { + "type": "array", + "items": { + "type": "string" + } } }, - "additionalProperties": false, - "required": [ - "user", - "display-name", - "access" - ] + "additionalProperties": false }, - "CloudsResult": { + "FilesystemFilters": { "type": "object", "properties": { - "clouds": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/Cloud" - } + "filters": { + "type": "array", + "items": { + "$ref": "#/definitions/FilesystemFilter" } } }, "additionalProperties": false }, - "ControllerCredentialInfo": { + "FilesystemInfo": { "type": "object", "properties": { - "content": { - "$ref": "#/definitions/CredentialContent" + "filesystem-id": { + "type": "string" }, - "models": { - "type": "array", - "items": { - "$ref": "#/definitions/ModelAccess" - } + "pool": { + "type": "string" + }, + "size": { + "type": "integer" } }, - "additionalProperties": false + "additionalProperties": false, + "required": [ + "filesystem-id", + "pool", + "size" + ] }, - "CredentialContent": { + "ImportStorageDetails": { "type": "object", "properties": { - "attrs": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "auth-type": { + "storage-tag": { "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "storage-tag" + ] + }, + "ImportStorageParams": { + "type": "object", + "properties": { + "kind": { + "type": "integer" }, - "cloud": { + "pool": { "type": "string" }, - "name": { + "provider-id": { "type": "string" }, - "valid": { - "type": "boolean" + "storage-name": { + "type": "string" } }, "additionalProperties": false, "required": [ - "name", - "cloud", - "auth-type" + "kind", + "pool", + "provider-id", + "storage-name" ] }, - "CredentialContentResult": { + "ImportStorageResult": { "type": "object", "properties": { "error": { "$ref": "#/definitions/Error" }, "result": { - "$ref": "#/definitions/ControllerCredentialInfo" + "$ref": "#/definitions/ImportStorageDetails" } }, "additionalProperties": false }, - "CredentialContentResults": { + "ImportStorageResults": { "type": "object", "properties": { "results": { "type": "array", "items": { - "$ref": "#/definitions/CredentialContentResult" + "$ref": "#/definitions/ImportStorageResult" } } }, - "additionalProperties": false + "additionalProperties": false, + "required": [ + "results" + ] }, - "Entities": { + "RemoveStorage": { "type": "object", "properties": { - "entities": { + "storage": { "type": "array", "items": { - "$ref": "#/definitions/Entity" + "$ref": "#/definitions/RemoveStorageInstance" } } }, "additionalProperties": false, "required": [ - "entities" + "storage" ] }, - "Entity": { + "RemoveStorageInstance": { "type": "object", "properties": { + "destroy-attachments": { + "type": "boolean" + }, + "destroy-storage": { + "type": "boolean" + }, + "force": { + "type": "boolean" + }, + "max-wait": { + "type": "integer" + }, "tag": { "type": "string" } @@ -8292,276 +43897,300 @@ "tag" ] }, - "Error": { + "StorageAddParams": { "type": "object", "properties": { - "code": { + "name": { "type": "string" }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } + "storage": { + "$ref": "#/definitions/StorageConstraints" }, - "message": { + "unit": { "type": "string" } }, "additionalProperties": false, "required": [ - "message", - "code" + "unit", + "name", + "storage" ] }, - "ErrorResult": { + "StorageAttachmentDetails": { "type": "object", "properties": { - "error": { - "$ref": "#/definitions/Error" + "life": { + "type": "string" + }, + "location": { + "type": "string" + }, + "machine-tag": { + "type": "string" + }, + "storage-tag": { + "type": "string" + }, + "unit-tag": { + "type": "string" } }, - "additionalProperties": false + "additionalProperties": false, + "required": [ + "storage-tag", + "unit-tag", + "machine-tag" + ] }, - "ErrorResults": { + "StorageAttachmentId": { "type": "object", "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } + "storage-tag": { + "type": "string" + }, + "unit-tag": { + "type": "string" } }, "additionalProperties": false, "required": [ - "results" + "storage-tag", + "unit-tag" ] }, - "InstanceType": { + "StorageAttachmentIds": { "type": "object", "properties": { - "arches": { + "ids": { "type": "array", "items": { - "type": "string" + "$ref": "#/definitions/StorageAttachmentId" } - }, - "cost": { + } + }, + "additionalProperties": false, + "required": [ + "ids" + ] + }, + "StorageConstraints": { + "type": "object", + "properties": { + "count": { "type": "integer" }, - "cpu-cores": { - "type": "integer" + "pool": { + "type": "string" }, - "memory": { + "size": { "type": "integer" + } + }, + "additionalProperties": false + }, + "StorageDetachmentParams": { + "type": "object", + "properties": { + "force": { + "type": "boolean" }, - "name": { - "type": "string" + "ids": { + "$ref": "#/definitions/StorageAttachmentIds" }, - "root-disk": { + "max-wait": { "type": "integer" - }, - "virt-type": { - "type": "string" } }, "additionalProperties": false, "required": [ - "arches", - "cpu-cores", - "memory" + "ids" ] }, - "InstanceTypesResult": { + "StorageDetails": { "type": "object", "properties": { - "cost-currency": { - "type": "string" + "attachments": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/StorageAttachmentDetails" + } + } }, - "cost-divisor": { + "kind": { "type": "integer" }, - "cost-unit": { + "life": { "type": "string" }, + "owner-tag": { + "type": "string" + }, + "persistent": { + "type": "boolean" + }, + "status": { + "$ref": "#/definitions/EntityStatus" + }, + "storage-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "storage-tag", + "owner-tag", + "kind", + "status", + "persistent" + ] + }, + "StorageDetailsListResult": { + "type": "object", + "properties": { "error": { "$ref": "#/definitions/Error" }, - "instance-types": { + "result": { "type": "array", "items": { - "$ref": "#/definitions/InstanceType" + "$ref": "#/definitions/StorageDetails" } } }, "additionalProperties": false }, - "InstanceTypesResults": { + "StorageDetailsListResults": { "type": "object", "properties": { "results": { "type": "array", "items": { - "$ref": "#/definitions/InstanceTypesResult" + "$ref": "#/definitions/StorageDetailsListResult" } } }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ListCloudInfo": { - "type": "object", - "properties": { - "CloudDetails": { - "$ref": "#/definitions/CloudDetails" - }, - "user-access": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "CloudDetails", - "user-access" - ] + "additionalProperties": false }, - "ListCloudInfoResult": { + "StorageDetailsResult": { "type": "object", "properties": { "error": { "$ref": "#/definitions/Error" }, "result": { - "$ref": "#/definitions/ListCloudInfo" + "$ref": "#/definitions/StorageDetails" } }, "additionalProperties": false }, - "ListCloudInfoResults": { + "StorageDetailsResults": { "type": "object", "properties": { "results": { "type": "array", "items": { - "$ref": "#/definitions/ListCloudInfoResult" + "$ref": "#/definitions/StorageDetailsResult" } } }, - "additionalProperties": false, - "required": [ - "results" - ] + "additionalProperties": false }, - "ListCloudsRequest": { + "StorageFilter": { "type": "object", - "properties": { - "all": { - "type": "boolean" - }, - "user-tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "user-tag" - ] + "additionalProperties": false }, - "ModelAccess": { + "StorageFilters": { "type": "object", "properties": { - "access": { - "type": "string" - }, - "model": { - "type": "string" + "filters": { + "type": "array", + "items": { + "$ref": "#/definitions/StorageFilter" + } } }, "additionalProperties": false }, - "ModifyCloudAccess": { + "StoragePool": { "type": "object", "properties": { - "access": { - "type": "string" - }, - "action": { - "type": "string" + "attrs": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } }, - "cloud-tag": { + "name": { "type": "string" }, - "user-tag": { + "provider": { "type": "string" } }, "additionalProperties": false, "required": [ - "user-tag", - "cloud-tag", - "action", - "access" + "name", + "provider", + "attrs" ] }, - "ModifyCloudAccessRequest": { + "StoragePoolArgs": { "type": "object", "properties": { - "changes": { + "pools": { "type": "array", "items": { - "$ref": "#/definitions/ModifyCloudAccess" + "$ref": "#/definitions/StoragePool" } } }, "additionalProperties": false, "required": [ - "changes" + "pools" ] }, - "RevokeCredentialArg": { + "StoragePoolDeleteArg": { "type": "object", "properties": { - "force": { - "type": "boolean" - }, - "tag": { + "name": { "type": "string" } }, "additionalProperties": false, "required": [ - "tag", - "force" + "name" ] }, - "RevokeCredentialArgs": { + "StoragePoolDeleteArgs": { "type": "object", "properties": { - "credentials": { + "pools": { "type": "array", "items": { - "$ref": "#/definitions/RevokeCredentialArg" + "$ref": "#/definitions/StoragePoolDeleteArg" } } }, "additionalProperties": false, "required": [ - "credentials" + "pools" ] }, - "StringsResult": { + "StoragePoolFilter": { "type": "object", "properties": { - "error": { - "$ref": "#/definitions/Error" + "names": { + "type": "array", + "items": { + "type": "string" + } }, - "result": { + "providers": { "type": "array", "items": { "type": "string" @@ -8570,453 +44199,621 @@ }, "additionalProperties": false }, - "StringsResults": { + "StoragePoolFilters": { "type": "object", "properties": { - "results": { + "filters": { "type": "array", "items": { - "$ref": "#/definitions/StringsResult" + "$ref": "#/definitions/StoragePoolFilter" } } }, - "additionalProperties": false, - "required": [ - "results" - ] + "additionalProperties": false }, - "TaggedCredential": { + "StoragePoolsResult": { "type": "object", "properties": { - "credential": { - "$ref": "#/definitions/CloudCredential" + "error": { + "$ref": "#/definitions/Error" }, - "tag": { - "type": "string" + "storage-pools": { + "type": "array", + "items": { + "$ref": "#/definitions/StoragePool" + } } }, - "additionalProperties": false, - "required": [ - "tag", - "credential" - ] + "additionalProperties": false }, - "TaggedCredentials": { + "StoragePoolsResults": { "type": "object", "properties": { - "credentials": { + "results": { "type": "array", "items": { - "$ref": "#/definitions/TaggedCredential" + "$ref": "#/definitions/StoragePoolsResult" } } }, "additionalProperties": false }, - "UpdateCloudArgs": { + "StoragesAddParams": { "type": "object", "properties": { - "clouds": { + "storages": { "type": "array", "items": { - "$ref": "#/definitions/AddCloudArgs" + "$ref": "#/definitions/StorageAddParams" } } }, "additionalProperties": false, "required": [ - "clouds" + "storages" ] }, - "UpdateCredentialArgs": { + "VolumeAttachmentDetails": { "type": "object", "properties": { - "credentials": { - "type": "array", - "items": { - "$ref": "#/definitions/TaggedCredential" - } + "VolumeAttachmentInfo": { + "$ref": "#/definitions/VolumeAttachmentInfo" }, - "force": { + "bus-address": { + "type": "string" + }, + "device-link": { + "type": "string" + }, + "device-name": { + "type": "string" + }, + "life": { + "type": "string" + }, + "plan-info": { + "$ref": "#/definitions/VolumeAttachmentPlanInfo" + }, + "read-only": { "type": "boolean" } }, "additionalProperties": false, "required": [ - "credentials", - "force" + "VolumeAttachmentInfo" ] }, - "UpdateCredentialModelResult": { + "VolumeAttachmentInfo": { "type": "object", "properties": { - "errors": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" + "bus-address": { + "type": "string" + }, + "device-link": { + "type": "string" + }, + "device-name": { + "type": "string" + }, + "plan-info": { + "$ref": "#/definitions/VolumeAttachmentPlanInfo" + }, + "read-only": { + "type": "boolean" + } + }, + "additionalProperties": false + }, + "VolumeAttachmentPlanInfo": { + "type": "object", + "properties": { + "device-attributes": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } } }, - "name": { + "device-type": { + "type": "string" + } + }, + "additionalProperties": false + }, + "VolumeDetails": { + "type": "object", + "properties": { + "info": { + "$ref": "#/definitions/VolumeInfo" + }, + "life": { "type": "string" }, - "uuid": { + "machine-attachments": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/VolumeAttachmentDetails" + } + } + }, + "status": { + "$ref": "#/definitions/EntityStatus" + }, + "storage": { + "$ref": "#/definitions/StorageDetails" + }, + "unit-attachments": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/VolumeAttachmentDetails" + } + } + }, + "volume-tag": { "type": "string" } }, "additionalProperties": false, "required": [ - "uuid", - "name" + "volume-tag", + "info", + "status" ] }, - "UpdateCredentialResult": { + "VolumeDetailsListResult": { "type": "object", "properties": { "error": { "$ref": "#/definitions/Error" }, - "models": { + "result": { "type": "array", "items": { - "$ref": "#/definitions/UpdateCredentialModelResult" + "$ref": "#/definitions/VolumeDetails" } - }, - "tag": { - "type": "string" } }, - "additionalProperties": false, - "required": [ - "tag" - ] + "additionalProperties": false }, - "UpdateCredentialResults": { + "VolumeDetailsListResults": { "type": "object", "properties": { "results": { "type": "array", "items": { - "$ref": "#/definitions/UpdateCredentialResult" + "$ref": "#/definitions/VolumeDetailsListResult" } } }, "additionalProperties": false }, - "UserCloud": { + "VolumeFilter": { "type": "object", "properties": { - "cloud-tag": { - "type": "string" - }, - "user-tag": { - "type": "string" + "machines": { + "type": "array", + "items": { + "type": "string" + } } }, - "additionalProperties": false, - "required": [ - "user-tag", - "cloud-tag" - ] + "additionalProperties": false }, - "UserClouds": { + "VolumeFilters": { "type": "object", "properties": { - "user-clouds": { + "filters": { "type": "array", "items": { - "$ref": "#/definitions/UserCloud" + "$ref": "#/definitions/VolumeFilter" } } }, "additionalProperties": false }, - "Value": { + "VolumeInfo": { "type": "object", "properties": { - "allocate-public-ip": { - "type": "boolean" - }, - "arch": { - "type": "string" - }, - "container": { - "type": "string" - }, - "cores": { - "type": "integer" - }, - "cpu-power": { - "type": "integer" - }, - "image-id": { + "hardware-id": { "type": "string" }, - "instance-role": { - "type": "string" + "persistent": { + "type": "boolean" }, - "instance-type": { + "pool": { "type": "string" }, - "mem": { - "type": "integer" - }, - "root-disk": { + "size": { "type": "integer" }, - "root-disk-source": { + "volume-id": { "type": "string" }, - "spaces": { - "type": "array", - "items": { - "type": "string" - } - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "virt-type": { + "wwn": { "type": "string" - }, - "zones": { - "type": "array", - "items": { - "type": "string" - } } }, - "additionalProperties": false + "additionalProperties": false, + "required": [ + "volume-id", + "size", + "persistent" + ] } } } }, { - "Name": "Controller", - "Description": "ControllerAPI provides the Controller API.", - "Version": 11, + "Name": "StorageProvisioner", + "Description": "StorageProvisionerAPIv4 provides the StorageProvisioner API v4 facade.", + "Version": 4, "AvailableTo": [ "controller-machine-agent", "machine-agent", "unit-agent", - "controller-user" + "model-user" ], "Schema": { "type": "object", "properties": { - "AllModels": { + "AttachmentLife": { "type": "object", "properties": { + "Params": { + "$ref": "#/definitions/MachineStorageIds" + }, "Result": { - "$ref": "#/definitions/UserModelList" + "$ref": "#/definitions/LifeResults" } }, - "description": "AllModels allows controller administrators to get the list of all the\nmodels in the controller." + "description": "AttachmentLife returns the lifecycle state of each specified machine\nstorage attachment." }, - "CloudSpec": { + "CreateVolumeAttachmentPlans": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/VolumeAttachmentPlans" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + } + }, + "EnsureDead": { "type": "object", "properties": { "Params": { "$ref": "#/definitions/Entities" }, "Result": { - "$ref": "#/definitions/CloudSpecResults" + "$ref": "#/definitions/ErrorResults" } }, - "description": "CloudSpec returns the model's cloud spec." + "description": "EnsureDead calls EnsureDead on each given entity from state. It\nwill fail if the entity is not present. If it's Alive, nothing will\nhappen (see state/EnsureDead() for units or machines)." }, - "ConfigSet": { + "FilesystemAttachmentParams": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/ControllerConfigSet" + "$ref": "#/definitions/MachineStorageIds" + }, + "Result": { + "$ref": "#/definitions/FilesystemAttachmentParamsResults" } }, - "description": "ConfigSet changes the value of specified controller configuration\nsettings. Only some settings can be changed after bootstrap.\nSettings that aren't specified in the params are left unchanged." + "description": "FilesystemAttachmentParams returns the parameters for creating the filesystem\nattachments with the specified IDs." }, - "ControllerAPIInfoForModels": { + "FilesystemAttachments": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/MachineStorageIds" + }, + "Result": { + "$ref": "#/definitions/FilesystemAttachmentResults" + } + }, + "description": "FilesystemAttachments returns details of filesystem attachments with the specified IDs." + }, + "FilesystemParams": { "type": "object", "properties": { "Params": { "$ref": "#/definitions/Entities" }, "Result": { - "$ref": "#/definitions/ControllerAPIInfoResults" + "$ref": "#/definitions/FilesystemParamsResults" } }, - "description": "ControllerAPIInfoForModels returns the controller api connection details for the specified models." + "description": "FilesystemParams returns the parameters for creating the filesystems\nwith the specified tags." }, - "ControllerConfig": { + "Filesystems": { "type": "object", "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, "Result": { - "$ref": "#/definitions/ControllerConfigResult" + "$ref": "#/definitions/FilesystemResults" } }, - "description": "ControllerConfig returns the controller's configuration." + "description": "Filesystems returns details of filesystems with the specified tags." }, - "ControllerVersion": { + "InstanceId": { "type": "object", "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, "Result": { - "$ref": "#/definitions/ControllerVersionResults" + "$ref": "#/definitions/StringResults" } }, - "description": "ControllerVersion returns the version information associated with this\ncontroller binary.\n\nNOTE: the implementation intentionally does not check for SuperuserAccess\nas the Version is known even to users with login access." + "description": "InstanceId returns the provider specific instance id for each given\nmachine or an CodeNotProvisioned error, if not set." }, - "DashboardConnectionInfo": { + "Life": { "type": "object", "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, "Result": { - "$ref": "#/definitions/DashboardConnectionInfo" + "$ref": "#/definitions/LifeResults" } }, - "description": "DashboardConnectionInfo returns the connection information for a client to\nconnect to the Juju Dashboard including any proxying information." + "description": "Life returns the life status of every supplied entity, where available." }, - "DestroyController": { + "Remove": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/DestroyControllerArgs" + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" } }, - "description": "DestroyController destroys the controller.\n\nIf the args specify the destruction of the models, this method will\nattempt to do so. Otherwise, if the controller has any non-empty,\nnon-Dead hosted models, then an error with the code\nparams.CodeHasHostedModels will be transmitted." + "description": "Remove removes volumes and filesystems from state." }, - "GetCloudSpec": { + "RemoveAttachment": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/ModelTag" + "$ref": "#/definitions/MachineStorageIds" }, "Result": { - "$ref": "#/definitions/CloudSpecResult" + "$ref": "#/definitions/ErrorResults" } }, - "description": "GetCloudSpec constructs the CloudSpec for a validated and authorized model." + "description": "RemoveAttachment removes the specified machine storage attachments\nfrom state." }, - "GetControllerAccess": { + "RemoveFilesystemParams": { "type": "object", "properties": { "Params": { "$ref": "#/definitions/Entities" }, "Result": { - "$ref": "#/definitions/UserAccessResults" + "$ref": "#/definitions/RemoveFilesystemParamsResults" } }, - "description": "GetControllerAccess returns the level of access the specified users\nhave on the controller." + "description": "RemoveFilesystemParams returns the parameters for destroying or\nreleasing the filesystems with the specified tags." }, - "HostedModelConfigs": { + "RemoveVolumeAttachmentPlan": { "type": "object", "properties": { + "Params": { + "$ref": "#/definitions/MachineStorageIds" + }, "Result": { - "$ref": "#/definitions/HostedModelConfigsResults" + "$ref": "#/definitions/ErrorResults" + } + } + }, + "RemoveVolumeParams": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/RemoveVolumeParamsResults" } }, - "description": "HostedModelConfigs returns all the information that the client needs in\norder to connect directly with the host model's provider and destroy it\ndirectly." + "description": "RemoveVolumeParams returns the parameters for destroying\nor releasing the volumes with the specified tags." }, - "IdentityProviderURL": { + "SetFilesystemAttachmentInfo": { "type": "object", "properties": { + "Params": { + "$ref": "#/definitions/FilesystemAttachments" + }, "Result": { - "$ref": "#/definitions/StringResult" + "$ref": "#/definitions/ErrorResults" } }, - "description": "IdentityProviderURL returns the URL of the configured external identity\nprovider for this controller or an empty string if no external identity\nprovider has been configured when the controller was bootstrapped.\n\nNOTE: the implementation intentionally does not check for SuperuserAccess\nas the URL is known even to users with login access." + "description": "SetFilesystemAttachmentInfo records the details of newly provisioned filesystem\nattachments." }, - "InitiateMigration": { + "SetFilesystemInfo": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/InitiateMigrationArgs" + "$ref": "#/definitions/Filesystems" }, "Result": { - "$ref": "#/definitions/InitiateMigrationResults" + "$ref": "#/definitions/ErrorResults" } }, - "description": "InitiateMigration attempts to begin the migration of one or\nmore models to other controllers." + "description": "SetFilesystemInfo records the details of newly provisioned filesystems." }, - "ListBlockedModels": { + "SetStatus": { "type": "object", "properties": { + "Params": { + "$ref": "#/definitions/SetStatus" + }, "Result": { - "$ref": "#/definitions/ModelBlockInfoList" + "$ref": "#/definitions/ErrorResults" } }, - "description": "ListBlockedModels returns a list of all models on the controller\nwhich have a block in place. The resulting slice is sorted by model\nname, then owner. Callers must be controller administrators to retrieve the\nlist." + "description": "SetStatus sets the status of each given entity." }, - "ModelConfig": { + "SetVolumeAttachmentInfo": { "type": "object", "properties": { + "Params": { + "$ref": "#/definitions/VolumeAttachments" + }, "Result": { - "$ref": "#/definitions/ModelConfigResults" + "$ref": "#/definitions/ErrorResults" } }, - "description": "ModelConfig returns the model config for the controller\nmodel. For information on the current model, use\nclient.ModelGet" + "description": "SetVolumeAttachmentInfo records the details of newly provisioned volume\nattachments." }, - "ModelStatus": { + "SetVolumeAttachmentPlanBlockInfo": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/VolumeAttachmentPlans" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + } + }, + "SetVolumeInfo": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Volumes" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "SetVolumeInfo records the details of newly provisioned volumes." + }, + "VolumeAttachmentParams": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/MachineStorageIds" + }, + "Result": { + "$ref": "#/definitions/VolumeAttachmentParamsResults" + } + }, + "description": "VolumeAttachmentParams returns the parameters for creating the volume\nattachments with the specified IDs." + }, + "VolumeAttachmentPlans": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/MachineStorageIds" + }, + "Result": { + "$ref": "#/definitions/VolumeAttachmentPlanResults" + } + }, + "description": "VolumeAttachmentPlans returns details of volume attachment plans with the specified IDs." + }, + "VolumeAttachments": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/MachineStorageIds" + }, + "Result": { + "$ref": "#/definitions/VolumeAttachmentResults" + } + }, + "description": "VolumeAttachments returns details of volume attachments with the specified IDs." + }, + "VolumeBlockDevices": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/MachineStorageIds" + }, + "Result": { + "$ref": "#/definitions/BlockDeviceResults" + } + }, + "description": "VolumeBlockDevices returns details of the block devices corresponding to the\nvolume attachments with the specified IDs." + }, + "VolumeParams": { "type": "object", "properties": { "Params": { "$ref": "#/definitions/Entities" }, "Result": { - "$ref": "#/definitions/ModelStatusResults" + "$ref": "#/definitions/VolumeParamsResults" } }, - "description": "ModelStatus returns a summary of the model." + "description": "VolumeParams returns the parameters for creating or destroying\nthe volumes with the specified tags." }, - "ModifyControllerAccess": { + "Volumes": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/ModifyControllerAccessRequest" + "$ref": "#/definitions/Entities" }, "Result": { - "$ref": "#/definitions/ErrorResults" + "$ref": "#/definitions/VolumeResults" } }, - "description": "ModifyControllerAccess changes the model access granted to users." + "description": "Volumes returns details of volumes with the specified tags." }, - "MongoVersion": { + "WatchApplications": { "type": "object", "properties": { "Result": { - "$ref": "#/definitions/StringResult" + "$ref": "#/definitions/StringsWatchResult" } }, - "description": "MongoVersion allows the introspection of the mongo version per controller" + "description": "WatchApplications starts a StringsWatcher to watch CAAS applications\ndeployed to this model." }, - "RemoveBlocks": { + "WatchBlockDevices": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/RemoveBlocksArgs" + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/NotifyWatchResults" } }, - "description": "RemoveBlocks removes all the blocks in the controller." + "description": "WatchBlockDevices watches for changes to the specified machines' block devices." }, - "WatchAllModelSummaries": { + "WatchFilesystemAttachments": { "type": "object", "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, "Result": { - "$ref": "#/definitions/SummaryWatcherID" + "$ref": "#/definitions/MachineStorageIdsWatchResults" } }, - "description": "WatchAllModelSummaries starts watching the summary updates from the cache.\nThis method is superuser access only, and watches all models in the\ncontroller." + "description": "WatchFilesystemAttachments watches for changes to filesystem attachments\nscoped to the entity with the tag passed to NewState." }, - "WatchAllModels": { + "WatchFilesystems": { "type": "object", "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, "Result": { - "$ref": "#/definitions/AllWatcherId" + "$ref": "#/definitions/StringsWatchResults" } }, - "description": "WatchAllModels starts watching events for all models in the\ncontroller. The returned AllWatcherId should be used with Next on the\nAllModelWatcher endpoint to receive deltas." + "description": "WatchFilesystems watches for changes to filesystems scoped\nto the entity with the tag passed to NewState." }, - "WatchCloudSpecsChanges": { + "WatchMachines": { "type": "object", "properties": { "Params": { @@ -9026,182 +44823,196 @@ "$ref": "#/definitions/NotifyWatchResults" } }, - "description": "WatchCloudSpecsChanges returns a watcher for cloud spec changes." + "description": "WatchMachines watches for changes to the specified machines." }, - "WatchModelSummaries": { + "WatchVolumeAttachmentPlans": { "type": "object", "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, "Result": { - "$ref": "#/definitions/SummaryWatcherID" + "$ref": "#/definitions/MachineStorageIdsWatchResults" } }, - "description": "WatchModelSummaries starts watching the summary updates from the cache.\nOnly models that the user has access to are returned." - } - }, - "definitions": { - "AllWatcherId": { + "description": "WatchVolumeAttachmentPlans watches for changes to volume attachments for a machine for the purpose of allowing\nthat machine to run any initialization needed, for that volume to actually appear as a block device (ie: iSCSI)" + }, + "WatchVolumeAttachments": { "type": "object", "properties": { - "watcher-id": { - "type": "string" + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/MachineStorageIdsWatchResults" } }, - "additionalProperties": false, - "required": [ - "watcher-id" - ] + "description": "WatchVolumeAttachments watches for changes to volume attachments scoped to\nthe entity with the tag passed to NewState." }, - "CloudCredential": { + "WatchVolumes": { "type": "object", "properties": { - "attrs": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "auth-type": { - "type": "string" + "Params": { + "$ref": "#/definitions/Entities" }, - "redacted": { - "type": "array", - "items": { - "type": "string" - } + "Result": { + "$ref": "#/definitions/StringsWatchResults" } }, - "additionalProperties": false, - "required": [ - "auth-type" - ] - }, - "CloudSpec": { + "description": "WatchVolumes watches for changes to volumes scoped to the\nentity with the tag passed to NewState." + } + }, + "definitions": { + "BlockDevice": { "type": "object", "properties": { - "cacertificates": { + "BusAddress": { + "type": "string" + }, + "DeviceLinks": { "type": "array", "items": { "type": "string" } }, - "credential": { - "$ref": "#/definitions/CloudCredential" + "DeviceName": { + "type": "string" }, - "endpoint": { + "FilesystemType": { "type": "string" }, - "identity-endpoint": { + "HardwareId": { "type": "string" }, - "is-controller-cloud": { + "InUse": { "type": "boolean" }, - "name": { + "Label": { "type": "string" }, - "region": { + "MountPoint": { "type": "string" }, - "skip-tls-verify": { - "type": "boolean" + "SerialId": { + "type": "string" }, - "storage-endpoint": { + "Size": { + "type": "integer" + }, + "UUID": { "type": "string" }, - "type": { + "WWN": { "type": "string" } }, "additionalProperties": false, "required": [ - "type", - "name" + "DeviceName", + "DeviceLinks", + "Label", + "UUID", + "HardwareId", + "WWN", + "BusAddress", + "Size", + "FilesystemType", + "InUse", + "MountPoint", + "SerialId" ] }, - "CloudSpecResult": { + "BlockDeviceResult": { "type": "object", "properties": { "error": { "$ref": "#/definitions/Error" }, "result": { - "$ref": "#/definitions/CloudSpec" + "$ref": "#/definitions/BlockDevice" } }, - "additionalProperties": false + "additionalProperties": false, + "required": [ + "result" + ] }, - "CloudSpecResults": { + "BlockDeviceResults": { "type": "object", "properties": { "results": { "type": "array", "items": { - "$ref": "#/definitions/CloudSpecResult" + "$ref": "#/definitions/BlockDeviceResult" } } }, "additionalProperties": false }, - "ConfigValue": { + "Entities": { "type": "object", "properties": { - "source": { - "type": "string" - }, - "value": { - "type": "object", - "additionalProperties": true + "entities": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } } }, "additionalProperties": false, "required": [ - "value", - "source" + "entities" ] }, - "ControllerAPIInfoResult": { + "Entity": { "type": "object", "properties": { - "addresses": { - "type": "array", - "items": { - "type": "string" - } - }, - "cacert": { + "tag": { "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" } }, "additionalProperties": false, "required": [ - "addresses", - "cacert" + "tag" ] }, - "ControllerAPIInfoResults": { + "EntityStatusArgs": { "type": "object", "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ControllerAPIInfoResult" + "data": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } } + }, + "info": { + "type": "string" + }, + "status": { + "type": "string" + }, + "tag": { + "type": "string" } }, "additionalProperties": false, "required": [ - "results" + "tag", + "status", + "info", + "data" ] }, - "ControllerConfigResult": { + "Error": { "type": "object", "properties": { - "config": { + "code": { + "type": "string" + }, + "info": { "type": "object", "patternProperties": { ".*": { @@ -9209,146 +45020,220 @@ "additionalProperties": true } } + }, + "message": { + "type": "string" } }, "additionalProperties": false, "required": [ - "config" + "message", + "code" ] }, - "ControllerConfigSet": { + "ErrorResult": { "type": "object", "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "ErrorResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResult" } } }, "additionalProperties": false, "required": [ - "config" + "results" ] }, - "ControllerVersionResults": { + "Filesystem": { "type": "object", "properties": { - "git-commit": { + "filesystem-tag": { "type": "string" }, - "version": { + "info": { + "$ref": "#/definitions/FilesystemInfo" + }, + "volume-tag": { "type": "string" } }, "additionalProperties": false, "required": [ - "version", - "git-commit" + "filesystem-tag", + "info" ] }, - "DashboardConnectionInfo": { + "FilesystemAttachment": { "type": "object", "properties": { - "error": { - "$ref": "#/definitions/Error" + "filesystem-tag": { + "type": "string" }, - "proxy-connection": { - "$ref": "#/definitions/Proxy" + "info": { + "$ref": "#/definitions/FilesystemAttachmentInfo" }, - "ssh-connection": { - "$ref": "#/definitions/DashboardConnectionSSHTunnel" + "machine-tag": { + "type": "string" } }, "additionalProperties": false, "required": [ - "proxy-connection", - "ssh-connection" + "filesystem-tag", + "machine-tag", + "info" ] }, - "DashboardConnectionSSHTunnel": { + "FilesystemAttachmentInfo": { "type": "object", "properties": { - "entity": { + "mount-point": { "type": "string" }, - "host": { + "read-only": { + "type": "boolean" + } + }, + "additionalProperties": false + }, + "FilesystemAttachmentParams": { + "type": "object", + "properties": { + "filesystem-id": { "type": "string" }, - "model": { + "filesystem-tag": { "type": "string" }, - "port": { + "instance-id": { + "type": "string" + }, + "machine-tag": { + "type": "string" + }, + "mount-point": { + "type": "string" + }, + "provider": { "type": "string" + }, + "read-only": { + "type": "boolean" } }, "additionalProperties": false, "required": [ - "host", - "port" + "filesystem-tag", + "machine-tag", + "provider" ] }, - "DestroyControllerArgs": { + "FilesystemAttachmentParamsResult": { "type": "object", "properties": { - "destroy-models": { - "type": "boolean" - }, - "destroy-storage": { - "type": "boolean" - }, - "force": { - "type": "boolean" + "error": { + "$ref": "#/definitions/Error" }, - "max-wait": { - "type": "integer" + "result": { + "$ref": "#/definitions/FilesystemAttachmentParams" + } + }, + "additionalProperties": false, + "required": [ + "result" + ] + }, + "FilesystemAttachmentParamsResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/FilesystemAttachmentParamsResult" + } + } + }, + "additionalProperties": false + }, + "FilesystemAttachmentResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" }, - "model-timeout": { - "type": "integer" + "result": { + "$ref": "#/definitions/FilesystemAttachment" } }, "additionalProperties": false, "required": [ - "destroy-models" + "result" ] }, - "Entities": { + "FilesystemAttachmentResults": { "type": "object", "properties": { - "entities": { + "results": { "type": "array", "items": { - "$ref": "#/definitions/Entity" + "$ref": "#/definitions/FilesystemAttachmentResult" + } + } + }, + "additionalProperties": false + }, + "FilesystemAttachments": { + "type": "object", + "properties": { + "filesystem-attachments": { + "type": "array", + "items": { + "$ref": "#/definitions/FilesystemAttachment" } } }, "additionalProperties": false, "required": [ - "entities" + "filesystem-attachments" ] }, - "Entity": { + "FilesystemInfo": { "type": "object", "properties": { - "tag": { + "filesystem-id": { + "type": "string" + }, + "pool": { "type": "string" + }, + "size": { + "type": "integer" } }, "additionalProperties": false, "required": [ - "tag" + "filesystem-id", + "pool", + "size" ] }, - "Error": { + "FilesystemParams": { "type": "object", "properties": { - "code": { - "type": "string" + "attachment": { + "$ref": "#/definitions/FilesystemAttachmentParams" }, - "info": { + "attributes": { "type": "object", "patternProperties": { ".*": { @@ -9357,32 +45242,125 @@ } } }, - "message": { + "filesystem-tag": { + "type": "string" + }, + "provider": { + "type": "string" + }, + "size": { + "type": "integer" + }, + "tags": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "volume-tag": { "type": "string" } }, "additionalProperties": false, "required": [ - "message", - "code" + "filesystem-tag", + "size", + "provider" ] }, - "ErrorResult": { + "FilesystemParamsResult": { "type": "object", "properties": { "error": { "$ref": "#/definitions/Error" + }, + "result": { + "$ref": "#/definitions/FilesystemParams" + } + }, + "additionalProperties": false, + "required": [ + "result" + ] + }, + "FilesystemParamsResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/FilesystemParamsResult" + } } }, "additionalProperties": false }, - "ErrorResults": { + "FilesystemResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "$ref": "#/definitions/Filesystem" + } + }, + "additionalProperties": false, + "required": [ + "result" + ] + }, + "FilesystemResults": { "type": "object", "properties": { "results": { "type": "array", "items": { - "$ref": "#/definitions/ErrorResult" + "$ref": "#/definitions/FilesystemResult" + } + } + }, + "additionalProperties": false + }, + "Filesystems": { + "type": "object", + "properties": { + "filesystems": { + "type": "array", + "items": { + "$ref": "#/definitions/Filesystem" + } + } + }, + "additionalProperties": false, + "required": [ + "filesystems" + ] + }, + "LifeResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "life": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "life" + ] + }, + "LifeResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/LifeResult" } } }, @@ -9391,666 +45369,683 @@ "results" ] }, - "HostedModelConfig": { + "MachineStorageId": { "type": "object", "properties": { - "cloud-spec": { - "$ref": "#/definitions/CloudSpec" + "attachment-tag": { + "type": "string" }, - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } + "machine-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "machine-tag", + "attachment-tag" + ] + }, + "MachineStorageIds": { + "type": "object", + "properties": { + "ids": { + "type": "array", + "items": { + "$ref": "#/definitions/MachineStorageId" + } + } + }, + "additionalProperties": false, + "required": [ + "ids" + ] + }, + "MachineStorageIdsWatchResult": { + "type": "object", + "properties": { + "changes": { + "type": "array", + "items": { + "$ref": "#/definitions/MachineStorageId" } }, "error": { "$ref": "#/definitions/Error" }, - "name": { - "type": "string" - }, - "owner": { + "watcher-id": { "type": "string" } }, "additionalProperties": false, "required": [ - "name", - "owner" + "watcher-id", + "changes" ] }, - "HostedModelConfigsResults": { + "MachineStorageIdsWatchResults": { "type": "object", "properties": { - "models": { + "results": { "type": "array", "items": { - "$ref": "#/definitions/HostedModelConfig" + "$ref": "#/definitions/MachineStorageIdsWatchResult" } } }, "additionalProperties": false, "required": [ - "models" + "results" ] }, - "InitiateMigrationArgs": { + "NotifyWatchResult": { "type": "object", "properties": { - "specs": { + "NotifyWatcherId": { + "type": "string" + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false, + "required": [ + "NotifyWatcherId" + ] + }, + "NotifyWatchResults": { + "type": "object", + "properties": { + "results": { "type": "array", "items": { - "$ref": "#/definitions/MigrationSpec" + "$ref": "#/definitions/NotifyWatchResult" } } }, "additionalProperties": false, "required": [ - "specs" + "results" + ] + }, + "RemoveFilesystemParams": { + "type": "object", + "properties": { + "destroy": { + "type": "boolean" + }, + "filesystem-id": { + "type": "string" + }, + "provider": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "provider", + "filesystem-id" ] }, - "InitiateMigrationResult": { + "RemoveFilesystemParamsResult": { "type": "object", "properties": { "error": { "$ref": "#/definitions/Error" }, - "migration-id": { - "type": "string" - }, - "model-tag": { - "type": "string" + "result": { + "$ref": "#/definitions/RemoveFilesystemParams" } }, "additionalProperties": false, "required": [ - "model-tag", - "migration-id" + "result" ] }, - "InitiateMigrationResults": { + "RemoveFilesystemParamsResults": { "type": "object", "properties": { "results": { "type": "array", "items": { - "$ref": "#/definitions/InitiateMigrationResult" + "$ref": "#/definitions/RemoveFilesystemParamsResult" } } }, - "additionalProperties": false, - "required": [ - "results" - ] + "additionalProperties": false }, - "MachineHardware": { + "RemoveVolumeParams": { "type": "object", "properties": { - "arch": { - "type": "string" + "destroy": { + "type": "boolean" }, - "availability-zone": { + "provider": { "type": "string" }, - "cores": { - "type": "integer" - }, - "cpu-power": { - "type": "integer" - }, - "mem": { - "type": "integer" - }, - "root-disk": { - "type": "integer" - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "virt-type": { + "volume-id": { "type": "string" } }, - "additionalProperties": false + "additionalProperties": false, + "required": [ + "provider", + "volume-id" + ] }, - "MigrationSpec": { + "RemoveVolumeParamsResult": { "type": "object", "properties": { - "model-tag": { - "type": "string" + "error": { + "$ref": "#/definitions/Error" }, - "target-info": { - "$ref": "#/definitions/MigrationTargetInfo" + "result": { + "$ref": "#/definitions/RemoveVolumeParams" } }, "additionalProperties": false, "required": [ - "model-tag", - "target-info" + "result" ] }, - "MigrationTargetInfo": { + "RemoveVolumeParamsResults": { "type": "object", "properties": { - "addrs": { + "results": { "type": "array", "items": { - "type": "string" + "$ref": "#/definitions/RemoveVolumeParamsResult" + } + } + }, + "additionalProperties": false + }, + "SetStatus": { + "type": "object", + "properties": { + "entities": { + "type": "array", + "items": { + "$ref": "#/definitions/EntityStatusArgs" } - }, - "auth-tag": { - "type": "string" - }, - "ca-cert": { - "type": "string" - }, - "controller-alias": { - "type": "string" - }, - "controller-tag": { - "type": "string" - }, - "macaroons": { - "type": "string" - }, - "password": { - "type": "string" } }, "additionalProperties": false, "required": [ - "controller-tag", - "addrs", - "ca-cert", - "auth-tag" + "entities" ] }, - "Model": { + "StringResult": { "type": "object", "properties": { - "name": { - "type": "string" - }, - "owner-tag": { - "type": "string" - }, - "type": { - "type": "string" + "error": { + "$ref": "#/definitions/Error" }, - "uuid": { + "result": { "type": "string" } }, "additionalProperties": false, "required": [ - "name", - "uuid", - "type", - "owner-tag" + "result" ] }, - "ModelApplicationInfo": { + "StringResults": { "type": "object", "properties": { - "name": { - "type": "string" + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/StringResult" + } } }, "additionalProperties": false, "required": [ - "name" + "results" ] }, - "ModelBlockInfo": { + "StringsWatchResult": { "type": "object", "properties": { - "blocks": { + "changes": { "type": "array", "items": { "type": "string" } }, - "model-uuid": { - "type": "string" - }, - "name": { - "type": "string" + "error": { + "$ref": "#/definitions/Error" }, - "owner-tag": { + "watcher-id": { "type": "string" } }, "additionalProperties": false, "required": [ - "name", - "model-uuid", - "owner-tag", - "blocks" + "watcher-id" ] }, - "ModelBlockInfoList": { + "StringsWatchResults": { "type": "object", "properties": { - "models": { + "results": { "type": "array", "items": { - "$ref": "#/definitions/ModelBlockInfo" + "$ref": "#/definitions/StringsWatchResult" } } }, - "additionalProperties": false + "additionalProperties": false, + "required": [ + "results" + ] }, - "ModelConfigResults": { + "Volume": { "type": "object", "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/ConfigValue" - } - } + "info": { + "$ref": "#/definitions/VolumeInfo" + }, + "volume-tag": { + "type": "string" } }, "additionalProperties": false, "required": [ - "config" + "volume-tag", + "info" ] }, - "ModelFilesystemInfo": { + "VolumeAttachment": { "type": "object", "properties": { - "detachable": { - "type": "boolean" - }, - "id": { - "type": "string" - }, - "message": { - "type": "string" + "info": { + "$ref": "#/definitions/VolumeAttachmentInfo" }, - "provider-id": { + "machine-tag": { "type": "string" }, - "status": { + "volume-tag": { "type": "string" } }, "additionalProperties": false, "required": [ - "id" + "volume-tag", + "machine-tag", + "info" ] }, - "ModelMachineInfo": { + "VolumeAttachmentInfo": { "type": "object", "properties": { - "display-name": { + "bus-address": { "type": "string" }, - "ha-primary": { - "type": "boolean" - }, - "hardware": { - "$ref": "#/definitions/MachineHardware" - }, - "has-vote": { - "type": "boolean" + "device-link": { + "type": "string" }, - "id": { + "device-name": { "type": "string" }, + "plan-info": { + "$ref": "#/definitions/VolumeAttachmentPlanInfo" + }, + "read-only": { + "type": "boolean" + } + }, + "additionalProperties": false + }, + "VolumeAttachmentParams": { + "type": "object", + "properties": { "instance-id": { "type": "string" }, - "message": { + "machine-tag": { "type": "string" }, - "status": { + "provider": { "type": "string" }, - "wants-vote": { + "read-only": { "type": "boolean" + }, + "volume-id": { + "type": "string" + }, + "volume-tag": { + "type": "string" } }, "additionalProperties": false, "required": [ - "id" + "volume-tag", + "machine-tag", + "provider" ] }, - "ModelStatus": { + "VolumeAttachmentParamsResult": { "type": "object", "properties": { - "application-count": { - "type": "integer" - }, - "applications": { - "type": "array", - "items": { - "$ref": "#/definitions/ModelApplicationInfo" - } - }, "error": { "$ref": "#/definitions/Error" }, - "filesystems": { - "type": "array", - "items": { - "$ref": "#/definitions/ModelFilesystemInfo" - } - }, - "hosted-machine-count": { - "type": "integer" - }, - "life": { - "type": "string" - }, - "machines": { - "type": "array", - "items": { - "$ref": "#/definitions/ModelMachineInfo" - } - }, - "model-tag": { - "type": "string" - }, - "owner-tag": { - "type": "string" - }, - "type": { - "type": "string" - }, - "unit-count": { - "type": "integer" - }, - "volumes": { - "type": "array", - "items": { - "$ref": "#/definitions/ModelVolumeInfo" - } + "result": { + "$ref": "#/definitions/VolumeAttachmentParams" } }, "additionalProperties": false, "required": [ - "model-tag", - "life", - "type", - "hosted-machine-count", - "application-count", - "unit-count", - "owner-tag" + "result" ] }, - "ModelStatusResults": { + "VolumeAttachmentParamsResults": { "type": "object", "properties": { - "models": { + "results": { "type": "array", "items": { - "$ref": "#/definitions/ModelStatus" + "$ref": "#/definitions/VolumeAttachmentParamsResult" } } }, - "additionalProperties": false, - "required": [ - "models" - ] - }, - "ModelTag": { - "type": "object", "additionalProperties": false }, - "ModelVolumeInfo": { + "VolumeAttachmentPlan": { "type": "object", "properties": { - "detachable": { - "type": "boolean" + "block-device": { + "$ref": "#/definitions/BlockDevice" }, - "id": { + "life": { "type": "string" }, - "message": { + "machine-tag": { "type": "string" }, - "provider-id": { - "type": "string" + "plan-info": { + "$ref": "#/definitions/VolumeAttachmentPlanInfo" }, - "status": { + "volume-tag": { "type": "string" } }, "additionalProperties": false, "required": [ - "id" + "volume-tag", + "machine-tag", + "plan-info" ] }, - "ModifyControllerAccess": { + "VolumeAttachmentPlanInfo": { "type": "object", "properties": { - "access": { - "type": "string" - }, - "action": { - "type": "string" + "device-attributes": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } }, - "user-tag": { + "device-type": { "type": "string" } }, - "additionalProperties": false, - "required": [ - "user-tag", - "action", - "access" - ] + "additionalProperties": false }, - "ModifyControllerAccessRequest": { + "VolumeAttachmentPlanResult": { "type": "object", "properties": { - "changes": { - "type": "array", - "items": { - "$ref": "#/definitions/ModifyControllerAccess" - } + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "$ref": "#/definitions/VolumeAttachmentPlan" } }, "additionalProperties": false, "required": [ - "changes" + "result" ] }, - "NotifyWatchResult": { + "VolumeAttachmentPlanResults": { "type": "object", "properties": { - "NotifyWatcherId": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/VolumeAttachmentPlanResult" + } } }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] + "additionalProperties": false }, - "NotifyWatchResults": { + "VolumeAttachmentPlans": { "type": "object", "properties": { - "results": { + "volume-plans": { "type": "array", "items": { - "$ref": "#/definitions/NotifyWatchResult" + "$ref": "#/definitions/VolumeAttachmentPlan" } } }, "additionalProperties": false, "required": [ - "results" + "volume-plans" ] }, - "Proxy": { + "VolumeAttachmentResult": { "type": "object", "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } + "error": { + "$ref": "#/definitions/Error" }, - "type": { - "type": "string" + "result": { + "$ref": "#/definitions/VolumeAttachment" } }, "additionalProperties": false, "required": [ - "config", - "type" + "result" ] }, - "RemoveBlocksArgs": { + "VolumeAttachmentResults": { "type": "object", "properties": { - "all": { - "type": "boolean" + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/VolumeAttachmentResult" + } } }, - "additionalProperties": false, - "required": [ - "all" - ] + "additionalProperties": false }, - "StringResult": { + "VolumeAttachments": { "type": "object", "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "string" + "volume-attachments": { + "type": "array", + "items": { + "$ref": "#/definitions/VolumeAttachment" + } } }, "additionalProperties": false, "required": [ - "result" + "volume-attachments" ] }, - "SummaryWatcherID": { + "VolumeInfo": { "type": "object", "properties": { - "watcher-id": { + "hardware-id": { + "type": "string" + }, + "persistent": { + "type": "boolean" + }, + "pool": { + "type": "string" + }, + "size": { + "type": "integer" + }, + "volume-id": { + "type": "string" + }, + "wwn": { "type": "string" } }, "additionalProperties": false, "required": [ - "watcher-id" + "volume-id", + "size", + "persistent" ] }, - "UserAccess": { + "VolumeParams": { "type": "object", "properties": { - "access": { + "attachment": { + "$ref": "#/definitions/VolumeAttachmentParams" + }, + "attributes": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "provider": { "type": "string" }, - "user-tag": { + "size": { + "type": "integer" + }, + "tags": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "volume-tag": { "type": "string" } }, "additionalProperties": false, "required": [ - "user-tag", - "access" + "volume-tag", + "size", + "provider" ] }, - "UserAccessResult": { + "VolumeParamsResult": { "type": "object", "properties": { "error": { "$ref": "#/definitions/Error" }, "result": { - "$ref": "#/definitions/UserAccess" + "$ref": "#/definitions/VolumeParams" } }, - "additionalProperties": false + "additionalProperties": false, + "required": [ + "result" + ] }, - "UserAccessResults": { + "VolumeParamsResults": { "type": "object", "properties": { "results": { "type": "array", "items": { - "$ref": "#/definitions/UserAccessResult" + "$ref": "#/definitions/VolumeParamsResult" } } }, "additionalProperties": false }, - "UserModel": { + "VolumeResult": { "type": "object", "properties": { - "last-connection": { - "type": "string", - "format": "date-time" + "error": { + "$ref": "#/definitions/Error" }, - "model": { - "$ref": "#/definitions/Model" + "result": { + "$ref": "#/definitions/Volume" } }, "additionalProperties": false, "required": [ - "model", - "last-connection" + "result" ] }, - "UserModelList": { + "VolumeResults": { "type": "object", "properties": { - "user-models": { + "results": { "type": "array", "items": { - "$ref": "#/definitions/UserModel" + "$ref": "#/definitions/VolumeResult" + } + } + }, + "additionalProperties": false + }, + "Volumes": { + "type": "object", + "properties": { + "volumes": { + "type": "array", + "items": { + "$ref": "#/definitions/Volume" } } }, "additionalProperties": false, "required": [ - "user-models" + "volumes" ] } } } }, { - "Name": "CredentialManager", - "Description": "", + "Name": "StringsWatcher", + "Description": "srvStringsWatcher defines the API for methods on a state.StringsWatcher.\nEach client has its own current set of watchers, stored in resources.\nsrvStringsWatcher notifies about changes for all entities of a given kind,\nsending the changes as a list of strings.", "Version": 1, "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", "model-user" ], "Schema": { "type": "object", "properties": { - "InvalidateModelCredential": { + "Next": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/InvalidateCredentialArg" - }, "Result": { - "$ref": "#/definitions/ErrorResult" + "$ref": "#/definitions/StringsWatchResult" } }, - "description": "InvalidateModelCredential marks the cloud credential for this model as invalid." + "description": "Next returns when a change has occurred to an entity of the\ncollection being watched since the most recent call to Next\nor the Watch call that created the srvStringsWatcher." + }, + "Stop": { + "type": "object", + "description": "Stop stops the watcher." } }, "definitions": { @@ -10079,239 +46074,308 @@ "code" ] }, - "ErrorResult": { + "StringsWatchResult": { "type": "object", "properties": { + "changes": { + "type": "array", + "items": { + "type": "string" + } + }, "error": { "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "InvalidateCredentialArg": { - "type": "object", - "properties": { - "reason": { + }, + "watcher-id": { "type": "string" } }, - "additionalProperties": false + "additionalProperties": false, + "required": [ + "watcher-id" + ] } } } }, { - "Name": "HighAvailability", - "Description": "HighAvailabilityAPI implements the HighAvailability interface and is the concrete\nimplementation of the api end point.", - "Version": 2, + "Name": "Subnets", + "Description": "API provides the subnets API facade for version 5.", + "Version": 5, "AvailableTo": [ - "controller-user", + "controller-machine-agent", + "machine-agent", + "unit-agent", "model-user" ], "Schema": { "type": "object", "properties": { - "EnableHA": { + "AllZones": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/ControllersSpecs" - }, "Result": { - "$ref": "#/definitions/ControllersChangeResults" + "$ref": "#/definitions/ZoneResults" } }, - "description": "EnableHA adds controller machines as necessary to ensure the\ncontroller has the number of machines specified." - } - }, - "definitions": { - "ControllersChangeResult": { + "description": "AllZones returns all availability zones known to Juju. If a\nzone is unusable, unavailable, or deprecated the Available\nfield will be false." + }, + "ListSubnets": { "type": "object", "properties": { - "error": { - "$ref": "#/definitions/Error" + "Params": { + "$ref": "#/definitions/SubnetsFilters" }, - "result": { - "$ref": "#/definitions/ControllersChanges" + "Result": { + "$ref": "#/definitions/ListSubnetsResults" } }, - "additionalProperties": false, - "required": [ - "result" - ] + "description": "ListSubnets returns the matching subnets after applying\noptional filters." }, - "ControllersChangeResults": { + "SubnetsByCIDR": { "type": "object", "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ControllersChangeResult" - } + "Params": { + "$ref": "#/definitions/CIDRParams" + }, + "Result": { + "$ref": "#/definitions/SubnetsResults" } }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "ControllersChanges": { + "description": "SubnetsByCIDR returns the collection of subnets matching each CIDR in the input." + } + }, + "definitions": { + "CIDRParams": { "type": "object", "properties": { - "added": { - "type": "array", - "items": { - "type": "string" - } - }, - "converted": { - "type": "array", - "items": { - "type": "string" - } - }, - "maintained": { - "type": "array", - "items": { - "type": "string" - } - }, - "removed": { + "cidrs": { "type": "array", "items": { "type": "string" } } }, - "additionalProperties": false + "additionalProperties": false, + "required": [ + "cidrs" + ] }, - "ControllersSpec": { + "Error": { "type": "object", "properties": { - "constraints": { - "$ref": "#/definitions/Value" - }, - "num-controllers": { - "type": "integer" + "code": { + "type": "string" }, - "placement": { - "type": "array", - "items": { - "type": "string" + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } } + }, + "message": { + "type": "string" } }, "additionalProperties": false, "required": [ - "num-controllers" + "message", + "code" ] }, - "ControllersSpecs": { + "ListSubnetsResults": { "type": "object", "properties": { - "specs": { + "results": { "type": "array", "items": { - "$ref": "#/definitions/ControllersSpec" + "$ref": "#/definitions/Subnet" } } }, "additionalProperties": false, "required": [ - "specs" + "results" ] }, - "Error": { + "Subnet": { "type": "object", "properties": { - "code": { + "cidr": { "type": "string" }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } + "life": { + "type": "string" }, - "message": { + "provider-id": { + "type": "string" + }, + "provider-network-id": { + "type": "string" + }, + "provider-space-id": { + "type": "string" + }, + "space-tag": { "type": "string" + }, + "status": { + "type": "string" + }, + "vlan-tag": { + "type": "integer" + }, + "zones": { + "type": "array", + "items": { + "type": "string" + } } }, "additionalProperties": false, "required": [ - "message", - "code" + "cidr", + "vlan-tag", + "life", + "space-tag", + "zones" ] }, - "Value": { + "SubnetV2": { "type": "object", "properties": { - "allocate-public-ip": { - "type": "boolean" + "Subnet": { + "$ref": "#/definitions/Subnet" }, - "arch": { + "cidr": { "type": "string" }, - "container": { + "id": { "type": "string" }, - "cores": { - "type": "integer" + "life": { + "type": "string" }, - "cpu-power": { - "type": "integer" + "provider-id": { + "type": "string" }, - "image-id": { + "provider-network-id": { "type": "string" }, - "instance-role": { + "provider-space-id": { "type": "string" }, - "instance-type": { + "space-tag": { "type": "string" }, - "mem": { - "type": "integer" + "status": { + "type": "string" }, - "root-disk": { + "vlan-tag": { "type": "integer" }, - "root-disk-source": { - "type": "string" - }, - "spaces": { + "zones": { "type": "array", "items": { "type": "string" } + } + }, + "additionalProperties": false, + "required": [ + "cidr", + "vlan-tag", + "life", + "space-tag", + "zones", + "Subnet" + ] + }, + "SubnetsFilters": { + "type": "object", + "properties": { + "space-tag": { + "type": "string" }, - "tags": { + "zone": { + "type": "string" + } + }, + "additionalProperties": false + }, + "SubnetsResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "subnets": { "type": "array", "items": { - "type": "string" + "$ref": "#/definitions/SubnetV2" + } + } + }, + "additionalProperties": false + }, + "SubnetsResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/SubnetsResult" } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "ZoneResult": { + "type": "object", + "properties": { + "available": { + "type": "boolean" }, - "virt-type": { - "type": "string" + "error": { + "$ref": "#/definitions/Error" }, - "zones": { + "name": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "name", + "available" + ] + }, + "ZoneResults": { + "type": "object", + "properties": { + "results": { "type": "array", "items": { - "type": "string" + "$ref": "#/definitions/ZoneResult" } } }, - "additionalProperties": false + "additionalProperties": false, + "required": [ + "results" + ] } } } }, { - "Name": "ImageMetadataManager", - "Description": "API is the concrete implementation of the api end point\nfor loud image metadata manipulations.", + "Name": "Undertaker", + "Description": "UndertakerAPI implements the API used by the model undertaker worker.", "Version": 1, "AvailableTo": [ "controller-machine-agent", @@ -10322,100 +46386,259 @@ "Schema": { "type": "object", "properties": { - "Delete": { + "CloudSpec": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/MetadataImageIds" + "$ref": "#/definitions/Entities" }, "Result": { - "$ref": "#/definitions/ErrorResults" + "$ref": "#/definitions/CloudSpecResults" } }, - "description": "Delete deletes cloud image metadata for given image ids.\nIt supports bulk calls." + "description": "CloudSpec returns the model's cloud spec." }, - "List": { + "GetCloudSpec": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/ImageMetadataFilter" + "$ref": "#/definitions/ModelTag" }, "Result": { - "$ref": "#/definitions/ListCloudImageMetadataResult" + "$ref": "#/definitions/CloudSpecResult" } }, - "description": "List returns all found cloud image metadata that satisfy\ngiven filter.\nReturned list contains metadata ordered by priority." + "description": "GetCloudSpec constructs the CloudSpec for a validated and authorized model." }, - "Save": { + "ModelConfig": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/ModelConfigResult" + } + }, + "description": "ModelConfig returns the current model's configuration." + }, + "ModelInfo": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/UndertakerModelInfoResult" + } + }, + "description": "ModelInfo returns information on the model needed by the undertaker worker." + }, + "ProcessDyingModel": { + "type": "object", + "description": "ProcessDyingModel checks if a dying model has any machines or applications.\nIf there are none, the model's life is changed from dying to dead." + }, + "RemoveModel": { + "type": "object", + "description": "RemoveModel removes any records of this model from Juju." + }, + "SetStatus": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/MetadataSaveParams" + "$ref": "#/definitions/SetStatus" }, "Result": { "$ref": "#/definitions/ErrorResults" } }, - "description": "Save stores given cloud image metadata.\nIt supports bulk calls." + "description": "SetStatus sets the status of each given entity." + }, + "WatchCloudSpecsChanges": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/NotifyWatchResults" + } + }, + "description": "WatchCloudSpecsChanges returns a watcher for cloud spec changes." + }, + "WatchForModelConfigChanges": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/NotifyWatchResult" + } + }, + "description": "WatchForModelConfigChanges returns a NotifyWatcher that observes\nchanges to the model configuration.\nNote that although the NotifyWatchResult contains an Error field,\nit's not used because we are only returning a single watcher,\nso we use the regular error return." + }, + "WatchModel": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/NotifyWatchResults" + } + }, + "description": "WatchModel creates a watcher for the current model." + }, + "WatchModelResources": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/NotifyWatchResults" + } + }, + "description": "WatchModelResources creates watchers for changes to the lifecycle of an\nmodel's machines and applications and storage." } }, "definitions": { - "CloudImageMetadata": { + "CloudCredential": { "type": "object", "properties": { - "arch": { - "type": "string" + "attrs": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } }, - "image-id": { + "auth-type": { "type": "string" }, - "priority": { - "type": "integer" + "redacted": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "auth-type" + ] + }, + "CloudSpec": { + "type": "object", + "properties": { + "cacertificates": { + "type": "array", + "items": { + "type": "string" + } }, - "region": { - "type": "string" + "credential": { + "$ref": "#/definitions/CloudCredential" }, - "root-storage-size": { - "type": "integer" + "endpoint": { + "type": "string" }, - "root-storage-type": { + "identity-endpoint": { "type": "string" }, - "source": { + "is-controller-cloud": { + "type": "boolean" + }, + "name": { "type": "string" }, - "stream": { + "region": { "type": "string" }, - "version": { + "skip-tls-verify": { + "type": "boolean" + }, + "storage-endpoint": { "type": "string" }, - "virt-type": { + "type": { "type": "string" } }, "additionalProperties": false, "required": [ - "image-id", - "region", - "version", - "arch", - "source", - "priority" + "type", + "name" ] }, - "CloudImageMetadataList": { + "CloudSpecResult": { "type": "object", "properties": { - "metadata": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "$ref": "#/definitions/CloudSpec" + } + }, + "additionalProperties": false + }, + "CloudSpecResults": { + "type": "object", + "properties": { + "results": { "type": "array", "items": { - "$ref": "#/definitions/CloudImageMetadata" + "$ref": "#/definitions/CloudSpecResult" } } }, "additionalProperties": false }, + "Entities": { + "type": "object", + "properties": { + "entities": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } + } + }, + "additionalProperties": false, + "required": [ + "entities" + ] + }, + "Entity": { + "type": "object", + "properties": { + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag" + ] + }, + "EntityStatusArgs": { + "type": "object", + "properties": { + "data": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "info": { + "type": "string" + }, + "status": { + "type": "string" + }, + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag", + "status", + "info", + "data" + ] + }, "Error": { "type": "object", "properties": { @@ -10465,138 +46688,170 @@ "results" ] }, - "ImageMetadataFilter": { + "ModelConfigResult": { "type": "object", "properties": { - "arches": { - "type": "array", - "items": { - "type": "string" + "config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } } - }, - "region": { - "type": "string" - }, - "root-storage-type": { - "type": "string" - }, - "stream": { + } + }, + "additionalProperties": false, + "required": [ + "config" + ] + }, + "ModelTag": { + "type": "object", + "additionalProperties": false + }, + "NotifyWatchResult": { + "type": "object", + "properties": { + "NotifyWatcherId": { "type": "string" }, - "versions": { - "type": "array", - "items": { - "type": "string" - } - }, - "virt-type": { - "type": "string" + "error": { + "$ref": "#/definitions/Error" } }, - "additionalProperties": false + "additionalProperties": false, + "required": [ + "NotifyWatcherId" + ] }, - "ListCloudImageMetadataResult": { + "NotifyWatchResults": { "type": "object", "properties": { - "result": { + "results": { "type": "array", "items": { - "$ref": "#/definitions/CloudImageMetadata" + "$ref": "#/definitions/NotifyWatchResult" } } }, "additionalProperties": false, "required": [ - "result" + "results" ] }, - "MetadataImageIds": { + "SetStatus": { "type": "object", "properties": { - "image-ids": { + "entities": { "type": "array", "items": { - "type": "string" + "$ref": "#/definitions/EntityStatusArgs" } } }, "additionalProperties": false, "required": [ - "image-ids" + "entities" ] }, - "MetadataSaveParams": { + "UndertakerModelInfo": { "type": "object", "properties": { - "metadata": { - "type": "array", - "items": { - "$ref": "#/definitions/CloudImageMetadataList" - } + "destroy-timeout": { + "type": "integer" + }, + "force-destroyed": { + "type": "boolean" + }, + "global-name": { + "type": "string" + }, + "is-system": { + "type": "boolean" + }, + "life": { + "type": "string" + }, + "name": { + "type": "string" + }, + "uuid": { + "type": "string" } }, - "additionalProperties": false + "additionalProperties": false, + "required": [ + "uuid", + "name", + "global-name", + "is-system", + "life" + ] + }, + "UndertakerModelInfoResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "$ref": "#/definitions/UndertakerModelInfo" + } + }, + "additionalProperties": false, + "required": [ + "result" + ] } } } }, { - "Name": "KeyManager", - "Description": "KeyManagerAPI provides api endpoints for manipulating ssh keys", + "Name": "UnitAssigner", + "Description": "API implements the functionality for assigning units to machines.", "Version": 1, "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", "model-user" ], "Schema": { "type": "object", "properties": { - "AddKeys": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ModifyUserSSHKeys" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "AddKeys adds new authorised ssh keys for the specified user." - }, - "DeleteKeys": { + "AssignUnits": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/ModifyUserSSHKeys" + "$ref": "#/definitions/Entities" }, "Result": { "$ref": "#/definitions/ErrorResults" } }, - "description": "DeleteKeys deletes the authorised ssh keys for the specified user." + "description": "AssignUnits assigns the units with the given ids to the correct machine. The\nerror results are returned in the same order as the given entities." }, - "ImportKeys": { + "SetAgentStatus": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/ModifyUserSSHKeys" + "$ref": "#/definitions/SetStatus" }, "Result": { "$ref": "#/definitions/ErrorResults" } }, - "description": "ImportKeys imports new authorised ssh keys from the specified key ids for the specified user." + "description": "SetAgentStatus will set status for agents of Units passed in args, if one\nof the args is not an Unit it will fail." }, - "ListKeys": { + "WatchUnitAssignments": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/ListSSHKeys" - }, "Result": { - "$ref": "#/definitions/StringsResults" + "$ref": "#/definitions/StringsWatchResult" } }, - "description": "ListKeys returns the authorised ssh keys for the specified users." + "description": "WatchUnitAssignments returns a strings watcher that is notified when new unit\nassignments are added to the db." } }, "definitions": { @@ -10627,6 +46882,36 @@ "tag" ] }, + "EntityStatusArgs": { + "type": "object", + "properties": { + "data": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "info": { + "type": "string" + }, + "status": { + "type": "string" + }, + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag", + "status", + "info", + "data" + ] + }, "Error": { "type": "object", "properties": { @@ -10676,78 +46961,49 @@ "results" ] }, - "ListSSHKeys": { + "SetStatus": { "type": "object", "properties": { "entities": { - "$ref": "#/definitions/Entities" - }, - "mode": { - "type": "boolean" + "type": "array", + "items": { + "$ref": "#/definitions/EntityStatusArgs" + } } }, "additionalProperties": false, "required": [ - "entities", - "mode" + "entities" ] }, - "ModifyUserSSHKeys": { + "StringsWatchResult": { "type": "object", "properties": { - "ssh-keys": { + "changes": { "type": "array", "items": { "type": "string" } }, - "user": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "user", - "ssh-keys" - ] - }, - "StringsResult": { - "type": "object", - "properties": { "error": { "$ref": "#/definitions/Error" }, - "result": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "StringsResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StringsResult" - } + "watcher-id": { + "type": "string" } }, "additionalProperties": false, "required": [ - "results" + "watcher-id" ] } } } }, { - "Name": "MachineManager", - "Description": "MachineManagerAPI provides access to the MachineManager API facade.", - "Version": 10, + "Name": "Uniter", + "Description": "UniterAPI implements the latest version (v18) of the Uniter API.", + "Version": 19, "AvailableTo": [ "controller-machine-agent", "machine-agent", @@ -10757,1748 +47013,1269 @@ "Schema": { "type": "object", "properties": { - "AddMachines": { + "APIAddresses": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/StringsResult" + } + }, + "description": "APIAddresses returns the list of addresses used to connect to the API." + }, + "APIHostPorts": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/APIHostPortsResult" + } + }, + "description": "APIHostPorts returns the API server addresses." + }, + "ActionStatus": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/AddMachines" + "$ref": "#/definitions/Entities" }, "Result": { - "$ref": "#/definitions/AddMachinesResults" + "$ref": "#/definitions/StringResults" } }, - "description": "AddMachines adds new machines with the supplied parameters.\nThe args will contain Base info." + "description": "ActionStatus returns the status of Actions by Tags passed in." }, - "DestroyMachineWithParams": { + "Actions": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/DestroyMachinesParams" + "$ref": "#/definitions/Entities" }, "Result": { - "$ref": "#/definitions/DestroyMachineResults" + "$ref": "#/definitions/ActionResults" } }, - "description": "DestroyMachineWithParams removes a set of machines from the model." + "description": "Actions returns the Actions by Tags passed and ensures that the Unit asking\nfor them is the same Unit that has the Actions." }, - "GetUpgradeSeriesMessages": { + "AddMetricBatches": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/UpgradeSeriesNotificationParams" + "$ref": "#/definitions/MetricBatchParams" }, "Result": { - "$ref": "#/definitions/StringsResults" + "$ref": "#/definitions/ErrorResults" } }, - "description": "GetUpgradeSeriesMessages returns all new messages associated with upgrade\nseries events. Messages that have already been retrieved once are not\nreturned by this method." + "description": "AddMetricBatches adds the metrics for the specified unit." }, - "InstanceTypes": { + "ApplicationStatus": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/ModelInstanceTypesConstraints" + "$ref": "#/definitions/Entities" }, "Result": { - "$ref": "#/definitions/InstanceTypesResults" + "$ref": "#/definitions/ApplicationStatusResults" } }, - "description": "InstanceTypes returns instance type information for the cloud and region\nin which the current model is deployed." + "description": "ApplicationStatus returns the status of the Applications and its workloads\nif the given unit is the leader." }, - "ProvisioningScript": { + "AssignedMachine": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/ProvisioningScriptParams" + "$ref": "#/definitions/Entities" }, "Result": { - "$ref": "#/definitions/ProvisioningScriptResult" + "$ref": "#/definitions/StringResults" } }, - "description": "ProvisioningScript returns a shell script that, when run,\nprovisions a machine agent on the machine executing the script." + "description": "AssignedMachine returns the machine tag for each given unit tag, or\nan error satisfying params.IsCodeNotAssigned when a unit has no\nassigned machine." }, - "RetryProvisioning": { + "AvailabilityZone": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/RetryProvisioningArgs" + "$ref": "#/definitions/Entities" }, "Result": { - "$ref": "#/definitions/ErrorResults" + "$ref": "#/definitions/StringResults" } }, - "description": "RetryProvisioning marks a provisioning error as transient on the machines." + "description": "AvailabilityZone returns the availability zone for each given unit, if applicable." }, - "UpgradeSeriesComplete": { + "BeginActions": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/UpdateChannelArg" + "$ref": "#/definitions/Entities" }, "Result": { - "$ref": "#/definitions/ErrorResult" + "$ref": "#/definitions/ErrorResults" } }, - "description": "UpgradeSeriesComplete marks a machine as having completed a managed series\nupgrade." + "description": "BeginActions marks the actions represented by the passed in Tags as running." }, - "UpgradeSeriesPrepare": { + "CanApplyLXDProfile": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/UpdateChannelArg" + "$ref": "#/definitions/Entities" }, "Result": { - "$ref": "#/definitions/ErrorResult" + "$ref": "#/definitions/BoolResults" } }, - "description": "UpgradeSeriesPrepare prepares a machine for a OS series upgrade." + "description": "CanApplyLXDProfile is a shim to call the LXDProfileAPIv2 version of this method." }, - "UpgradeSeriesValidate": { + "CharmArchiveSha256": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/UpdateChannelArgs" + "$ref": "#/definitions/CharmURLs" }, "Result": { - "$ref": "#/definitions/UpgradeSeriesUnitsResults" + "$ref": "#/definitions/StringResults" } }, - "description": "UpgradeSeriesValidate validates that the incoming arguments correspond to a\nvalid series upgrade for the target machine.\nIf they do, a list of the machine's current units is returned for use in\nsoliciting user confirmation of the command." + "description": "CharmArchiveSha256 returns the SHA256 digest of the charm archive\n(bundle) data for each charm url in the given parameters." }, - "WatchUpgradeSeriesNotifications": { + "CharmModifiedVersion": { "type": "object", "properties": { "Params": { "$ref": "#/definitions/Entities" }, "Result": { - "$ref": "#/definitions/NotifyWatchResults" + "$ref": "#/definitions/IntResults" } }, - "description": "WatchUpgradeSeriesNotifications returns a watcher that fires on upgrade\nseries events." - } - }, - "definitions": { - "AddMachineParams": { + "description": "CharmModifiedVersion returns the most CharmModifiedVersion for all given\nunits or applications." + }, + "CharmURL": { "type": "object", "properties": { - "addresses": { - "type": "array", - "items": { - "$ref": "#/definitions/Address" - } - }, - "base": { - "$ref": "#/definitions/Base" - }, - "constraints": { - "$ref": "#/definitions/Value" - }, - "container-type": { - "type": "string" - }, - "disks": { - "type": "array", - "items": { - "$ref": "#/definitions/Constraints" - } - }, - "hardware-characteristics": { - "$ref": "#/definitions/HardwareCharacteristics" - }, - "instance-id": { - "type": "string" - }, - "jobs": { - "type": "array", - "items": { - "type": "string" - } - }, - "nonce": { - "type": "string" - }, - "parent-id": { - "type": "string" + "Params": { + "$ref": "#/definitions/Entities" }, - "placement": { - "$ref": "#/definitions/Placement" + "Result": { + "$ref": "#/definitions/StringBoolResults" } }, - "additionalProperties": false, - "required": [ - "constraints", - "jobs", - "parent-id", - "container-type", - "instance-id", - "nonce", - "hardware-characteristics", - "addresses" - ] + "description": "CharmURL returns the charm URL for all given units or applications." }, - "AddMachines": { + "ClearResolved": { "type": "object", "properties": { - "params": { - "type": "array", - "items": { - "$ref": "#/definitions/AddMachineParams" - } + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" } }, - "additionalProperties": false, - "required": [ - "params" - ] + "description": "ClearResolved removes any resolved setting from each given unit." }, - "AddMachinesResult": { + "CloudAPIVersion": { "type": "object", "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "machine": { - "type": "string" + "Result": { + "$ref": "#/definitions/StringResult" } }, - "additionalProperties": false, - "required": [ - "machine" - ] + "description": "CloudAPIVersion returns the cloud API version, if available." }, - "AddMachinesResults": { + "CloudSpec": { "type": "object", "properties": { - "machines": { - "type": "array", - "items": { - "$ref": "#/definitions/AddMachinesResult" - } + "Result": { + "$ref": "#/definitions/CloudSpecResult" } }, - "additionalProperties": false, - "required": [ - "machines" - ] + "description": "CloudSpec returns the cloud spec used by the model in which the\nauthenticated unit or application resides.\nA check is made beforehand to ensure that the request is made by an entity\nthat has been granted the appropriate trust." }, - "Address": { + "CommitHookChanges": { "type": "object", "properties": { - "cidr": { - "type": "string" - }, - "config-type": { - "type": "string" - }, - "is-secondary": { - "type": "boolean" - }, - "scope": { - "type": "string" - }, - "space-id": { - "type": "string" - }, - "space-name": { - "type": "string" - }, - "type": { - "type": "string" + "Params": { + "$ref": "#/definitions/CommitHookChangesArgs" }, - "value": { - "type": "string" + "Result": { + "$ref": "#/definitions/ErrorResults" } }, - "additionalProperties": false, - "required": [ - "value", - "type", - "scope" - ] + "description": "CommitHookChanges batches together all required API calls for applying\na set of changes after a hook successfully completes and executes them in a\nsingle transaction." }, - "Base": { + "ConfigSettings": { "type": "object", "properties": { - "channel": { - "type": "string" + "Params": { + "$ref": "#/definitions/Entities" }, - "name": { - "type": "string" + "Result": { + "$ref": "#/definitions/ConfigSettingsResults" } }, - "additionalProperties": false, - "required": [ - "name", - "channel" - ] + "description": "ConfigSettings returns the complete set of application charm config\nsettings available to each given unit." }, - "Constraints": { + "CreateSecretURIs": { "type": "object", "properties": { - "Count": { - "type": "integer" - }, - "Pool": { - "type": "string" + "Params": { + "$ref": "#/definitions/CreateSecretURIsArg" }, - "Size": { - "type": "integer" + "Result": { + "$ref": "#/definitions/StringResults" } }, - "additionalProperties": false, - "required": [ - "Pool", - "Size", - "Count" - ] + "description": "CreateSecretURIs creates new secret URIs." }, - "DestroyMachineInfo": { + "CreateSecrets": { "type": "object", "properties": { - "destroyed-containers": { - "type": "array", - "items": { - "$ref": "#/definitions/DestroyMachineResult" - } - }, - "destroyed-storage": { - "type": "array", - "items": { - "$ref": "#/definitions/Entity" - } - }, - "destroyed-units": { - "type": "array", - "items": { - "$ref": "#/definitions/Entity" - } + "Params": { + "$ref": "#/definitions/CreateSecretArgs" }, - "detached-storage": { - "type": "array", - "items": { - "$ref": "#/definitions/Entity" - } + "Result": { + "$ref": "#/definitions/StringResults" + } + }, + "description": "CreateSecrets creates new secrets." + }, + "CurrentModel": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/ModelResult" + } + }, + "description": "CurrentModel returns the name and UUID for the current juju model." + }, + "Destroy": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" }, - "machine-id": { - "type": "string" + "Result": { + "$ref": "#/definitions/ErrorResults" } }, - "additionalProperties": false, - "required": [ - "machine-id" - ] + "description": "Destroy advances all given Alive units' lifecycles as far as\npossible. See state/Unit.Destroy()." }, - "DestroyMachineResult": { + "DestroyAllSubordinates": { "type": "object", "properties": { - "error": { - "$ref": "#/definitions/Error" + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "DestroyAllSubordinates destroys all subordinates of each given unit." + }, + "DestroyUnitStorageAttachments": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" }, - "info": { - "$ref": "#/definitions/DestroyMachineInfo" + "Result": { + "$ref": "#/definitions/ErrorResults" } }, - "additionalProperties": false + "description": "DestroyUnitStorageAttachments marks each storage attachment of the\nspecified units as Dying." }, - "DestroyMachineResults": { + "EnsureDead": { "type": "object", "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/DestroyMachineResult" - } + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" } }, - "additionalProperties": false + "description": "EnsureDead calls EnsureDead on each given entity from state. It\nwill fail if the entity is not present. If it's Alive, nothing will\nhappen (see state/EnsureDead() for units or machines)." }, - "DestroyMachinesParams": { + "EnterScope": { "type": "object", "properties": { - "dry-run": { - "type": "boolean" - }, - "force": { - "type": "boolean" - }, - "keep": { - "type": "boolean" - }, - "machine-tags": { - "type": "array", - "items": { - "type": "string" - } + "Params": { + "$ref": "#/definitions/RelationUnits" }, - "max-wait": { - "type": "integer" + "Result": { + "$ref": "#/definitions/ErrorResults" } }, - "additionalProperties": false, - "required": [ - "machine-tags" - ] + "description": "EnterScope ensures each unit has entered its scope in the relation,\nfor all of the given relation/unit pairs. See also\nstate.RelationUnit.EnterScope()." }, - "Entities": { + "FinishActions": { "type": "object", "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/Entity" - } + "Params": { + "$ref": "#/definitions/ActionExecutionResults" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" } }, - "additionalProperties": false, - "required": [ - "entities" - ] + "description": "FinishActions saves the result of a completed Action" }, - "Entity": { + "GetConsumerSecretsRevisionInfo": { "type": "object", "properties": { - "tag": { - "type": "string" + "Params": { + "$ref": "#/definitions/GetSecretConsumerInfoArgs" + }, + "Result": { + "$ref": "#/definitions/SecretConsumerInfoResults" } }, - "additionalProperties": false, - "required": [ - "tag" - ] + "description": "GetConsumerSecretsRevisionInfo returns the latest secret revisions for the specified secrets.\nThis facade method is used for remote watcher to get the latest secret revisions and labels for a secret changed hook." }, - "Error": { + "GetMeterStatus": { "type": "object", "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } + "Params": { + "$ref": "#/definitions/Entities" }, - "message": { - "type": "string" + "Result": { + "$ref": "#/definitions/MeterStatusResults" } - }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] + } }, - "ErrorResult": { + "GetPodSpec": { "type": "object", "properties": { - "error": { - "$ref": "#/definitions/Error" + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/StringResults" } }, - "additionalProperties": false + "description": "GetPodSpec gets the pod specs for a set of applications." }, - "ErrorResults": { + "GetPrincipal": { "type": "object", "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/StringBoolResults" } }, - "additionalProperties": false, - "required": [ - "results" - ] + "description": "GetPrincipal returns the result of calling PrincipalName() and\nconverting it to a tag, on each given unit." }, - "HardwareCharacteristics": { + "GetRawK8sSpec": { "type": "object", "properties": { - "arch": { - "type": "string" - }, - "availability-zone": { - "type": "string" - }, - "cpu-cores": { - "type": "integer" - }, - "cpu-power": { - "type": "integer" - }, - "mem": { - "type": "integer" - }, - "root-disk": { - "type": "integer" - }, - "root-disk-source": { - "type": "string" - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } + "Params": { + "$ref": "#/definitions/Entities" }, - "virt-type": { - "type": "string" + "Result": { + "$ref": "#/definitions/StringResults" } }, - "additionalProperties": false + "description": "GetRawK8sSpec gets the raw k8s specs for a set of applications." }, - "InstanceType": { + "GetSecretBackendConfigs": { "type": "object", "properties": { - "arches": { - "type": "array", - "items": { - "type": "string" - } - }, - "cost": { - "type": "integer" - }, - "cpu-cores": { - "type": "integer" - }, - "memory": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "root-disk": { - "type": "integer" + "Params": { + "$ref": "#/definitions/SecretBackendArgs" }, - "virt-type": { - "type": "string" + "Result": { + "$ref": "#/definitions/SecretBackendConfigResults" } }, - "additionalProperties": false, - "required": [ - "arches", - "cpu-cores", - "memory" - ] + "description": "GetSecretBackendConfigs gets the config needed to create a client to secret backends." }, - "InstanceTypesResult": { + "GetSecretContentInfo": { "type": "object", "properties": { - "cost-currency": { - "type": "string" - }, - "cost-divisor": { - "type": "integer" - }, - "cost-unit": { - "type": "string" - }, - "error": { - "$ref": "#/definitions/Error" + "Params": { + "$ref": "#/definitions/GetSecretContentArgs" }, - "instance-types": { - "type": "array", - "items": { - "$ref": "#/definitions/InstanceType" - } + "Result": { + "$ref": "#/definitions/SecretContentResults" } }, - "additionalProperties": false + "description": "GetSecretContentInfo returns the secret values for the specified secrets." }, - "InstanceTypesResults": { + "GetSecretMetadata": { "type": "object", "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/InstanceTypesResult" - } + "Result": { + "$ref": "#/definitions/ListSecretResults" } }, - "additionalProperties": false, - "required": [ - "results" - ] + "description": "GetSecretMetadata returns metadata for the caller's secrets." }, - "ModelInstanceTypesConstraint": { + "GetSecretRevisionContentInfo": { "type": "object", "properties": { - "value": { - "$ref": "#/definitions/Value" + "Params": { + "$ref": "#/definitions/SecretRevisionArg" + }, + "Result": { + "$ref": "#/definitions/SecretContentResults" } }, - "additionalProperties": false + "description": "GetSecretRevisionContentInfo returns the secret values for the specified secret revisions." }, - "ModelInstanceTypesConstraints": { + "GoalStates": { "type": "object", "properties": { - "constraints": { - "type": "array", - "items": { - "$ref": "#/definitions/ModelInstanceTypesConstraint" - } + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/GoalStateResults" } }, - "additionalProperties": false, - "required": [ - "constraints" - ] + "description": "GoalStates returns information of charm units and relations." }, - "NotifyWatchResult": { + "HasSubordinates": { "type": "object", "properties": { - "NotifyWatcherId": { - "type": "string" + "Params": { + "$ref": "#/definitions/Entities" }, - "error": { - "$ref": "#/definitions/Error" + "Result": { + "$ref": "#/definitions/BoolResults" } }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId" - ] + "description": "HasSubordinates returns the whether each given unit has any subordinates." }, - "NotifyWatchResults": { + "LXDProfileName": { "type": "object", "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/NotifyWatchResult" - } + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/StringResults" } }, - "additionalProperties": false, - "required": [ - "results" - ] + "description": "LXDProfileName is a shim to call the LXDProfileAPIv2 version of this method." }, - "Placement": { + "LXDProfileRequired": { "type": "object", "properties": { - "directive": { - "type": "string" + "Params": { + "$ref": "#/definitions/CharmURLs" }, - "scope": { - "type": "string" + "Result": { + "$ref": "#/definitions/BoolResults" } }, - "additionalProperties": false, - "required": [ - "scope", - "directive" - ] + "description": "LXDProfileRequired is a shim to call the LXDProfileAPIv2 version of this method." }, - "ProvisioningScriptParams": { + "LeaveScope": { "type": "object", "properties": { - "data-dir": { - "type": "string" - }, - "disable-package-commands": { - "type": "boolean" - }, - "machine-id": { - "type": "string" + "Params": { + "$ref": "#/definitions/RelationUnits" }, - "nonce": { - "type": "string" + "Result": { + "$ref": "#/definitions/ErrorResults" } }, - "additionalProperties": false, - "required": [ - "machine-id", - "nonce", - "data-dir", - "disable-package-commands" - ] + "description": "LeaveScope signals each unit has left its scope in the relation,\nfor all of the given relation/unit pairs. See also\nstate.RelationUnit.LeaveScope()." }, - "ProvisioningScriptResult": { + "Life": { "type": "object", "properties": { - "script": { - "type": "string" + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/LifeResults" } }, - "additionalProperties": false, - "required": [ - "script" - ] + "description": "Life returns the life status of every supplied entity, where available." }, - "RetryProvisioningArgs": { + "LogActionsMessages": { "type": "object", "properties": { - "all": { - "type": "boolean" + "Params": { + "$ref": "#/definitions/ActionMessageParams" }, - "machines": { - "type": "array", - "items": { - "type": "string" - } + "Result": { + "$ref": "#/definitions/ErrorResults" } }, - "additionalProperties": false, - "required": [ - "all" - ] + "description": "LogActionsMessages records the log messages against the specified actions." }, - "StringsResult": { + "Merge": { "type": "object", "properties": { - "error": { - "$ref": "#/definitions/Error" + "Params": { + "$ref": "#/definitions/MergeLeadershipSettingsBulkParams" }, - "result": { - "type": "array", - "items": { - "type": "string" - } + "Result": { + "$ref": "#/definitions/ErrorResults" } }, - "additionalProperties": false + "description": "Merge merges in the provided leadership settings. Only leaders for\nthe given service may perform this operation." }, - "StringsResults": { + "ModelConfig": { "type": "object", "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/StringsResult" - } + "Result": { + "$ref": "#/definitions/ModelConfigResult" } }, - "additionalProperties": false, - "required": [ - "results" - ] + "description": "ModelConfig returns the current model's configuration." }, - "UpdateChannelArg": { + "NetworkInfo": { "type": "object", "properties": { - "channel": { - "type": "string" + "Params": { + "$ref": "#/definitions/NetworkInfoParams" }, - "force": { - "type": "boolean" + "Result": { + "$ref": "#/definitions/NetworkInfoResults" + } + }, + "description": "NetworkInfo returns network interfaces/addresses for specified bindings." + }, + "OpenedMachinePortRangesByEndpoint": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" }, - "tag": { - "$ref": "#/definitions/Entity" + "Result": { + "$ref": "#/definitions/OpenPortRangesByEndpointResults" } }, - "additionalProperties": false, - "required": [ - "tag", - "force", - "channel" - ] + "description": "OpenedMachinePortRangesByEndpoint returns the port ranges opened by each\nunit on the provided machines grouped by application endpoint." }, - "UpdateChannelArgs": { + "OpenedPortRangesByEndpoint": { "type": "object", "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/UpdateChannelArg" - } + "Result": { + "$ref": "#/definitions/OpenPortRangesByEndpointResults" } }, - "additionalProperties": false, - "required": [ - "args" - ] + "description": "OpenedPortRangesByEndpoint returns the port ranges opened by the unit." }, - "UpgradeSeriesNotificationParam": { + "PrivateAddress": { "type": "object", "properties": { - "entity": { - "$ref": "#/definitions/Entity" + "Params": { + "$ref": "#/definitions/Entities" }, - "watcher-id": { - "type": "string" + "Result": { + "$ref": "#/definitions/StringResults" } }, - "additionalProperties": false, - "required": [ - "entity", - "watcher-id" - ] + "description": "PrivateAddress returns the private address for each given unit, if set." }, - "UpgradeSeriesNotificationParams": { + "ProviderType": { "type": "object", "properties": { - "params": { - "type": "array", - "items": { - "$ref": "#/definitions/UpgradeSeriesNotificationParam" - } + "Result": { + "$ref": "#/definitions/StringResult" } }, - "additionalProperties": false, - "required": [ - "params" - ] + "description": "ProviderType returns the provider type used by the current juju\nmodel.\n\nTODO(dimitern): Refactor the uniter to call this instead of calling\nModelConfig() just to get the provider type. Once we have machine\naddresses, this might be completely unnecessary though." }, - "UpgradeSeriesUnitsResult": { + "PublicAddress": { "type": "object", "properties": { - "error": { - "$ref": "#/definitions/Error" + "Params": { + "$ref": "#/definitions/Entities" }, - "unit-names": { - "type": "array", - "items": { - "type": "string" - } + "Result": { + "$ref": "#/definitions/StringResults" } }, - "additionalProperties": false, - "required": [ - "unit-names" - ] + "description": "PublicAddress returns the public address for each given unit, if set." }, - "UpgradeSeriesUnitsResults": { + "Read": { "type": "object", "properties": { - "Results": { - "type": "array", - "items": { - "$ref": "#/definitions/UpgradeSeriesUnitsResult" - } + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/GetLeadershipSettingsBulkResults" } }, - "additionalProperties": false, - "required": [ - "Results" - ] + "description": "Read reads leadership settings for the provided service ID. Any\nunit of the service may perform this operation." }, - "Value": { + "ReadLocalApplicationSettings": { "type": "object", "properties": { - "allocate-public-ip": { - "type": "boolean" - }, - "arch": { - "type": "string" - }, - "container": { - "type": "string" - }, - "cores": { - "type": "integer" - }, - "cpu-power": { - "type": "integer" - }, - "image-id": { - "type": "string" - }, - "instance-role": { - "type": "string" - }, - "instance-type": { - "type": "string" - }, - "mem": { - "type": "integer" - }, - "root-disk": { - "type": "integer" - }, - "root-disk-source": { - "type": "string" - }, - "spaces": { - "type": "array", - "items": { - "type": "string" - } - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "virt-type": { - "type": "string" + "Params": { + "$ref": "#/definitions/RelationUnit" }, - "zones": { - "type": "array", - "items": { - "type": "string" - } + "Result": { + "$ref": "#/definitions/SettingsResult" } }, - "additionalProperties": false - } - } - } - }, - { - "Name": "MetricsDebug", - "Description": "MetricsDebugAPI implements the metricsdebug interface and is the concrete\nimplementation of the api end point.", - "Version": 2, - "AvailableTo": [ - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "GetMetrics": { + "description": "ReadLocalApplicationSettings returns the local application settings for a\nparticular relation when invoked by the leader unit." + }, + "ReadRemoteSettings": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/RelationUnitPairs" + }, + "Result": { + "$ref": "#/definitions/SettingsResults" + } + }, + "description": "ReadRemoteSettings returns the remote settings of each given set of\nrelation/local unit/remote unit." + }, + "ReadSettings": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/Entities" + "$ref": "#/definitions/RelationUnits" }, "Result": { - "$ref": "#/definitions/MetricResults" + "$ref": "#/definitions/SettingsResults" } }, - "description": "GetMetrics returns all metrics stored by the state server." + "description": "ReadSettings returns the local settings of each given set of\nrelation/unit.\n\nNOTE(achilleasa): Using this call to read application data is deprecated\nand will not work for k8s charms (see LP1876097). Instead, clients should\nuse ReadLocalApplicationSettings." }, - "SetMeterStatus": { + "Refresh": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/MeterStatusParams" + "$ref": "#/definitions/Entities" }, "Result": { - "$ref": "#/definitions/ErrorResults" + "$ref": "#/definitions/UnitRefreshResults" } }, - "description": "SetMeterStatus sets meter statuses for entities." - } - }, - "definitions": { - "Entities": { + "description": "Refresh retrieves the latest values for attributes on this unit." + }, + "Relation": { "type": "object", "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/Entity" - } + "Params": { + "$ref": "#/definitions/RelationUnits" + }, + "Result": { + "$ref": "#/definitions/RelationResults" } }, - "additionalProperties": false, - "required": [ - "entities" - ] + "description": "Relation returns information about all given relation/unit pairs,\nincluding their id, key and the local endpoint." }, - "Entity": { + "RelationById": { "type": "object", "properties": { - "tag": { - "type": "string" + "Params": { + "$ref": "#/definitions/RelationIds" + }, + "Result": { + "$ref": "#/definitions/RelationResults" } }, - "additionalProperties": false, - "required": [ - "tag" - ] + "description": "RelationById returns information about all given relations,\nspecified by their ids, including their key and the local\nendpoint." }, - "EntityMetrics": { + "RelationsStatus": { "type": "object", "properties": { - "error": { - "$ref": "#/definitions/Error" + "Params": { + "$ref": "#/definitions/Entities" }, - "metrics": { - "type": "array", - "items": { - "$ref": "#/definitions/MetricResult" - } + "Result": { + "$ref": "#/definitions/RelationUnitStatusResults" } }, - "additionalProperties": false + "description": "RelationsStatus returns for each unit the corresponding relation and status information." }, - "Error": { + "RemoveSecrets": { "type": "object", "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } + "Params": { + "$ref": "#/definitions/DeleteSecretArgs" }, - "message": { - "type": "string" + "Result": { + "$ref": "#/definitions/ErrorResults" } }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] + "description": "RemoveSecrets removes the specified secrets." }, - "ErrorResult": { + "RemoveStorageAttachments": { "type": "object", "properties": { - "error": { - "$ref": "#/definitions/Error" + "Params": { + "$ref": "#/definitions/StorageAttachmentIds" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" } }, - "additionalProperties": false + "description": "RemoveStorageAttachments removes the specified storage\nattachments from state." }, - "ErrorResults": { + "RequestReboot": { "type": "object", "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" } }, - "additionalProperties": false, - "required": [ - "results" - ] + "description": "RequestReboot sets the reboot flag on the provided machines" }, - "MeterStatusParam": { + "Resolved": { "type": "object", "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "string" + "Params": { + "$ref": "#/definitions/Entities" }, - "tag": { - "type": "string" + "Result": { + "$ref": "#/definitions/ResolvedModeResults" } }, - "additionalProperties": false, - "required": [ - "tag", - "code" - ] + "description": "Resolved returns the current resolved setting for each given unit." }, - "MeterStatusParams": { + "SLALevel": { "type": "object", "properties": { - "statues": { - "type": "array", - "items": { - "$ref": "#/definitions/MeterStatusParam" - } + "Result": { + "$ref": "#/definitions/StringResult" } }, - "additionalProperties": false, - "required": [ - "statues" - ] + "description": "SLALevel returns the model's SLA level." }, - "MetricResult": { + "SecretsGrant": { "type": "object", "properties": { - "key": { - "type": "string" - }, - "labels": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "time": { - "type": "string", - "format": "date-time" - }, - "unit": { - "type": "string" + "Params": { + "$ref": "#/definitions/GrantRevokeSecretArgs" }, - "value": { - "type": "string" + "Result": { + "$ref": "#/definitions/ErrorResults" } }, - "additionalProperties": false, - "required": [ - "time", - "key", - "value", - "unit", - "labels" - ] + "description": "SecretsGrant grants access to a secret for the specified subjects." }, - "MetricResults": { + "SecretsRevoke": { "type": "object", "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/EntityMetrics" - } + "Params": { + "$ref": "#/definitions/GrantRevokeSecretArgs" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" } }, - "additionalProperties": false, - "required": [ - "results" - ] - } - } - } - }, - { - "Name": "ModelConfig", - "Description": "ModelConfigAPIV3 is currently the latest.", - "Version": 3, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "controller-user", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "GetModelConstraints": { + "description": "SecretsRevoke revokes access to a secret for the specified subjects." + }, + "SecretsRotated": { "type": "object", "properties": { + "Params": { + "$ref": "#/definitions/SecretRotatedArgs" + }, "Result": { - "$ref": "#/definitions/GetConstraintsResults" + "$ref": "#/definitions/ErrorResults" } }, - "description": "GetModelConstraints returns the constraints for the model." + "description": "SecretsRotated records when secrets were last rotated." }, - "ModelGet": { + "SetAgentStatus": { "type": "object", "properties": { + "Params": { + "$ref": "#/definitions/SetStatus" + }, "Result": { - "$ref": "#/definitions/ModelConfigResults" + "$ref": "#/definitions/ErrorResults" } }, - "description": "ModelGet implements the server-side part of the\nmodel-config CLI command." + "description": "SetAgentStatus will set status for agents of Units passed in args, if one\nof the args is not an Unit it will fail." }, - "ModelSet": { + "SetApplicationStatus": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/ModelSet" + "$ref": "#/definitions/SetStatus" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" } }, - "description": "ModelSet implements the server-side part of the\nset-model-config CLI command." + "description": "SetApplicationStatus sets the status for all the Applications in args if the given Unit is\nthe leader." }, - "ModelUnset": { + "SetCharmURL": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/ModelUnset" + "$ref": "#/definitions/EntitiesCharmURL" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" } }, - "description": "ModelUnset implements the server-side part of the\nset-model-config CLI command." + "description": "SetCharmURL sets the charm URL for each given unit. An error will\nbe returned if a unit is dead, or the charm URL is not known." }, - "SLALevel": { + "SetRelationStatus": { "type": "object", "properties": { + "Params": { + "$ref": "#/definitions/RelationStatusArgs" + }, "Result": { - "$ref": "#/definitions/StringResult" + "$ref": "#/definitions/ErrorResults" } }, - "description": "SLALevel returns the current sla level for the model." + "description": "SetRelationStatus updates the status of the specified relations." }, - "Sequences": { + "SetState": { "type": "object", "properties": { + "Params": { + "$ref": "#/definitions/SetUnitStateArgs" + }, "Result": { - "$ref": "#/definitions/ModelSequencesResult" + "$ref": "#/definitions/ErrorResults" } }, - "description": "Sequences returns the model's sequence names and next values." + "description": "SetState sets the state persisted by the charm running in this unit\nand the state internal to the uniter for this unit." }, - "SetModelConstraints": { + "SetStatus": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/SetConstraints" + "$ref": "#/definitions/SetStatus" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" } }, - "description": "SetModelConstraints sets the constraints for the model." + "description": "SetStatus will set status for a entities passed in args. If the entity is\na Unit it will instead set status to its agent, to emulate backwards\ncompatibility." }, - "SetSLALevel": { + "SetUnitStatus": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/ModelSLA" + "$ref": "#/definitions/SetStatus" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" } }, - "description": "SetSLALevel sets the sla level on the model." - } - }, - "definitions": { - "ConfigValue": { + "description": "SetUnitStatus sets status for all elements passed in args, the difference\nwith SetStatus is that if an entity is a Unit it will set its status instead\nof its agent." + }, + "SetUpgradeSeriesUnitStatus": { "type": "object", "properties": { - "source": { - "type": "string" + "Params": { + "$ref": "#/definitions/UpgradeSeriesStatusParams" }, - "value": { - "type": "object", - "additionalProperties": true + "Result": { + "$ref": "#/definitions/ErrorResults" } }, - "additionalProperties": false, - "required": [ - "value", - "source" - ] + "description": "SetUpgradeSeriesUnitStatus sets the upgrade series status of the unit.\nIf no upgrade is in progress an error is returned instead." }, - "Error": { + "SetWorkloadVersion": { "type": "object", "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } + "Params": { + "$ref": "#/definitions/EntityWorkloadVersions" }, - "message": { - "type": "string" + "Result": { + "$ref": "#/definitions/ErrorResults" } }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] + "description": "SetWorkloadVersion sets the workload version for each given unit. An error will\nbe returned if a unit is dead." }, - "GetConstraintsResults": { + "State": { "type": "object", "properties": { - "constraints": { - "$ref": "#/definitions/Value" + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/UnitStateResults" } }, - "additionalProperties": false, - "required": [ - "constraints" - ] + "description": "State returns the state persisted by the charm running in this unit\nand the state internal to the uniter for this unit." }, - "ModelConfigResults": { + "StorageAttachmentLife": { "type": "object", "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/ConfigValue" - } - } + "Params": { + "$ref": "#/definitions/StorageAttachmentIds" + }, + "Result": { + "$ref": "#/definitions/LifeResults" } }, - "additionalProperties": false, - "required": [ - "config" - ] + "description": "StorageAttachmentLife returns the lifecycle state of the storage attachments\nwith the specified tags." }, - "ModelSLA": { + "StorageAttachments": { "type": "object", "properties": { - "ModelSLAInfo": { - "$ref": "#/definitions/ModelSLAInfo" - }, - "creds": { - "type": "array", - "items": { - "type": "integer" - } - }, - "level": { - "type": "string" + "Params": { + "$ref": "#/definitions/StorageAttachmentIds" }, - "owner": { - "type": "string" + "Result": { + "$ref": "#/definitions/StorageAttachmentResults" } }, - "additionalProperties": false, - "required": [ - "level", - "owner", - "ModelSLAInfo", - "creds" - ] + "description": "StorageAttachments returns the storage attachments with the specified tags." }, - "ModelSLAInfo": { + "UnitStatus": { "type": "object", "properties": { - "level": { - "type": "string" + "Params": { + "$ref": "#/definitions/Entities" }, - "owner": { - "type": "string" + "Result": { + "$ref": "#/definitions/StatusResults" } }, - "additionalProperties": false, - "required": [ - "level", - "owner" - ] + "description": "UnitStatus returns the workload status information for the unit." }, - "ModelSequencesResult": { + "UnitStorageAttachments": { "type": "object", "properties": { - "sequences": { - "type": "object", - "patternProperties": { - ".*": { - "type": "integer" - } - } + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/StorageAttachmentIdsResults" } }, - "additionalProperties": false, - "required": [ - "sequences" - ] + "description": "UnitStorageAttachments returns the IDs of storage attachments for a collection of units." }, - "ModelSet": { + "UpdateNetworkInfo": { "type": "object", "properties": { - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" } }, - "additionalProperties": false, - "required": [ - "config" - ] + "description": "UpdateNetworkInfo refreshes the network settings for a unit's bound\nendpoints." }, - "ModelUnset": { + "UpdateSecrets": { "type": "object", "properties": { - "keys": { - "type": "array", - "items": { - "type": "string" - } + "Params": { + "$ref": "#/definitions/UpdateSecretArgs" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" } }, - "additionalProperties": false, - "required": [ - "keys" - ] + "description": "UpdateSecrets updates the specified secrets." }, - "SetConstraints": { + "UpgradeSeriesUnitStatus": { "type": "object", "properties": { - "application": { - "type": "string" + "Params": { + "$ref": "#/definitions/Entities" }, - "constraints": { - "$ref": "#/definitions/Value" + "Result": { + "$ref": "#/definitions/UpgradeSeriesStatusResults" } }, - "additionalProperties": false, - "required": [ - "application", - "constraints" - ] + "description": "UpgradeSeriesUnitStatus returns the current preparation status of an\nupgrading unit.\nIf no series upgrade is in progress an error is returned instead." }, - "StringResult": { + "Watch": { "type": "object", "properties": { - "error": { - "$ref": "#/definitions/Error" + "Params": { + "$ref": "#/definitions/Entities" }, - "result": { - "type": "string" + "Result": { + "$ref": "#/definitions/NotifyWatchResults" } }, - "additionalProperties": false, - "required": [ - "result" - ] + "description": "Watch starts an NotifyWatcher for each given entity." }, - "Value": { + "WatchAPIHostPorts": { "type": "object", "properties": { - "allocate-public-ip": { - "type": "boolean" - }, - "arch": { - "type": "string" - }, - "container": { - "type": "string" - }, - "cores": { - "type": "integer" - }, - "cpu-power": { - "type": "integer" - }, - "image-id": { - "type": "string" - }, - "instance-role": { - "type": "string" - }, - "instance-type": { - "type": "string" - }, - "mem": { - "type": "integer" - }, - "root-disk": { - "type": "integer" - }, - "root-disk-source": { - "type": "string" - }, - "spaces": { - "type": "array", - "items": { - "type": "string" - } - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } + "Result": { + "$ref": "#/definitions/NotifyWatchResult" + } + }, + "description": "WatchAPIHostPorts watches the API server addresses." + }, + "WatchActionNotifications": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" }, - "virt-type": { - "type": "string" + "Result": { + "$ref": "#/definitions/StringsWatchResults" + } + }, + "description": "WatchActionNotifications returns a StringsWatcher for observing\nincoming action calls to a unit. See also state/watcher.go\nUnit.WatchActionNotifications(). This method is called from\napi/uniter/uniter.go WatchActionNotifications()." + }, + "WatchConfigSettingsHash": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" }, - "zones": { - "type": "array", - "items": { - "type": "string" - } + "Result": { + "$ref": "#/definitions/StringsWatchResults" } }, - "additionalProperties": false - } - } - } - }, - { - "Name": "ModelGeneration", - "Description": "API is the concrete implementation of the API endpoint.", - "Version": 4, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "AbortBranch": { + "description": "WatchConfigSettingsHash returns a StringsWatcher that yields a hash\nof the config values every time the config changes. The uniter can\nsave this hash and use it to decide whether the config-changed hook\nneeds to be run (or whether this was just an agent restart with no\nsubstantive config change)." + }, + "WatchConsumedSecretsChanges": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/BranchArg" + "$ref": "#/definitions/Entities" }, "Result": { - "$ref": "#/definitions/ErrorResult" + "$ref": "#/definitions/StringsWatchResults" } }, - "description": "AbortBranch aborts the input branch, marking it complete. However no\nchanges are made applicable to the whole model. No units may be assigned\nto the branch when aborting." + "description": "WatchConsumedSecretsChanges sets up a watcher to notify of changes to secret revisions for the specified consumers." }, - "AddBranch": { + "WatchForModelConfigChanges": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/BranchArg" - }, "Result": { - "$ref": "#/definitions/ErrorResult" + "$ref": "#/definitions/NotifyWatchResult" } }, - "description": "AddBranch adds a new branch with the input name to the model." + "description": "WatchForModelConfigChanges returns a NotifyWatcher that observes\nchanges to the model configuration.\nNote that although the NotifyWatchResult contains an Error field,\nit's not used because we are only returning a single watcher,\nso we use the regular error return." }, - "BranchInfo": { + "WatchInstanceData": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/BranchInfoArgs" + "$ref": "#/definitions/Entities" }, "Result": { - "$ref": "#/definitions/BranchResults" + "$ref": "#/definitions/NotifyWatchResults" } }, - "description": "BranchInfo will return details of branch identified by the input argument,\nincluding units on the branch and the configuration disjoint with the\nmaster generation.\nAn error is returned if no in-flight branch matching in input is found." + "description": "WatchInstanceData is a shim to call the LXDProfileAPIv2 version of this method." }, - "CommitBranch": { + "WatchLeadershipSettings": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/BranchArg" + "$ref": "#/definitions/Entities" }, "Result": { - "$ref": "#/definitions/IntResult" + "$ref": "#/definitions/NotifyWatchResults" } }, - "description": "CommitBranch commits the input branch, making its changes applicable to\nthe whole model and marking it complete." + "description": "WatchLeadershipSettings will block the caller until leadership settings\nfor the given service ID change." }, - "HasActiveBranch": { + "WatchMeterStatus": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/BranchArg" + "$ref": "#/definitions/Entities" }, "Result": { - "$ref": "#/definitions/BoolResult" + "$ref": "#/definitions/NotifyWatchResults" } - }, - "description": "HasActiveBranch returns a true result if the input model has an \"in-flight\"\nbranch matching the input name." + } }, - "ListCommits": { + "WatchObsolete": { "type": "object", "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, "Result": { - "$ref": "#/definitions/BranchResults" + "$ref": "#/definitions/StringsWatchResult" } }, - "description": "ListCommits will return the commits, hence only branches with generation_id higher than 0" + "description": "WatchObsolete returns a watcher for notifying when:\n - a secret owned by the entity is deleted\n - a secret revision owed by the entity no longer\n has any consumers\n\nObsolete revisions results are \"uri/revno\" and deleted\nsecret results are \"uri\"." }, - "ShowCommit": { + "WatchRelationUnits": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/GenerationId" + "$ref": "#/definitions/RelationUnits" }, "Result": { - "$ref": "#/definitions/GenerationResult" + "$ref": "#/definitions/RelationUnitsWatchResults" } }, - "description": "ShowCommit will return details a commit given by its generationId\nAn error is returned if either no branch can be found corresponding to the generation id.\nOr the generation id given is below 1." + "description": "WatchRelationUnits returns a RelationUnitsWatcher for observing\nchanges to every unit in the supplied relation that is visible to\nthe supplied unit. See also state/watcher.go:RelationUnit.Watch()." }, - "TrackBranch": { + "WatchSecretRevisionsExpiryChanges": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/BranchTrackArg" + "$ref": "#/definitions/Entities" }, "Result": { - "$ref": "#/definitions/ErrorResults" + "$ref": "#/definitions/SecretTriggerWatchResult" } }, - "description": "TrackBranch marks the input units and/or applications as tracking the input\nbranch, causing them to realise changes made under that branch." - } - }, - "definitions": { - "BoolResult": { + "description": "WatchSecretRevisionsExpiryChanges sets up a watcher to notify of changes to secret revision expiry config." + }, + "WatchSecretsRotationChanges": { "type": "object", "properties": { - "error": { - "$ref": "#/definitions/Error" + "Params": { + "$ref": "#/definitions/Entities" }, - "result": { - "type": "boolean" + "Result": { + "$ref": "#/definitions/SecretTriggerWatchResult" } }, - "additionalProperties": false, - "required": [ - "result" - ] + "description": "WatchSecretsRotationChanges sets up a watcher to notify of changes to secret rotation config." }, - "BranchArg": { + "WatchStorageAttachments": { "type": "object", "properties": { - "branch": { - "type": "string" + "Params": { + "$ref": "#/definitions/StorageAttachmentIds" + }, + "Result": { + "$ref": "#/definitions/NotifyWatchResults" } }, - "additionalProperties": false, - "required": [ - "branch" - ] + "description": "WatchStorageAttachments creates watchers for a collection of storage\nattachments, each of which can be used to watch changes to storage\nattachment info." }, - "BranchInfoArgs": { + "WatchTrustConfigSettingsHash": { "type": "object", "properties": { - "branches": { - "type": "array", - "items": { - "type": "string" - } + "Params": { + "$ref": "#/definitions/Entities" }, - "detailed": { - "type": "boolean" + "Result": { + "$ref": "#/definitions/StringsWatchResults" } }, - "additionalProperties": false, - "required": [ - "branches", - "detailed" - ] + "description": "WatchTrustConfigSettingsHash returns a StringsWatcher that yields a\nhash of the application config values whenever they change. The\nuniter can use the hash to determine whether the actual values have\nchanged since it last saw the config." }, - "BranchResults": { + "WatchUnitAddressesHash": { "type": "object", "properties": { - "error": { - "$ref": "#/definitions/Error" + "Params": { + "$ref": "#/definitions/Entities" }, - "generations": { - "type": "array", - "items": { - "$ref": "#/definitions/Generation" - } + "Result": { + "$ref": "#/definitions/StringsWatchResults" } }, - "additionalProperties": false, - "required": [ - "generations" - ] + "description": "WatchUnitAddressesHash returns a StringsWatcher that yields the\nhashes of the addresses for the unit whenever the addresses\nchange. The uniter can use the hash to determine whether the actual\naddress values have changed since it last saw the config." }, - "BranchTrackArg": { + "WatchUnitRelations": { "type": "object", "properties": { - "branch": { - "type": "string" - }, - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/Entity" - } + "Params": { + "$ref": "#/definitions/Entities" }, - "num-units": { - "type": "integer" + "Result": { + "$ref": "#/definitions/StringsWatchResults" } }, - "additionalProperties": false, - "required": [ - "branch", - "entities" - ] + "description": "WatchUnitRelations returns a StringsWatcher, for each given\nunit, that notifies of changes to the lifecycles of relations\nrelevant to that unit. For principal units, this will be all of the\nrelations for the application. For subordinate units, only\nrelations with the principal unit's application will be monitored." }, - "Entity": { + "WatchUnitStorageAttachments": { "type": "object", "properties": { - "tag": { - "type": "string" + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/StringsWatchResults" } }, - "additionalProperties": false, - "required": [ - "tag" - ] + "description": "WatchUnitStorageAttachments creates watchers for a collection of units,\neach of which can be used to watch for lifecycle changes to the corresponding\nunit's storage attachments." }, - "Error": { + "WatchUpgradeSeriesNotifications": { "type": "object", "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } + "Params": { + "$ref": "#/definitions/Entities" }, - "message": { - "type": "string" + "Result": { + "$ref": "#/definitions/NotifyWatchResults" } }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] + "description": "WatchUpgradeSeriesNotifications returns a NotifyWatcher for observing changes to upgrade series locks." }, - "ErrorResult": { + "WorkloadVersion": { "type": "object", "properties": { - "error": { - "$ref": "#/definitions/Error" + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/StringResults" } }, - "additionalProperties": false - }, - "ErrorResults": { + "description": "WorkloadVersion returns the workload version for all given units or applications." + } + }, + "definitions": { + "APIHostPortsResult": { "type": "object", "properties": { - "results": { + "servers": { "type": "array", "items": { - "$ref": "#/definitions/ErrorResult" + "type": "array", + "items": { + "$ref": "#/definitions/HostPort" + } } } }, "additionalProperties": false, "required": [ - "results" + "servers" ] }, - "Generation": { + "AccessInfo": { "type": "object", "properties": { - "applications": { - "type": "array", - "items": { - "$ref": "#/definitions/GenerationApplication" - } - }, - "branch": { + "role": { "type": "string" }, - "completed": { - "type": "integer" - }, - "completed-by": { + "scope-tag": { "type": "string" }, - "created": { - "type": "integer" - }, - "created-by": { + "target-tag": { "type": "string" - }, - "generation-id": { - "type": "integer" } }, "additionalProperties": false, "required": [ - "branch", - "created", - "created-by", - "applications" + "target-tag", + "scope-tag", + "role" ] }, - "GenerationApplication": { + "Action": { "type": "object", "properties": { - "application": { + "execution-group": { "type": "string" }, - "config": { + "name": { + "type": "string" + }, + "parallel": { + "type": "boolean" + }, + "parameters": { "type": "object", "patternProperties": { ".*": { @@ -12507,552 +48284,500 @@ } } }, - "pending": { - "type": "array", - "items": { - "type": "string" - } - }, - "progress": { + "receiver": { "type": "string" }, - "tracking": { - "type": "array", - "items": { - "type": "string" - } + "tag": { + "type": "string" } }, "additionalProperties": false, "required": [ - "application", - "progress", - "config" + "tag", + "receiver", + "name" ] }, - "GenerationId": { + "ActionExecutionResult": { "type": "object", "properties": { - "generation-id": { - "type": "integer" + "action-tag": { + "type": "string" + }, + "message": { + "type": "string" + }, + "results": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "status": { + "type": "string" } }, "additionalProperties": false, "required": [ - "generation-id" + "action-tag", + "status" ] }, - "GenerationResult": { + "ActionExecutionResults": { "type": "object", "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "generation": { - "$ref": "#/definitions/Generation" + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ActionExecutionResult" + } } }, - "additionalProperties": false, - "required": [ - "generation" - ] + "additionalProperties": false }, - "IntResult": { + "ActionMessage": { "type": "object", "properties": { - "error": { - "$ref": "#/definitions/Error" + "message": { + "type": "string" }, - "result": { - "type": "integer" + "timestamp": { + "type": "string", + "format": "date-time" } }, "additionalProperties": false, "required": [ - "result" + "timestamp", + "message" ] - } - } - } - }, - { - "Name": "ModelManager", - "Description": "ModelManagerAPI implements the model manager interface and is\nthe concrete implementation of the api end point.", - "Version": 9, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "controller-user" - ], - "Schema": { - "type": "object", - "properties": { - "ChangeModelCredential": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ChangeModelCredentialsParams" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "ChangeModelCredential changes cloud credential reference for models.\nThese new cloud credentials must already exist on the controller." }, - "CreateModel": { + "ActionMessageParams": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/ModelCreateArgs" - }, - "Result": { - "$ref": "#/definitions/ModelInfo" + "messages": { + "type": "array", + "items": { + "$ref": "#/definitions/EntityString" + } } }, - "description": "CreateModel creates a new model using the account and\nmodel config specified in the args." + "additionalProperties": false, + "required": [ + "messages" + ] }, - "DestroyModels": { + "ActionResult": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/DestroyModelsParams" + "action": { + "$ref": "#/definitions/Action" }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "DestroyModels will try to destroy the specified models.\nIf there is a block on destruction, this method will return an error.\nFrom ModelManager v7 onwards, DestroyModels gains 'force' and 'max-wait' parameters." - }, - "DumpModels": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/DumpModelRequest" + "completed": { + "type": "string", + "format": "date-time" }, - "Result": { - "$ref": "#/definitions/StringResults" - } - }, - "description": "DumpModels will export the models into the database agnostic\nrepresentation. The user needs to either be a controller admin, or have\nadmin privileges on the model itself." - }, - "DumpModelsDB": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" + "enqueued": { + "type": "string", + "format": "date-time" }, - "Result": { - "$ref": "#/definitions/MapResults" - } - }, - "description": "DumpModelsDB will gather all documents from all model collections\nfor the specified model. The map result contains a map of collection\nnames to lists of documents represented as maps." - }, - "ListModelSummaries": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ModelSummariesRequest" + "error": { + "$ref": "#/definitions/Error" }, - "Result": { - "$ref": "#/definitions/ModelSummaryResults" - } - }, - "description": "ListModelSummaries returns models that the specified user\nhas access to in the current server. Controller admins (superuser)\ncan list models for any user. Other users\ncan only ask about their own models." - }, - "ListModels": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entity" + "log": { + "type": "array", + "items": { + "$ref": "#/definitions/ActionMessage" + } }, - "Result": { - "$ref": "#/definitions/UserModelList" - } - }, - "description": "ListModels returns the models that the specified user\nhas access to in the current server. Controller admins (superuser)\ncan list models for any user. Other users\ncan only ask about their own models." - }, - "ModelDefaultsForClouds": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" + "message": { + "type": "string" }, - "Result": { - "$ref": "#/definitions/ModelDefaultsResults" - } - }, - "description": "ModelDefaultsForClouds returns the default config values for the specified\nclouds." - }, - "ModelInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" + "output": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } }, - "Result": { - "$ref": "#/definitions/ModelInfoResults" - } - }, - "description": "ModelInfo returns information about the specified models." - }, - "ModelStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" + "started": { + "type": "string", + "format": "date-time" }, - "Result": { - "$ref": "#/definitions/ModelStatusResults" + "status": { + "type": "string" } }, - "description": "ModelStatus returns a summary of the model." + "additionalProperties": false }, - "ModifyModelAccess": { + "ActionResults": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/ModifyModelAccessRequest" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ActionResult" + } } }, - "description": "ModifyModelAccess changes the model access granted to users." + "additionalProperties": false }, - "SetModelDefaults": { + "Address": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/SetModelDefaults" + "cidr": { + "type": "string" }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "SetModelDefaults writes new values for the specified default model settings." - }, - "UnsetModelDefaults": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/UnsetModelDefaults" + "config-type": { + "type": "string" }, - "Result": { - "$ref": "#/definitions/ErrorResults" + "is-secondary": { + "type": "boolean" + }, + "scope": { + "type": "string" + }, + "space-id": { + "type": "string" + }, + "space-name": { + "type": "string" + }, + "type": { + "type": "string" + }, + "value": { + "type": "string" } }, - "description": "UnsetModelDefaults removes the specified default model settings." - } - }, - "definitions": { - "ChangeModelCredentialParams": { + "additionalProperties": false, + "required": [ + "value", + "type", + "scope" + ] + }, + "ApplicationStatusResult": { "type": "object", "properties": { - "credential-tag": { - "type": "string" + "application": { + "$ref": "#/definitions/StatusResult" }, - "model-tag": { - "type": "string" + "error": { + "$ref": "#/definitions/Error" + }, + "units": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/StatusResult" + } + } } }, "additionalProperties": false, "required": [ - "model-tag", - "credential-tag" + "application", + "units" ] }, - "ChangeModelCredentialsParams": { + "ApplicationStatusResults": { "type": "object", "properties": { - "model-credentials": { + "results": { "type": "array", "items": { - "$ref": "#/definitions/ChangeModelCredentialParams" + "$ref": "#/definitions/ApplicationStatusResult" } } }, "additionalProperties": false, "required": [ - "model-credentials" + "results" ] }, - "DestroyModelParams": { + "BoolResult": { "type": "object", "properties": { - "destroy-storage": { - "type": "boolean" + "error": { + "$ref": "#/definitions/Error" }, - "force": { + "result": { "type": "boolean" - }, - "max-wait": { - "type": "integer" - }, - "model-tag": { - "type": "string" - }, - "timeout": { - "type": "integer" } }, "additionalProperties": false, "required": [ - "model-tag" + "result" ] }, - "DestroyModelsParams": { + "BoolResults": { "type": "object", "properties": { - "models": { + "results": { "type": "array", "items": { - "$ref": "#/definitions/DestroyModelParams" + "$ref": "#/definitions/BoolResult" } } }, "additionalProperties": false, "required": [ - "models" + "results" ] }, - "DumpModelRequest": { + "CharmRelation": { "type": "object", "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/Entity" - } + "interface": { + "type": "string" }, - "simplified": { + "limit": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "optional": { "type": "boolean" + }, + "role": { + "type": "string" + }, + "scope": { + "type": "string" } }, "additionalProperties": false, "required": [ - "entities", - "simplified" + "name", + "role", + "interface", + "optional", + "limit", + "scope" ] }, - "Entities": { + "CharmURL": { "type": "object", "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/Entity" - } + "url": { + "type": "string" } }, "additionalProperties": false, "required": [ - "entities" + "url" ] }, - "Entity": { + "CharmURLs": { "type": "object", "properties": { - "tag": { - "type": "string" + "urls": { + "type": "array", + "items": { + "$ref": "#/definitions/CharmURL" + } } }, "additionalProperties": false, "required": [ - "tag" + "urls" ] }, - "EntityStatus": { + "CloudCredential": { "type": "object", "properties": { - "data": { + "attrs": { "type": "object", "patternProperties": { ".*": { - "type": "object", - "additionalProperties": true + "type": "string" } } }, - "info": { + "auth-type": { "type": "string" }, - "since": { - "type": "string", - "format": "date-time" - }, - "status": { - "type": "string" + "redacted": { + "type": "array", + "items": { + "type": "string" + } } }, "additionalProperties": false, "required": [ - "status", - "info", - "since" + "auth-type" ] }, - "Error": { + "CloudSpec": { "type": "object", "properties": { - "code": { + "cacertificates": { + "type": "array", + "items": { + "type": "string" + } + }, + "credential": { + "$ref": "#/definitions/CloudCredential" + }, + "endpoint": { "type": "string" }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } + "identity-endpoint": { + "type": "string" }, - "message": { + "is-controller-cloud": { + "type": "boolean" + }, + "name": { + "type": "string" + }, + "region": { + "type": "string" + }, + "skip-tls-verify": { + "type": "boolean" + }, + "storage-endpoint": { + "type": "string" + }, + "type": { "type": "string" } }, "additionalProperties": false, "required": [ - "message", - "code" + "type", + "name" ] }, - "ErrorResult": { + "CloudSpecResult": { "type": "object", "properties": { "error": { "$ref": "#/definitions/Error" + }, + "result": { + "$ref": "#/definitions/CloudSpec" } }, "additionalProperties": false }, - "ErrorResults": { + "CommitHookChangesArg": { "type": "object", "properties": { - "results": { + "add-storage": { "type": "array", "items": { - "$ref": "#/definitions/ErrorResult" + "$ref": "#/definitions/StorageAddParams" } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "MachineHardware": { - "type": "object", - "properties": { - "arch": { - "type": "string" }, - "availability-zone": { - "type": "string" + "close-ports": { + "type": "array", + "items": { + "$ref": "#/definitions/EntityPortRange" + } }, - "cores": { - "type": "integer" + "open-ports": { + "type": "array", + "items": { + "$ref": "#/definitions/EntityPortRange" + } }, - "cpu-power": { - "type": "integer" + "pod-spec": { + "$ref": "#/definitions/PodSpec" }, - "mem": { - "type": "integer" + "relation-unit-settings": { + "type": "array", + "items": { + "$ref": "#/definitions/RelationUnitSettings" + } }, - "root-disk": { - "type": "integer" + "secret-creates": { + "type": "array", + "items": { + "$ref": "#/definitions/CreateSecretArg" + } }, - "tags": { + "secret-deletes": { "type": "array", "items": { - "type": "string" + "$ref": "#/definitions/DeleteSecretArg" } }, - "virt-type": { - "type": "string" - } - }, - "additionalProperties": false - }, - "MapResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" + "secret-grants": { + "type": "array", + "items": { + "$ref": "#/definitions/GrantRevokeSecretArg" + } }, - "result": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } + "secret-revokes": { + "type": "array", + "items": { + "$ref": "#/definitions/GrantRevokeSecretArg" } - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, - "MapResults": { - "type": "object", - "properties": { - "results": { + }, + "secret-track-latest": { "type": "array", "items": { - "$ref": "#/definitions/MapResult" + "type": "string" } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "Model": { - "type": "object", - "properties": { - "name": { - "type": "string" }, - "owner-tag": { - "type": "string" + "secret-updates": { + "type": "array", + "items": { + "$ref": "#/definitions/UpdateSecretArg" + } }, - "type": { - "type": "string" + "set-raw-k8s-spec": { + "$ref": "#/definitions/PodSpec" }, - "uuid": { + "tag": { "type": "string" + }, + "unit-state": { + "$ref": "#/definitions/SetUnitStateArg" + }, + "update-network-info": { + "type": "boolean" } }, "additionalProperties": false, "required": [ - "name", - "uuid", - "type", - "owner-tag" + "tag", + "update-network-info" ] }, - "ModelApplicationInfo": { + "CommitHookChangesArgs": { "type": "object", "properties": { - "name": { - "type": "string" + "args": { + "type": "array", + "items": { + "$ref": "#/definitions/CommitHookChangesArg" + } } }, "additionalProperties": false, "required": [ - "name" + "args" ] }, - "ModelCreateArgs": { + "ConfigSettingsResult": { "type": "object", "properties": { - "cloud-tag": { - "type": "string" + "error": { + "$ref": "#/definitions/Error" }, - "config": { + "settings": { "type": "object", "patternProperties": { ".*": { @@ -13060,538 +48785,356 @@ "additionalProperties": true } } - }, - "credential": { - "type": "string" - }, - "name": { - "type": "string" - }, - "owner-tag": { - "type": "string" - }, - "region": { - "type": "string" } }, "additionalProperties": false, "required": [ - "name", - "owner-tag" + "settings" ] }, - "ModelDefaultValues": { + "ConfigSettingsResults": { "type": "object", "properties": { - "cloud-region": { - "type": "string" - }, - "cloud-tag": { - "type": "string" - }, - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ConfigSettingsResult" } } }, "additionalProperties": false, "required": [ - "config" + "results" ] }, - "ModelDefaults": { + "CreateSecretArg": { "type": "object", "properties": { - "controller": { - "type": "object", - "additionalProperties": true + "UpsertSecretArg": { + "$ref": "#/definitions/UpsertSecretArg" }, - "default": { - "type": "object", - "additionalProperties": true + "content": { + "$ref": "#/definitions/SecretContentParams" }, - "regions": { - "type": "array", - "items": { - "$ref": "#/definitions/RegionDefaults" - } - } - }, - "additionalProperties": false - }, - "ModelDefaultsResult": { - "type": "object", - "properties": { - "config": { + "description": { + "type": "string" + }, + "expire-time": { + "type": "string", + "format": "date-time" + }, + "label": { + "type": "string" + }, + "owner-tag": { + "type": "string" + }, + "params": { "type": "object", "patternProperties": { ".*": { - "$ref": "#/definitions/ModelDefaults" + "type": "object", + "additionalProperties": true } } }, - "error": { - "$ref": "#/definitions/Error" + "rotate-policy": { + "type": "string" + }, + "uri": { + "type": "string" } }, "additionalProperties": false, "required": [ - "config" + "UpsertSecretArg", + "owner-tag" ] }, - "ModelDefaultsResults": { + "CreateSecretArgs": { "type": "object", "properties": { - "results": { + "args": { "type": "array", "items": { - "$ref": "#/definitions/ModelDefaultsResult" + "$ref": "#/definitions/CreateSecretArg" } } }, "additionalProperties": false, "required": [ - "results" + "args" ] }, - "ModelEntityCount": { + "CreateSecretURIsArg": { "type": "object", "properties": { "count": { "type": "integer" - }, - "entity": { - "type": "string" } }, "additionalProperties": false, "required": [ - "entity", "count" ] }, - "ModelFilesystemInfo": { + "DeleteSecretArg": { "type": "object", "properties": { - "detachable": { - "type": "boolean" - }, - "id": { - "type": "string" - }, - "message": { + "label": { "type": "string" }, - "provider-id": { - "type": "string" + "revisions": { + "type": "array", + "items": { + "type": "integer" + } }, - "status": { + "uri": { "type": "string" } }, "additionalProperties": false, "required": [ - "id" + "uri", + "label" ] }, - "ModelInfo": { + "DeleteSecretArgs": { "type": "object", "properties": { - "agent-version": { - "$ref": "#/definitions/Number" - }, - "cloud-credential-tag": { - "type": "string" - }, - "cloud-credential-validity": { - "type": "boolean" - }, - "cloud-region": { - "type": "string" - }, - "cloud-tag": { - "type": "string" - }, - "controller-uuid": { - "type": "string" - }, - "default-base": { - "type": "string" - }, - "default-series": { - "type": "string" - }, - "is-controller": { - "type": "boolean" - }, - "life": { - "type": "string" - }, - "machines": { - "type": "array", - "items": { - "$ref": "#/definitions/ModelMachineInfo" - } - }, - "migration": { - "$ref": "#/definitions/ModelMigrationStatus" - }, - "name": { - "type": "string" - }, - "owner-tag": { - "type": "string" - }, - "provider-type": { - "type": "string" - }, - "secret-backends": { - "type": "array", - "items": { - "$ref": "#/definitions/SecretBackendResult" - } - }, - "sla": { - "$ref": "#/definitions/ModelSLAInfo" - }, - "status": { - "$ref": "#/definitions/EntityStatus" - }, - "supported-features": { - "type": "array", - "items": { - "$ref": "#/definitions/SupportedFeature" - } - }, - "type": { - "type": "string" - }, - "users": { - "type": "array", - "items": { - "$ref": "#/definitions/ModelUserInfo" - } - }, - "uuid": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "name", - "type", - "uuid", - "controller-uuid", - "is-controller", - "cloud-tag", - "owner-tag", - "life", - "users", - "machines", - "secret-backends", - "sla", - "agent-version" + "args": { + "type": "array", + "items": { + "$ref": "#/definitions/DeleteSecretArg" + } + } + }, + "additionalProperties": false, + "required": [ + "args" ] }, - "ModelInfoResult": { + "Endpoint": { "type": "object", "properties": { - "error": { - "$ref": "#/definitions/Error" + "application-name": { + "type": "string" }, - "result": { - "$ref": "#/definitions/ModelInfo" + "relation": { + "$ref": "#/definitions/CharmRelation" } }, - "additionalProperties": false + "additionalProperties": false, + "required": [ + "application-name", + "relation" + ] }, - "ModelInfoResults": { + "Entities": { "type": "object", "properties": { - "results": { + "entities": { "type": "array", "items": { - "$ref": "#/definitions/ModelInfoResult" + "$ref": "#/definitions/Entity" } } }, "additionalProperties": false, "required": [ - "results" + "entities" ] }, - "ModelMachineInfo": { + "EntitiesCharmURL": { "type": "object", "properties": { - "display-name": { - "type": "string" - }, - "ha-primary": { - "type": "boolean" - }, - "hardware": { - "$ref": "#/definitions/MachineHardware" - }, - "has-vote": { - "type": "boolean" - }, - "id": { - "type": "string" - }, - "instance-id": { - "type": "string" - }, - "message": { - "type": "string" - }, - "status": { - "type": "string" - }, - "wants-vote": { - "type": "boolean" + "entities": { + "type": "array", + "items": { + "$ref": "#/definitions/EntityCharmURL" + } } }, "additionalProperties": false, "required": [ - "id" + "entities" ] }, - "ModelMigrationStatus": { + "Entity": { "type": "object", "properties": { - "end": { - "type": "string", - "format": "date-time" - }, - "start": { - "type": "string", - "format": "date-time" - }, - "status": { + "tag": { "type": "string" } }, "additionalProperties": false, "required": [ - "status", - "start" + "tag" ] }, - "ModelSLAInfo": { + "EntityCharmURL": { "type": "object", "properties": { - "level": { + "charm-url": { "type": "string" }, - "owner": { + "tag": { "type": "string" } }, "additionalProperties": false, "required": [ - "level", - "owner" + "tag", + "charm-url" ] }, - "ModelStatus": { + "EntityPortRange": { "type": "object", "properties": { - "application-count": { - "type": "integer" - }, - "applications": { - "type": "array", - "items": { - "$ref": "#/definitions/ModelApplicationInfo" - } - }, - "error": { - "$ref": "#/definitions/Error" - }, - "filesystems": { - "type": "array", - "items": { - "$ref": "#/definitions/ModelFilesystemInfo" - } - }, - "hosted-machine-count": { - "type": "integer" - }, - "life": { + "endpoint": { "type": "string" }, - "machines": { - "type": "array", - "items": { - "$ref": "#/definitions/ModelMachineInfo" - } - }, - "model-tag": { - "type": "string" + "from-port": { + "type": "integer" }, - "owner-tag": { + "protocol": { "type": "string" }, - "type": { + "tag": { "type": "string" }, - "unit-count": { + "to-port": { "type": "integer" - }, - "volumes": { - "type": "array", - "items": { - "$ref": "#/definitions/ModelVolumeInfo" - } } }, "additionalProperties": false, "required": [ - "model-tag", - "life", - "type", - "hosted-machine-count", - "application-count", - "unit-count", - "owner-tag" + "tag", + "protocol", + "from-port", + "to-port", + "endpoint" ] }, - "ModelStatusResults": { + "EntityStatusArgs": { "type": "object", "properties": { - "models": { - "type": "array", - "items": { - "$ref": "#/definitions/ModelStatus" + "data": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } } + }, + "info": { + "type": "string" + }, + "status": { + "type": "string" + }, + "tag": { + "type": "string" } }, "additionalProperties": false, "required": [ - "models" + "tag", + "status", + "info", + "data" ] }, - "ModelSummariesRequest": { + "EntityString": { "type": "object", "properties": { - "all": { - "type": "boolean" + "tag": { + "type": "string" }, - "user-tag": { + "value": { "type": "string" } }, "additionalProperties": false, "required": [ - "user-tag" + "tag", + "value" ] }, - "ModelSummary": { + "EntityWorkloadVersion": { "type": "object", "properties": { - "agent-version": { - "$ref": "#/definitions/Number" - }, - "cloud-credential-tag": { - "type": "string" - }, - "cloud-region": { - "type": "string" - }, - "cloud-tag": { + "tag": { "type": "string" }, - "controller-uuid": { + "workload-version": { "type": "string" - }, - "counts": { + } + }, + "additionalProperties": false, + "required": [ + "tag", + "workload-version" + ] + }, + "EntityWorkloadVersions": { + "type": "object", + "properties": { + "entities": { "type": "array", "items": { - "$ref": "#/definitions/ModelEntityCount" + "$ref": "#/definitions/EntityWorkloadVersion" } - }, - "default-series": { - "type": "string" - }, - "is-controller": { - "type": "boolean" - }, - "last-connection": { - "type": "string", - "format": "date-time" - }, - "life": { - "type": "string" - }, - "migration": { - "$ref": "#/definitions/ModelMigrationStatus" - }, - "name": { - "type": "string" - }, - "owner-tag": { - "type": "string" - }, - "provider-type": { - "type": "string" - }, - "sla": { - "$ref": "#/definitions/ModelSLAInfo" - }, - "status": { - "$ref": "#/definitions/EntityStatus" - }, - "type": { + } + }, + "additionalProperties": false, + "required": [ + "entities" + ] + }, + "Error": { + "type": "object", + "properties": { + "code": { "type": "string" }, - "user-access": { - "type": "string" + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } }, - "uuid": { + "message": { "type": "string" } }, "additionalProperties": false, "required": [ - "name", - "uuid", - "type", - "controller-uuid", - "is-controller", - "cloud-tag", - "owner-tag", - "life", - "user-access", - "last-connection", - "counts", - "sla", - "agent-version" + "message", + "code" ] }, - "ModelSummaryResult": { + "ErrorResult": { "type": "object", "properties": { "error": { "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/ModelSummary" } }, "additionalProperties": false }, - "ModelSummaryResults": { + "ErrorResults": { "type": "object", "properties": { "results": { "type": "array", "items": { - "$ref": "#/definitions/ModelSummaryResult" + "$ref": "#/definitions/ErrorResult" } } }, @@ -13600,246 +49143,268 @@ "results" ] }, - "ModelUnsetKeys": { + "GetLeadershipSettingsBulkResults": { "type": "object", "properties": { - "cloud-region": { - "type": "string" - }, - "cloud-tag": { - "type": "string" - }, - "keys": { + "results": { "type": "array", "items": { - "type": "string" + "$ref": "#/definitions/GetLeadershipSettingsResult" } } }, "additionalProperties": false, "required": [ - "keys" + "results" ] }, - "ModelUserInfo": { + "GetLeadershipSettingsResult": { "type": "object", "properties": { - "access": { - "type": "string" - }, - "display-name": { - "type": "string" - }, - "last-connection": { - "type": "string", - "format": "date-time" - }, - "model-tag": { - "type": "string" + "error": { + "$ref": "#/definitions/Error" }, - "user": { - "type": "string" + "settings": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } } }, "additionalProperties": false, "required": [ - "model-tag", - "user", - "display-name", - "last-connection", - "access" + "settings" ] }, - "ModelVolumeInfo": { + "GetSecretConsumerInfoArgs": { "type": "object", "properties": { - "detachable": { - "type": "boolean" - }, - "id": { - "type": "string" - }, - "message": { + "consumer-tag": { "type": "string" }, - "provider-id": { - "type": "string" - }, - "status": { - "type": "string" + "uris": { + "type": "array", + "items": { + "type": "string" + } } }, "additionalProperties": false, "required": [ - "id" + "consumer-tag", + "uris" ] }, - "ModifyModelAccess": { + "GetSecretContentArg": { "type": "object", "properties": { - "access": { + "label": { "type": "string" }, - "action": { - "type": "string" + "peek": { + "type": "boolean" }, - "model-tag": { - "type": "string" + "refresh": { + "type": "boolean" }, - "user-tag": { + "uri": { "type": "string" } }, "additionalProperties": false, "required": [ - "user-tag", - "action", - "access", - "model-tag" + "uri" ] }, - "ModifyModelAccessRequest": { + "GetSecretContentArgs": { "type": "object", "properties": { - "changes": { + "args": { "type": "array", "items": { - "$ref": "#/definitions/ModifyModelAccess" + "$ref": "#/definitions/GetSecretContentArg" } } }, "additionalProperties": false, "required": [ - "changes" + "args" ] }, - "Number": { + "GoalState": { "type": "object", "properties": { - "Build": { - "type": "integer" - }, - "Major": { - "type": "integer" - }, - "Minor": { - "type": "integer" - }, - "Patch": { - "type": "integer" + "relations": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/GoalStateStatus" + } + } + } + } }, - "Tag": { - "type": "string" + "units": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/GoalStateStatus" + } + } } }, "additionalProperties": false, "required": [ - "Major", - "Minor", - "Tag", - "Patch", - "Build" + "units", + "relations" ] }, - "RegionDefaults": { + "GoalStateResult": { "type": "object", "properties": { - "region-name": { - "type": "string" + "error": { + "$ref": "#/definitions/Error" }, - "value": { - "type": "object", - "additionalProperties": true + "result": { + "$ref": "#/definitions/GoalState" } }, "additionalProperties": false, "required": [ - "region-name", - "value" + "result", + "error" ] }, - "SecretBackend": { + "GoalStateResults": { "type": "object", "properties": { - "backend-type": { - "type": "string" - }, - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/GoalStateResult" } + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "GoalStateStatus": { + "type": "object", + "properties": { + "since": { + "type": "string", + "format": "date-time" }, - "name": { + "status": { "type": "string" - }, - "token-rotate-interval": { - "type": "integer" } }, "additionalProperties": false, "required": [ - "name", - "backend-type", - "config" + "status", + "since" ] }, - "SecretBackendResult": { + "GrantRevokeSecretArg": { "type": "object", "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "id": { + "role": { "type": "string" }, - "message": { + "scope-tag": { "type": "string" }, - "num-secrets": { - "type": "integer" - }, - "result": { - "$ref": "#/definitions/SecretBackend" + "subject-tags": { + "type": "array", + "items": { + "type": "string" + } }, - "status": { + "uri": { "type": "string" } }, "additionalProperties": false, "required": [ - "result", - "id", - "num-secrets", - "status" + "uri", + "scope-tag", + "subject-tags", + "role" ] }, - "SetModelDefaults": { + "GrantRevokeSecretArgs": { "type": "object", "properties": { - "config": { + "args": { "type": "array", "items": { - "$ref": "#/definitions/ModelDefaultValues" + "$ref": "#/definitions/GrantRevokeSecretArg" } } }, "additionalProperties": false, "required": [ - "config" + "args" + ] + }, + "HostPort": { + "type": "object", + "properties": { + "Address": { + "$ref": "#/definitions/Address" + }, + "cidr": { + "type": "string" + }, + "config-type": { + "type": "string" + }, + "is-secondary": { + "type": "boolean" + }, + "port": { + "type": "integer" + }, + "scope": { + "type": "string" + }, + "space-id": { + "type": "string" + }, + "space-name": { + "type": "string" + }, + "type": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "value", + "type", + "scope", + "Address", + "port" ] }, - "StringResult": { + "IntResult": { "type": "object", "properties": { "error": { "$ref": "#/definitions/Error" }, "result": { - "type": "string" + "type": "integer" } }, "additionalProperties": false, @@ -13847,13 +49412,13 @@ "result" ] }, - "StringResults": { + "IntResults": { "type": "object", "properties": { "results": { "type": "array", "items": { - "$ref": "#/definitions/StringResult" + "$ref": "#/definitions/IntResult" } } }, @@ -13862,708 +49427,605 @@ "results" ] }, - "SupportedFeature": { + "InterfaceAddress": { "type": "object", "properties": { - "description": { + "cidr": { "type": "string" }, - "name": { + "hostname": { "type": "string" }, - "version": { + "value": { "type": "string" } }, "additionalProperties": false, "required": [ - "name", - "description" + "hostname", + "value", + "cidr" ] }, - "UnsetModelDefaults": { + "LifeResult": { "type": "object", "properties": { - "keys": { + "error": { + "$ref": "#/definitions/Error" + }, + "life": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "life" + ] + }, + "LifeResults": { + "type": "object", + "properties": { + "results": { "type": "array", "items": { - "$ref": "#/definitions/ModelUnsetKeys" + "$ref": "#/definitions/LifeResult" } } }, "additionalProperties": false, "required": [ - "keys" + "results" ] }, - "UserModel": { + "ListSecretResult": { "type": "object", "properties": { - "last-connection": { + "access": { + "type": "array", + "items": { + "$ref": "#/definitions/AccessInfo" + } + }, + "create-time": { "type": "string", "format": "date-time" }, - "model": { - "$ref": "#/definitions/Model" + "description": { + "type": "string" + }, + "label": { + "type": "string" + }, + "latest-expire-time": { + "type": "string", + "format": "date-time" + }, + "latest-revision": { + "type": "integer" + }, + "next-rotate-time": { + "type": "string", + "format": "date-time" + }, + "owner-tag": { + "type": "string" + }, + "revisions": { + "type": "array", + "items": { + "$ref": "#/definitions/SecretRevision" + } + }, + "rotate-policy": { + "type": "string" + }, + "update-time": { + "type": "string", + "format": "date-time" + }, + "uri": { + "type": "string" + }, + "value": { + "$ref": "#/definitions/SecretValueResult" + }, + "version": { + "type": "integer" } }, "additionalProperties": false, "required": [ - "model", - "last-connection" + "uri", + "version", + "owner-tag", + "latest-revision", + "create-time", + "update-time", + "revisions" ] }, - "UserModelList": { + "ListSecretResults": { "type": "object", "properties": { - "user-models": { + "results": { "type": "array", "items": { - "$ref": "#/definitions/UserModel" + "$ref": "#/definitions/ListSecretResult" } } }, "additionalProperties": false, "required": [ - "user-models" + "results" ] - } - } - } - }, - { - "Name": "ModelUpgrader", - "Description": "ModelUpgraderAPI implements the model upgrader interface and is\nthe concrete implementation of the api end point.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "controller-user" - ], - "Schema": { - "type": "object", - "properties": { - "AbortModelUpgrade": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ModelParam" - } - }, - "description": "AbortModelUpgrade aborts and archives the model upgrade\nsynchronisation record, if any." }, - "UpgradeModel": { + "MergeLeadershipSettingsBulkParams": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/UpgradeModelParams" - }, - "Result": { - "$ref": "#/definitions/UpgradeModelResult" + "params": { + "type": "array", + "items": { + "$ref": "#/definitions/MergeLeadershipSettingsParam" + } } }, - "description": "UpgradeModel upgrades a model." - } - }, - "definitions": { - "Error": { + "additionalProperties": false, + "required": [ + "params" + ] + }, + "MergeLeadershipSettingsParam": { "type": "object", "properties": { - "code": { + "application-tag": { "type": "string" }, - "info": { + "settings": { "type": "object", "patternProperties": { ".*": { - "type": "object", - "additionalProperties": true + "type": "string" } } }, - "message": { + "unit-tag": { "type": "string" } }, "additionalProperties": false, "required": [ - "message", - "code" + "settings" ] }, - "ModelParam": { + "MeterStatusResult": { "type": "object", "properties": { - "model-tag": { + "code": { + "type": "string" + }, + "error": { + "$ref": "#/definitions/Error" + }, + "info": { "type": "string" } }, "additionalProperties": false, "required": [ - "model-tag" + "code", + "info" ] }, - "Number": { + "MeterStatusResults": { "type": "object", "properties": { - "Build": { - "type": "integer" - }, - "Major": { - "type": "integer" - }, - "Minor": { - "type": "integer" - }, - "Patch": { - "type": "integer" - }, - "Tag": { - "type": "string" + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/MeterStatusResult" + } } }, "additionalProperties": false, "required": [ - "Major", - "Minor", - "Tag", - "Patch", - "Build" + "results" ] }, - "UpgradeModelParams": { + "Metric": { "type": "object", "properties": { - "agent-stream": { + "key": { "type": "string" }, - "dry-run": { - "type": "boolean" + "labels": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } }, - "ignore-agent-versions": { - "type": "boolean" + "time": { + "type": "string", + "format": "date-time" }, - "model-tag": { + "value": { "type": "string" - }, - "target-version": { - "$ref": "#/definitions/Number" } }, "additionalProperties": false, "required": [ - "model-tag", - "target-version" + "key", + "value", + "time" ] }, - "UpgradeModelResult": { - "type": "object", - "properties": { - "chosen-version": { - "$ref": "#/definitions/Number" - }, - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "chosen-version" - ] - } - } - } - }, - { - "Name": "Payloads", - "Description": "API serves payload-specific API methods.", - "Version": 1, - "AvailableTo": [ - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "List": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/PayloadListArgs" - }, - "Result": { - "$ref": "#/definitions/PayloadListResults" - } - }, - "description": "List builds the list of payloads being tracked for\nthe given unit and IDs. If no IDs are provided then all tracked\npayloads for the unit are returned." - } - }, - "definitions": { - "Payload": { + "MetricBatch": { "type": "object", "properties": { - "class": { + "charm-url": { "type": "string" }, - "id": { - "type": "string" + "created": { + "type": "string", + "format": "date-time" }, - "labels": { + "metrics": { "type": "array", "items": { - "type": "string" + "$ref": "#/definitions/Metric" } }, - "machine": { - "type": "string" - }, - "status": { - "type": "string" - }, - "type": { - "type": "string" - }, - "unit": { + "uuid": { "type": "string" } }, "additionalProperties": false, "required": [ - "class", - "type", - "id", - "status", - "labels", - "unit", - "machine" + "uuid", + "charm-url", + "created", + "metrics" ] }, - "PayloadListArgs": { + "MetricBatchParam": { "type": "object", "properties": { - "patterns": { - "type": "array", - "items": { - "type": "string" - } + "batch": { + "$ref": "#/definitions/MetricBatch" + }, + "tag": { + "type": "string" } }, "additionalProperties": false, "required": [ - "patterns" + "tag", + "batch" ] }, - "PayloadListResults": { + "MetricBatchParams": { "type": "object", "properties": { - "results": { + "batches": { "type": "array", "items": { - "$ref": "#/definitions/Payload" + "$ref": "#/definitions/MetricBatchParam" } } }, "additionalProperties": false, "required": [ - "results" + "batches" ] - } - } - } - }, - { - "Name": "Pinger", - "Description": "pinger describes a resource that can be pinged and stopped.", - "Version": 1, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "controller-user", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "Ping": { - "type": "object" }, - "Stop": { - "type": "object" - } - } - } - }, - { - "Name": "Resources", - "Description": "API is the public API facade for resources.", - "Version": 3, - "AvailableTo": [ - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "AddPendingResources": { + "ModelConfigResult": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/AddPendingResourcesArgsV2" - }, - "Result": { - "$ref": "#/definitions/AddPendingResourcesResult" + "config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } } }, - "description": "AddPendingResources adds the provided resources (info) to the Juju\nmodel in a pending state, meaning they are not available until\nresolved. Handles CharmHub and Local charms." + "additionalProperties": false, + "required": [ + "config" + ] }, - "ListResources": { + "ModelResult": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/ListResourcesArgs" + "error": { + "$ref": "#/definitions/Error" }, - "Result": { - "$ref": "#/definitions/ResourcesResults" + "name": { + "type": "string" + }, + "type": { + "type": "string" + }, + "uuid": { + "type": "string" } }, - "description": "ListResources returns the list of resources for the given application." - } - }, - "definitions": { - "AddPendingResourcesArgsV2": { + "additionalProperties": false, + "required": [ + "name", + "uuid", + "type" + ] + }, + "NetworkInfo": { "type": "object", "properties": { - "Entity": { - "$ref": "#/definitions/Entity" - }, - "charm-origin": { - "$ref": "#/definitions/CharmOrigin" - }, - "macaroon": { - "$ref": "#/definitions/Macaroon" - }, - "resources": { + "addresses": { "type": "array", "items": { - "$ref": "#/definitions/CharmResource" + "$ref": "#/definitions/InterfaceAddress" } }, - "tag": { + "interface-name": { "type": "string" }, - "url": { + "mac-address": { "type": "string" } }, "additionalProperties": false, "required": [ - "tag", - "Entity", - "url", - "charm-origin", - "macaroon", - "resources" + "mac-address", + "interface-name", + "addresses" ] }, - "AddPendingResourcesResult": { + "NetworkInfoParams": { "type": "object", "properties": { - "ErrorResult": { - "$ref": "#/definitions/ErrorResult" - }, - "error": { - "$ref": "#/definitions/Error" - }, - "pending-ids": { + "bindings": { "type": "array", "items": { "type": "string" } + }, + "relation-id": { + "type": "integer" + }, + "unit": { + "type": "string" } }, "additionalProperties": false, "required": [ - "ErrorResult", - "pending-ids" + "unit", + "bindings" ] }, - "Base": { + "NetworkInfoResult": { "type": "object", "properties": { - "channel": { - "type": "string" + "bind-addresses": { + "type": "array", + "items": { + "$ref": "#/definitions/NetworkInfo" + } }, - "name": { - "type": "string" + "egress-subnets": { + "type": "array", + "items": { + "type": "string" + } + }, + "error": { + "$ref": "#/definitions/Error" + }, + "ingress-addresses": { + "type": "array", + "items": { + "type": "string" + } } }, - "additionalProperties": false, - "required": [ - "name", - "channel" - ] + "additionalProperties": false }, - "CharmOrigin": { + "NetworkInfoResults": { "type": "object", "properties": { - "architecture": { - "type": "string" - }, - "base": { - "$ref": "#/definitions/Base" - }, - "branch": { - "type": "string" - }, - "hash": { - "type": "string" - }, - "id": { - "type": "string" - }, - "instance-key": { - "type": "string" - }, - "revision": { - "type": "integer" - }, - "risk": { - "type": "string" - }, - "source": { - "type": "string" - }, - "track": { - "type": "string" - }, - "type": { - "type": "string" + "results": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/NetworkInfoResult" + } + } } }, "additionalProperties": false, - "required": [ - "source", - "type", - "id" + "required": [ + "results" ] }, - "CharmResource": { + "NotifyWatchResult": { "type": "object", "properties": { - "description": { - "type": "string" - }, - "fingerprint": { - "type": "array", - "items": { - "type": "integer" - } - }, - "name": { - "type": "string" - }, - "origin": { - "type": "string" - }, - "path": { + "NotifyWatcherId": { "type": "string" }, - "revision": { - "type": "integer" - }, - "size": { - "type": "integer" - }, - "type": { - "type": "string" + "error": { + "$ref": "#/definitions/Error" } }, "additionalProperties": false, "required": [ - "name", - "type", - "path", - "origin", - "revision", - "fingerprint", - "size" + "NotifyWatcherId" ] }, - "Entity": { + "NotifyWatchResults": { "type": "object", "properties": { - "tag": { - "type": "string" + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/NotifyWatchResult" + } } }, "additionalProperties": false, "required": [ - "tag" + "results" ] }, - "Error": { + "OpenPortRangesByEndpointResult": { "type": "object", "properties": { - "code": { - "type": "string" + "error": { + "$ref": "#/definitions/Error" }, - "info": { + "unit-port-ranges": { "type": "object", "patternProperties": { ".*": { - "type": "object", - "additionalProperties": true + "type": "array", + "items": { + "$ref": "#/definitions/OpenUnitPortRangesByEndpoint" + } } } - }, - "message": { - "type": "string" } }, "additionalProperties": false, "required": [ - "message", - "code" + "unit-port-ranges" ] }, - "ErrorResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "ListResourcesArgs": { + "OpenPortRangesByEndpointResults": { "type": "object", "properties": { - "entities": { + "results": { "type": "array", "items": { - "$ref": "#/definitions/Entity" + "$ref": "#/definitions/OpenPortRangesByEndpointResult" } } }, "additionalProperties": false, "required": [ - "entities" + "results" ] }, - "Macaroon": { - "type": "object", - "additionalProperties": false - }, - "Resource": { + "OpenUnitPortRangesByEndpoint": { "type": "object", "properties": { - "CharmResource": { - "$ref": "#/definitions/CharmResource" - }, - "application": { - "type": "string" - }, - "description": { + "endpoint": { "type": "string" }, - "fingerprint": { + "port-ranges": { "type": "array", "items": { - "type": "integer" + "$ref": "#/definitions/PortRange" } - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "origin": { - "type": "string" - }, - "path": { + } + }, + "additionalProperties": false, + "required": [ + "endpoint", + "port-ranges" + ] + }, + "PodSpec": { + "type": "object", + "properties": { + "spec": { "type": "string" }, - "pending-id": { + "tag": { "type": "string" - }, - "revision": { - "type": "integer" - }, - "size": { + } + }, + "additionalProperties": false, + "required": [ + "tag" + ] + }, + "PortRange": { + "type": "object", + "properties": { + "from-port": { "type": "integer" }, - "timestamp": { - "type": "string", - "format": "date-time" - }, - "type": { + "protocol": { "type": "string" }, - "username": { - "type": "string" + "to-port": { + "type": "integer" } }, "additionalProperties": false, "required": [ - "name", - "type", - "path", - "origin", - "revision", - "fingerprint", - "size", - "CharmResource", - "id", - "pending-id", - "application", - "username", - "timestamp" + "from-port", + "to-port", + "protocol" ] }, - "ResourcesResult": { + "RelationIds": { "type": "object", "properties": { - "ErrorResult": { - "$ref": "#/definitions/ErrorResult" - }, - "charm-store-resources": { + "relation-ids": { "type": "array", "items": { - "$ref": "#/definitions/CharmResource" + "type": "integer" } + } + }, + "additionalProperties": false, + "required": [ + "relation-ids" + ] + }, + "RelationResult": { + "type": "object", + "properties": { + "bool": { + "type": "boolean" + }, + "endpoint": { + "$ref": "#/definitions/Endpoint" }, "error": { "$ref": "#/definitions/Error" }, - "resources": { - "type": "array", - "items": { - "$ref": "#/definitions/Resource" - } + "id": { + "type": "integer" }, - "unit-resources": { - "type": "array", - "items": { - "$ref": "#/definitions/UnitResources" - } + "key": { + "type": "string" + }, + "life": { + "type": "string" + }, + "other-application": { + "type": "string" } }, "additionalProperties": false, "required": [ - "ErrorResult", - "resources", - "charm-store-resources", - "unit-resources" + "life", + "id", + "key", + "endpoint" ] }, - "ResourcesResults": { + "RelationResults": { "type": "object", "properties": { "results": { "type": "array", "items": { - "$ref": "#/definitions/ResourcesResult" + "$ref": "#/definitions/RelationResult" } } }, @@ -14572,126 +50034,100 @@ "results" ] }, - "UnitResources": { + "RelationStatusArg": { "type": "object", "properties": { - "Entity": { - "$ref": "#/definitions/Entity" + "message": { + "type": "string" }, - "download-progress": { - "type": "object", - "patternProperties": { - ".*": { - "type": "integer" - } - } + "relation-id": { + "type": "integer" }, - "resources": { - "type": "array", - "items": { - "$ref": "#/definitions/Resource" - } + "status": { + "type": "string" }, - "tag": { + "unit-tag": { "type": "string" } }, "additionalProperties": false, "required": [ - "tag", - "Entity", - "resources", - "download-progress" + "unit-tag", + "relation-id", + "status", + "message" ] - } - } - } - }, - { - "Name": "SSHClient", - "Description": "Facade implements the API required by the sshclient worker.", - "Version": 4, - "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "AllAddresses": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/SSHAddressesResults" - } - }, - "description": "AllAddresses reports all addresses that might have SSH listening for each\nentity in args. The result is sorted with public addresses first.\nMachines and units are supported as entity types." }, - "ModelCredentialForSSH": { + "RelationStatusArgs": { "type": "object", "properties": { - "Result": { - "$ref": "#/definitions/CloudSpecResult" + "args": { + "type": "array", + "items": { + "$ref": "#/definitions/RelationStatusArg" + } } }, - "description": "ModelCredentialForSSH returns a cloud spec for ssh purpose.\nThis facade call is only used for k8s model." + "additionalProperties": false, + "required": [ + "args" + ] }, - "PrivateAddress": { + "RelationUnit": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/Entities" + "relation": { + "type": "string" }, - "Result": { - "$ref": "#/definitions/SSHAddressResults" - } - }, - "description": "PrivateAddress reports the preferred private network address for one or\nmore entities. Machines and units are supported." - }, - "Proxy": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/SSHProxyResult" + "unit": { + "type": "string" } }, - "description": "Proxy returns whether SSH connections should be proxied through the\ncontroller hosts for the model associated with the API connection." + "additionalProperties": false, + "required": [ + "relation", + "unit" + ] }, - "PublicAddress": { + "RelationUnitPair": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/Entities" + "local-unit": { + "type": "string" }, - "Result": { - "$ref": "#/definitions/SSHAddressResults" + "relation": { + "type": "string" + }, + "remote-unit": { + "type": "string" } }, - "description": "PublicAddress reports the preferred public network address for one\nor more entities. Machines and units are supported." + "additionalProperties": false, + "required": [ + "relation", + "local-unit", + "remote-unit" + ] }, - "PublicKeys": { + "RelationUnitPairs": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/SSHPublicKeysResults" + "relation-unit-pairs": { + "type": "array", + "items": { + "$ref": "#/definitions/RelationUnitPair" + } } }, - "description": "PublicKeys returns the public SSH hosts for one or more\nentities. Machines and units are supported." - } - }, - "definitions": { - "CloudCredential": { + "additionalProperties": false, + "required": [ + "relation-unit-pairs" + ] + }, + "RelationUnitSettings": { "type": "object", "properties": { - "attrs": { + "application-settings": { "type": "object", "patternProperties": { ".*": { @@ -14699,147 +50135,154 @@ } } }, - "auth-type": { + "relation": { "type": "string" }, - "redacted": { - "type": "array", - "items": { - "type": "string" + "settings": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } } + }, + "unit": { + "type": "string" } }, "additionalProperties": false, "required": [ - "auth-type" + "relation", + "unit", + "settings", + "application-settings" ] }, - "CloudSpec": { + "RelationUnitStatus": { "type": "object", "properties": { - "cacertificates": { - "type": "array", - "items": { - "type": "string" - } - }, - "credential": { - "$ref": "#/definitions/CloudCredential" - }, - "endpoint": { - "type": "string" - }, - "identity-endpoint": { - "type": "string" - }, - "is-controller-cloud": { + "in-scope": { "type": "boolean" }, - "name": { - "type": "string" - }, - "region": { + "relation-tag": { "type": "string" }, - "skip-tls-verify": { + "suspended": { "type": "boolean" - }, - "storage-endpoint": { - "type": "string" - }, - "type": { - "type": "string" } }, "additionalProperties": false, "required": [ - "type", - "name" + "relation-tag", + "in-scope", + "suspended" ] }, - "CloudSpecResult": { + "RelationUnitStatusResult": { "type": "object", "properties": { "error": { "$ref": "#/definitions/Error" }, - "result": { - "$ref": "#/definitions/CloudSpec" + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/RelationUnitStatus" + } } }, - "additionalProperties": false + "additionalProperties": false, + "required": [ + "results" + ] }, - "Entities": { + "RelationUnitStatusResults": { "type": "object", "properties": { - "entities": { + "results": { "type": "array", "items": { - "$ref": "#/definitions/Entity" + "$ref": "#/definitions/RelationUnitStatusResult" } } }, "additionalProperties": false, "required": [ - "entities" + "results" ] }, - "Entity": { + "RelationUnits": { "type": "object", "properties": { - "tag": { - "type": "string" + "relation-units": { + "type": "array", + "items": { + "$ref": "#/definitions/RelationUnit" + } } }, "additionalProperties": false, "required": [ - "tag" + "relation-units" ] }, - "Error": { + "RelationUnitsChange": { "type": "object", "properties": { - "code": { - "type": "string" + "app-changed": { + "type": "object", + "patternProperties": { + ".*": { + "type": "integer" + } + } }, - "info": { + "changed": { "type": "object", "patternProperties": { ".*": { - "type": "object", - "additionalProperties": true + "$ref": "#/definitions/UnitSettings" } } }, - "message": { - "type": "string" + "departed": { + "type": "array", + "items": { + "type": "string" + } } }, "additionalProperties": false, "required": [ - "message", - "code" + "changed" ] }, - "SSHAddressResult": { + "RelationUnitsWatchResult": { "type": "object", "properties": { - "address": { - "type": "string" + "changes": { + "$ref": "#/definitions/RelationUnitsChange" }, "error": { "$ref": "#/definitions/Error" + }, + "watcher-id": { + "type": "string" } }, - "additionalProperties": false + "additionalProperties": false, + "required": [ + "watcher-id", + "changes" + ] }, - "SSHAddressResults": { + "RelationUnitsWatchResults": { "type": "object", "properties": { "results": { "type": "array", "items": { - "$ref": "#/definitions/SSHAddressResult" + "$ref": "#/definitions/RelationUnitsWatchResult" } } }, @@ -14848,31 +50291,28 @@ "results" ] }, - "SSHAddressesResult": { + "ResolvedModeResult": { "type": "object", "properties": { - "addresses": { - "type": "array", - "items": { - "type": "string" - } - }, "error": { "$ref": "#/definitions/Error" + }, + "mode": { + "type": "string" } }, "additionalProperties": false, "required": [ - "addresses" + "mode" ] }, - "SSHAddressesResults": { + "ResolvedModeResults": { "type": "object", "properties": { "results": { "type": "array", "items": { - "$ref": "#/definitions/SSHAddressesResult" + "$ref": "#/definitions/ResolvedModeResult" } } }, @@ -14881,203 +50321,172 @@ "results" ] }, - "SSHProxyResult": { - "type": "object", - "properties": { - "use-proxy": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "use-proxy" - ] - }, - "SSHPublicKeysResult": { + "SecretBackendArgs": { "type": "object", "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "public-keys": { + "backend-ids": { "type": "array", "items": { "type": "string" } - } - }, - "additionalProperties": false - }, - "SSHPublicKeysResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/SSHPublicKeysResult" - } + }, + "for-drain": { + "type": "boolean" } }, "additionalProperties": false, "required": [ - "results" + "for-drain", + "backend-ids" ] - } - } - } - }, - { - "Name": "SecretBackends", - "Description": "SecretBackendsAPI is the server implementation for the SecretBackends facade.", - "Version": 1, - "AvailableTo": [ - "controller-user" - ], - "Schema": { - "type": "object", - "properties": { - "AddSecretBackends": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/AddSecretBackendArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "AddSecretBackends adds new secret backends." - }, - "ListSecretBackends": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ListSecretBackendsArgs" - }, - "Result": { - "$ref": "#/definitions/ListSecretBackendsResults" - } - }, - "description": "ListSecretBackends lists available secret backends." }, - "RemoveSecretBackends": { + "SecretBackendConfig": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/RemoveSecretBackendArgs" + "params": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } }, - "Result": { - "$ref": "#/definitions/ErrorResults" + "type": { + "type": "string" } }, - "description": "RemoveSecretBackends removes secret backends." + "additionalProperties": false, + "required": [ + "type" + ] }, - "UpdateSecretBackends": { + "SecretBackendConfigResult": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/UpdateSecretBackendArgs" + "config": { + "$ref": "#/definitions/SecretBackendConfig" }, - "Result": { - "$ref": "#/definitions/ErrorResults" + "draining": { + "type": "boolean" + }, + "model-controller": { + "type": "string" + }, + "model-name": { + "type": "string" + }, + "model-uuid": { + "type": "string" } }, - "description": "UpdateSecretBackends updates secret backends." - } - }, - "definitions": { - "AddSecretBackendArg": { + "additionalProperties": false, + "required": [ + "model-controller", + "model-uuid", + "model-name", + "draining" + ] + }, + "SecretBackendConfigResults": { "type": "object", "properties": { - "SecretBackend": { - "$ref": "#/definitions/SecretBackend" - }, - "backend-type": { + "active-id": { "type": "string" }, - "config": { + "results": { "type": "object", "patternProperties": { ".*": { - "type": "object", - "additionalProperties": true + "$ref": "#/definitions/SecretBackendConfigResult" } } + } + }, + "additionalProperties": false, + "required": [ + "active-id" + ] + }, + "SecretConsumerInfoResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" }, - "id": { - "type": "string" - }, - "name": { + "label": { "type": "string" }, - "token-rotate-interval": { + "revision": { "type": "integer" } }, "additionalProperties": false, "required": [ - "name", - "backend-type", - "config", - "SecretBackend" + "revision", + "label" ] }, - "AddSecretBackendArgs": { + "SecretConsumerInfoResults": { "type": "object", "properties": { - "args": { + "results": { "type": "array", "items": { - "$ref": "#/definitions/AddSecretBackendArg" + "$ref": "#/definitions/SecretConsumerInfoResult" } } }, "additionalProperties": false, "required": [ - "args" + "results" ] }, - "Error": { + "SecretContentParams": { "type": "object", "properties": { - "code": { - "type": "string" - }, - "info": { + "data": { "type": "object", "patternProperties": { ".*": { - "type": "object", - "additionalProperties": true + "type": "string" } } }, - "message": { - "type": "string" + "value-ref": { + "$ref": "#/definitions/SecretValueRef" } }, - "additionalProperties": false, - "required": [ - "message", - "code" - ] + "additionalProperties": false }, - "ErrorResult": { + "SecretContentResult": { "type": "object", "properties": { + "backend-config": { + "$ref": "#/definitions/SecretBackendConfigResult" + }, + "content": { + "$ref": "#/definitions/SecretContentParams" + }, "error": { "$ref": "#/definitions/Error" + }, + "latest-revision": { + "type": "integer" } }, - "additionalProperties": false + "additionalProperties": false, + "required": [ + "content" + ] }, - "ErrorResults": { + "SecretContentResults": { "type": "object", "properties": { "results": { "type": "array", "items": { - "$ref": "#/definitions/ErrorResult" + "$ref": "#/definitions/SecretContentResult" } } }, @@ -15086,62 +50495,86 @@ "results" ] }, - "ListSecretBackendsArgs": { + "SecretRevision": { "type": "object", "properties": { - "names": { - "type": "array", - "items": { - "type": "string" - } + "backend-name": { + "type": "string" }, - "reveal": { - "type": "boolean" + "create-time": { + "type": "string", + "format": "date-time" + }, + "expire-time": { + "type": "string", + "format": "date-time" + }, + "revision": { + "type": "integer" + }, + "update-time": { + "type": "string", + "format": "date-time" + }, + "value-ref": { + "$ref": "#/definitions/SecretValueRef" } }, "additionalProperties": false, "required": [ - "names", - "reveal" + "revision" ] }, - "ListSecretBackendsResults": { + "SecretRevisionArg": { "type": "object", "properties": { - "results": { + "pending-delete": { + "type": "boolean" + }, + "revisions": { "type": "array", "items": { - "$ref": "#/definitions/SecretBackendResult" + "type": "integer" } + }, + "uri": { + "type": "string" } }, "additionalProperties": false, "required": [ - "results" + "uri", + "revisions", + "pending-delete" ] }, - "RemoveSecretBackendArg": { + "SecretRotatedArg": { "type": "object", "properties": { - "force": { + "original-revision": { + "type": "integer" + }, + "skip": { "type": "boolean" }, - "name": { + "uri": { "type": "string" } }, "additionalProperties": false, "required": [ - "name" + "uri", + "original-revision", + "skip" ] }, - "RemoveSecretBackendArgs": { + "SecretRotatedArgs": { "type": "object", "properties": { "args": { "type": "array", "items": { - "$ref": "#/definitions/RemoveSecretBackendArg" + "$ref": "#/definitions/SecretRotatedArg" } } }, @@ -15150,111 +50583,143 @@ "args" ] }, - "SecretBackend": { + "SecretTriggerChange": { "type": "object", "properties": { - "backend-type": { - "type": "string" + "next-trigger-time": { + "type": "string", + "format": "date-time" }, - "config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } + "revision": { + "type": "integer" }, - "name": { + "uri": { "type": "string" - }, - "token-rotate-interval": { - "type": "integer" } }, "additionalProperties": false, "required": [ - "name", - "backend-type", - "config" + "uri", + "next-trigger-time" ] }, - "SecretBackendResult": { + "SecretTriggerWatchResult": { "type": "object", "properties": { + "changes": { + "type": "array", + "items": { + "$ref": "#/definitions/SecretTriggerChange" + } + }, "error": { "$ref": "#/definitions/Error" }, - "id": { + "watcher-id": { "type": "string" - }, - "message": { + } + }, + "additionalProperties": false, + "required": [ + "watcher-id", + "changes" + ] + }, + "SecretValueRef": { + "type": "object", + "properties": { + "backend-id": { "type": "string" }, - "num-secrets": { - "type": "integer" - }, - "result": { - "$ref": "#/definitions/SecretBackend" - }, - "status": { + "revision-id": { "type": "string" } }, "additionalProperties": false, "required": [ - "result", - "id", - "num-secrets", - "status" + "backend-id", + "revision-id" ] }, - "UpdateSecretBackendArg": { + "SecretValueResult": { "type": "object", "properties": { - "config": { + "data": { "type": "object", "patternProperties": { ".*": { - "type": "object", - "additionalProperties": true + "type": "string" } } }, - "force": { - "type": "boolean" + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "SetStatus": { + "type": "object", + "properties": { + "entities": { + "type": "array", + "items": { + "$ref": "#/definitions/EntityStatusArgs" + } + } + }, + "additionalProperties": false, + "required": [ + "entities" + ] + }, + "SetUnitStateArg": { + "type": "object", + "properties": { + "charm-state": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } }, - "name": { + "meter-status-state": { "type": "string" }, - "name-change": { + "relation-state": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "secret-state": { "type": "string" }, - "reset": { - "type": "array", - "items": { - "type": "string" - } + "storage-state": { + "type": "string" }, - "token-rotate-interval": { - "type": "integer" + "tag": { + "type": "string" + }, + "uniter-state": { + "type": "string" } }, "additionalProperties": false, "required": [ - "name", - "token-rotate-interval", - "config", - "reset" + "tag" ] }, - "UpdateSecretBackendArgs": { + "SetUnitStateArgs": { "type": "object", "properties": { "args": { "type": "array", "items": { - "$ref": "#/definitions/UpdateSecretBackendArg" + "$ref": "#/definitions/SetUnitStateArg" } } }, @@ -15262,251 +50727,307 @@ "required": [ "args" ] - } - } - } - }, - { - "Name": "Secrets", - "Description": "SecretsAPI is the backend for the Secrets facade.", - "Version": 2, - "AvailableTo": [ - "model-user" - ], - "Schema": { - "type": "object", - "properties": { - "CreateSecrets": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/CreateSecretArgs" - }, - "Result": { - "$ref": "#/definitions/StringResults" - } - }, - "description": "CreateSecrets creates new secrets." }, - "GrantSecret": { + "SettingsResult": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/GrantRevokeUserSecretArg" + "error": { + "$ref": "#/definitions/Error" }, - "Result": { - "$ref": "#/definitions/ErrorResults" + "settings": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } } }, - "description": "GrantSecret grants access to a user secret." + "additionalProperties": false, + "required": [ + "settings" + ] }, - "ListSecrets": { + "SettingsResults": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/ListSecretsArgs" - }, - "Result": { - "$ref": "#/definitions/ListSecretResults" + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/SettingsResult" + } } }, - "description": "ListSecrets lists available secrets." + "additionalProperties": false, + "required": [ + "results" + ] }, - "RemoveSecrets": { + "StatusResult": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/DeleteSecretArgs" + "data": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "RemoveSecrets remove user secret." - }, - "RevokeSecret": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/GrantRevokeUserSecretArg" + "error": { + "$ref": "#/definitions/Error" }, - "Result": { - "$ref": "#/definitions/ErrorResults" + "id": { + "type": "string" + }, + "info": { + "type": "string" + }, + "life": { + "type": "string" + }, + "since": { + "type": "string", + "format": "date-time" + }, + "status": { + "type": "string" } }, - "description": "RevokeSecret revokes access to a user secret." + "additionalProperties": false, + "required": [ + "id", + "life", + "status", + "info", + "data", + "since" + ] }, - "UpdateSecrets": { + "StatusResults": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/UpdateUserSecretArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/StatusResult" + } } }, - "description": "UpdateSecrets creates new secrets." - } - }, - "definitions": { - "AccessInfo": { + "additionalProperties": false, + "required": [ + "results" + ] + }, + "StorageAddParams": { "type": "object", "properties": { - "role": { + "name": { "type": "string" }, - "scope-tag": { - "type": "string" + "storage": { + "$ref": "#/definitions/StorageConstraints" }, - "target-tag": { + "unit": { "type": "string" } }, "additionalProperties": false, "required": [ - "target-tag", - "scope-tag", - "role" + "unit", + "name", + "storage" ] }, - "CreateSecretArg": { + "StorageAttachment": { "type": "object", "properties": { - "UpsertSecretArg": { - "$ref": "#/definitions/UpsertSecretArg" - }, - "content": { - "$ref": "#/definitions/SecretContentParams" + "kind": { + "type": "integer" }, - "description": { + "life": { "type": "string" }, - "expire-time": { - "type": "string", - "format": "date-time" - }, - "label": { + "location": { "type": "string" }, "owner-tag": { "type": "string" }, - "params": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } + "storage-tag": { + "type": "string" }, - "rotate-policy": { + "unit-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "storage-tag", + "owner-tag", + "unit-tag", + "kind", + "location", + "life" + ] + }, + "StorageAttachmentId": { + "type": "object", + "properties": { + "storage-tag": { "type": "string" }, - "uri": { + "unit-tag": { "type": "string" } }, "additionalProperties": false, "required": [ - "UpsertSecretArg", - "owner-tag" + "storage-tag", + "unit-tag" + ] + }, + "StorageAttachmentIds": { + "type": "object", + "properties": { + "ids": { + "type": "array", + "items": { + "$ref": "#/definitions/StorageAttachmentId" + } + } + }, + "additionalProperties": false, + "required": [ + "ids" + ] + }, + "StorageAttachmentIdsResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "$ref": "#/definitions/StorageAttachmentIds" + } + }, + "additionalProperties": false, + "required": [ + "result" ] }, - "CreateSecretArgs": { + "StorageAttachmentIdsResults": { "type": "object", "properties": { - "args": { + "results": { "type": "array", "items": { - "$ref": "#/definitions/CreateSecretArg" + "$ref": "#/definitions/StorageAttachmentIdsResult" } } }, + "additionalProperties": false + }, + "StorageAttachmentResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "$ref": "#/definitions/StorageAttachment" + } + }, "additionalProperties": false, "required": [ - "args" + "result" ] }, - "DeleteSecretArg": { + "StorageAttachmentResults": { "type": "object", "properties": { - "label": { - "type": "string" - }, - "revisions": { + "results": { "type": "array", "items": { - "type": "integer" + "$ref": "#/definitions/StorageAttachmentResult" } + } + }, + "additionalProperties": false + }, + "StorageConstraints": { + "type": "object", + "properties": { + "count": { + "type": "integer" }, - "uri": { + "pool": { "type": "string" + }, + "size": { + "type": "integer" } }, - "additionalProperties": false, - "required": [ - "uri", - "label" - ] + "additionalProperties": false }, - "DeleteSecretArgs": { + "StringBoolResult": { "type": "object", "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/DeleteSecretArg" - } + "error": { + "$ref": "#/definitions/Error" + }, + "ok": { + "type": "boolean" + }, + "result": { + "type": "string" } }, "additionalProperties": false, "required": [ - "args" + "result", + "ok" ] }, - "Error": { + "StringBoolResults": { "type": "object", "properties": { - "code": { - "type": "string" - }, - "info": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/StringBoolResult" } - }, - "message": { - "type": "string" } }, "additionalProperties": false, "required": [ - "message", - "code" + "results" ] }, - "ErrorResult": { + "StringResult": { "type": "object", "properties": { "error": { "$ref": "#/definitions/Error" + }, + "result": { + "type": "string" } }, - "additionalProperties": false + "additionalProperties": false, + "required": [ + "result" + ] }, - "ErrorResults": { + "StringResults": { "type": "object", "properties": { "results": { "type": "array", "items": { - "$ref": "#/definitions/ErrorResult" + "$ref": "#/definitions/StringResult" } } }, @@ -15515,103 +51036,49 @@ "results" ] }, - "GrantRevokeUserSecretArg": { + "StringsResult": { "type": "object", "properties": { - "applications": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { "type": "array", "items": { "type": "string" } - }, - "label": { - "type": "string" - }, - "uri": { - "type": "string" } }, - "additionalProperties": false, - "required": [ - "uri", - "label", - "applications" - ] + "additionalProperties": false }, - "ListSecretResult": { + "StringsWatchResult": { "type": "object", "properties": { - "access": { - "type": "array", - "items": { - "$ref": "#/definitions/AccessInfo" - } - }, - "create-time": { - "type": "string", - "format": "date-time" - }, - "description": { - "type": "string" - }, - "label": { - "type": "string" - }, - "latest-expire-time": { - "type": "string", - "format": "date-time" - }, - "latest-revision": { - "type": "integer" - }, - "next-rotate-time": { - "type": "string", - "format": "date-time" - }, - "owner-tag": { - "type": "string" - }, - "revisions": { + "changes": { "type": "array", "items": { - "$ref": "#/definitions/SecretRevision" + "type": "string" } }, - "rotate-policy": { - "type": "string" - }, - "update-time": { - "type": "string", - "format": "date-time" + "error": { + "$ref": "#/definitions/Error" }, - "uri": { + "watcher-id": { "type": "string" - }, - "value": { - "$ref": "#/definitions/SecretValueResult" - }, - "version": { - "type": "integer" } }, "additionalProperties": false, "required": [ - "uri", - "version", - "owner-tag", - "latest-revision", - "create-time", - "update-time", - "revisions" + "watcher-id" ] }, - "ListSecretResults": { + "StringsWatchResults": { "type": "object", "properties": { "results": { "type": "array", "items": { - "$ref": "#/definitions/ListSecretResult" + "$ref": "#/definitions/StringsWatchResult" } } }, @@ -15620,89 +51087,60 @@ "results" ] }, - "ListSecretsArgs": { + "UnitRefreshResult": { "type": "object", "properties": { - "filter": { - "$ref": "#/definitions/SecretsFilter" + "Error": { + "$ref": "#/definitions/Error" }, - "show-secrets": { - "type": "boolean" + "Life": { + "type": "string" + }, + "Resolved": { + "type": "string" + }, + "provider-id": { + "type": "string" } }, "additionalProperties": false, "required": [ - "show-secrets", - "filter" + "Life", + "Resolved", + "Error" ] }, - "SecretContentParams": { + "UnitRefreshResults": { "type": "object", "properties": { - "data": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } + "Results": { + "type": "array", + "items": { + "$ref": "#/definitions/UnitRefreshResult" } - }, - "value-ref": { - "$ref": "#/definitions/SecretValueRef" - } - }, - "additionalProperties": false - }, - "SecretRevision": { - "type": "object", - "properties": { - "backend-name": { - "type": "string" - }, - "create-time": { - "type": "string", - "format": "date-time" - }, - "expire-time": { - "type": "string", - "format": "date-time" - }, - "revision": { - "type": "integer" - }, - "update-time": { - "type": "string", - "format": "date-time" - }, - "value-ref": { - "$ref": "#/definitions/SecretValueRef" } }, "additionalProperties": false, "required": [ - "revision" + "Results" ] }, - "SecretValueRef": { + "UnitSettings": { "type": "object", "properties": { - "backend-id": { - "type": "string" - }, - "revision-id": { - "type": "string" + "version": { + "type": "integer" } }, "additionalProperties": false, "required": [ - "backend-id", - "revision-id" + "version" ] }, - "SecretValueResult": { + "UnitStateResult": { "type": "object", "properties": { - "data": { + "charm-state": { "type": "object", "patternProperties": { ".*": { @@ -15712,50 +51150,37 @@ }, "error": { "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false - }, - "SecretsFilter": { - "type": "object", - "properties": { - "label": { - "type": "string" }, - "owner-tag": { + "meter-status-state": { "type": "string" }, - "revision": { - "type": "integer" + "relation-state": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } }, - "uri": { + "secret-state": { "type": "string" - } - }, - "additionalProperties": false - }, - "StringResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" }, - "result": { + "storage-state": { + "type": "string" + }, + "uniter-state": { "type": "string" } }, - "additionalProperties": false, - "required": [ - "result" - ] + "additionalProperties": false }, - "StringResults": { + "UnitStateResults": { "type": "object", "properties": { "results": { "type": "array", "items": { - "$ref": "#/definitions/StringResult" + "$ref": "#/definitions/UnitStateResult" } } }, @@ -15764,24 +51189,18 @@ "results" ] }, - "UpdateUserSecretArg": { + "UpdateSecretArg": { "type": "object", "properties": { "UpsertSecretArg": { "$ref": "#/definitions/UpsertSecretArg" }, - "auto-prune": { - "type": "boolean" - }, "content": { "$ref": "#/definitions/SecretContentParams" }, "description": { "type": "string" }, - "existing-label": { - "type": "string" - }, "expire-time": { "type": "string", "format": "date-time" @@ -15808,17 +51227,16 @@ "additionalProperties": false, "required": [ "UpsertSecretArg", - "uri", - "existing-label" + "uri" ] }, - "UpdateUserSecretArgs": { + "UpdateSecretArgs": { "type": "object", "properties": { "args": { "type": "array", "items": { - "$ref": "#/definitions/UpdateUserSecretArg" + "$ref": "#/definitions/UpdateSecretArg" } } }, @@ -15827,6 +51245,68 @@ "args" ] }, + "UpgradeSeriesStatusParam": { + "type": "object", + "properties": { + "entity": { + "$ref": "#/definitions/Entity" + }, + "message": { + "type": "string" + }, + "status": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "entity", + "status", + "message" + ] + }, + "UpgradeSeriesStatusParams": { + "type": "object", + "properties": { + "params": { + "type": "array", + "items": { + "$ref": "#/definitions/UpgradeSeriesStatusParam" + } + } + }, + "additionalProperties": false, + "required": [ + "params" + ] + }, + "UpgradeSeriesStatusResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + }, + "status": { + "type": "string" + }, + "target": { + "type": "string" + } + }, + "additionalProperties": false + }, + "UpgradeSeriesStatusResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/UpgradeSeriesStatusResult" + } + } + }, + "additionalProperties": false + }, "UpsertSecretArg": { "type": "object", "properties": { @@ -15862,9 +51342,9 @@ } }, { - "Name": "Spaces", - "Description": "API provides the spaces API facade for version 6.", - "Version": 6, + "Name": "UpgradeSeries", + "Description": "API serves methods required by the machine agent upgrade-machine worker.", + "Version": 3, "AvailableTo": [ "controller-machine-agent", "machine-agent", @@ -15874,135 +51354,225 @@ "Schema": { "type": "object", "properties": { - "CreateSpaces": { + "CurrentSeries": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/CreateSpacesParams" + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/StringResults" + } + }, + "description": "CurrentSeries returns what Juju thinks the current series of the machine is.\nNote that a machine could have been upgraded out-of-band by running\ndo-release-upgrade outside of the upgrade-machine workflow,\nmaking this value incorrect." + }, + "FinishUpgradeSeries": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/UpdateChannelArgs" }, "Result": { "$ref": "#/definitions/ErrorResults" } }, - "description": "CreateSpaces creates a new Juju network space, associating the\nspecified subnets with it (optional; can be empty)." + "description": "FinishUpgradeSeries is the last action in the upgrade workflow and is\ncalled after all machine and unit statuses are \"completed\".\nIt updates the machine series to reflect the completed upgrade, then\nremoves the upgrade-machine lock." }, - "ListSpaces": { + "MachineStatus": { "type": "object", "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, "Result": { - "$ref": "#/definitions/ListSpacesResults" + "$ref": "#/definitions/UpgradeSeriesStatusResults" } }, - "description": "ListSpaces lists all the available spaces and their associated subnets." + "description": "MachineStatus gets the current upgrade-machine status of a machine." }, - "MoveSubnets": { + "PinMachineApplications": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/PinApplicationsResults" + } + }, + "description": "PinMachineApplications pins leadership for applications represented by units\nrunning on the auth'd machine." + }, + "PinnedLeadership": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/PinnedLeadershipResult" + } + }, + "description": "PinnedLeadership returns all pinned applications and the entities that\nrequire their pinned behaviour, for leadership in the current model." + }, + "SetInstanceStatus": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/MoveSubnetsParams" + "$ref": "#/definitions/SetStatus" }, "Result": { - "$ref": "#/definitions/MoveSubnetsResults" + "$ref": "#/definitions/ErrorResults" } }, - "description": "MoveSubnets ensures that the input subnets are in the input space." + "description": "SetInstanceStatus sets the status of the machine." }, - "ReloadSpaces": { + "SetMachineStatus": { "type": "object", - "description": "ReloadSpaces refreshes spaces from substrate" + "properties": { + "Params": { + "$ref": "#/definitions/UpgradeSeriesStatusParams" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + }, + "description": "SetMachineStatus sets the current upgrade-machine status of a machine." }, - "RemoveSpace": { + "SetUpgradeSeriesUnitStatus": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/RemoveSpaceParams" + "$ref": "#/definitions/UpgradeSeriesStatusParams" }, "Result": { - "$ref": "#/definitions/RemoveSpaceResults" + "$ref": "#/definitions/ErrorResults" } }, - "description": "RemoveSpace removes a space.\nReturns SpaceResults if entities/settings are found which makes the deletion not possible." + "description": "SetUpgradeSeriesUnitStatus sets the upgrade series status of the unit.\nIf no upgrade is in progress an error is returned instead." }, - "RenameSpace": { + "StartUnitCompletion": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/RenameSpacesParams" + "$ref": "#/definitions/UpgradeSeriesStartUnitCompletionParam" }, "Result": { "$ref": "#/definitions/ErrorResults" } }, - "description": "RenameSpace renames a space." + "description": "StartUnitCompletion starts the upgrade series completion phase for all subordinate\nunits of a given machine." }, - "ShowSpace": { + "TargetSeries": { "type": "object", "properties": { "Params": { "$ref": "#/definitions/Entities" }, "Result": { - "$ref": "#/definitions/ShowSpaceResults" + "$ref": "#/definitions/StringResults" } }, - "description": "ShowSpace shows the spaces for a set of given entities." + "description": "TargetSeries returns the series that a machine has been locked\nfor upgrading to." + }, + "UnitsCompleted": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/EntitiesResults" + } + }, + "description": "UnitsCompleted returns the units running on this machine that have completed\nthe upgrade-machine workflow and are in their normal running state." + }, + "UnitsPrepared": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/EntitiesResults" + } + }, + "description": "UnitsPrepared returns the units running on this machine that have completed\ntheir upgrade-machine preparation, and are ready to be stopped and have their\nunit agent services converted for the target series." + }, + "UnpinMachineApplications": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/PinApplicationsResults" + } + }, + "description": "UnpinMachineApplications unpins leadership for applications represented by\nunits running on the auth'd machine." + }, + "UpgradeSeriesUnitStatus": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/UpgradeSeriesStatusResults" + } + }, + "description": "UpgradeSeriesUnitStatus returns the current preparation status of an\nupgrading unit.\nIf no series upgrade is in progress an error is returned instead." + }, + "WatchUpgradeSeriesNotifications": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/NotifyWatchResults" + } + }, + "description": "WatchUpgradeSeriesNotifications returns a NotifyWatcher for observing changes to upgrade series locks." } }, "definitions": { - "CreateSpaceParams": { + "Entities": { "type": "object", "properties": { - "cidrs": { + "entities": { "type": "array", "items": { - "type": "string" + "$ref": "#/definitions/Entity" } - }, - "provider-id": { - "type": "string" - }, - "public": { - "type": "boolean" - }, - "space-tag": { - "type": "string" } }, "additionalProperties": false, "required": [ - "cidrs", - "space-tag", - "public" + "entities" ] }, - "CreateSpacesParams": { + "EntitiesResult": { "type": "object", "properties": { - "spaces": { + "entities": { "type": "array", "items": { - "$ref": "#/definitions/CreateSpaceParams" + "$ref": "#/definitions/Entity" } + }, + "error": { + "$ref": "#/definitions/Error" } }, "additionalProperties": false, "required": [ - "spaces" + "entities" ] }, - "Entities": { + "EntitiesResults": { "type": "object", "properties": { - "entities": { + "results": { "type": "array", "items": { - "$ref": "#/definitions/Entity" + "$ref": "#/definitions/EntitiesResult" } } }, "additionalProperties": false, "required": [ - "entities" + "results" ] }, "Entity": { @@ -16014,7 +51584,37 @@ }, "additionalProperties": false, "required": [ - "tag" + "tag" + ] + }, + "EntityStatusArgs": { + "type": "object", + "properties": { + "data": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "info": { + "type": "string" + }, + "status": { + "type": "string" + }, + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag", + "status", + "info", + "data" ] }, "Error": { @@ -16066,87 +51666,58 @@ "results" ] }, - "ListSpacesResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/Space" - } - } - }, - "additionalProperties": false, - "required": [ - "results" - ] - }, - "MoveSubnetsParam": { + "NotifyWatchResult": { "type": "object", "properties": { - "force": { - "type": "boolean" - }, - "space-tag": { + "NotifyWatcherId": { "type": "string" }, - "subnets": { - "type": "array", - "items": { - "type": "string" - } + "error": { + "$ref": "#/definitions/Error" } }, "additionalProperties": false, "required": [ - "subnets", - "space-tag", - "force" + "NotifyWatcherId" ] }, - "MoveSubnetsParams": { + "NotifyWatchResults": { "type": "object", "properties": { - "args": { + "results": { "type": "array", "items": { - "$ref": "#/definitions/MoveSubnetsParam" + "$ref": "#/definitions/NotifyWatchResult" } } }, "additionalProperties": false, "required": [ - "args" + "results" ] }, - "MoveSubnetsResult": { + "PinApplicationResult": { "type": "object", "properties": { + "application-name": { + "type": "string" + }, "error": { "$ref": "#/definitions/Error" - }, - "moved-subnets": { - "type": "array", - "items": { - "$ref": "#/definitions/MovedSubnet" - } - }, - "new-space": { - "type": "string" } }, "additionalProperties": false, "required": [ - "new-space" + "application-name" ] }, - "MoveSubnetsResults": { + "PinApplicationsResults": { "type": "object", "properties": { "results": { "type": "array", "items": { - "$ref": "#/definitions/MoveSubnetsResult" + "$ref": "#/definitions/PinApplicationResult" } } }, @@ -16155,93 +51726,63 @@ "results" ] }, - "MovedSubnet": { - "type": "object", - "properties": { - "cidr": { - "type": "string" - }, - "old-space": { - "type": "string" - }, - "subnet": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "subnet", - "old-space", - "cidr" - ] - }, - "RemoveSpaceParam": { + "PinnedLeadershipResult": { "type": "object", "properties": { - "dry-run": { - "type": "boolean" - }, - "force": { - "type": "boolean" + "error": { + "$ref": "#/definitions/Error" }, - "space": { - "$ref": "#/definitions/Entity" + "result": { + "type": "object", + "patternProperties": { + ".*": { + "type": "array", + "items": { + "type": "string" + } + } + } } }, - "additionalProperties": false, - "required": [ - "space" - ] + "additionalProperties": false }, - "RemoveSpaceParams": { + "SetStatus": { "type": "object", "properties": { - "space-param": { + "entities": { "type": "array", "items": { - "$ref": "#/definitions/RemoveSpaceParam" + "$ref": "#/definitions/EntityStatusArgs" } } }, "additionalProperties": false, "required": [ - "space-param" + "entities" ] }, - "RemoveSpaceResult": { + "StringResult": { "type": "object", "properties": { - "bindings": { - "type": "array", - "items": { - "$ref": "#/definitions/Entity" - } - }, - "constraints": { - "type": "array", - "items": { - "$ref": "#/definitions/Entity" - } - }, - "controller-settings": { - "type": "array", - "items": { - "type": "string" - } - }, "error": { "$ref": "#/definitions/Error" + }, + "result": { + "type": "string" } }, - "additionalProperties": false + "additionalProperties": false, + "required": [ + "result" + ] }, - "RemoveSpaceResults": { + "StringResults": { "type": "object", "properties": { "results": { "type": "array", "items": { - "$ref": "#/definitions/RemoveSpaceResult" + "$ref": "#/definitions/StringResult" } } }, @@ -16250,391 +51791,409 @@ "results" ] }, - "RenameSpaceParams": { + "UpdateChannelArg": { "type": "object", "properties": { - "from-space-tag": { + "channel": { "type": "string" }, - "to-space-tag": { - "type": "string" + "force": { + "type": "boolean" + }, + "tag": { + "$ref": "#/definitions/Entity" } }, "additionalProperties": false, "required": [ - "from-space-tag", - "to-space-tag" + "tag", + "force", + "channel" ] }, - "RenameSpacesParams": { + "UpdateChannelArgs": { "type": "object", "properties": { - "changes": { + "args": { "type": "array", "items": { - "$ref": "#/definitions/RenameSpaceParams" + "$ref": "#/definitions/UpdateChannelArg" } } }, "additionalProperties": false, "required": [ - "changes" + "args" ] }, - "ShowSpaceResult": { + "UpgradeSeriesStartUnitCompletionParam": { "type": "object", "properties": { - "applications": { + "entities": { "type": "array", "items": { - "type": "string" + "$ref": "#/definitions/Entity" } }, - "error": { - "$ref": "#/definitions/Error" + "message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "entities", + "message" + ] + }, + "UpgradeSeriesStatusParam": { + "type": "object", + "properties": { + "entity": { + "$ref": "#/definitions/Entity" }, - "machine-count": { - "type": "integer" + "message": { + "type": "string" }, - "space": { - "$ref": "#/definitions/Space" + "status": { + "type": "string" } }, "additionalProperties": false, "required": [ - "space", - "applications", - "machine-count" + "entity", + "status", + "message" ] }, - "ShowSpaceResults": { + "UpgradeSeriesStatusParams": { "type": "object", "properties": { - "results": { + "params": { "type": "array", "items": { - "$ref": "#/definitions/ShowSpaceResult" + "$ref": "#/definitions/UpgradeSeriesStatusParam" } } }, "additionalProperties": false, "required": [ - "results" + "params" ] }, - "Space": { + "UpgradeSeriesStatusResult": { "type": "object", "properties": { "error": { "$ref": "#/definitions/Error" }, - "id": { + "status": { "type": "string" }, - "name": { + "target": { "type": "string" - }, - "subnets": { - "type": "array", - "items": { - "$ref": "#/definitions/Subnet" - } } }, - "additionalProperties": false, - "required": [ - "id", - "name", - "subnets" - ] + "additionalProperties": false }, - "Subnet": { + "UpgradeSeriesStatusResults": { "type": "object", "properties": { - "cidr": { - "type": "string" - }, - "life": { - "type": "string" - }, - "provider-id": { - "type": "string" - }, - "provider-network-id": { - "type": "string" - }, - "provider-space-id": { - "type": "string" - }, - "space-tag": { - "type": "string" - }, - "status": { - "type": "string" - }, - "vlan-tag": { - "type": "integer" - }, - "zones": { + "results": { "type": "array", "items": { - "type": "string" + "$ref": "#/definitions/UpgradeSeriesStatusResult" } } }, - "additionalProperties": false, - "required": [ - "cidr", - "vlan-tag", - "life", - "space-tag", - "zones" - ] + "additionalProperties": false } } } }, { - "Name": "Storage", - "Description": "StorageAPI implements the latest version (v6) of the Storage API.", - "Version": 6, + "Name": "UpgradeSteps", + "Description": "UpgradeStepsAPI implements version 2 of the Upgrade Steps API,\nwhich adds WriteUniterState.", + "Version": 2, "AvailableTo": [ "controller-machine-agent", "machine-agent", - "unit-agent", - "model-user" + "unit-agent" ], "Schema": { "type": "object", "properties": { - "AddToUnit": { + "ResetKVMMachineModificationStatusIdle": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/StoragesAddParams" + "$ref": "#/definitions/Entity" }, "Result": { - "$ref": "#/definitions/AddStorageResults" + "$ref": "#/definitions/ErrorResult" } }, - "description": "AddToUnit validates and creates additional storage instances for units.\nA \"CHANGE\" block can block this operation." + "description": "ResetKVMMachineModificationStatusIdle sets the modification status\nof a kvm machine to idle if it is in an error state before upgrade.\nRelated to lp:1829393." }, - "Attach": { + "WriteAgentState": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/StorageAttachmentIds" + "$ref": "#/definitions/SetUnitStateArgs" }, "Result": { "$ref": "#/definitions/ErrorResults" } }, - "description": "Attach attaches existing storage instances to units.\nA \"CHANGE\" block can block this operation." - }, - "CreatePool": { + "description": "WriteAgentState writes the agent state for the set of units provided. This\ncall presently deals with the state for the unit agent." + } + }, + "definitions": { + "Entity": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/StoragePoolArgs" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" + "tag": { + "type": "string" } }, - "description": "CreatePool creates a new pool with specified parameters." + "additionalProperties": false, + "required": [ + "tag" + ] }, - "DetachStorage": { + "Error": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/StorageDetachmentParams" + "code": { + "type": "string" }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "DetachStorage sets the specified storage attachments to Dying, unless they are\nalready Dying or Dead. Any associated, persistent storage will remain\nalive. This call can be forced." - }, - "Import": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/BulkImportStorageParams" + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } }, - "Result": { - "$ref": "#/definitions/ImportStorageResults" + "message": { + "type": "string" } }, - "description": "Import imports existing storage into the model.\nA \"CHANGE\" block can block this operation." + "additionalProperties": false, + "required": [ + "message", + "code" + ] }, - "ListFilesystems": { + "ErrorResult": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/FilesystemFilters" - }, - "Result": { - "$ref": "#/definitions/FilesystemDetailsListResults" + "error": { + "$ref": "#/definitions/Error" } }, - "description": "ListFilesystems returns a list of filesystems in the environment matching\nthe provided filter. Each result describes a filesystem in detail, including\nthe filesystem's attachments." + "additionalProperties": false }, - "ListPools": { + "ErrorResults": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/StoragePoolFilters" - }, - "Result": { - "$ref": "#/definitions/StoragePoolsResults" + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResult" + } } }, - "description": "ListPools returns a list of pools.\nIf filter is provided, returned list only contains pools that match\nthe filter.\nPools can be filtered on names and provider types.\nIf both names and types are provided as filter,\npools that match either are returned.\nThis method lists union of pools and environment provider types.\nIf no filter is provided, all pools are returned." + "additionalProperties": false, + "required": [ + "results" + ] }, - "ListStorageDetails": { + "SetUnitStateArg": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/StorageFilters" + "charm-state": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } }, - "Result": { - "$ref": "#/definitions/StorageDetailsListResults" + "meter-status-state": { + "type": "string" + }, + "relation-state": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "secret-state": { + "type": "string" + }, + "storage-state": { + "type": "string" + }, + "tag": { + "type": "string" + }, + "uniter-state": { + "type": "string" } }, - "description": "ListStorageDetails returns storage matching a filter." + "additionalProperties": false, + "required": [ + "tag" + ] }, - "ListVolumes": { + "SetUnitStateArgs": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/VolumeFilters" - }, - "Result": { - "$ref": "#/definitions/VolumeDetailsListResults" + "args": { + "type": "array", + "items": { + "$ref": "#/definitions/SetUnitStateArg" + } } }, - "description": "ListVolumes lists volumes with the given filters. Each filter produces\nan independent list of volumes, or an error if the filter is invalid\nor the volumes could not be listed." - }, - "Remove": { + "additionalProperties": false, + "required": [ + "args" + ] + } + } + } + }, + { + "Name": "Upgrader", + "Description": "", + "Version": 1, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "DesiredVersion": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/RemoveStorage" + "$ref": "#/definitions/Entities" }, "Result": { - "$ref": "#/definitions/ErrorResults" + "$ref": "#/definitions/VersionResults" } - }, - "description": "Remove sets the specified storage entities to Dying, unless they are\nalready Dying or Dead, such that the storage will eventually be removed\nfrom the model. If the arguments specify that the storage should be\ndestroyed, then the associated cloud storage will be destroyed first;\notherwise it will only be released from Juju's control." + } }, - "RemovePool": { + "SetTools": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/StoragePoolDeleteArgs" + "$ref": "#/definitions/EntitiesVersion" }, "Result": { "$ref": "#/definitions/ErrorResults" } - }, - "description": "RemovePool deletes the named pool" + } }, - "StorageDetails": { + "Tools": { "type": "object", "properties": { "Params": { "$ref": "#/definitions/Entities" }, "Result": { - "$ref": "#/definitions/StorageDetailsResults" + "$ref": "#/definitions/ToolsResults" } - }, - "description": "StorageDetails retrieves and returns detailed information about desired\nstorage identified by supplied tags. If specified storage cannot be\nretrieved, individual error is returned instead of storage information." + } }, - "UpdatePool": { + "WatchAPIVersion": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/StoragePoolArgs" + "$ref": "#/definitions/Entities" }, "Result": { - "$ref": "#/definitions/ErrorResults" + "$ref": "#/definitions/NotifyWatchResults" } - }, - "description": "UpdatePool deletes the named pool" + } } }, "definitions": { - "AddStorageDetails": { - "type": "object", - "properties": { - "storage-tags": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "storage-tags" - ] - }, - "AddStorageResult": { + "Binary": { "type": "object", "properties": { - "error": { - "$ref": "#/definitions/Error" + "Arch": { + "type": "string" }, - "result": { - "$ref": "#/definitions/AddStorageDetails" - } - }, - "additionalProperties": false - }, - "AddStorageResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/AddStorageResult" - } + "Build": { + "type": "integer" + }, + "Major": { + "type": "integer" + }, + "Minor": { + "type": "integer" + }, + "Number": { + "$ref": "#/definitions/Number" + }, + "Patch": { + "type": "integer" + }, + "Release": { + "type": "string" + }, + "Tag": { + "type": "string" } }, "additionalProperties": false, "required": [ - "results" + "Major", + "Minor", + "Tag", + "Patch", + "Build", + "Number", + "Release", + "Arch" ] }, - "BulkImportStorageParams": { + "Entities": { "type": "object", "properties": { - "storage": { + "entities": { "type": "array", "items": { - "$ref": "#/definitions/ImportStorageParams" + "$ref": "#/definitions/Entity" } } }, "additionalProperties": false, "required": [ - "storage" + "entities" ] }, - "Entities": { + "EntitiesVersion": { "type": "object", "properties": { - "entities": { + "agent-tools": { "type": "array", "items": { - "$ref": "#/definitions/Entity" + "$ref": "#/definitions/EntityVersion" } } }, "additionalProperties": false, "required": [ - "entities" + "agent-tools" ] }, "Entity": { @@ -16649,34 +52208,20 @@ "tag" ] }, - "EntityStatus": { + "EntityVersion": { "type": "object", "properties": { - "data": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "info": { + "tag": { "type": "string" }, - "since": { - "type": "string", - "format": "date-time" - }, - "status": { - "type": "string" + "tools": { + "$ref": "#/definitions/Version" } }, "additionalProperties": false, "required": [ - "status", - "info", - "since" + "tag", + "tools" ] }, "Error": { @@ -16728,210 +52273,151 @@ "results" ] }, - "FilesystemAttachmentDetails": { + "NotifyWatchResult": { "type": "object", "properties": { - "FilesystemAttachmentInfo": { - "$ref": "#/definitions/FilesystemAttachmentInfo" - }, - "life": { - "type": "string" - }, - "mount-point": { + "NotifyWatcherId": { "type": "string" }, - "read-only": { - "type": "boolean" + "error": { + "$ref": "#/definitions/Error" } }, "additionalProperties": false, "required": [ - "FilesystemAttachmentInfo" + "NotifyWatcherId" ] }, - "FilesystemAttachmentInfo": { + "NotifyWatchResults": { "type": "object", "properties": { - "mount-point": { - "type": "string" - }, - "read-only": { - "type": "boolean" + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/NotifyWatchResult" + } } }, - "additionalProperties": false + "additionalProperties": false, + "required": [ + "results" + ] }, - "FilesystemDetails": { + "Number": { "type": "object", "properties": { - "filesystem-tag": { - "type": "string" - }, - "info": { - "$ref": "#/definitions/FilesystemInfo" - }, - "life": { - "type": "string" - }, - "machine-attachments": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/FilesystemAttachmentDetails" - } - } + "Build": { + "type": "integer" }, - "status": { - "$ref": "#/definitions/EntityStatus" + "Major": { + "type": "integer" }, - "storage": { - "$ref": "#/definitions/StorageDetails" + "Minor": { + "type": "integer" }, - "unit-attachments": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/FilesystemAttachmentDetails" - } - } + "Patch": { + "type": "integer" }, - "volume-tag": { + "Tag": { "type": "string" } }, "additionalProperties": false, "required": [ - "filesystem-tag", - "info", - "status" + "Major", + "Minor", + "Tag", + "Patch", + "Build" ] }, - "FilesystemDetailsListResult": { + "Tools": { "type": "object", "properties": { - "error": { - "$ref": "#/definitions/Error" + "sha256": { + "type": "string" }, - "result": { - "type": "array", - "items": { - "$ref": "#/definitions/FilesystemDetails" - } - } - }, - "additionalProperties": false - }, - "FilesystemDetailsListResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/FilesystemDetailsListResult" - } - } - }, - "additionalProperties": false - }, - "FilesystemFilter": { - "type": "object", - "properties": { - "machines": { - "type": "array", - "items": { - "type": "string" - } + "size": { + "type": "integer" + }, + "url": { + "type": "string" + }, + "version": { + "$ref": "#/definitions/Binary" } }, - "additionalProperties": false + "additionalProperties": false, + "required": [ + "version", + "url", + "size" + ] }, - "FilesystemFilters": { + "ToolsResult": { "type": "object", "properties": { - "filters": { + "error": { + "$ref": "#/definitions/Error" + }, + "tools": { "type": "array", "items": { - "$ref": "#/definitions/FilesystemFilter" + "$ref": "#/definitions/Tools" } } }, - "additionalProperties": false - }, - "FilesystemInfo": { - "type": "object", - "properties": { - "filesystem-id": { - "type": "string" - }, - "pool": { - "type": "string" - }, - "size": { - "type": "integer" - } - }, "additionalProperties": false, "required": [ - "filesystem-id", - "pool", - "size" + "tools" ] }, - "ImportStorageDetails": { + "ToolsResults": { "type": "object", "properties": { - "storage-tag": { - "type": "string" + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ToolsResult" + } } }, "additionalProperties": false, "required": [ - "storage-tag" + "results" ] }, - "ImportStorageParams": { + "Version": { "type": "object", "properties": { - "kind": { - "type": "integer" - }, - "pool": { - "type": "string" - }, - "provider-id": { - "type": "string" - }, - "storage-name": { - "type": "string" + "version": { + "$ref": "#/definitions/Binary" } }, "additionalProperties": false, "required": [ - "kind", - "pool", - "provider-id", - "storage-name" + "version" ] }, - "ImportStorageResult": { + "VersionResult": { "type": "object", "properties": { "error": { "$ref": "#/definitions/Error" }, - "result": { - "$ref": "#/definitions/ImportStorageDetails" + "version": { + "$ref": "#/definitions/Number" } }, "additionalProperties": false }, - "ImportStorageResults": { + "VersionResults": { "type": "object", "properties": { "results": { "type": "array", "items": { - "$ref": "#/definitions/ImportStorageResult" + "$ref": "#/definitions/VersionResult" } } }, @@ -16939,656 +52425,564 @@ "required": [ "results" ] - }, - "RemoveStorage": { + } + } + } + }, + { + "Name": "UserManager", + "Description": "UserManagerAPI implements the user manager interface and is the concrete\nimplementation of the api end point.", + "Version": 3, + "AvailableTo": [ + "controller-user" + ], + "Schema": { + "type": "object", + "properties": { + "AddUser": { "type": "object", "properties": { - "storage": { - "type": "array", - "items": { - "$ref": "#/definitions/RemoveStorageInstance" - } + "Params": { + "$ref": "#/definitions/AddUsers" + }, + "Result": { + "$ref": "#/definitions/AddUserResults" } }, - "additionalProperties": false, - "required": [ - "storage" - ] + "description": "AddUser adds a user with a username, and either a password or\na randomly generated secret key which will be returned." }, - "RemoveStorageInstance": { + "DisableUser": { "type": "object", "properties": { - "destroy-attachments": { - "type": "boolean" - }, - "destroy-storage": { - "type": "boolean" - }, - "force": { - "type": "boolean" - }, - "max-wait": { - "type": "integer" + "Params": { + "$ref": "#/definitions/Entities" }, - "tag": { - "type": "string" + "Result": { + "$ref": "#/definitions/ErrorResults" } }, - "additionalProperties": false, - "required": [ - "tag" - ] + "description": "DisableUser disables one or more users. If the user is already disabled,\nthe action is considered a success." }, - "StorageAddParams": { + "EnableUser": { "type": "object", "properties": { - "name": { - "type": "string" - }, - "storage": { - "$ref": "#/definitions/StorageConstraints" + "Params": { + "$ref": "#/definitions/Entities" }, - "unit": { - "type": "string" + "Result": { + "$ref": "#/definitions/ErrorResults" } }, - "additionalProperties": false, - "required": [ - "unit", - "name", - "storage" - ] + "description": "EnableUser enables one or more users. If the user is already enabled,\nthe action is considered a success." }, - "StorageAttachmentDetails": { + "ModelUserInfo": { "type": "object", "properties": { - "life": { - "type": "string" - }, - "location": { - "type": "string" - }, - "machine-tag": { - "type": "string" - }, - "storage-tag": { - "type": "string" + "Params": { + "$ref": "#/definitions/Entities" }, - "unit-tag": { - "type": "string" + "Result": { + "$ref": "#/definitions/ModelUserInfoResults" } }, - "additionalProperties": false, - "required": [ - "storage-tag", - "unit-tag", - "machine-tag" - ] + "description": "ModelUserInfo returns information on all users in the model." }, - "StorageAttachmentId": { + "RemoveUser": { "type": "object", "properties": { - "storage-tag": { - "type": "string" + "Params": { + "$ref": "#/definitions/Entities" }, - "unit-tag": { - "type": "string" + "Result": { + "$ref": "#/definitions/ErrorResults" } }, - "additionalProperties": false, - "required": [ - "storage-tag", - "unit-tag" - ] + "description": "RemoveUser permanently removes a user from the current controller for each\nentity provided. While the user is permanently removed we keep it's\ninformation around for auditing purposes.\nTODO(redir): Add information about getting deleted user information when we\nadd that capability." }, - "StorageAttachmentIds": { + "ResetPassword": { "type": "object", "properties": { - "ids": { - "type": "array", - "items": { - "$ref": "#/definitions/StorageAttachmentId" - } + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/AddUserResults" } }, - "additionalProperties": false, - "required": [ - "ids" - ] + "description": "ResetPassword resets password for supplied users by\ninvalidating current passwords (if any) and generating\nnew random secret keys which will be returned.\nUsers cannot reset their own password." }, - "StorageConstraints": { + "SetPassword": { "type": "object", "properties": { - "count": { - "type": "integer" - }, - "pool": { - "type": "string" + "Params": { + "$ref": "#/definitions/EntityPasswords" }, - "size": { - "type": "integer" + "Result": { + "$ref": "#/definitions/ErrorResults" } }, - "additionalProperties": false + "description": "SetPassword changes the stored password for the specified users." }, - "StorageDetachmentParams": { + "UserInfo": { "type": "object", "properties": { - "force": { - "type": "boolean" - }, - "ids": { - "$ref": "#/definitions/StorageAttachmentIds" + "Params": { + "$ref": "#/definitions/UserInfoRequest" }, - "max-wait": { - "type": "integer" + "Result": { + "$ref": "#/definitions/UserInfoResults" } }, - "additionalProperties": false, - "required": [ - "ids" - ] - }, - "StorageDetails": { + "description": "UserInfo returns information on a user." + } + }, + "definitions": { + "AddUser": { "type": "object", "properties": { - "attachments": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/StorageAttachmentDetails" - } - } - }, - "kind": { - "type": "integer" - }, - "life": { + "display-name": { "type": "string" }, - "owner-tag": { + "password": { "type": "string" }, - "persistent": { - "type": "boolean" - }, - "status": { - "$ref": "#/definitions/EntityStatus" - }, - "storage-tag": { + "username": { "type": "string" } }, "additionalProperties": false, "required": [ - "storage-tag", - "owner-tag", - "kind", - "status", - "persistent" + "username", + "display-name" ] }, - "StorageDetailsListResult": { + "AddUserResult": { "type": "object", "properties": { "error": { "$ref": "#/definitions/Error" }, - "result": { - "type": "array", - "items": { - "$ref": "#/definitions/StorageDetails" - } - } - }, - "additionalProperties": false - }, - "StorageDetailsListResults": { - "type": "object", - "properties": { - "results": { + "secret-key": { "type": "array", "items": { - "$ref": "#/definitions/StorageDetailsListResult" + "type": "integer" } - } - }, - "additionalProperties": false - }, - "StorageDetailsResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" }, - "result": { - "$ref": "#/definitions/StorageDetails" + "tag": { + "type": "string" } }, "additionalProperties": false }, - "StorageDetailsResults": { + "AddUserResults": { "type": "object", "properties": { "results": { "type": "array", "items": { - "$ref": "#/definitions/StorageDetailsResult" + "$ref": "#/definitions/AddUserResult" } } }, - "additionalProperties": false - }, - "StorageFilter": { - "type": "object", - "additionalProperties": false + "additionalProperties": false, + "required": [ + "results" + ] }, - "StorageFilters": { + "AddUsers": { "type": "object", "properties": { - "filters": { + "users": { "type": "array", "items": { - "$ref": "#/definitions/StorageFilter" - } - } - }, - "additionalProperties": false - }, - "StoragePool": { - "type": "object", - "properties": { - "attrs": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } + "$ref": "#/definitions/AddUser" } - }, - "name": { - "type": "string" - }, - "provider": { - "type": "string" } }, "additionalProperties": false, "required": [ - "name", - "provider", - "attrs" + "users" ] }, - "StoragePoolArgs": { + "Entities": { "type": "object", "properties": { - "pools": { + "entities": { "type": "array", "items": { - "$ref": "#/definitions/StoragePool" + "$ref": "#/definitions/Entity" } } }, "additionalProperties": false, "required": [ - "pools" + "entities" ] }, - "StoragePoolDeleteArg": { + "Entity": { "type": "object", "properties": { - "name": { + "tag": { "type": "string" } }, "additionalProperties": false, "required": [ - "name" + "tag" ] }, - "StoragePoolDeleteArgs": { + "EntityPassword": { "type": "object", "properties": { - "pools": { - "type": "array", - "items": { - "$ref": "#/definitions/StoragePoolDeleteArg" - } + "password": { + "type": "string" + }, + "tag": { + "type": "string" } }, "additionalProperties": false, "required": [ - "pools" + "tag", + "password" ] }, - "StoragePoolFilter": { + "EntityPasswords": { "type": "object", "properties": { - "names": { - "type": "array", - "items": { - "type": "string" - } - }, - "providers": { + "changes": { "type": "array", "items": { - "type": "string" + "$ref": "#/definitions/EntityPassword" } } }, - "additionalProperties": false + "additionalProperties": false, + "required": [ + "changes" + ] }, - "StoragePoolFilters": { + "Error": { "type": "object", "properties": { - "filters": { - "type": "array", - "items": { - "$ref": "#/definitions/StoragePoolFilter" + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } } + }, + "message": { + "type": "string" } }, - "additionalProperties": false + "additionalProperties": false, + "required": [ + "message", + "code" + ] }, - "StoragePoolsResult": { + "ErrorResult": { "type": "object", "properties": { "error": { "$ref": "#/definitions/Error" - }, - "storage-pools": { - "type": "array", - "items": { - "$ref": "#/definitions/StoragePool" - } } }, "additionalProperties": false }, - "StoragePoolsResults": { + "ErrorResults": { "type": "object", "properties": { "results": { "type": "array", "items": { - "$ref": "#/definitions/StoragePoolsResult" - } - } - }, - "additionalProperties": false - }, - "StoragesAddParams": { - "type": "object", - "properties": { - "storages": { - "type": "array", - "items": { - "$ref": "#/definitions/StorageAddParams" + "$ref": "#/definitions/ErrorResult" } } }, "additionalProperties": false, "required": [ - "storages" + "results" ] }, - "VolumeAttachmentDetails": { + "ModelUserInfo": { "type": "object", "properties": { - "VolumeAttachmentInfo": { - "$ref": "#/definitions/VolumeAttachmentInfo" - }, - "bus-address": { + "access": { "type": "string" }, - "device-link": { + "display-name": { "type": "string" }, - "device-name": { - "type": "string" + "last-connection": { + "type": "string", + "format": "date-time" }, - "life": { + "model-tag": { "type": "string" }, - "plan-info": { - "$ref": "#/definitions/VolumeAttachmentPlanInfo" - }, - "read-only": { - "type": "boolean" + "user": { + "type": "string" } }, "additionalProperties": false, "required": [ - "VolumeAttachmentInfo" + "model-tag", + "user", + "display-name", + "last-connection", + "access" ] }, - "VolumeAttachmentInfo": { + "ModelUserInfoResult": { "type": "object", "properties": { - "bus-address": { - "type": "string" - }, - "device-link": { - "type": "string" - }, - "device-name": { - "type": "string" - }, - "plan-info": { - "$ref": "#/definitions/VolumeAttachmentPlanInfo" + "error": { + "$ref": "#/definitions/Error" }, - "read-only": { - "type": "boolean" + "result": { + "$ref": "#/definitions/ModelUserInfo" } }, "additionalProperties": false }, - "VolumeAttachmentPlanInfo": { + "ModelUserInfoResults": { "type": "object", "properties": { - "device-attributes": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ModelUserInfoResult" } - }, - "device-type": { - "type": "string" } }, - "additionalProperties": false + "additionalProperties": false, + "required": [ + "results" + ] }, - "VolumeDetails": { + "UserInfo": { "type": "object", "properties": { - "info": { - "$ref": "#/definitions/VolumeInfo" + "access": { + "type": "string" }, - "life": { + "created-by": { "type": "string" }, - "machine-attachments": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/VolumeAttachmentDetails" - } - } + "date-created": { + "type": "string", + "format": "date-time" }, - "status": { - "$ref": "#/definitions/EntityStatus" + "disabled": { + "type": "boolean" }, - "storage": { - "$ref": "#/definitions/StorageDetails" + "display-name": { + "type": "string" }, - "unit-attachments": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/VolumeAttachmentDetails" - } - } + "last-connection": { + "type": "string", + "format": "date-time" }, - "volume-tag": { + "username": { "type": "string" } }, "additionalProperties": false, "required": [ - "volume-tag", - "info", - "status" + "username", + "display-name", + "access", + "created-by", + "date-created", + "disabled" ] }, - "VolumeDetailsListResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "type": "array", - "items": { - "$ref": "#/definitions/VolumeDetails" - } - } - }, - "additionalProperties": false - }, - "VolumeDetailsListResults": { + "UserInfoRequest": { "type": "object", "properties": { - "results": { + "entities": { "type": "array", "items": { - "$ref": "#/definitions/VolumeDetailsListResult" + "$ref": "#/definitions/Entity" } + }, + "include-disabled": { + "type": "boolean" } }, - "additionalProperties": false + "additionalProperties": false, + "required": [ + "entities", + "include-disabled" + ] }, - "VolumeFilter": { + "UserInfoResult": { "type": "object", "properties": { - "machines": { - "type": "array", - "items": { - "type": "string" - } + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "$ref": "#/definitions/UserInfo" } }, "additionalProperties": false }, - "VolumeFilters": { + "UserInfoResults": { "type": "object", "properties": { - "filters": { + "results": { "type": "array", "items": { - "$ref": "#/definitions/VolumeFilter" + "$ref": "#/definitions/UserInfoResult" } } }, - "additionalProperties": false - }, - "VolumeInfo": { - "type": "object", - "properties": { - "hardware-id": { - "type": "string" - }, - "persistent": { - "type": "boolean" - }, - "pool": { - "type": "string" - }, - "size": { - "type": "integer" - }, - "volume-id": { - "type": "string" - }, - "wwn": { - "type": "string" - } - }, "additionalProperties": false, "required": [ - "volume-id", - "size", - "persistent" + "results" ] } } } }, { - "Name": "Subnets", - "Description": "API provides the subnets API facade for version 5.", - "Version": 5, + "Name": "UserSecretsDrain", + "Description": "SecretsDrainAPI is the implementation for the SecretsDrain facade.", + "Version": 1, "AvailableTo": [ - "controller-machine-agent", - "machine-agent", - "unit-agent", - "model-user" + "controller-machine-agent" ], "Schema": { "type": "object", "properties": { - "AllZones": { + "ChangeSecretBackend": { "type": "object", "properties": { + "Params": { + "$ref": "#/definitions/ChangeSecretBackendArgs" + }, "Result": { - "$ref": "#/definitions/ZoneResults" + "$ref": "#/definitions/ErrorResults" } }, - "description": "AllZones returns all availability zones known to Juju. If a\nzone is unusable, unavailable, or deprecated the Available\nfield will be false." + "description": "ChangeSecretBackend updates the backend for the specified secret after migration done." }, - "ListSubnets": { + "GetSecretBackendConfigs": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/SubnetsFilters" + "$ref": "#/definitions/SecretBackendArgs" }, "Result": { - "$ref": "#/definitions/ListSubnetsResults" + "$ref": "#/definitions/SecretBackendConfigResults" } }, - "description": "ListSubnets returns the matching subnets after applying\noptional filters." + "description": "GetSecretBackendConfigs gets the config needed to create a client to secret backends for the drain worker." }, - "SubnetsByCIDR": { + "GetSecretContentInfo": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/CIDRParams" + "$ref": "#/definitions/GetSecretContentArgs" }, "Result": { - "$ref": "#/definitions/SubnetsResults" + "$ref": "#/definitions/SecretContentResults" } }, - "description": "SubnetsByCIDR returns the collection of subnets matching each CIDR in the input." + "description": "GetSecretContentInfo returns the secret values for the specified secrets." + }, + "GetSecretRevisionContentInfo": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/SecretRevisionArg" + }, + "Result": { + "$ref": "#/definitions/SecretContentResults" + } + }, + "description": "GetSecretRevisionContentInfo returns the secret values for the specified secret revisions." + }, + "GetSecretsToDrain": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/ListSecretResults" + } + }, + "description": "GetSecretsToDrain returns metadata for the secrets that need to be drained." + }, + "WatchSecretBackendChanged": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/NotifyWatchResult" + } + }, + "description": "WatchSecretBackendChanged sets up a watcher to notify of changes to the secret backend." } }, "definitions": { - "CIDRParams": { + "AccessInfo": { "type": "object", "properties": { - "cidrs": { + "role": { + "type": "string" + }, + "scope-tag": { + "type": "string" + }, + "target-tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "target-tag", + "scope-tag", + "role" + ] + }, + "ChangeSecretBackendArg": { + "type": "object", + "properties": { + "content": { + "$ref": "#/definitions/SecretContentParams" + }, + "revision": { + "type": "integer" + }, + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri", + "revision" + ] + }, + "ChangeSecretBackendArgs": { + "type": "object", + "properties": { + "args": { "type": "array", "items": { - "type": "string" + "$ref": "#/definitions/ChangeSecretBackendArg" } } }, "additionalProperties": false, "required": [ - "cidrs" + "args" ] }, "Error": { @@ -17616,13 +53010,22 @@ "code" ] }, - "ListSubnetsResults": { + "ErrorResult": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "ErrorResults": { "type": "object", "properties": { "results": { "type": "array", "items": { - "$ref": "#/definitions/Subnet" + "$ref": "#/definitions/ErrorResult" } } }, @@ -17631,133 +53034,116 @@ "results" ] }, - "Subnet": { + "GetSecretContentArg": { "type": "object", "properties": { - "cidr": { - "type": "string" - }, - "life": { - "type": "string" - }, - "provider-id": { - "type": "string" - }, - "provider-network-id": { + "label": { "type": "string" }, - "provider-space-id": { - "type": "string" + "peek": { + "type": "boolean" }, - "space-tag": { - "type": "string" + "refresh": { + "type": "boolean" }, - "status": { + "uri": { "type": "string" - }, - "vlan-tag": { - "type": "integer" - }, - "zones": { + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + }, + "GetSecretContentArgs": { + "type": "object", + "properties": { + "args": { "type": "array", "items": { - "type": "string" + "$ref": "#/definitions/GetSecretContentArg" } } }, "additionalProperties": false, "required": [ - "cidr", - "vlan-tag", - "life", - "space-tag", - "zones" + "args" ] }, - "SubnetV2": { + "ListSecretResult": { "type": "object", "properties": { - "Subnet": { - "$ref": "#/definitions/Subnet" - }, - "cidr": { - "type": "string" + "access": { + "type": "array", + "items": { + "$ref": "#/definitions/AccessInfo" + } }, - "id": { - "type": "string" + "create-time": { + "type": "string", + "format": "date-time" }, - "life": { + "description": { "type": "string" }, - "provider-id": { + "label": { "type": "string" }, - "provider-network-id": { - "type": "string" + "latest-expire-time": { + "type": "string", + "format": "date-time" }, - "provider-space-id": { - "type": "string" + "latest-revision": { + "type": "integer" }, - "space-tag": { - "type": "string" + "next-rotate-time": { + "type": "string", + "format": "date-time" }, - "status": { + "owner-tag": { "type": "string" }, - "vlan-tag": { - "type": "integer" - }, - "zones": { + "revisions": { "type": "array", "items": { - "type": "string" + "$ref": "#/definitions/SecretRevision" } - } - }, - "additionalProperties": false, - "required": [ - "cidr", - "vlan-tag", - "life", - "space-tag", - "zones", - "Subnet" - ] - }, - "SubnetsFilters": { - "type": "object", - "properties": { - "space-tag": { + }, + "rotate-policy": { "type": "string" }, - "zone": { + "update-time": { + "type": "string", + "format": "date-time" + }, + "uri": { "type": "string" - } - }, - "additionalProperties": false - }, - "SubnetsResult": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Error" }, - "subnets": { - "type": "array", - "items": { - "$ref": "#/definitions/SubnetV2" - } + "value": { + "$ref": "#/definitions/SecretValueResult" + }, + "version": { + "type": "integer" } }, - "additionalProperties": false + "additionalProperties": false, + "required": [ + "uri", + "version", + "owner-tag", + "latest-revision", + "create-time", + "update-time", + "revisions" + ] }, - "SubnetsResults": { + "ListSecretResults": { "type": "object", "properties": { "results": { "type": "array", "items": { - "$ref": "#/definitions/SubnetsResult" + "$ref": "#/definitions/ListSecretResult" } } }, @@ -17766,274 +53152,318 @@ "results" ] }, - "ZoneResult": { + "NotifyWatchResult": { "type": "object", "properties": { - "available": { - "type": "boolean" + "NotifyWatcherId": { + "type": "string" }, "error": { "$ref": "#/definitions/Error" - }, - "name": { - "type": "string" } }, "additionalProperties": false, "required": [ - "name", - "available" + "NotifyWatcherId" ] }, - "ZoneResults": { + "SecretBackendArgs": { "type": "object", "properties": { - "results": { + "backend-ids": { "type": "array", "items": { - "$ref": "#/definitions/ZoneResult" + "type": "string" } + }, + "for-drain": { + "type": "boolean" } }, "additionalProperties": false, "required": [ - "results" + "for-drain", + "backend-ids" ] - } - } - } - }, - { - "Name": "UserManager", - "Description": "UserManagerAPI implements the user manager interface and is the concrete\nimplementation of the api end point.", - "Version": 3, - "AvailableTo": [ - "controller-user" - ], - "Schema": { - "type": "object", - "properties": { - "AddUser": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/AddUsers" - }, - "Result": { - "$ref": "#/definitions/AddUserResults" - } - }, - "description": "AddUser adds a user with a username, and either a password or\na randomly generated secret key which will be returned." }, - "DisableUser": { + "SecretBackendConfig": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/Entities" + "params": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } }, - "Result": { - "$ref": "#/definitions/ErrorResults" + "type": { + "type": "string" } }, - "description": "DisableUser disables one or more users. If the user is already disabled,\nthe action is considered a success." + "additionalProperties": false, + "required": [ + "type" + ] }, - "EnableUser": { + "SecretBackendConfigResult": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/Entities" + "config": { + "$ref": "#/definitions/SecretBackendConfig" }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - }, - "description": "EnableUser enables one or more users. If the user is already enabled,\nthe action is considered a success." - }, - "ModelUserInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" + "draining": { + "type": "boolean" }, - "Result": { - "$ref": "#/definitions/ModelUserInfoResults" + "model-controller": { + "type": "string" + }, + "model-name": { + "type": "string" + }, + "model-uuid": { + "type": "string" } }, - "description": "ModelUserInfo returns information on all users in the model." + "additionalProperties": false, + "required": [ + "model-controller", + "model-uuid", + "model-name", + "draining" + ] }, - "RemoveUser": { + "SecretBackendConfigResults": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/Entities" + "active-id": { + "type": "string" }, - "Result": { - "$ref": "#/definitions/ErrorResults" + "results": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/SecretBackendConfigResult" + } + } } }, - "description": "RemoveUser permanently removes a user from the current controller for each\nentity provided. While the user is permanently removed we keep it's\ninformation around for auditing purposes.\nTODO(redir): Add information about getting deleted user information when we\nadd that capability." + "additionalProperties": false, + "required": [ + "active-id" + ] }, - "ResetPassword": { + "SecretContentParams": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/Entities" + "data": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } }, - "Result": { - "$ref": "#/definitions/AddUserResults" + "value-ref": { + "$ref": "#/definitions/SecretValueRef" } }, - "description": "ResetPassword resets password for supplied users by\ninvalidating current passwords (if any) and generating\nnew random secret keys which will be returned.\nUsers cannot reset their own password." + "additionalProperties": false }, - "SetPassword": { + "SecretContentResult": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/EntityPasswords" + "backend-config": { + "$ref": "#/definitions/SecretBackendConfigResult" }, - "Result": { - "$ref": "#/definitions/ErrorResults" + "content": { + "$ref": "#/definitions/SecretContentParams" + }, + "error": { + "$ref": "#/definitions/Error" + }, + "latest-revision": { + "type": "integer" } }, - "description": "SetPassword changes the stored password for the specified users." + "additionalProperties": false, + "required": [ + "content" + ] }, - "UserInfo": { + "SecretContentResults": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/UserInfoRequest" - }, - "Result": { - "$ref": "#/definitions/UserInfoResults" + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/SecretContentResult" + } } }, - "description": "UserInfo returns information on a user." - } - }, - "definitions": { - "AddUser": { + "additionalProperties": false, + "required": [ + "results" + ] + }, + "SecretRevision": { "type": "object", "properties": { - "display-name": { + "backend-name": { "type": "string" }, - "password": { - "type": "string" + "create-time": { + "type": "string", + "format": "date-time" }, - "username": { - "type": "string" + "expire-time": { + "type": "string", + "format": "date-time" + }, + "revision": { + "type": "integer" + }, + "update-time": { + "type": "string", + "format": "date-time" + }, + "value-ref": { + "$ref": "#/definitions/SecretValueRef" } }, "additionalProperties": false, "required": [ - "username", - "display-name" + "revision" ] }, - "AddUserResult": { + "SecretRevisionArg": { "type": "object", "properties": { - "error": { - "$ref": "#/definitions/Error" + "pending-delete": { + "type": "boolean" }, - "secret-key": { + "revisions": { "type": "array", "items": { "type": "integer" } }, - "tag": { + "uri": { "type": "string" } }, - "additionalProperties": false + "additionalProperties": false, + "required": [ + "uri", + "revisions", + "pending-delete" + ] }, - "AddUserResults": { + "SecretValueRef": { "type": "object", "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/AddUserResult" - } + "backend-id": { + "type": "string" + }, + "revision-id": { + "type": "string" } }, "additionalProperties": false, "required": [ - "results" + "backend-id", + "revision-id" ] }, - "AddUsers": { + "SecretValueResult": { "type": "object", "properties": { - "users": { - "type": "array", - "items": { - "$ref": "#/definitions/AddUser" + "data": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } } + }, + "error": { + "$ref": "#/definitions/Error" } }, - "additionalProperties": false, - "required": [ - "users" - ] - }, - "Entities": { + "additionalProperties": false + } + } + } + }, + { + "Name": "UserSecretsManager", + "Description": "UserSecretsManager is the implementation for the usersecrets facade.", + "Version": 1, + "AvailableTo": [ + "controller-machine-agent" + ], + "Schema": { + "type": "object", + "properties": { + "DeleteRevisions": { "type": "object", "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/Entity" - } + "Params": { + "$ref": "#/definitions/DeleteSecretArgs" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" } }, - "additionalProperties": false, - "required": [ - "entities" - ] + "description": "DeleteRevisions deletes the specified revisions of the specified secret." }, - "Entity": { + "WatchRevisionsToPrune": { "type": "object", "properties": { - "tag": { - "type": "string" + "Result": { + "$ref": "#/definitions/StringsWatchResult" } }, - "additionalProperties": false, - "required": [ - "tag" - ] - }, - "EntityPassword": { + "description": "WatchRevisionsToPrune returns a watcher for notifying when:\n - a secret revision owned by the model no longer\n has any consumers and should be pruned." + } + }, + "definitions": { + "DeleteSecretArg": { "type": "object", "properties": { - "password": { + "label": { "type": "string" }, - "tag": { + "revisions": { + "type": "array", + "items": { + "type": "integer" + } + }, + "uri": { "type": "string" } }, "additionalProperties": false, "required": [ - "tag", - "password" + "uri", + "label" ] }, - "EntityPasswords": { + "DeleteSecretArgs": { "type": "object", "properties": { - "changes": { + "args": { "type": "array", "items": { - "$ref": "#/definitions/EntityPassword" + "$ref": "#/definitions/DeleteSecretArg" } } }, "additionalProperties": false, "required": [ - "changes" + "args" ] }, "Error": { @@ -18085,143 +53515,213 @@ "results" ] }, - "ModelUserInfo": { + "StringsWatchResult": { "type": "object", "properties": { - "access": { - "type": "string" - }, - "display-name": { - "type": "string" - }, - "last-connection": { - "type": "string", - "format": "date-time" + "changes": { + "type": "array", + "items": { + "type": "string" + } }, - "model-tag": { - "type": "string" + "error": { + "$ref": "#/definitions/Error" }, - "user": { + "watcher-id": { "type": "string" } }, "additionalProperties": false, "required": [ - "model-tag", - "user", - "display-name", - "last-connection", - "access" + "watcher-id" ] - }, - "ModelUserInfoResult": { + } + } + } + }, + { + "Name": "VolumeAttachmentPlansWatcher", + "Description": "srvMachineStorageIdsWatcher defines the API wrapping a state.StringsWatcher\nwatching machine/storage attachments. This watcher notifies about storage\nentities (volumes/filesystems) being attached to and detached from machines.\n\nTODO(axw) state needs a new watcher, this is a bt of a hack. State watchers\ncould do with some deduplication of logic, and I don't want to add to that\nspaghetti right now.", + "Version": 1, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "Next": { "type": "object", "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/ModelUserInfo" + "Result": { + "$ref": "#/definitions/MachineStorageIdsWatchResult" } }, - "additionalProperties": false + "description": "Next returns when a change has occurred to an entity of the\ncollection being watched since the most recent call to Next\nor the Watch call that created the srvMachineStorageIdsWatcher." }, - "ModelUserInfoResults": { + "Stop": { + "type": "object", + "description": "Stop stops the watcher." + } + }, + "definitions": { + "Error": { "type": "object", "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ModelUserInfoResult" + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } } + }, + "message": { + "type": "string" } }, "additionalProperties": false, "required": [ - "results" + "message", + "code" ] }, - "UserInfo": { + "MachineStorageId": { "type": "object", "properties": { - "access": { - "type": "string" - }, - "created-by": { + "attachment-tag": { "type": "string" }, - "date-created": { - "type": "string", - "format": "date-time" - }, - "disabled": { - "type": "boolean" - }, - "display-name": { + "machine-tag": { "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "machine-tag", + "attachment-tag" + ] + }, + "MachineStorageIdsWatchResult": { + "type": "object", + "properties": { + "changes": { + "type": "array", + "items": { + "$ref": "#/definitions/MachineStorageId" + } }, - "last-connection": { - "type": "string", - "format": "date-time" + "error": { + "$ref": "#/definitions/Error" }, - "username": { + "watcher-id": { "type": "string" } }, "additionalProperties": false, "required": [ - "username", - "display-name", - "access", - "created-by", - "date-created", - "disabled" + "watcher-id", + "changes" ] + } + } + } + }, + { + "Name": "VolumeAttachmentsWatcher", + "Description": "srvMachineStorageIdsWatcher defines the API wrapping a state.StringsWatcher\nwatching machine/storage attachments. This watcher notifies about storage\nentities (volumes/filesystems) being attached to and detached from machines.\n\nTODO(axw) state needs a new watcher, this is a bt of a hack. State watchers\ncould do with some deduplication of logic, and I don't want to add to that\nspaghetti right now.", + "Version": 2, + "AvailableTo": [ + "controller-machine-agent", + "machine-agent", + "unit-agent", + "model-user" + ], + "Schema": { + "type": "object", + "properties": { + "Next": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/MachineStorageIdsWatchResult" + } + }, + "description": "Next returns when a change has occurred to an entity of the\ncollection being watched since the most recent call to Next\nor the Watch call that created the srvMachineStorageIdsWatcher." }, - "UserInfoRequest": { + "Stop": { + "type": "object", + "description": "Stop stops the watcher." + } + }, + "definitions": { + "Error": { "type": "object", "properties": { - "entities": { - "type": "array", - "items": { - "$ref": "#/definitions/Entity" + "code": { + "type": "string" + }, + "info": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } } }, - "include-disabled": { - "type": "boolean" + "message": { + "type": "string" } }, "additionalProperties": false, "required": [ - "entities", - "include-disabled" + "message", + "code" ] }, - "UserInfoResult": { + "MachineStorageId": { "type": "object", "properties": { - "error": { - "$ref": "#/definitions/Error" + "attachment-tag": { + "type": "string" }, - "result": { - "$ref": "#/definitions/UserInfo" + "machine-tag": { + "type": "string" } }, - "additionalProperties": false + "additionalProperties": false, + "required": [ + "machine-tag", + "attachment-tag" + ] }, - "UserInfoResults": { + "MachineStorageIdsWatchResult": { "type": "object", "properties": { - "results": { + "changes": { "type": "array", "items": { - "$ref": "#/definitions/UserInfoResult" + "$ref": "#/definitions/MachineStorageId" } + }, + "error": { + "$ref": "#/definitions/Error" + }, + "watcher-id": { + "type": "string" } }, "additionalProperties": false, "required": [ - "results" + "watcher-id", + "changes" ] } }