public final class KeyVaultAccessControlAsyncClient extends Object
KeyVaultAccessControlAsyncClient
provides asynchronous methods to view and manage Role Based Access
for the Azure Key Vault. The client supports creating, listing, updating, and deleting
role definitions
and role assignments
.public String getVaultUrl()
public com.azure.core.http.rest.PagedFlux<KeyVaultRoleDefinition> listRoleDefinitions(KeyVaultRoleScope roleScope)
role definitions
that are applicable at the given
role scope
and above.roleScope
- The role scope
of the role definitions
.PagedFlux
containing the role definitions
for the given
role scope
.KeyVaultAdministrationException
- If the given roleScope
is invalid.NullPointerException
- If the role scope
is null
.public Mono<KeyVaultRoleDefinition> setRoleDefinition(KeyVaultRoleScope roleScope)
KeyVaultRoleDefinition
with a randomly generated name
.roleScope
- The role scope
of the KeyVaultRoleDefinition
. Managed HSM
only supports '/'.Mono
containing the created KeyVaultRoleDefinition
.KeyVaultAdministrationException
- If the given roleScope
is invalid.NullPointerException
- If the role scope
is null
.public Mono<KeyVaultRoleDefinition> setRoleDefinition(KeyVaultRoleScope roleScope, String roleDefinitionName)
KeyVaultRoleDefinition
.roleScope
- The role scope
of the KeyVaultRoleDefinition
. Managed HSM only
supports '/'.roleDefinitionName
- The name of the KeyVaultRoleDefinition
. It can be any valid UUID.Mono
containing the created KeyVaultRoleDefinition
.KeyVaultAdministrationException
- If the given roleScope
is invalid.NullPointerException
- If the role scope
or roleDefinitionName
are null
.public Mono<com.azure.core.http.rest.Response<KeyVaultRoleDefinition>> setRoleDefinitionWithResponse(SetRoleDefinitionOptions options)
KeyVaultRoleDefinition
.options
- Object representing the configurable options to create or update a
role definition
.Mono
containing a Response
whose value
contains the
created or updated KeyVaultRoleDefinition
.KeyVaultAdministrationException
- If any parameter in options
is invalid.NullPointerException
- If the role scope
or roleDefinitionName
in the options
object are null
.public Mono<KeyVaultRoleDefinition> getRoleDefinition(KeyVaultRoleScope roleScope, String roleDefinitionName)
KeyVaultRoleDefinition
.roleScope
- The role scope
of the KeyVaultRoleDefinition
.roleDefinitionName
- The name used of the KeyVaultRoleDefinition
.Mono
containing the KeyVaultRoleDefinition
.KeyVaultAdministrationException
- If a role definition
with the given name cannot
be found or if the given roleScope
is invalid.NullPointerException
- If the role scope
or roleDefinitionName
are
null
.public Mono<com.azure.core.http.rest.Response<KeyVaultRoleDefinition>> getRoleDefinitionWithResponse(KeyVaultRoleScope roleScope, String roleDefinitionName)
KeyVaultRoleDefinition
.roleScope
- The role scope
of the KeyVaultRoleDefinition
.roleDefinitionName
- The name of the KeyVaultRoleDefinition
.Mono
containing a Response
whose value
contains the
KeyVaultRoleDefinition
.KeyVaultAdministrationException
- If a role definition
with the given name cannot
be found or if the given roleScope
is invalid.NullPointerException
- If the role scope
or roleDefinitionName
are
null
.public Mono<KeyVaultRoleDefinition> deleteRoleDefinition(KeyVaultRoleScope roleScope, String roleDefinitionName)
KeyVaultRoleDefinition
.roleScope
- The role scope
of the KeyVaultRoleDefinition
. Managed HSM
only supports '/'.roleDefinitionName
- The name of the KeyVaultRoleDefinition
.Mono
containing the deleted KeyVaultRoleDefinition
.KeyVaultAdministrationException
- If a role definition
with the given name cannot
be found or if the given roleScope
is invalid.NullPointerException
- If the role scope
or roleDefinitionName
are
null
.public Mono<com.azure.core.http.rest.Response<KeyVaultRoleDefinition>> deleteRoleDefinitionWithResponse(KeyVaultRoleScope roleScope, String roleDefinitionName)
KeyVaultRoleDefinition
.roleScope
- The role scope
of the KeyVaultRoleDefinition
.roleDefinitionName
- The name of the KeyVaultRoleDefinition
.Mono
containing a Response
whose value
contains the deleted
KeyVaultRoleDefinition
.KeyVaultAdministrationException
- If a role definition
with the given name cannot
be found or if the given roleScope
is invalid.NullPointerException
- If the role scope
or roleDefinitionName
are
null
.public com.azure.core.http.rest.PagedFlux<KeyVaultRoleAssignment> listRoleAssignments(KeyVaultRoleScope roleScope)
role assignments
that are applicable at the given
role scope
and above.roleScope
- The role scope
of the KeyVaultRoleAssignment
.PagedFlux
containing the role assignments
for the given
role scope
.KeyVaultAdministrationException
- If the given roleScope
is invalid.NullPointerException
- If the role scope
is null
.public Mono<KeyVaultRoleAssignment> createRoleAssignment(KeyVaultRoleScope roleScope, String roleDefinitionId, String principalId)
KeyVaultRoleAssignment
with a randomly generated name.roleScope
- The role scope
of the KeyVaultRoleAssignment
to create.roleDefinitionId
- The role definition
ID for the role assignment.principalId
- The principal ID assigned to the role. This maps to the ID inside the Active Directory.Mono
containing the created KeyVaultRoleAssignment
.KeyVaultAdministrationException
- If the given roleScope
, roleDefinitionId
or principalId
are invalid.NullPointerException
- If the role scope
, roleAssignmentName
,
roleDefinitionId
or principalId
are null
.public Mono<KeyVaultRoleAssignment> createRoleAssignment(KeyVaultRoleScope roleScope, String roleDefinitionId, String principalId, String roleAssignmentName)
KeyVaultRoleAssignment
.roleScope
- The role scope
of the KeyVaultRoleAssignment
to create.roleDefinitionId
- The role definition
ID for the role assignment.principalId
- The principal ID assigned to the role. This maps to the ID inside the Active Directory.roleAssignmentName
- The name used to create the KeyVaultRoleAssignment
. It can be any valid UUID.Mono
containing the created KeyVaultRoleAssignment
.KeyVaultAdministrationException
- If a role assignment
with the given name already
exists or if the given roleScope
, roleDefinitionId
or principalId
are invalid.NullPointerException
- If the role scope
, roleAssignmentName
,
roleDefinitionId
or principalId
are null
.public Mono<com.azure.core.http.rest.Response<KeyVaultRoleAssignment>> createRoleAssignmentWithResponse(KeyVaultRoleScope roleScope, String roleDefinitionId, String principalId, String roleAssignmentName)
KeyVaultRoleAssignment
.roleScope
- The role scope
of the KeyVaultRoleAssignment
to create.roleAssignmentName
- The name used to create the KeyVaultRoleAssignment
. It can be any valid UUID.roleDefinitionId
- The role definition
ID for the role assignment.principalId
- The principal ID assigned to the role. This maps to the ID inside the Active Directory.Mono
containing a Response
whose value
contains the created
KeyVaultRoleAssignment
.KeyVaultAdministrationException
- If a role assignment
with the given name already
exists or if the given roleScope
, roleDefinitionId
or principalId
are invalid.NullPointerException
- If the role scope
, roleAssignmentName
,
roleDefinitionId
or principalId
are null
.public Mono<KeyVaultRoleAssignment> getRoleAssignment(KeyVaultRoleScope roleScope, String roleAssignmentName)
KeyVaultRoleAssignment
.roleScope
- The role scope
of the KeyVaultRoleAssignment
.roleAssignmentName
- The name used of the KeyVaultRoleAssignment
.Mono
containing the KeyVaultRoleAssignment
.KeyVaultAdministrationException
- If a role assignment
with the given name cannot
be found or if the given roleScope
is invalid.NullPointerException
- If the role scope
or roleAssignmentName
are
null
.public Mono<com.azure.core.http.rest.Response<KeyVaultRoleAssignment>> getRoleAssignmentWithResponse(KeyVaultRoleScope roleScope, String roleAssignmentName)
KeyVaultRoleAssignment
.roleScope
- The role scope
of the KeyVaultRoleAssignment
.roleAssignmentName
- The name of the KeyVaultRoleAssignment
.Mono
containing a Response
whose value
contains the
KeyVaultRoleAssignment
.KeyVaultAdministrationException
- If a role assignment
with the given name cannot
be found or if the given roleScope
is invalid.NullPointerException
- If the role scope
or roleAssignmentName
are
null
.public Mono<KeyVaultRoleAssignment> deleteRoleAssignment(KeyVaultRoleScope roleScope, String roleAssignmentName)
KeyVaultRoleAssignment
.roleScope
- The role scope
of the KeyVaultRoleAssignment
.roleAssignmentName
- The name of the KeyVaultRoleAssignment
.Mono
containing the KeyVaultRoleAssignment
.KeyVaultAdministrationException
- If a role assignment
with the given name cannot
be found or if the given roleScope
is invalid.NullPointerException
- If the role scope
or roleAssignmentName
are
null
.public Mono<com.azure.core.http.rest.Response<KeyVaultRoleAssignment>> deleteRoleAssignmentWithResponse(KeyVaultRoleScope roleScope, String roleAssignmentName)
KeyVaultRoleAssignment
.roleScope
- The role scope
of the KeyVaultRoleAssignment
.roleAssignmentName
- The name of the KeyVaultRoleAssignment
.Mono
containing a Response
whose value
contains the
KeyVaultRoleAssignment
.KeyVaultAdministrationException
- If a role assignment
with the given name cannot
be found or if the given roleScope
is invalid.NullPointerException
- If the role scope
or roleAssignmentName
are
null
.Copyright © 2021 Microsoft Corporation. All rights reserved.