properties;
+
+ private TokenCredential credential;
+ private HttpPipeline pipeline;
+ private URL vaultUrl;
+ private HttpClient httpClient;
+ private HttpLogOptions httpLogOptions;
+ private RetryPolicy retryPolicy;
+ private Configuration configuration;
+
+ /**
+ * Creates a {@link KeyVaultAccessControlClientBuilder} instance that is able to configure and construct
+ * instances of {@link KeyVaultAccessControlClient} and {@link KeyVaultAccessControlAsyncClient}.
+ */
+ public KeyVaultAccessControlClientBuilder() {
+ retryPolicy = new RetryPolicy();
+ httpLogOptions = new HttpLogOptions();
+ policies = new ArrayList<>();
+ properties = CoreUtils.getProperties(AZURE_KEY_VAULT_RBAC);
+ }
+
+ /**
+ * Creates an {@link KeyVaultAccessControlClient} based on options set in the Builder. Every time {@code
+ * buildClient()} is called a new instance of {@link KeyVaultAccessControlClient} is created.
+ *
+ * If {@link #pipeline(HttpPipeline) pipeline} is set, then only the {@code pipeline} and
+ * {@link #vaultUrl(String) vaultUrl} are used to create the {@link KeyVaultAccessControlClient client}. All other
+ * builder settings are ignored.
+ *
+ * @return An {@link KeyVaultAccessControlClient} with the options set from the builder.
+ * @throws NullPointerException If {@code vaultUrl} is {@code null}.
+ */
+ public KeyVaultAccessControlClient buildClient() {
+ return new KeyVaultAccessControlClient(buildAsyncClient());
+ }
+
+ /**
+ * Creates a {@link KeyVaultAccessControlAsyncClient} based on options set in the Builder. Every time {@code
+ * buildAsyncClient()} is called a new instance of {@link KeyVaultAccessControlAsyncClient} is created.
+ *
+ * If {@link #pipeline(HttpPipeline) pipeline} is set, then only the {@code pipeline} and
+ * {@link #vaultUrl(String) endpoint} are used to create the {@link KeyVaultAccessControlAsyncClient client}. All
+ * other builder settings are ignored.
+ *
+ * @return An {@link KeyVaultAccessControlAsyncClient} with the options set from the builder.
+ * @throws NullPointerException If {@code vaultUrl} is {@code null}.
+ */
+ public KeyVaultAccessControlAsyncClient buildAsyncClient() {
+ Configuration buildConfiguration = (configuration == null)
+ ? Configuration.getGlobalConfiguration().clone()
+ : configuration;
+
+ URL buildEndpoint = getBuildEndpoint(buildConfiguration);
+
+ if (buildEndpoint == null) {
+ throw logger.logExceptionAsError(
+ new IllegalStateException(
+ KeyVaultErrorCodeStrings.getErrorString(KeyVaultErrorCodeStrings.VAULT_END_POINT_REQUIRED)));
+ }
+
+ if (pipeline != null) {
+ return new KeyVaultAccessControlAsyncClient(vaultUrl, pipeline);
+ }
+
+ // Closest to API goes first, closest to wire goes last.
+ final List policies = new ArrayList<>();
+
+ String clientName = properties.getOrDefault(SDK_NAME, "UnknownName");
+ String clientVersion = properties.getOrDefault(SDK_VERSION, "UnknownVersion");
+
+ policies.add(new UserAgentPolicy(httpLogOptions.getApplicationId(), clientName, clientVersion,
+ buildConfiguration));
+ HttpPolicyProviders.addBeforeRetryPolicies(policies);
+ policies.add(retryPolicy == null ? new RetryPolicy() : retryPolicy);
+ this.policies.add(new KeyVaultCredentialPolicy(credential));
+ policies.addAll(this.policies);
+ HttpPolicyProviders.addAfterRetryPolicies(policies);
+ policies.add(new HttpLoggingPolicy(httpLogOptions));
+
+ HttpPipeline buildPipeline = new HttpPipelineBuilder()
+ .policies(policies.toArray(new HttpPipelinePolicy[0]))
+ .httpClient(httpClient)
+ .build();
+
+ return new KeyVaultAccessControlAsyncClient(vaultUrl, buildPipeline);
+ }
+
+ /**
+ * Sets the URL to the Key Vault on which the client operates. Appears as "DNS Name" in the Azure portal.
+ *
+ * @param vaultUrl The vault URL is used as destination on Azure to send requests to.
+ * @return The updated {@link KeyVaultAccessControlClientBuilder} object.
+ * @throws IllegalArgumentException If {@code vaultUrl} is null or it cannot be parsed into a valid URL.
+ */
+ public KeyVaultAccessControlClientBuilder vaultUrl(String vaultUrl) {
+ try {
+ this.vaultUrl = new URL(vaultUrl);
+ } catch (MalformedURLException e) {
+ throw logger.logExceptionAsWarning(
+ new IllegalArgumentException("The Azure Key Vault URL is malformed.", e));
+ }
+
+ return this;
+ }
+
+ /**
+ * Sets the credential to use when authenticating HTTP requests.
+ *
+ * @param credential The credential to use for authenticating HTTP requests.
+ * @return The updated {@link KeyVaultAccessControlClientBuilder} object.
+ * @throws NullPointerException If {@code credential} is {@code null}.
+ */
+ public KeyVaultAccessControlClientBuilder credential(TokenCredential credential) {
+ Objects.requireNonNull(credential);
+
+ this.credential = credential;
+
+ return this;
+ }
+
+ /**
+ * Sets the logging configuration for HTTP requests and responses.
+ *
+ * If logLevel is not provided, default value of {@link HttpLogDetailLevel#NONE} is set.
+ *
+ * @param logOptions The logging configuration to use when sending and receiving HTTP requests/responses.
+ * @return The updated {@link KeyVaultAccessControlClientBuilder} object.
+ */
+ public KeyVaultAccessControlClientBuilder httpLogOptions(HttpLogOptions logOptions) {
+ httpLogOptions = logOptions;
+
+ return this;
+ }
+
+ /**
+ * Adds a policy to the set of existing policies that are executed after and {@link KeyVaultAccessControlClient}
+ * {@link KeyVaultAccessControlAsyncClient} required policies.
+ *
+ * @param policy The {@link HttpPipelinePolicy policy} to be added.
+ * @return The updated {@link KeyVaultAccessControlClientBuilder} object.
+ * @throws NullPointerException If {@code policy} is {@code null}.
+ */
+ public KeyVaultAccessControlClientBuilder addPolicy(HttpPipelinePolicy policy) {
+ Objects.requireNonNull(policy);
+
+ policies.add(policy);
+
+ return this;
+ }
+
+ /**
+ * Sets the HTTP client to use for sending and receiving requests to and from the service.
+ *
+ * @param client The HTTP client to use for requests.
+ * @return The updated {@link KeyVaultAccessControlClientBuilder} object.
+ * @throws NullPointerException If {@code client} is {@code null}.
+ */
+ public KeyVaultAccessControlClientBuilder httpClient(HttpClient client) {
+ Objects.requireNonNull(client);
+
+ this.httpClient = client;
+
+ return this;
+ }
+
+ /**
+ * Sets the HTTP pipeline to use for the service client.
+ *
+ * If {@code pipeline} is set, all other settings are ignored, aside from
+ * {@link KeyVaultAccessControlClientBuilder#vaultUrl(String) vaultUrl} to build {@link KeyVaultAccessControlClient}
+ * or {@link KeyVaultAccessControlAsyncClient}.
+ *
+ * @param pipeline The HTTP pipeline to use for sending service requests and receiving responses.
+ * @return The updated {@link KeyVaultAccessControlClientBuilder} object.
+ */
+ public KeyVaultAccessControlClientBuilder pipeline(HttpPipeline pipeline) {
+ Objects.requireNonNull(pipeline);
+ this.pipeline = pipeline;
+ return this;
+ }
+
+ /**
+ * Sets the configuration store that is used during construction of the service client.
+ *
+ * The default configuration store is a clone of the {@link Configuration#getGlobalConfiguration() global
+ * configuration store}, use {@link Configuration#NONE} to bypass using configuration settings during construction.
+ *
+ * @param configuration The configuration store used to get configuration details.
+ * @return The updated {@link KeyVaultAccessControlClientBuilder} object.
+ */
+ public KeyVaultAccessControlClientBuilder configuration(Configuration configuration) {
+ this.configuration = configuration;
+
+ return this;
+ }
+
+ /**
+ * Sets the {@link RetryPolicy} that is used when each request is sent.
+ *
+ * The default retry policy will be used in the pipeline, if not provided.
+ *
+ * @param retryPolicy User's retry policy applied to each request.
+ * @return The updated {@link KeyVaultAccessControlClientBuilder} object.
+ * @throws NullPointerException If the specified {@code retryPolicy} is null.
+ */
+ public KeyVaultAccessControlClientBuilder retryPolicy(RetryPolicy retryPolicy) {
+ Objects.requireNonNull(retryPolicy, "The retry policy cannot be bull");
+
+ this.retryPolicy = retryPolicy;
+
+ return this;
+ }
+
+ private URL getBuildEndpoint(Configuration configuration) {
+ if (vaultUrl != null) {
+ return vaultUrl;
+ }
+
+ String configEndpoint = configuration.get("AZURE_KEYVAULT_ENDPOINT");
+
+ if (CoreUtils.isNullOrEmpty(configEndpoint)) {
+ return null;
+ }
+
+ try {
+ return new URL(configEndpoint);
+ } catch (MalformedURLException ex) {
+ return null;
+ }
+ }
+}
diff --git a/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/KeyVaultAccessControlClientImpl.java b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/KeyVaultAccessControlClientImpl.java
new file mode 100644
index 000000000000..1eedce941db5
--- /dev/null
+++ b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/KeyVaultAccessControlClientImpl.java
@@ -0,0 +1,108 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.security.keyvault.administration.implementation;
+
+import com.azure.core.http.HttpPipeline;
+import com.azure.core.http.HttpPipelineBuilder;
+import com.azure.core.http.policy.CookiePolicy;
+import com.azure.core.http.policy.RetryPolicy;
+import com.azure.core.http.policy.UserAgentPolicy;
+import com.azure.core.util.serializer.JacksonAdapter;
+import com.azure.core.util.serializer.SerializerAdapter;
+
+/** Initializes a new instance of the KeyVaultAccessControlClient type. */
+public final class KeyVaultAccessControlClientImpl {
+ /** Api Version. */
+ private final String apiVersion;
+
+ /**
+ * Gets Api Version.
+ *
+ * @return the apiVersion value.
+ */
+ public String getApiVersion() {
+ return this.apiVersion;
+ }
+
+ /** The HTTP pipeline to send requests through. */
+ private final HttpPipeline httpPipeline;
+
+ /**
+ * Gets The HTTP pipeline to send requests through.
+ *
+ * @return the httpPipeline value.
+ */
+ public HttpPipeline getHttpPipeline() {
+ return this.httpPipeline;
+ }
+
+ /** The serializer to serialize an object into a string. */
+ private final SerializerAdapter serializerAdapter;
+
+ /**
+ * Gets The serializer to serialize an object into a string.
+ *
+ * @return the serializerAdapter value.
+ */
+ public SerializerAdapter getSerializerAdapter() {
+ return this.serializerAdapter;
+ }
+
+ /** The RoleDefinitionsImpl object to access its operations. */
+ private final RoleDefinitionsImpl roleDefinitions;
+
+ /**
+ * Gets the RoleDefinitionsImpl object to access its operations.
+ *
+ * @return the RoleDefinitionsImpl object.
+ */
+ public RoleDefinitionsImpl getRoleDefinitions() {
+ return this.roleDefinitions;
+ }
+
+ /** The RoleAssignmentsImpl object to access its operations. */
+ private final RoleAssignmentsImpl roleAssignments;
+
+ /**
+ * Gets the RoleAssignmentsImpl object to access its operations.
+ *
+ * @return the RoleAssignmentsImpl object.
+ */
+ public RoleAssignmentsImpl getRoleAssignments() {
+ return this.roleAssignments;
+ }
+
+ /** Initializes an instance of KeyVaultAccessControlClient client. */
+ KeyVaultAccessControlClientImpl() {
+ this(
+ new HttpPipelineBuilder()
+ .policies(new UserAgentPolicy(), new RetryPolicy(), new CookiePolicy())
+ .build(),
+ JacksonAdapter.createDefaultSerializerAdapter());
+ }
+
+ /**
+ * Initializes an instance of KeyVaultAccessControlClient client.
+ *
+ * @param httpPipeline The HTTP pipeline to send requests through.
+ */
+ KeyVaultAccessControlClientImpl(HttpPipeline httpPipeline) {
+ this(httpPipeline, JacksonAdapter.createDefaultSerializerAdapter());
+ }
+
+ /**
+ * Initializes an instance of KeyVaultAccessControlClient client.
+ *
+ * @param httpPipeline The HTTP pipeline to send requests through.
+ * @param serializerAdapter The serializer to serialize an object into a string.
+ */
+ KeyVaultAccessControlClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter) {
+ this.httpPipeline = httpPipeline;
+ this.serializerAdapter = serializerAdapter;
+ this.apiVersion = "7.2-preview";
+ this.roleDefinitions = new RoleDefinitionsImpl(this);
+ this.roleAssignments = new RoleAssignmentsImpl(this);
+ }
+}
diff --git a/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/KeyVaultAccessControlClientImplBuilder.java b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/KeyVaultAccessControlClientImplBuilder.java
new file mode 100644
index 000000000000..d135ff4387b1
--- /dev/null
+++ b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/KeyVaultAccessControlClientImplBuilder.java
@@ -0,0 +1,69 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.security.keyvault.administration.implementation;
+
+import com.azure.core.annotation.ServiceClientBuilder;
+import com.azure.core.http.HttpPipeline;
+import com.azure.core.http.HttpPipelineBuilder;
+import com.azure.core.http.policy.CookiePolicy;
+import com.azure.core.http.policy.RetryPolicy;
+import com.azure.core.http.policy.UserAgentPolicy;
+import com.azure.core.util.serializer.JacksonAdapter;
+import com.azure.core.util.serializer.SerializerAdapter;
+
+/** A builder for creating a new instance of the KeyVaultAccessControlClient type. */
+@ServiceClientBuilder(serviceClients = {KeyVaultAccessControlClientImpl.class})
+public final class KeyVaultAccessControlClientImplBuilder {
+ /*
+ * The HTTP pipeline to send requests through
+ */
+ private HttpPipeline pipeline;
+
+ /**
+ * Sets The HTTP pipeline to send requests through.
+ *
+ * @param pipeline the pipeline value.
+ * @return the KeyVaultAccessControlClientImplBuilder.
+ */
+ public KeyVaultAccessControlClientImplBuilder pipeline(HttpPipeline pipeline) {
+ this.pipeline = pipeline;
+ return this;
+ }
+
+ /*
+ * The serializer to serialize an object into a string
+ */
+ private SerializerAdapter serializerAdapter;
+
+ /**
+ * Sets The serializer to serialize an object into a string.
+ *
+ * @param serializerAdapter the serializerAdapter value.
+ * @return the KeyVaultAccessControlClientImplBuilder.
+ */
+ public KeyVaultAccessControlClientImplBuilder serializerAdapter(SerializerAdapter serializerAdapter) {
+ this.serializerAdapter = serializerAdapter;
+ return this;
+ }
+
+ /**
+ * Builds an instance of KeyVaultAccessControlClientImpl with the provided parameters.
+ *
+ * @return an instance of KeyVaultAccessControlClientImpl.
+ */
+ public KeyVaultAccessControlClientImpl buildClient() {
+ if (pipeline == null) {
+ this.pipeline =
+ new HttpPipelineBuilder()
+ .policies(new UserAgentPolicy(), new RetryPolicy(), new CookiePolicy())
+ .build();
+ }
+ if (serializerAdapter == null) {
+ this.serializerAdapter = JacksonAdapter.createDefaultSerializerAdapter();
+ }
+ KeyVaultAccessControlClientImpl client = new KeyVaultAccessControlClientImpl(pipeline, serializerAdapter);
+ return client;
+ }
+}
diff --git a/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/KeyVaultCredentialPolicy.java b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/KeyVaultCredentialPolicy.java
new file mode 100644
index 000000000000..947721a0cdc4
--- /dev/null
+++ b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/KeyVaultCredentialPolicy.java
@@ -0,0 +1,125 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+package com.azure.security.keyvault.administration.implementation;
+
+import com.azure.core.credential.TokenCredential;
+import com.azure.core.credential.TokenRequestContext;
+import com.azure.core.http.HttpPipelineCallContext;
+import com.azure.core.http.HttpPipelineNextPolicy;
+import com.azure.core.http.HttpResponse;
+import com.azure.core.http.policy.HttpPipelinePolicy;
+import com.azure.core.util.CoreUtils;
+import com.azure.core.util.logging.ClientLogger;
+import reactor.core.publisher.Mono;
+
+import java.util.HashMap;
+import java.util.Locale;
+import java.util.Map;
+import java.util.Objects;
+
+/**
+ * A policy that authenticates requests with Azure Key Vault service. The content added by this policy is leveraged
+ * in {@link TokenCredential} to get and set the correct "Authorization" header value.
+ *
+ * @see TokenCredential
+ */
+public final class KeyVaultCredentialPolicy implements HttpPipelinePolicy {
+ private final ClientLogger logger = new ClientLogger(KeyVaultCredentialPolicy.class);
+ private static final String WWW_AUTHENTICATE = "WWW-Authenticate";
+ private static final String BEARER_TOKEN_PREFIX = "Bearer ";
+ private static final String AUTHORIZATION = "Authorization";
+ private final ScopeTokenCache cache;
+
+ /**
+ * Creates KeyVaultCredentialPolicy.
+ *
+ * @param credential the token credential to authenticate the request
+ */
+ public KeyVaultCredentialPolicy(TokenCredential credential) {
+ Objects.requireNonNull(credential);
+
+ this.cache = new ScopeTokenCache(credential::getToken);
+ }
+
+ /**
+ * Adds the required header to authenticate a request to Azure Key Vault service.
+ *
+ * @param context The request {@link HttpPipelineCallContext context}.
+ * @param next The next HTTP pipeline policy to process the {@link HttpPipelineCallContext context's} request
+ * after this policy completes.
+ * @return A {@link Mono} representing the {@link HttpResponse HTTP response} that will arrive asynchronously.
+ */
+ @Override
+ public Mono process(HttpPipelineCallContext context, HttpPipelineNextPolicy next) {
+ if (!context.getHttpRequest().getUrl().getProtocol().startsWith("https")) {
+ return Mono.error(new RuntimeException("Token credentials require a URL using the HTTPS protocol scheme"));
+ }
+
+ return next.clone().process()
+ .doOnNext(httpResponse -> {
+ // KV follows challenge based auth. Currently every service
+ // call hit the endpoint for challenge and then resend the
+ // request with token. The challenge response body is not
+ // consumed, not draining/closing the body will result in leak.
+ // Ref: https://github.com/Azure/azure-sdk-for-java/issues/7934
+ // https://github.com/Azure/azure-sdk-for-java/issues/10467
+ try {
+ httpResponse.getBody().subscribe().dispose();
+ } catch (RuntimeException ignored) {
+ logger.logExceptionAsWarning(ignored);
+ }
+ // The ReactorNettyHttpResponse::close() should be sufficient
+ // and should take care similar body disposal but looks like that
+ // is not happening, need to re-visit the close() method.
+ })
+ .map(res -> res.getHeaderValue(WWW_AUTHENTICATE))
+ .map(header -> extractChallenge(header, BEARER_TOKEN_PREFIX))
+ .flatMap(map -> {
+ cache.setTokenRequest(new TokenRequestContext().addScopes(map.get("resource") + "/.default"));
+ return cache.getToken();
+ })
+ .flatMap(token -> {
+ context.getHttpRequest().setHeader(AUTHORIZATION, BEARER_TOKEN_PREFIX + token.getToken());
+ return next.process();
+ });
+ }
+
+ /**
+ * Extracts the challenge off the authentication header.
+ *
+ * @param authenticateHeader The authentication header containing all the challenges.
+ * @param authChallengePrefix The authentication challenge name.
+ * @return A challenge map.
+ */
+ private static Map extractChallenge(String authenticateHeader, String authChallengePrefix) {
+ if (!isValidChallenge(authenticateHeader, authChallengePrefix)) {
+ return null;
+ }
+
+ authenticateHeader =
+ authenticateHeader.toLowerCase(Locale.ROOT).replace(authChallengePrefix.toLowerCase(Locale.ROOT), "");
+
+ String[] challenges = authenticateHeader.split(", ");
+ Map challengeMap = new HashMap<>();
+
+ for (String pair : challenges) {
+ String[] keyValue = pair.split("=");
+ challengeMap.put(keyValue[0].replaceAll("\"", ""), keyValue[1].replaceAll("\"", ""));
+ }
+
+ return challengeMap;
+ }
+
+ /**
+ * Verifies whether a challenge is bearer or not.
+ *
+ * @param authenticateHeader The authentication header containing all the challenges.
+ * @param authChallengePrefix The authentication challenge name.
+ * @return A boolean indicating tha challenge is valid or not.
+ */
+ private static boolean isValidChallenge(String authenticateHeader, String authChallengePrefix) {
+ return (!CoreUtils.isNullOrEmpty(authenticateHeader)
+ && authenticateHeader.toLowerCase(Locale.ROOT).startsWith(authChallengePrefix.toLowerCase(Locale.ROOT)));
+ }
+}
diff --git a/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/KeyVaultErrorCodeStrings.java b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/KeyVaultErrorCodeStrings.java
new file mode 100644
index 000000000000..9421a205af76
--- /dev/null
+++ b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/KeyVaultErrorCodeStrings.java
@@ -0,0 +1,53 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+package com.azure.security.keyvault.administration.implementation;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Properties;
+
+public class KeyVaultErrorCodeStrings {
+ static final String ERROR_STRINGS_FILE_NAME = "kvErrorStrings.properties";
+ private static Properties errorStrings;
+
+ /**
+ * The property name of Azure Key Vault Credentials required error string.
+ */
+ public static final String CREDENTIAL_REQUIRED = "credential_required";
+
+ /**
+ * The property name of Azure Key Vault Endpoint required error string.
+ */
+ public static final String VAULT_END_POINT_REQUIRED = "vault_endpoint_required";
+
+ /**
+ * The property name of Azure Key Vault Parameter required error string.
+ */
+ public static final String PARAMETER_REQUIRED = "parameter_required";
+
+ /**
+ * Gets the error String for the specified property.
+ *
+ * @param propertyName the property name for which error string is required.
+ * @return The {@link String value} containing the error message.
+ */
+ public static String getErrorString(String propertyName) {
+ loadProperties();
+ return errorStrings.getProperty(propertyName);
+ }
+
+ private static synchronized void loadProperties() {
+ if (errorStrings == null) {
+ try (InputStream fileInputStream =
+ KeyVaultErrorCodeStrings.class.getClassLoader().getResource((ERROR_STRINGS_FILE_NAME)).openStream()) {
+ errorStrings = new Properties();
+ errorStrings.load(fileInputStream);
+ } catch (IOException ex) {
+ ex.printStackTrace();
+ }
+ }
+ }
+}
+
+
diff --git a/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/RoleAssignmentsImpl.java b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/RoleAssignmentsImpl.java
new file mode 100644
index 000000000000..ef7d31d6b48b
--- /dev/null
+++ b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/RoleAssignmentsImpl.java
@@ -0,0 +1,217 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.security.keyvault.administration.implementation;
+
+import com.azure.core.annotation.BodyParam;
+import com.azure.core.annotation.Delete;
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.Put;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.PagedResponse;
+import com.azure.core.http.rest.PagedResponseBase;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.util.Context;
+import com.azure.security.keyvault.administration.implementation.models.KeyVaultErrorException;
+import com.azure.security.keyvault.administration.implementation.models.RoleAssignment;
+import com.azure.security.keyvault.administration.implementation.models.RoleAssignmentCreateParameters;
+import com.azure.security.keyvault.administration.implementation.models.RoleAssignmentListResult;
+import reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in RoleAssignments. */
+public final class RoleAssignmentsImpl {
+ /** The proxy service used to perform REST calls. */
+ private final RoleAssignmentsService service;
+
+ /** The service client containing this operation class. */
+ private final KeyVaultAccessControlClientImpl client;
+
+ /**
+ * Initializes an instance of RoleAssignmentsImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ RoleAssignmentsImpl(KeyVaultAccessControlClientImpl client) {
+ this.service =
+ RestProxy.create(RoleAssignmentsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for KeyVaultAccessControlClientRoleAssignments to be used by the proxy
+ * service to perform REST calls.
+ */
+ @Host("{vaultBaseUrl}")
+ @ServiceInterface(name = "KeyVaultAccessContro")
+ private interface RoleAssignmentsService {
+ @Delete("/{scope}/providers/Microsoft.Authorization/roleAssignments/{roleAssignmentName}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(KeyVaultErrorException.class)
+ Mono> delete(
+ @HostParam("vaultBaseUrl") String vaultBaseUrl,
+ @PathParam(value = "scope", encoded = true) String scope,
+ @PathParam("roleAssignmentName") String roleAssignmentName,
+ @QueryParam("api-version") String apiVersion,
+ Context context);
+
+ @Put("/{scope}/providers/Microsoft.Authorization/roleAssignments/{roleAssignmentName}")
+ @ExpectedResponses({201})
+ @UnexpectedResponseExceptionType(KeyVaultErrorException.class)
+ Mono> create(
+ @HostParam("vaultBaseUrl") String vaultBaseUrl,
+ @PathParam(value = "scope", encoded = true) String scope,
+ @PathParam("roleAssignmentName") String roleAssignmentName,
+ @QueryParam("api-version") String apiVersion,
+ @BodyParam("application/json") RoleAssignmentCreateParameters parameters,
+ Context context);
+
+ @Get("/{scope}/providers/Microsoft.Authorization/roleAssignments/{roleAssignmentName}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(KeyVaultErrorException.class)
+ Mono> get(
+ @HostParam("vaultBaseUrl") String vaultBaseUrl,
+ @PathParam(value = "scope", encoded = true) String scope,
+ @PathParam("roleAssignmentName") String roleAssignmentName,
+ @QueryParam("api-version") String apiVersion,
+ Context context);
+
+ @Get("/{scope}/providers/Microsoft.Authorization/roleAssignments")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(KeyVaultErrorException.class)
+ Mono> listForScope(
+ @HostParam("vaultBaseUrl") String vaultBaseUrl,
+ @PathParam(value = "scope", encoded = true) String scope,
+ @QueryParam("$filter") String filter,
+ @QueryParam("api-version") String apiVersion,
+ Context context);
+
+ @Get("{nextLink}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(KeyVaultErrorException.class)
+ Mono> listForScopeNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink, Context context);
+ }
+
+ /**
+ * Deletes a role assignment.
+ *
+ * @param vaultBaseUrl simple string.
+ * @param scope The scope of the role assignment to delete.
+ * @param roleAssignmentName The name of the role assignment to delete.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws KeyVaultErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return role Assignments.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono> deleteWithResponseAsync(
+ String vaultBaseUrl, String scope, String roleAssignmentName, Context context) {
+ return service.delete(vaultBaseUrl, scope, roleAssignmentName, this.client.getApiVersion(), context);
+ }
+
+ /**
+ * Creates a role assignment.
+ *
+ * @param vaultBaseUrl simple string.
+ * @param scope The scope of the role assignment to create.
+ * @param roleAssignmentName The name of the role assignment to create. It can be any valid GUID.
+ * @param parameters Role assignment create parameters.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws KeyVaultErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return role Assignments.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono> createWithResponseAsync(
+ String vaultBaseUrl,
+ String scope,
+ String roleAssignmentName,
+ RoleAssignmentCreateParameters parameters,
+ Context context) {
+ return service.create(
+ vaultBaseUrl, scope, roleAssignmentName, this.client.getApiVersion(), parameters, context);
+ }
+
+ /**
+ * Get the specified role assignment.
+ *
+ * @param vaultBaseUrl simple string.
+ * @param scope The scope of the role assignment.
+ * @param roleAssignmentName The name of the role assignment to get.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws KeyVaultErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the specified role assignment.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono> getWithResponseAsync(
+ String vaultBaseUrl, String scope, String roleAssignmentName, Context context) {
+ return service.get(vaultBaseUrl, scope, roleAssignmentName, this.client.getApiVersion(), context);
+ }
+
+ /**
+ * Gets role assignments for a scope.
+ *
+ * @param vaultBaseUrl simple string.
+ * @param scope The scope of the role assignments.
+ * @param filter The filter to apply on the operation. Use $filter=atScope() to return all role assignments at or
+ * above the scope. Use $filter=principalId eq {id} to return all role assignments at, above or below the scope
+ * for the specified principal.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws KeyVaultErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return role assignments for a scope.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono> listForScopeSinglePageAsync(
+ String vaultBaseUrl, String scope, String filter, Context context) {
+ return service.listForScope(vaultBaseUrl, scope, filter, this.client.getApiVersion(), context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().getValue(),
+ res.getValue().getNextLink(),
+ null));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The nextLink parameter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws KeyVaultErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return role assignment list operation result.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono> listForScopeNextSinglePageAsync(String nextLink, Context context) {
+ return service.listForScopeNext(nextLink, context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().getValue(),
+ res.getValue().getNextLink(),
+ null));
+ }
+}
diff --git a/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/RoleDefinitionsImpl.java b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/RoleDefinitionsImpl.java
new file mode 100644
index 000000000000..0bb245c326f4
--- /dev/null
+++ b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/RoleDefinitionsImpl.java
@@ -0,0 +1,121 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.security.keyvault.administration.implementation;
+
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.PagedResponse;
+import com.azure.core.http.rest.PagedResponseBase;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.util.Context;
+import com.azure.security.keyvault.administration.implementation.models.KeyVaultErrorException;
+import com.azure.security.keyvault.administration.implementation.models.RoleDefinition;
+import com.azure.security.keyvault.administration.implementation.models.RoleDefinitionListResult;
+import reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in RoleDefinitions. */
+public final class RoleDefinitionsImpl {
+ /** The proxy service used to perform REST calls. */
+ private final RoleDefinitionsService service;
+
+ /** The service client containing this operation class. */
+ private final KeyVaultAccessControlClientImpl client;
+
+ /**
+ * Initializes an instance of RoleDefinitionsImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ RoleDefinitionsImpl(KeyVaultAccessControlClientImpl client) {
+ this.service =
+ RestProxy.create(RoleDefinitionsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for KeyVaultAccessControlClientRoleDefinitions to be used by the proxy
+ * service to perform REST calls.
+ */
+ @Host("{vaultBaseUrl}")
+ @ServiceInterface(name = "KeyVaultAccessContro")
+ private interface RoleDefinitionsService {
+ @Get("/{scope}/providers/Microsoft.Authorization/roleDefinitions")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(KeyVaultErrorException.class)
+ Mono> list(
+ @HostParam("vaultBaseUrl") String vaultBaseUrl,
+ @PathParam(value = "scope", encoded = true) String scope,
+ @QueryParam("$filter") String filter,
+ @QueryParam("api-version") String apiVersion,
+ Context context);
+
+ @Get("{nextLink}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(KeyVaultErrorException.class)
+ Mono> listNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink, Context context);
+ }
+
+ /**
+ * Get all role definitions that are applicable at scope and above.
+ *
+ * @param vaultBaseUrl simple string.
+ * @param scope The scope of the role definition.
+ * @param filter The filter to apply on the operation. Use atScopeAndBelow filter to search below the given scope as
+ * well.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws KeyVaultErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return all role definitions that are applicable at scope and above.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono> listSinglePageAsync(
+ String vaultBaseUrl, String scope, String filter, Context context) {
+ return service.list(vaultBaseUrl, scope, filter, this.client.getApiVersion(), context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().getValue(),
+ res.getValue().getNextLink(),
+ null));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The nextLink parameter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws KeyVaultErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return role definition list operation result.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono> listNextSinglePageAsync(String nextLink, Context context) {
+ return service.listNext(nextLink, context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().getValue(),
+ res.getValue().getNextLink(),
+ null));
+ }
+}
diff --git a/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/ScopeTokenCache.java b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/ScopeTokenCache.java
new file mode 100644
index 000000000000..c7f1aaba7b6d
--- /dev/null
+++ b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/ScopeTokenCache.java
@@ -0,0 +1,60 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+package com.azure.security.keyvault.administration.implementation;
+
+import com.azure.core.credential.AccessToken;
+import com.azure.core.credential.TokenRequestContext;
+import reactor.core.publisher.FluxSink;
+import reactor.core.publisher.Mono;
+import reactor.core.publisher.ReplayProcessor;
+
+import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.function.Function;
+
+/**
+ * A token cache that supports caching a token and refreshing it.
+ */
+class ScopeTokenCache {
+ private final AtomicBoolean wip;
+ private AccessToken cache;
+ private final ReplayProcessor emitterProcessor = ReplayProcessor.create(1);
+ private final FluxSink sink = emitterProcessor.sink(FluxSink.OverflowStrategy.BUFFER);
+ private final Function> getNew;
+ private TokenRequestContext request;
+
+
+ /**
+ * Creates an instance of RefreshableTokenCredential with default scheme "Bearer".
+ *
+ * @param getNew a method to get a new token
+ */
+ ScopeTokenCache(Function> getNew) {
+ this.wip = new AtomicBoolean(false);
+ this.getNew = getNew;
+ }
+
+ public void setTokenRequest(TokenRequestContext request) {
+ this.request = request;
+ }
+
+ /**
+ * Asynchronously get a token from either the cache or replenish the cache with a new token.
+ * @return a Publisher that emits an AccessToken
+ */
+ public Mono getToken() {
+ if (cache != null && !cache.isExpired()) {
+ return Mono.just(cache);
+ }
+ return Mono.defer(() -> {
+ if (!wip.getAndSet(true)) {
+ return getNew.apply(request).doOnNext(ac -> cache = ac)
+ .doOnNext(sink::next)
+ .doOnError(sink::error)
+ .doOnTerminate(() -> wip.set(false));
+ } else {
+ return emitterProcessor.next();
+ }
+ });
+ }
+}
diff --git a/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/Error.java b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/Error.java
new file mode 100644
index 000000000000..7d7efb8e170e
--- /dev/null
+++ b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/Error.java
@@ -0,0 +1,57 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.security.keyvault.administration.implementation.models;
+
+import com.azure.core.annotation.Immutable;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The Error model. */
+@Immutable
+public final class Error {
+ /*
+ * The error code.
+ */
+ @JsonProperty(value = "code", access = JsonProperty.Access.WRITE_ONLY)
+ private String code;
+
+ /*
+ * The error message.
+ */
+ @JsonProperty(value = "message", access = JsonProperty.Access.WRITE_ONLY)
+ private String message;
+
+ /*
+ * The key vault server error.
+ */
+ @JsonProperty(value = "innererror", access = JsonProperty.Access.WRITE_ONLY)
+ private Error innerError;
+
+ /**
+ * Get the code property: The error code.
+ *
+ * @return the code value.
+ */
+ public String getCode() {
+ return this.code;
+ }
+
+ /**
+ * Get the message property: The error message.
+ *
+ * @return the message value.
+ */
+ public String getMessage() {
+ return this.message;
+ }
+
+ /**
+ * Get the innerError property: The key vault server error.
+ *
+ * @return the innerError value.
+ */
+ public Error getInnerError() {
+ return this.innerError;
+ }
+}
diff --git a/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/KeyVaultError.java b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/KeyVaultError.java
new file mode 100644
index 000000000000..e7a84828d10c
--- /dev/null
+++ b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/KeyVaultError.java
@@ -0,0 +1,27 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.security.keyvault.administration.implementation.models;
+
+import com.azure.core.annotation.Immutable;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The KeyVaultError model. */
+@Immutable
+public final class KeyVaultError {
+ /*
+ * The key vault server error.
+ */
+ @JsonProperty(value = "error", access = JsonProperty.Access.WRITE_ONLY)
+ private Error error;
+
+ /**
+ * Get the error property: The key vault server error.
+ *
+ * @return the error value.
+ */
+ public Error getError() {
+ return this.error;
+ }
+}
diff --git a/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/KeyVaultErrorException.java b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/KeyVaultErrorException.java
new file mode 100644
index 000000000000..77b9441be30e
--- /dev/null
+++ b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/KeyVaultErrorException.java
@@ -0,0 +1,37 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.security.keyvault.administration.implementation.models;
+
+import com.azure.core.exception.HttpResponseException;
+import com.azure.core.http.HttpResponse;
+
+/** Exception thrown for an invalid response with KeyVaultError information. */
+public final class KeyVaultErrorException extends HttpResponseException {
+ /**
+ * Initializes a new instance of the KeyVaultErrorException class.
+ *
+ * @param message the exception message or the response content if a message is not available.
+ * @param response the HTTP response.
+ */
+ public KeyVaultErrorException(String message, HttpResponse response) {
+ super(message, response);
+ }
+
+ /**
+ * Initializes a new instance of the KeyVaultErrorException class.
+ *
+ * @param message the exception message or the response content if a message is not available.
+ * @param response the HTTP response.
+ * @param value the deserialized response value.
+ */
+ public KeyVaultErrorException(String message, HttpResponse response, KeyVaultError value) {
+ super(message, response, value);
+ }
+
+ @Override
+ public KeyVaultError getValue() {
+ return (KeyVaultError) super.getValue();
+ }
+}
diff --git a/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/Permission.java b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/Permission.java
new file mode 100644
index 000000000000..d1feaf6d24e4
--- /dev/null
+++ b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/Permission.java
@@ -0,0 +1,117 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.security.keyvault.administration.implementation.models;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** The Permission model. */
+@Fluent
+public final class Permission {
+ /*
+ * Allowed actions.
+ */
+ @JsonProperty(value = "actions")
+ private List actions;
+
+ /*
+ * Denied actions.
+ */
+ @JsonProperty(value = "notActions")
+ private List notActions;
+
+ /*
+ * Allowed Data actions.
+ */
+ @JsonProperty(value = "dataActions")
+ private List dataActions;
+
+ /*
+ * Denied Data actions.
+ */
+ @JsonProperty(value = "notDataActions")
+ private List notDataActions;
+
+ /**
+ * Get the actions property: Allowed actions.
+ *
+ * @return the actions value.
+ */
+ public List getActions() {
+ return this.actions;
+ }
+
+ /**
+ * Set the actions property: Allowed actions.
+ *
+ * @param actions the actions value to set.
+ * @return the Permission object itself.
+ */
+ public Permission setActions(List actions) {
+ this.actions = actions;
+ return this;
+ }
+
+ /**
+ * Get the notActions property: Denied actions.
+ *
+ * @return the notActions value.
+ */
+ public List getNotActions() {
+ return this.notActions;
+ }
+
+ /**
+ * Set the notActions property: Denied actions.
+ *
+ * @param notActions the notActions value to set.
+ * @return the Permission object itself.
+ */
+ public Permission setNotActions(List notActions) {
+ this.notActions = notActions;
+ return this;
+ }
+
+ /**
+ * Get the dataActions property: Allowed Data actions.
+ *
+ * @return the dataActions value.
+ */
+ public List getDataActions() {
+ return this.dataActions;
+ }
+
+ /**
+ * Set the dataActions property: Allowed Data actions.
+ *
+ * @param dataActions the dataActions value to set.
+ * @return the Permission object itself.
+ */
+ public Permission setDataActions(List dataActions) {
+ this.dataActions = dataActions;
+ return this;
+ }
+
+ /**
+ * Get the notDataActions property: Denied Data actions.
+ *
+ * @return the notDataActions value.
+ */
+ public List getNotDataActions() {
+ return this.notDataActions;
+ }
+
+ /**
+ * Set the notDataActions property: Denied Data actions.
+ *
+ * @param notDataActions the notDataActions value to set.
+ * @return the Permission object itself.
+ */
+ public Permission setNotDataActions(List notDataActions) {
+ this.notDataActions = notDataActions;
+ return this;
+ }
+}
diff --git a/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/RoleAssignment.java b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/RoleAssignment.java
new file mode 100644
index 000000000000..1d06ce14088f
--- /dev/null
+++ b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/RoleAssignment.java
@@ -0,0 +1,83 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.security.keyvault.administration.implementation.models;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The RoleAssignment model. */
+@Fluent
+public final class RoleAssignment {
+ /*
+ * The role assignment ID.
+ */
+ @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY)
+ private String id;
+
+ /*
+ * The role assignment name.
+ */
+ @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY)
+ private String name;
+
+ /*
+ * The role assignment type.
+ */
+ @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY)
+ private String type;
+
+ /*
+ * Role assignment properties.
+ */
+ @JsonProperty(value = "properties")
+ private RoleAssignmentPropertiesWithScope properties;
+
+ /**
+ * Get the id property: The role assignment ID.
+ *
+ * @return the id value.
+ */
+ public String getId() {
+ return this.id;
+ }
+
+ /**
+ * Get the name property: The role assignment name.
+ *
+ * @return the name value.
+ */
+ public String getName() {
+ return this.name;
+ }
+
+ /**
+ * Get the type property: The role assignment type.
+ *
+ * @return the type value.
+ */
+ public String getType() {
+ return this.type;
+ }
+
+ /**
+ * Get the properties property: Role assignment properties.
+ *
+ * @return the properties value.
+ */
+ public RoleAssignmentPropertiesWithScope getProperties() {
+ return this.properties;
+ }
+
+ /**
+ * Set the properties property: Role assignment properties.
+ *
+ * @param properties the properties value to set.
+ * @return the RoleAssignment object itself.
+ */
+ public RoleAssignment setProperties(RoleAssignmentPropertiesWithScope properties) {
+ this.properties = properties;
+ return this;
+ }
+}
diff --git a/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/RoleAssignmentCreateParameters.java b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/RoleAssignmentCreateParameters.java
new file mode 100644
index 000000000000..56d16b847a06
--- /dev/null
+++ b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/RoleAssignmentCreateParameters.java
@@ -0,0 +1,38 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.security.keyvault.administration.implementation.models;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The RoleAssignmentCreateParameters model. */
+@Fluent
+public final class RoleAssignmentCreateParameters {
+ /*
+ * Role assignment properties.
+ */
+ @JsonProperty(value = "properties", required = true)
+ private RoleAssignmentProperties properties;
+
+ /**
+ * Get the properties property: Role assignment properties.
+ *
+ * @return the properties value.
+ */
+ public RoleAssignmentProperties getProperties() {
+ return this.properties;
+ }
+
+ /**
+ * Set the properties property: Role assignment properties.
+ *
+ * @param properties the properties value to set.
+ * @return the RoleAssignmentCreateParameters object itself.
+ */
+ public RoleAssignmentCreateParameters setProperties(RoleAssignmentProperties properties) {
+ this.properties = properties;
+ return this;
+ }
+}
diff --git a/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/RoleAssignmentFilter.java b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/RoleAssignmentFilter.java
new file mode 100644
index 000000000000..c04d69f36bd9
--- /dev/null
+++ b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/RoleAssignmentFilter.java
@@ -0,0 +1,38 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.security.keyvault.administration.implementation.models;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The RoleAssignmentFilter model. */
+@Fluent
+public final class RoleAssignmentFilter {
+ /*
+ * Returns role assignment of the specific principal.
+ */
+ @JsonProperty(value = "principalId")
+ private String principalId;
+
+ /**
+ * Get the principalId property: Returns role assignment of the specific principal.
+ *
+ * @return the principalId value.
+ */
+ public String getPrincipalId() {
+ return this.principalId;
+ }
+
+ /**
+ * Set the principalId property: Returns role assignment of the specific principal.
+ *
+ * @param principalId the principalId value to set.
+ * @return the RoleAssignmentFilter object itself.
+ */
+ public RoleAssignmentFilter setPrincipalId(String principalId) {
+ this.principalId = principalId;
+ return this;
+ }
+}
diff --git a/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/RoleAssignmentListResult.java b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/RoleAssignmentListResult.java
new file mode 100644
index 000000000000..72a6eb8440a6
--- /dev/null
+++ b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/RoleAssignmentListResult.java
@@ -0,0 +1,65 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.security.keyvault.administration.implementation.models;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** The RoleAssignmentListResult model. */
+@Fluent
+public final class RoleAssignmentListResult {
+ /*
+ * Role assignment list.
+ */
+ @JsonProperty(value = "value")
+ private List value;
+
+ /*
+ * The URL to use for getting the next set of results.
+ */
+ @JsonProperty(value = "nextLink")
+ private String nextLink;
+
+ /**
+ * Get the value property: Role assignment list.
+ *
+ * @return the value value.
+ */
+ public List getValue() {
+ return this.value;
+ }
+
+ /**
+ * Set the value property: Role assignment list.
+ *
+ * @param value the value value to set.
+ * @return the RoleAssignmentListResult object itself.
+ */
+ public RoleAssignmentListResult setValue(List value) {
+ this.value = value;
+ return this;
+ }
+
+ /**
+ * Get the nextLink property: The URL to use for getting the next set of results.
+ *
+ * @return the nextLink value.
+ */
+ public String getNextLink() {
+ return this.nextLink;
+ }
+
+ /**
+ * Set the nextLink property: The URL to use for getting the next set of results.
+ *
+ * @param nextLink the nextLink value to set.
+ * @return the RoleAssignmentListResult object itself.
+ */
+ public RoleAssignmentListResult setNextLink(String nextLink) {
+ this.nextLink = nextLink;
+ return this;
+ }
+}
diff --git a/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/RoleAssignmentProperties.java b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/RoleAssignmentProperties.java
new file mode 100644
index 000000000000..0ab892817a1e
--- /dev/null
+++ b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/RoleAssignmentProperties.java
@@ -0,0 +1,68 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.security.keyvault.administration.implementation.models;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The RoleAssignmentProperties model. */
+@Fluent
+public final class RoleAssignmentProperties {
+ /*
+ * The role definition ID used in the role assignment.
+ */
+ @JsonProperty(value = "roleDefinitionId", required = true)
+ private String roleDefinitionId;
+
+ /*
+ * The principal ID assigned to the role. This maps to the ID inside the
+ * Active Directory. It can point to a user, service principal, or security
+ * group.
+ */
+ @JsonProperty(value = "principalId", required = true)
+ private String principalId;
+
+ /**
+ * Get the roleDefinitionId property: The role definition ID used in the role assignment.
+ *
+ * @return the roleDefinitionId value.
+ */
+ public String getRoleDefinitionId() {
+ return this.roleDefinitionId;
+ }
+
+ /**
+ * Set the roleDefinitionId property: The role definition ID used in the role assignment.
+ *
+ * @param roleDefinitionId the roleDefinitionId value to set.
+ * @return the RoleAssignmentProperties object itself.
+ */
+ public RoleAssignmentProperties setRoleDefinitionId(String roleDefinitionId) {
+ this.roleDefinitionId = roleDefinitionId;
+ return this;
+ }
+
+ /**
+ * Get the principalId property: The principal ID assigned to the role. This maps to the ID inside the Active
+ * Directory. It can point to a user, service principal, or security group.
+ *
+ * @return the principalId value.
+ */
+ public String getPrincipalId() {
+ return this.principalId;
+ }
+
+ /**
+ * Set the principalId property: The principal ID assigned to the role. This maps to the ID inside the Active
+ * Directory. It can point to a user, service principal, or security group.
+ *
+ * @param principalId the principalId value to set.
+ * @return the RoleAssignmentProperties object itself.
+ */
+ public RoleAssignmentProperties setPrincipalId(String principalId) {
+ this.principalId = principalId;
+ return this;
+ }
+}
diff --git a/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/RoleAssignmentPropertiesWithScope.java b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/RoleAssignmentPropertiesWithScope.java
new file mode 100644
index 000000000000..ff50c91dc2ae
--- /dev/null
+++ b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/RoleAssignmentPropertiesWithScope.java
@@ -0,0 +1,90 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.security.keyvault.administration.implementation.models;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The RoleAssignmentPropertiesWithScope model. */
+@Fluent
+public final class RoleAssignmentPropertiesWithScope {
+ /*
+ * The role assignment scope.
+ */
+ @JsonProperty(value = "scope")
+ private String scope;
+
+ /*
+ * The role definition ID.
+ */
+ @JsonProperty(value = "roleDefinitionId")
+ private String roleDefinitionId;
+
+ /*
+ * The principal ID.
+ */
+ @JsonProperty(value = "principalId")
+ private String principalId;
+
+ /**
+ * Get the scope property: The role assignment scope.
+ *
+ * @return the scope value.
+ */
+ public String getScope() {
+ return this.scope;
+ }
+
+ /**
+ * Set the scope property: The role assignment scope.
+ *
+ * @param scope the scope value to set.
+ * @return the RoleAssignmentPropertiesWithScope object itself.
+ */
+ public RoleAssignmentPropertiesWithScope setScope(String scope) {
+ this.scope = scope;
+ return this;
+ }
+
+ /**
+ * Get the roleDefinitionId property: The role definition ID.
+ *
+ * @return the roleDefinitionId value.
+ */
+ public String getRoleDefinitionId() {
+ return this.roleDefinitionId;
+ }
+
+ /**
+ * Set the roleDefinitionId property: The role definition ID.
+ *
+ * @param roleDefinitionId the roleDefinitionId value to set.
+ * @return the RoleAssignmentPropertiesWithScope object itself.
+ */
+ public RoleAssignmentPropertiesWithScope setRoleDefinitionId(String roleDefinitionId) {
+ this.roleDefinitionId = roleDefinitionId;
+ return this;
+ }
+
+ /**
+ * Get the principalId property: The principal ID.
+ *
+ * @return the principalId value.
+ */
+ public String getPrincipalId() {
+ return this.principalId;
+ }
+
+ /**
+ * Set the principalId property: The principal ID.
+ *
+ * @param principalId the principalId value to set.
+ * @return the RoleAssignmentPropertiesWithScope object itself.
+ */
+ public RoleAssignmentPropertiesWithScope setPrincipalId(String principalId) {
+ this.principalId = principalId;
+ return this;
+ }
+}
diff --git a/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/RoleDefinition.java b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/RoleDefinition.java
new file mode 100644
index 000000000000..5383e4acbb8a
--- /dev/null
+++ b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/RoleDefinition.java
@@ -0,0 +1,190 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.security.keyvault.administration.implementation.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.annotation.JsonFlatten;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** The RoleDefinition model. */
+@JsonFlatten
+@Fluent
+public class RoleDefinition {
+ /*
+ * The role definition ID.
+ */
+ @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY)
+ private String id;
+
+ /*
+ * The role definition name.
+ */
+ @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY)
+ private String name;
+
+ /*
+ * The role definition type.
+ */
+ @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY)
+ private String type;
+
+ /*
+ * The role name.
+ */
+ @JsonProperty(value = "properties.roleName")
+ private String roleName;
+
+ /*
+ * The role definition description.
+ */
+ @JsonProperty(value = "properties.description")
+ private String description;
+
+ /*
+ * The role type.
+ */
+ @JsonProperty(value = "properties.type")
+ private String roleType;
+
+ /*
+ * Role definition permissions.
+ */
+ @JsonProperty(value = "properties.permissions")
+ private List permissions;
+
+ /*
+ * Role definition assignable scopes.
+ */
+ @JsonProperty(value = "properties.assignableScopes")
+ private List assignableScopes;
+
+ /**
+ * Get the id property: The role definition ID.
+ *
+ * @return the id value.
+ */
+ public String getId() {
+ return this.id;
+ }
+
+ /**
+ * Get the name property: The role definition name.
+ *
+ * @return the name value.
+ */
+ public String getName() {
+ return this.name;
+ }
+
+ /**
+ * Get the type property: The role definition type.
+ *
+ * @return the type value.
+ */
+ public String getType() {
+ return this.type;
+ }
+
+ /**
+ * Get the roleName property: The role name.
+ *
+ * @return the roleName value.
+ */
+ public String getRoleName() {
+ return this.roleName;
+ }
+
+ /**
+ * Set the roleName property: The role name.
+ *
+ * @param roleName the roleName value to set.
+ * @return the RoleDefinition object itself.
+ */
+ public RoleDefinition setRoleName(String roleName) {
+ this.roleName = roleName;
+ return this;
+ }
+
+ /**
+ * Get the description property: The role definition description.
+ *
+ * @return the description value.
+ */
+ public String getDescription() {
+ return this.description;
+ }
+
+ /**
+ * Set the description property: The role definition description.
+ *
+ * @param description the description value to set.
+ * @return the RoleDefinition object itself.
+ */
+ public RoleDefinition setDescription(String description) {
+ this.description = description;
+ return this;
+ }
+
+ /**
+ * Get the roleType property: The role type.
+ *
+ * @return the roleType value.
+ */
+ public String getRoleType() {
+ return this.roleType;
+ }
+
+ /**
+ * Set the roleType property: The role type.
+ *
+ * @param roleType the roleType value to set.
+ * @return the RoleDefinition object itself.
+ */
+ public RoleDefinition setRoleType(String roleType) {
+ this.roleType = roleType;
+ return this;
+ }
+
+ /**
+ * Get the permissions property: Role definition permissions.
+ *
+ * @return the permissions value.
+ */
+ public List getPermissions() {
+ return this.permissions;
+ }
+
+ /**
+ * Set the permissions property: Role definition permissions.
+ *
+ * @param permissions the permissions value to set.
+ * @return the RoleDefinition object itself.
+ */
+ public RoleDefinition setPermissions(List permissions) {
+ this.permissions = permissions;
+ return this;
+ }
+
+ /**
+ * Get the assignableScopes property: Role definition assignable scopes.
+ *
+ * @return the assignableScopes value.
+ */
+ public List getAssignableScopes() {
+ return this.assignableScopes;
+ }
+
+ /**
+ * Set the assignableScopes property: Role definition assignable scopes.
+ *
+ * @param assignableScopes the assignableScopes value to set.
+ * @return the RoleDefinition object itself.
+ */
+ public RoleDefinition setAssignableScopes(List assignableScopes) {
+ this.assignableScopes = assignableScopes;
+ return this;
+ }
+}
diff --git a/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/RoleDefinitionFilter.java b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/RoleDefinitionFilter.java
new file mode 100644
index 000000000000..ce01792ed37f
--- /dev/null
+++ b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/RoleDefinitionFilter.java
@@ -0,0 +1,38 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.security.keyvault.administration.implementation.models;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The RoleDefinitionFilter model. */
+@Fluent
+public final class RoleDefinitionFilter {
+ /*
+ * Returns role definition with the specific name.
+ */
+ @JsonProperty(value = "roleName")
+ private String roleName;
+
+ /**
+ * Get the roleName property: Returns role definition with the specific name.
+ *
+ * @return the roleName value.
+ */
+ public String getRoleName() {
+ return this.roleName;
+ }
+
+ /**
+ * Set the roleName property: Returns role definition with the specific name.
+ *
+ * @param roleName the roleName value to set.
+ * @return the RoleDefinitionFilter object itself.
+ */
+ public RoleDefinitionFilter setRoleName(String roleName) {
+ this.roleName = roleName;
+ return this;
+ }
+}
diff --git a/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/RoleDefinitionListResult.java b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/RoleDefinitionListResult.java
new file mode 100644
index 000000000000..fa52f012f154
--- /dev/null
+++ b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/RoleDefinitionListResult.java
@@ -0,0 +1,65 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.security.keyvault.administration.implementation.models;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** The RoleDefinitionListResult model. */
+@Fluent
+public final class RoleDefinitionListResult {
+ /*
+ * Role definition list.
+ */
+ @JsonProperty(value = "value")
+ private List value;
+
+ /*
+ * The URL to use for getting the next set of results.
+ */
+ @JsonProperty(value = "nextLink")
+ private String nextLink;
+
+ /**
+ * Get the value property: Role definition list.
+ *
+ * @return the value value.
+ */
+ public List getValue() {
+ return this.value;
+ }
+
+ /**
+ * Set the value property: Role definition list.
+ *
+ * @param value the value value to set.
+ * @return the RoleDefinitionListResult object itself.
+ */
+ public RoleDefinitionListResult setValue(List value) {
+ this.value = value;
+ return this;
+ }
+
+ /**
+ * Get the nextLink property: The URL to use for getting the next set of results.
+ *
+ * @return the nextLink value.
+ */
+ public String getNextLink() {
+ return this.nextLink;
+ }
+
+ /**
+ * Set the nextLink property: The URL to use for getting the next set of results.
+ *
+ * @param nextLink the nextLink value to set.
+ * @return the RoleDefinitionListResult object itself.
+ */
+ public RoleDefinitionListResult setNextLink(String nextLink) {
+ this.nextLink = nextLink;
+ return this;
+ }
+}
diff --git a/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/package-info.java b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/package-info.java
new file mode 100644
index 000000000000..3ad2fecedd55
--- /dev/null
+++ b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/package-info.java
@@ -0,0 +1,9 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+/**
+ * Package containing the data models for KeyVaultAccessControlClient. The key vault client performs cryptographic key
+ * operations and vault operations against the Key Vault service.
+ */
+package com.azure.security.keyvault.administration.implementation.models;
diff --git a/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/package-info.java b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/package-info.java
new file mode 100644
index 000000000000..2f88bbe09355
--- /dev/null
+++ b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/package-info.java
@@ -0,0 +1,9 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+/**
+ * Package containing the implementations and inner classes for KeyVaultAccessControlClient. The key vault client
+ * performs cryptographic key operations and vault operations against the Key Vault service.
+ */
+package com.azure.security.keyvault.administration.implementation;
diff --git a/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/models/KeyVaultPermission.java b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/models/KeyVaultPermission.java
new file mode 100644
index 000000000000..d987cbb04072
--- /dev/null
+++ b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/models/KeyVaultPermission.java
@@ -0,0 +1,67 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+package com.azure.security.keyvault.administration.models;
+
+import java.util.List;
+
+/**
+ * A class describing allowed and denied actions and data actions of a {@link KeyVaultRoleDefinition}.
+ */
+public final class KeyVaultPermission {
+ private List actions;
+ private List deniedActions;
+ private List dataActions;
+ private List deniedDataActions;
+
+ /**
+ * Creates a new {@link KeyVaultPermission} with the specified allowed and denied actions and data actions.
+ *
+ * @param actions The actions this {@link KeyVaultPermission permission} allows.
+ * @param deniedActions The actions this {@link KeyVaultPermission permission} denies.
+ * @param dataActions The data actions this {@link KeyVaultPermission permission} allows.
+ * @param deniedDataActions The data actions this {@link KeyVaultPermission permission} denies.
+ */
+ public KeyVaultPermission(List actions, List deniedActions, List dataActions, List deniedDataActions) {
+ this.actions = actions;
+ this.deniedActions = deniedActions;
+ this.dataActions = dataActions;
+ this.deniedDataActions = deniedDataActions;
+ }
+
+ /**
+ * Get the actions this {@link KeyVaultPermission permission} allows.
+ *
+ * @return The allowed actions.
+ */
+ public List getActions() {
+ return actions;
+ }
+
+ /**
+ * Get the actions this {@link KeyVaultPermission permission} denies.
+ *
+ * @return The denied actions.
+ */
+ public List getDeniedActions() {
+ return deniedActions;
+ }
+
+ /**
+ * Get the data actions this {@link KeyVaultPermission permission} allows.
+ *
+ * @return The allowed data actions.
+ */
+ public List getDataActions() {
+ return dataActions;
+ }
+
+ /**
+ * Get the data actions this {@link KeyVaultPermission permission} denies.
+ *
+ * @return The denied data actions.
+ */
+ public List getDeniedDataActions() {
+ return deniedDataActions;
+ }
+}
diff --git a/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/models/KeyVaultRoleAssignment.java b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/models/KeyVaultRoleAssignment.java
new file mode 100644
index 000000000000..ef085aea877b
--- /dev/null
+++ b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/models/KeyVaultRoleAssignment.java
@@ -0,0 +1,79 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+package com.azure.security.keyvault.administration.models;
+
+/**
+ * A class that defines a role assignment.
+ */
+public final class KeyVaultRoleAssignment {
+ private String id;
+ private String name;
+ private String type;
+ private KeyVaultRoleAssignmentProperties properties;
+ private KeyVaultRoleAssignmentScope scope;
+
+ /**
+ * Creates a new {@link KeyVaultRoleAssignment role assignment} with the specified details.
+ *
+ * @param id The ID for this {@link KeyVaultRoleAssignment role assignment}.
+ * @param name The name of this {@link KeyVaultRoleAssignment role assignment}.
+ * @param type The type of this {@link KeyVaultRoleAssignment role assignment}.
+ * @param properties {@link KeyVaultRoleAssignmentProperties properties} of this {@link KeyVaultRoleAssignment
+ * role assignment}.
+ * @param roleScope The {@link KeyVaultRoleAssignmentScope scope} of this {@link KeyVaultRoleAssignment role
+ * assignment}.
+ */
+ public KeyVaultRoleAssignment(String id, String name, String type, KeyVaultRoleAssignmentProperties properties, KeyVaultRoleAssignmentScope roleScope) {
+ this.id = id;
+ this.name = name;
+ this.type = type;
+ this.properties = properties;
+ this.scope = roleScope;
+ }
+
+ /**
+ * Get the {@link KeyVaultRoleAssignment role assignment} ID.
+ *
+ * @return The {@link KeyVaultRoleAssignment role assignment} ID.
+ */
+ public String getId() {
+ return id;
+ }
+
+ /**
+ * Get the {@link KeyVaultRoleAssignment role assignment} name.
+ *
+ * @return The {@link KeyVaultRoleAssignment role assignment} name.
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * Get the {@link KeyVaultRoleAssignment role assignment} type.
+ *
+ * @return The {@link KeyVaultRoleAssignment role assignment} type.
+ */
+ public String getType() {
+ return type;
+ }
+
+ /**
+ * Get the {@link KeyVaultRoleAssignment role assignment} {@link KeyVaultRoleAssignmentProperties properties}.
+ *
+ * @return The {@link KeyVaultRoleAssignment role assignment} {@link KeyVaultRoleAssignmentProperties properties}.
+ */
+ public KeyVaultRoleAssignmentProperties getProperties() {
+ return properties;
+ }
+
+ /**
+ * Get the {@link KeyVaultRoleAssignment role assignment} {@link KeyVaultRoleAssignmentScope scope}.
+ *
+ * @return The {@link KeyVaultRoleAssignment role assignment} {@link KeyVaultRoleAssignmentScope scope}.
+ */
+ public KeyVaultRoleAssignmentScope getScope() {
+ return scope;
+ }
+}
diff --git a/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/models/KeyVaultRoleAssignmentProperties.java b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/models/KeyVaultRoleAssignmentProperties.java
new file mode 100644
index 000000000000..cc0a945730e7
--- /dev/null
+++ b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/models/KeyVaultRoleAssignmentProperties.java
@@ -0,0 +1,56 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+package com.azure.security.keyvault.administration.models;
+
+import com.azure.security.keyvault.administration.implementation.KeyVaultErrorCodeStrings;
+
+import java.util.Objects;
+
+/**
+ * A class that defines a role assignment's properties.
+ */
+public final class KeyVaultRoleAssignmentProperties {
+ private String roleDefinitionId;
+ private String principalId;
+
+ /**
+ * Creates a new {@link KeyVaultRoleAssignmentProperties role assignment properties} object with the specified
+ * details.
+ *
+ * @param roleDefinitionId The {@link KeyVaultRoleDefinition role definition} ID used in the
+ * {@link KeyVaultRoleAssignment role assignment}.
+ * @param principalId The principal ID assigned to the role. This maps to the ID inside the Active Directory.
+ * It can point to a user, service principal, or security group.
+ */
+ public KeyVaultRoleAssignmentProperties(String roleDefinitionId, String principalId) {
+ Objects.requireNonNull(roleDefinitionId,
+ String.format(KeyVaultErrorCodeStrings.getErrorString(KeyVaultErrorCodeStrings.PARAMETER_REQUIRED),
+ "'roleDefinitionId' in 'properties'"));
+ Objects.requireNonNull(principalId,
+ String.format(KeyVaultErrorCodeStrings.getErrorString(KeyVaultErrorCodeStrings.PARAMETER_REQUIRED),
+ "'principalId' in 'properties'"));
+
+ this.roleDefinitionId = roleDefinitionId;
+ this.principalId = principalId;
+ }
+
+ /**
+ * Get the {@link KeyVaultRoleDefinition role definition} ID used in the {@link KeyVaultRoleAssignment role
+ * assignment}.
+ *
+ * @return The {@link KeyVaultRoleDefinition role definition} ID.
+ */
+ public String getRoleDefinitionId() {
+ return roleDefinitionId;
+ }
+
+ /**
+ * Get the principal ID assigned to the role.
+ *
+ * @return The principal ID.
+ */
+ public String getPrincipalId() {
+ return principalId;
+ }
+}
diff --git a/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/models/KeyVaultRoleAssignmentScope.java b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/models/KeyVaultRoleAssignmentScope.java
new file mode 100644
index 000000000000..0356d3fde614
--- /dev/null
+++ b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/models/KeyVaultRoleAssignmentScope.java
@@ -0,0 +1,36 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+package com.azure.security.keyvault.administration.models;
+
+import com.azure.core.util.ExpandableStringEnum;
+
+import java.net.URI;
+
+/**
+ * A class that defines the scope of a role.
+ */
+public final class KeyVaultRoleAssignmentScope extends ExpandableStringEnum {
+ public static final KeyVaultRoleAssignmentScope GLOBAL = fromString("/");
+ public static final KeyVaultRoleAssignmentScope KEYS = fromString("/keys");
+
+ /**
+ * Creates or finds a {@link KeyVaultRoleAssignmentScope} from its string representation.
+ *
+ * @param name A name to look for.
+ * @return The corresponding {@link KeyVaultRoleAssignmentScope}
+ */
+ public static KeyVaultRoleAssignmentScope fromString(String name) {
+ return fromString(name, KeyVaultRoleAssignmentScope.class);
+ }
+
+ /**
+ * Creates or finds a {@link KeyVaultRoleAssignmentScope} from its string representation.
+ *
+ * @param uri A URI to look for.
+ * @return The corresponding {@link KeyVaultRoleAssignmentScope}
+ */
+ public static KeyVaultRoleAssignmentScope fromUri(URI uri) {
+ return fromString(uri.getRawPath(), KeyVaultRoleAssignmentScope.class);
+ }
+}
diff --git a/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/models/KeyVaultRoleDefinition.java b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/models/KeyVaultRoleDefinition.java
new file mode 100644
index 000000000000..9d4a7465ffc5
--- /dev/null
+++ b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/models/KeyVaultRoleDefinition.java
@@ -0,0 +1,69 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+package com.azure.security.keyvault.administration.models;
+
+import java.util.List;
+
+/**
+ * A class that defines a role.
+ */
+public final class KeyVaultRoleDefinition {
+ private String id;
+ private String name;
+ private String type;
+ private KeyVaultRoleDefinitionProperties properties;
+ private List scopes;
+
+ /**
+ * Creates a new {@link KeyVaultRoleDefinition role definition} with the specified details.
+ *
+ * @param id The ID for this {@link KeyVaultRoleDefinition role definition}.
+ * @param name The name for this {@link KeyVaultRoleDefinition role definition}.
+ * @param type The type for this {@link KeyVaultRoleDefinition role definition}.
+ * @param properties {@link KeyVaultRoleDefinitionProperties properties} of this {@link KeyVaultRoleDefinition
+ * role assignment}.
+ */
+ public KeyVaultRoleDefinition(String id, String name, String type, KeyVaultRoleDefinitionProperties properties) {
+ this.id = id;
+ this.name = name;
+ this.type = type;
+ this.properties = properties;
+ }
+
+ /**
+ * Get the {@link KeyVaultRoleDefinition role definition} ID.
+ *
+ * @return The {@link KeyVaultRoleDefinition role definition} ID.
+ */
+ public String getId() {
+ return id;
+ }
+
+ /**
+ * Get the {@link KeyVaultRoleDefinition role definition} name.
+ *
+ * @return The {@link KeyVaultRoleDefinition role definition} name.
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * Get the {@link KeyVaultRoleDefinition role assignment} type.
+ *
+ * @return The {@link KeyVaultRoleDefinition role assignment} type.
+ */
+ public String getType() {
+ return type;
+ }
+
+ /**
+ * Get the {@link KeyVaultRoleDefinition role definition} {@link KeyVaultRoleDefinitionProperties properties}.
+ *
+ * @return The {@link KeyVaultRoleDefinition role assignment} {@link KeyVaultRoleDefinitionProperties properties}.
+ */
+ public KeyVaultRoleDefinitionProperties getProperties() {
+ return properties;
+ }
+}
diff --git a/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/models/KeyVaultRoleDefinitionProperties.java b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/models/KeyVaultRoleDefinitionProperties.java
new file mode 100644
index 000000000000..599a6ceae1f0
--- /dev/null
+++ b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/models/KeyVaultRoleDefinitionProperties.java
@@ -0,0 +1,81 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+package com.azure.security.keyvault.administration.models;
+
+import java.util.List;
+
+/**
+ * A class that defines a role definition's properties.
+ */
+public final class KeyVaultRoleDefinitionProperties {
+ private String roleName;
+ private String description;
+ private String roleType;
+ private List permissions;
+ private List assignableScopes;
+
+ /**
+ * Creates a new {@link KeyVaultRoleDefinitionProperties role definition properties} object with the specified
+ * details.
+ *
+ * @param roleName The name of the role.
+ * @param roleDescription The description of the role.
+ * @param roleType The type of the role.
+ * @param permissions The {@link KeyVaultPermission permissions} the {@link KeyVaultRoleDefinition role
+ * definition} has.
+ * @param assignableScopes The assignable scopes of the {@link KeyVaultRoleDefinition role definition}.
+ */
+ public KeyVaultRoleDefinitionProperties(String roleName, String roleDescription, String roleType, List permissions, List assignableScopes) {
+ this.roleName = roleName;
+ this.description = roleDescription;
+ this.roleType = roleType;
+ this.permissions = permissions;
+ this.assignableScopes = assignableScopes;
+ }
+
+ /**
+ * Get the role name.
+ *
+ * @return The role name.
+ */
+ public String getRoleName() {
+ return roleName;
+ }
+
+ /**
+ * Get the role description.
+ *
+ * @return The role description.
+ */
+ public String getDescription() {
+ return description;
+ }
+
+ /**
+ * Get the role type.
+ *
+ * @return The role type.
+ */
+ public String getRoleType() {
+ return roleType;
+ }
+
+ /**
+ * Get the {@link KeyVaultRoleDefinition role definition}'s {@link KeyVaultPermission permissions}.
+ *
+ * @return The {@link KeyVaultRoleDefinition role definition}'s {@link KeyVaultPermission permissions}.
+ */
+ public List getPermissions() {
+ return permissions;
+ }
+
+ /**
+ * Get the {@link KeyVaultRoleDefinition role definition}'s assignable scopes.
+ *
+ * @return The {@link KeyVaultRoleDefinition role definition}'s assignable scopes.
+ */
+ public List getAssignableScopes() {
+ return assignableScopes;
+ }
+}
diff --git a/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/models/package-info.java b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/models/package-info.java
new file mode 100644
index 000000000000..a53d8c9c2c32
--- /dev/null
+++ b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/models/package-info.java
@@ -0,0 +1,10 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+/**
+ * Package containing classes used by
+ * {@link com.azure.security.keyvault.administration.KeyVaultAccessControlAsyncClient} and
+ * {@link com.azure.security.keyvault.administration.KeyVaultAccessControlClient} to perform access control
+ * operations on Azure Key Vault resources.
+ */
+package com.azure.security.keyvault.administration.models;
diff --git a/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/package-info.java b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/package-info.java
new file mode 100644
index 000000000000..b1e6ea894df0
--- /dev/null
+++ b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/package-info.java
@@ -0,0 +1,10 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+/**
+ * Package containing classes for creating clients
+ * {@link com.azure.security.keyvault.administration.KeyVaultAccessControlAsyncClient} and
+ * {@link com.azure.security.keyvault.administration.KeyVaultAccessControlClient} that perform access control
+ * operations on Azure Key Vault resources.
+ */
+package com.azure.security.keyvault.administration;
diff --git a/sdk/keyvault/azure-security-keyvault-administration/src/main/java/module-info.java b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/module-info.java
new file mode 100644
index 000000000000..8bd509800fd7
--- /dev/null
+++ b/sdk/keyvault/azure-security-keyvault-administration/src/main/java/module-info.java
@@ -0,0 +1,16 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+module com.azure.security.keyvault.administration {
+ requires transitive com.azure.core;
+
+ exports com.azure.security.keyvault.administration;
+ exports com.azure.security.keyvault.administration.models;
+ exports com.azure.security.keyvault.administration.implementation;
+ exports com.azure.security.keyvault.administration.implementation.models;
+
+ opens com.azure.security.keyvault.administration to com.fasterxml.jackson.databind;
+ opens com.azure.security.keyvault.administration.models to com.fasterxml.jackson.databind;
+ opens com.azure.security.keyvault.administration.implementation to com.fasterxml.jackson.databind;
+ opens com.azure.security.keyvault.administration.implementation.models to com.fasterxml.jackson.databind;
+}
diff --git a/sdk/keyvault/azure-security-keyvault-administration/src/main/resources/azure-key-vault-administration.properties b/sdk/keyvault/azure-security-keyvault-administration/src/main/resources/azure-key-vault-administration.properties
new file mode 100644
index 000000000000..ca812989b4f2
--- /dev/null
+++ b/sdk/keyvault/azure-security-keyvault-administration/src/main/resources/azure-key-vault-administration.properties
@@ -0,0 +1,2 @@
+name=${project.artifactId}
+version=${project.version}
diff --git a/sdk/keyvault/azure-security-keyvault-administration/src/main/resources/kvErrorStrings.properties b/sdk/keyvault/azure-security-keyvault-administration/src/main/resources/kvErrorStrings.properties
new file mode 100644
index 000000000000..664cfe25c2c1
--- /dev/null
+++ b/sdk/keyvault/azure-security-keyvault-administration/src/main/resources/kvErrorStrings.properties
@@ -0,0 +1,3 @@
+credential_required=Azure Key Vault credentials are required.
+vault_endpoint_required=Azure Key Vault endpoint url is required.
+parameter_required=%s cannot be null.
diff --git a/sdk/keyvault/azure-security-keyvault-administration/swagger/autorest.md b/sdk/keyvault/azure-security-keyvault-administration/swagger/autorest.md
new file mode 100644
index 000000000000..3c96b1a3de64
--- /dev/null
+++ b/sdk/keyvault/azure-security-keyvault-administration/swagger/autorest.md
@@ -0,0 +1,52 @@
+# Azure Key Vault Administration for Java
+> see https://aka.ms/autorest
+
+### Setup
+Increase max memory if you're using Autorest older than 3. Set the environment variable `NODE_OPTIONS` to `--max-old-space-size=8192`.
+
+This is the AutoRest configuration file for KeyVaultAccessControlClient.
+---
+## Getting Started
+To build the SDK for KeyVaultAccessControlClient, simply [Install AutoRest](https://github.com/Azure/autorest/blob/master/docs/installing-autorest.md) and in this folder, run:
+
+> `autorest`
+
+To see additional help and options, run:
+
+> `autorest --help`
+
+### Generation
+There is one swagger for KeyVault Administration: rbac. It uses the following tag: `--tag=rbac-preview`.
+
+```ps
+cd
+autorest --use=@microsoft.azure/autorest.java@4.0.0 --tag=${package}
+```
+
+e.g.
+```ps
+cd
+autorest --use=@microsoft.azure/autorest.java@4.0.0 --tag=rbac-preview
+```
+
+## Code generation settings
+``` yaml
+java: true
+output-folder: ../
+namespace: com.azure.security.keyvault.administration
+license-header: MICROSOFT_MIT_SMALL
+models-subpackage: implementation.models
+custom-types-subpackage: models
+generate-client-as-impl: true
+sync-methods: none
+add-context-parameter: true
+context-client-method-parameter: true
+```
+
+### Tag: rbac-preview
+These settings apply only when `--tag=rbac-preview` is specified on the command line.
+
+``` yaml $(tag) == 'rbac-preview'
+input-file: https://github.com/Azure/azure-rest-api-specs/blob/master/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.2-preview/rbac.json
+title: KeyVaultAccessControlClient
+```
diff --git a/sdk/keyvault/pom.xml b/sdk/keyvault/pom.xml
index 5f620284c6a4..6042dcedc8af 100644
--- a/sdk/keyvault/pom.xml
+++ b/sdk/keyvault/pom.xml
@@ -1,6 +1,6 @@
-
4.0.0
com.azure
@@ -16,6 +16,7 @@
microsoft-azure-keyvault-cryptography
microsoft-azure-keyvault-extensions
microsoft-azure-keyvault-test
+ azure-security-keyvault-administration
azure-security-keyvault-certificates
azure-security-keyvault-keys
azure-security-keyvault-secrets