Documentation ¶
Overview ¶
Package secretsmanager provides the api client for the secretsmanager facade.
Index ¶
- type Client
- func (c *Client) CreateSecretURIs(count int) ([]*coresecrets.URI, error)
- func (c *Client) GetConsumerSecretsRevisionInfo(unitName string, uris []string) (map[string]coresecrets.SecretRevisionInfo, error)
- func (c *Client) Grant(uri *coresecrets.URI, p *SecretRevokeGrantArgs) error
- func (c *Client) Revoke(uri *coresecrets.URI, p *SecretRevokeGrantArgs) error
- func (c *Client) SecretMetadata() ([]coresecrets.SecretOwnerMetadata, error)
- func (c *Client) SecretRotated(uri string, oldRevision int) error
- func (c *Client) WatchConsumedSecretsChanges(unitName string) (watcher.StringsWatcher, error)
- func (c *Client) WatchObsolete(ownerTags ...names.Tag) (watcher.StringsWatcher, error)
- func (c *Client) WatchSecretRevisionsExpiryChanges(ownerTags ...names.Tag) (watcher.SecretTriggerWatcher, error)
- func (c *Client) WatchSecretsRotationChanges(ownerTags ...names.Tag) (watcher.SecretTriggerWatcher, error)
- type SecretRevokeGrantArgs
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { *commonsecretbackends.Client // contains filtered or unexported fields }
Client is the api client for the SecretsManager facade.
func (*Client) CreateSecretURIs ¶
func (c *Client) CreateSecretURIs(count int) ([]*coresecrets.URI, error)
CreateSecretURIs generates new secret URIs.
func (*Client) GetConsumerSecretsRevisionInfo ¶
func (c *Client) GetConsumerSecretsRevisionInfo(unitName string, uris []string) (map[string]coresecrets.SecretRevisionInfo, error)
GetConsumerSecretsRevisionInfo returns the current revision and labels for secrets consumed by the specified unit.
func (*Client) Grant ¶
func (c *Client) Grant(uri *coresecrets.URI, p *SecretRevokeGrantArgs) error
Grant grants access to the specified secret.
func (*Client) Revoke ¶
func (c *Client) Revoke(uri *coresecrets.URI, p *SecretRevokeGrantArgs) error
Revoke revokes access to the specified secret.
func (*Client) SecretMetadata ¶
func (c *Client) SecretMetadata() ([]coresecrets.SecretOwnerMetadata, error)
SecretMetadata returns metadata for the specified secrets.
func (*Client) SecretRotated ¶
SecretRotated records the outcome of rotating a secret.
func (*Client) WatchConsumedSecretsChanges ¶
func (c *Client) WatchConsumedSecretsChanges(unitName string) (watcher.StringsWatcher, error)
WatchConsumedSecretsChanges returns a watcher which serves changes to secrets payloads for any secrets consumed by the specified unit.
func (*Client) WatchObsolete ¶
func (c *Client) WatchObsolete(ownerTags ...names.Tag) (watcher.StringsWatcher, error)
WatchObsolete returns a watcher for notifying when:
- a secret owned by the entity is deleted
- a secret revision owed by the entity no longer has any consumers
Obsolete revisions results are "uri/revno" and deleted secret results are "uri".
func (*Client) WatchSecretRevisionsExpiryChanges ¶
func (c *Client) WatchSecretRevisionsExpiryChanges(ownerTags ...names.Tag) (watcher.SecretTriggerWatcher, error)
WatchSecretRevisionsExpiryChanges returns a watcher which serves changes to secret revision expiry config for any secrets managed by the specified owner.
func (*Client) WatchSecretsRotationChanges ¶
func (c *Client) WatchSecretsRotationChanges(ownerTags ...names.Tag) (watcher.SecretTriggerWatcher, error)
WatchSecretsRotationChanges returns a watcher which serves changes to secrets rotation config for any secrets managed by the specified owner.
type SecretRevokeGrantArgs ¶
type SecretRevokeGrantArgs struct { ApplicationName *string UnitName *string RelationKey *string Role coresecrets.SecretRole }
SecretRevokeGrantArgs holds the args used to grant or revoke access to a secret. To grant access, specify one of ApplicationName or UnitName, plus optionally RelationId. To revoke access, specify one of ApplicationName or UnitName.