Documentation
¶
Overview ¶
Package secretsmanager provides the api client for the secretsmanager facade.
Index ¶
- Variables
- type Client
- func (c *Client) CreateSecretURIs(ctx context.Context, count int) ([]*coresecrets.URI, error)
- func (c *Client) GetConsumerSecretsRevisionInfo(ctx context.Context, unitName string, uris []string) (map[string]coresecrets.SecretRevisionInfo, error)
- func (c *Client) Grant(ctx context.Context, uri *coresecrets.URI, p *SecretRevokeGrantArgs) error
- func (c *Client) Revoke(ctx context.Context, uri *coresecrets.URI, p *SecretRevokeGrantArgs) error
- func (c *Client) SecretMetadata(ctx context.Context) ([]coresecrets.SecretOwnerMetadata, error)
- func (c *Client) SecretRotated(ctx context.Context, uri string, oldRevision int) error
- func (c *Client) WatchConsumedSecretsChanges(ctx context.Context, unitName string) (watcher.StringsWatcher, error)
- func (c *Client) WatchObsolete(ctx context.Context, ownerTags ...names.Tag) (watcher.StringsWatcher, error)
- func (c *Client) WatchSecretRevisionsExpiryChanges(ctx context.Context, ownerTags ...names.Tag) (watcher.SecretTriggerWatcher, error)
- func (c *Client) WatchSecretsRotationChanges(ctx context.Context, ownerTags ...names.Tag) (watcher.SecretTriggerWatcher, error)
- type Option
- type SecretRevokeGrantArgs
Constants ¶
This section is empty.
Variables ¶
var WithTracer = base.WithTracer
WithTracer returns an Option that configures the Client to use the supplied tracer.
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 ¶
CreateSecretURIs generates new secret URIs.
func (*Client) GetConsumerSecretsRevisionInfo ¶
func (c *Client) GetConsumerSecretsRevisionInfo(ctx context.Context, 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(ctx context.Context, uri *coresecrets.URI, p *SecretRevokeGrantArgs) error
Grant grants access to the specified secret.
func (*Client) Revoke ¶
func (c *Client) Revoke(ctx context.Context, uri *coresecrets.URI, p *SecretRevokeGrantArgs) error
Revoke revokes access to the specified secret.
func (*Client) SecretMetadata ¶
func (c *Client) SecretMetadata(ctx context.Context) ([]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(ctx context.Context, 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(ctx context.Context, 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(ctx context.Context, 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(ctx context.Context, 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.