public interface SecretsGroupManager
SecretsGroup
s. It is intended to hide away the specifics of how encryption, storage
and access management is done.
Most read-only applications will only use this class to get
a SecretsGroup
,
and then do the rest of the operations on the returned SecretsGroup
object.Modifier and Type | Method and Description |
---|---|
void |
attachAdmin(SecretsGroupIdentifier group,
Principal principal)
Attach the
Principal to the SecretsGroup as an admin. |
void |
attachReadOnly(SecretsGroupIdentifier group,
Principal principal)
Attach the
Principal to the SecretsGroup as a read-only user. |
SecretsGroupInfo |
create(SecretsGroupIdentifier group)
Create a new secrets group.
|
void |
delete(SecretsGroupIdentifier group)
Delete a
SecretsGroup and its underlying resources. |
void |
detachAdmin(SecretsGroupIdentifier group,
Principal principal)
Remove the
Principal 's admin privileges from the SecretsGroup . |
void |
detachReadOnly(SecretsGroupIdentifier group,
Principal principal)
Remove the
Principal 's read-only privileges from the SecretsGroup . |
SecretsGroup |
get(SecretsGroupIdentifier group)
Get an instance of the
SecretsGroup . |
java.util.Set<SecretsGroupIdentifier> |
identifiers()
List the identifiers that are under management.
|
SecretsGroupInfo |
info(SecretsGroupIdentifier group)
Get information about a
SecretsGroup . |
SecretsGroupInfo create(SecretsGroupIdentifier group)
group
- the identifier of the SecretsGroup
to be createdSecretsGroup get(SecretsGroupIdentifier group)
SecretsGroup
. The underlying implementation is responsible
for tracking the necessary resources needed to construct the object.group
- the identifier of the SecretsGroup
to be retrievedSecretsGroup
DoesNotExistException
- if the SecretsGroup
does not existjava.util.Set<SecretsGroupIdentifier> identifiers()
SecretsGroupIdentifier
that is under managementSecretsGroupInfo info(SecretsGroupIdentifier group)
SecretsGroup
. This method is best effort,
and may return partial information. This is useful if debugging the underlying
resources of a SecretsGroup
.group
- the identifier of the SecretsGroup
to get information aboutSecretsGroupInfo
related to the SecretsGroup
void delete(SecretsGroupIdentifier group)
SecretsGroup
and its underlying resources. This method will attempt to delete all
resources of the given (@code SecretsGroup}, and will simply ignore any resource that does not exists.group
- the identifier of the SecretsGroup
to deletevoid attachAdmin(SecretsGroupIdentifier group, Principal principal)
Principal
to the SecretsGroup
as an admin. This will give the
Principal
full access to the SecretsGroup
.group
- identifier of the SecretsGroup
to attach the principal
toprincipal
- Principal
to be attachedvoid detachAdmin(SecretsGroupIdentifier group, Principal principal)
Principal
's admin privileges from the SecretsGroup
.group
- identifier of the SecretsGroup
to detach principal
fromprincipal
- Principal
to be detachedvoid attachReadOnly(SecretsGroupIdentifier group, Principal principal)
Principal
to the SecretsGroup
as a read-only user. This will give the
Principal
read-only access to the SecretsGroup
(i.e. ability to read secrets).group
- identifier of the SecretsGroup
to attach the principal
toprincipal
- Principal
to be attachedvoid detachReadOnly(SecretsGroupIdentifier group, Principal principal)
Principal
's read-only privileges from the SecretsGroup
.group
- identifier of the SecretsGroup
to detach the principal
fromprincipal
- Principal
to be detached