public class CredHubPermissionV2Template extends Object implements CredHubPermissionV2Operations
Constructor and Description |
---|
CredHubPermissionV2Template(CredHubOperations credHubOperations)
Create a new
CredHubPermissionV2Template . |
Modifier and Type | Method and Description |
---|---|
CredentialPermission |
addPermissions(CredentialName path,
Permission permission)
Add permissions to an credential path.
|
void |
deletePermission(String id)
Delete a permission.
|
CredentialPermission |
getPermissions(String id)
Get a permission.
|
CredentialPermission |
getPermissionsByPathAndActor(CredentialName path,
Actor actor)
Get a permission by path and actor.
|
CredentialPermission |
updatePermissions(String id,
CredentialName path,
Permission permission)
Add permissions to an existing credential.
|
public CredHubPermissionV2Template(CredHubOperations credHubOperations)
CredHubPermissionV2Template
.credHubOperations
- the CredHubOperations
to use for interactions with
CredHubpublic CredentialPermission getPermissions(String id)
CredHubPermissionV2Operations
getPermissions
in interface CredHubPermissionV2Operations
id
- the CredHub-assigned ID of the permission; must not be nullpublic CredentialPermission getPermissionsByPathAndActor(CredentialName path, Actor actor)
CredHubPermissionV2Operations
getPermissionsByPathAndActor
in interface CredHubPermissionV2Operations
path
- the path of the credentials; must not be nullactor
- the actor of the credentials; must not be nullpublic CredentialPermission addPermissions(CredentialName path, Permission permission)
CredHubPermissionV2Operations
addPermissions
in interface CredHubPermissionV2Operations
path
- the path of the credentials; must not be nullpermission
- a permission to addpublic CredentialPermission updatePermissions(String id, CredentialName path, Permission permission)
CredHubPermissionV2Operations
updatePermissions
in interface CredHubPermissionV2Operations
id
- the CredHub-assigned ID of the permission; must not be nullpath
- the path of the credentials; must not be nullpermission
- a permission to addpublic void deletePermission(String id)
CredHubPermissionV2Operations
deletePermission
in interface CredHubPermissionV2Operations
id
- the CredHub-assigned ID of the permission; must not be null