Static
NAMEStatic
VERSIONAPIAddresses returns the list of addresses used to connect to the API.
APIHostPorts returns the API server addresses.
ActionStatus returns the status of Actions by Tags passed in.
Actions returns the Actions by Tags passed and ensures that the Unit asking for them is the same Unit that has the Actions.
AddMetricBatches adds the metrics for the specified unit.
ApplicationStatus returns the status of the Applications and its workloads if the given unit is the leader.
AssignedMachine returns the machine tag for each given unit tag, or an error satisfying params.IsCodeNotAssigned when a unit has no assigned machine.
AvailabilityZone returns the availability zone for each given unit, if applicable.
BeginActions marks the actions represented by the passed in Tags as running.
CanApplyLXDProfile is a shim to call the LXDProfileAPIv2 version of this method.
CharmArchiveSha256 returns the SHA256 digest of the charm archive (bundle) data for each charm url in the given parameters.
CharmModifiedVersion returns the most CharmModifiedVersion for all given units or applications.
CharmURL returns the charm URL for all given units or applications.
ClearResolved removes any resolved setting from each given unit.
CloudAPIVersion returns the cloud API version, if available.
CloudSpec returns the cloud spec used by the model in which the authenticated unit or application resides. A check is made beforehand to ensure that the request is made by an entity that has been granted the appropriate trust.
CommitHookChanges batches together all required API calls for applying a set of changes after a hook successfully completes and executes them in a single transaction.
ConfigSettings returns the complete set of application charm config settings available to each given unit.
CreateSecretURIs creates new secret URIs.
CreateSecrets creates new secrets.
CurrentModel returns the name and UUID for the current juju model.
Destroy advances all given Alive units' lifecycles as far as possible. See state/Unit.Destroy().
DestroyAllSubordinates destroys all subordinates of each given unit.
DestroyUnitStorageAttachments marks each storage attachment of the specified units as Dying.
EnsureDead calls EnsureDead on each given entity from state. It will fail if the entity is not present. If it's Alive, nothing will happen (see state/EnsureDead() for units or machines).
EnterScope ensures each unit has entered its scope in the relation, for all of the given relation/unit pairs. See also state.RelationUnit.EnterScope().
FinishActions saves the result of a completed Action
GetConsumerSecretsRevisionInfo returns the latest secret revisions for the specified secrets. This facade method is used for remote watcher to get the latest secret revisions and labels for a secret changed hook.
GetPodSpec gets the pod specs for a set of applications.
GetPrincipal returns the result of calling PrincipalName() and converting it to a tag, on each given unit.
GetRawK8sSpec gets the raw k8s specs for a set of applications.
GetSecretBackendConfigs gets the config needed to create a client to secret backends.
GetSecretContentInfo returns the secret values for the specified secrets.
GetSecretMetadata returns metadata for the caller's secrets.
GetSecretRevisionContentInfo returns the secret values for the specified secret revisions. Used when deleting a secret; only returns external revision info.
GoalStates returns information of charm units and relations.
HasSubordinates returns the whether each given unit has any subordinates.
LXDProfileName is a shim to call the LXDProfileAPIv2 version of this method.
LXDProfileRequired is a shim to call the LXDProfileAPIv2 version of this method.
LeaveScope signals each unit has left its scope in the relation, for all of the given relation/unit pairs. See also state.RelationUnit.LeaveScope().
Life returns the life status of every supplied entity, where available.
LogActionsMessages records the log messages against the specified actions.
Merge merges in the provided leadership settings. Only leaders for the given service may perform this operation.
ModelConfig returns the current model's configuration.
ModelUUID returns the model UUID that this unit resides in. It is implemented here directly as a result of removing it from embedded APIAddresser without bumping the facade version. It should be blanked when this facade version is next incremented.
NetworkInfo returns network interfaces/addresses for specified bindings.
OpenedApplicationPortRangesByEndpoint returns the port ranges opened by each application.
OpenedMachinePortRangesByEndpoint returns the port ranges opened by each unit on the provided machines grouped by application endpoint.
OpenedPortRangesByEndpoint returns the port ranges opened by the unit.
PrivateAddress returns the private address for each given unit, if set.
ProviderType returns the provider type used by the current juju model.
TODO(dimitern): Refactor the uniter to call this instead of calling ModelConfig() just to get the provider type. Once we have machine addresses, this might be completely unnecessary though.
PublicAddress returns the public address for each given unit, if set.
Read reads leadership settings for the provided service ID. Any unit of the service may perform this operation.
ReadLocalApplicationSettings returns the local application settings for a particular relation when invoked by the leader unit.
ReadRemoteSettings returns the remote settings of each given set of relation/local unit/remote unit.
ReadSettings returns the local settings of each given set of relation/unit.
NOTE(achilleasa): Using this call to read application data is deprecated and will not work for k8s charms (see LP1876097). Instead, clients should use ReadLocalApplicationSettings.
Refresh retrieves the latest values for attributes on this unit.
Relation returns information about all given relation/unit pairs, including their id, key and the local endpoint.
RelationById returns information about all given relations, specified by their ids, including their key and the local endpoint.
RelationsStatus returns for each unit the corresponding relation and status information.
RemoveSecrets removes the specified secrets.
RemoveStorageAttachments removes the specified storage attachments from state.
RequestReboot sets the reboot flag on the provided machines
Resolved returns the current resolved setting for each given unit.
SLALevel returns the model's SLA level.
SecretsGrant grants access to a secret for the specified subjects.
SecretsRevoke revokes access to a secret for the specified subjects.
SecretsRotated records when secrets were last rotated.
SetAgentStatus will set status for agents of Units passed in args, if one of the args is not an Unit it will fail.
SetApplicationStatus sets the status for all the Applications in args if the given Unit is the leader.
SetCharmURL sets the charm URL for each given unit. An error will be returned if a unit is dead, or the charm URL is not known.
SetRelationStatus updates the status of the specified relations.
SetState sets the state persisted by the charm running in this unit and the state internal to the uniter for this unit.
SetStatus will set status for a entities passed in args. If the entity is a Unit it will instead set status to its agent, to emulate backwards compatibility.
SetUnitStatus sets status for all elements passed in args, the difference with SetStatus is that if an entity is a Unit it will set its status instead of its agent.
SetUpgradeSeriesUnitStatus sets the upgrade series status of the unit. If no upgrade is in progress an error is returned instead.
SetWorkloadVersion sets the workload version for each given unit. An error will be returned if a unit is dead.
State returns the state persisted by the charm running in this unit and the state internal to the uniter for this unit.
StorageAttachmentLife returns the lifecycle state of the storage attachments with the specified tags.
StorageAttachments returns the storage attachments with the specified tags.
UnitStatus returns the workload status information for the unit.
UnitStorageAttachments returns the IDs of storage attachments for a collection of units.
UpdateNetworkInfo refreshes the network settings for a unit's bound endpoints.
UpdateSecrets updates the specified secrets.
UpgradeSeriesUnitStatus returns the current preparation status of an upgrading unit. If no series upgrade is in progress an error is returned instead.
Watch starts an NotifyWatcher for each given entity.
WatchAPIHostPorts watches the API server addresses.
WatchActionNotifications returns a StringsWatcher for observing incoming action calls to a unit. See also state/watcher.go Unit.WatchActionNotifications(). This method is called from api/uniter/uniter.go WatchActionNotifications().
WatchConfigSettingsHash returns a StringsWatcher that yields a hash of the config values every time the config changes. The uniter can save this hash and use it to decide whether the config-changed hook needs to be run (or whether this was just an agent restart with no substantive config change).
WatchConsumedSecretsChanges sets up a watcher to notify of changes to secret revisions for the specified consumers.
WatchForModelConfigChanges returns a NotifyWatcher that observes changes to the model configuration. Note that although the NotifyWatchResult contains an Error field, it's not used because we are only returning a single watcher, so we use the regular error return.
WatchInstanceData is a shim to call the LXDProfileAPIv2 version of this method.
WatchLeadershipSettings will block the caller until leadership settings for the given service ID change.
WatchObsolete returns a watcher for notifying when:
Obsolete revisions results are "uri/revno" and deleted secret results are "uri".
WatchRelationUnits returns a RelationUnitsWatcher for observing changes to every unit in the supplied relation that is visible to the supplied unit. See also state/watcher.go:RelationUnit.Watch().
WatchSecretRevisionsExpiryChanges sets up a watcher to notify of changes to secret revision expiry config.
WatchSecretsRotationChanges sets up a watcher to notify of changes to secret rotation config.
WatchStorageAttachments creates watchers for a collection of storage attachments, each of which can be used to watch changes to storage attachment info.
WatchTrustConfigSettingsHash returns a StringsWatcher that yields a hash of the application config values whenever they change. The uniter can use the hash to determine whether the actual values have changed since it last saw the config.
WatchUnitAddressesHash returns a StringsWatcher that yields the hashes of the addresses for the unit whenever the addresses change. The uniter can use the hash to determine whether the actual address values have changed since it last saw the config.
WatchUnitRelations returns a StringsWatcher, for each given unit, that notifies of changes to the lifecycles of relations relevant to that unit. For principal units, this will be all of the relations for the application. For subordinate units, only relations with the principal unit's application will be monitored.
WatchUnitStorageAttachments creates watchers for a collection of units, each of which can be used to watch for lifecycle changes to the corresponding unit's storage attachments.
WatchUpgradeSeriesNotifications returns a NotifyWatcher for observing changes to upgrade series locks.
WorkloadVersion returns the workload version for all given units or applications.
Generated using TypeDoc
UniterAPI implements the latest version (v18) of the Uniter API.