Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -92,14 +92,31 @@ interface WithIdentity<ParentT> {
* @return the next stage of access policy definition
*/
WithAttach<ParentT> forUser(ActiveDirectoryUser user);

/**
* Specifies the Active Directory user this access policy is for.
*
* @param userPrincipalName the user principal name of the AD user
* @return the next stage of access policy definition
*/
WithAttach<ParentT> forUser(String userPrincipalName);

/**
* Application ID of the client making request on behalf of a principal.
*
* @param applicationId the application ID
* @return the next stage of access policy definition
*/
WithAttach<ParentT> forApplicationId(String applicationId);

/**
* Specifies the Azure Active Directory tenant ID that should be used for
* authenticating requests to the key vault.
*
* @param tenantId the tenant ID for the key vault.
* @return the next stage of access policy definition
*/
WithAttach<ParentT> forTenantId(String tenantId);

/**
* Specifies the Active Directory group this access policy is for.
Expand Down Expand Up @@ -202,6 +219,30 @@ interface WithPermissions<ParentT> {
* @return the next stage of access policy definition
*/
WithAttach<ParentT> allowCertificatePermissions(List<CertificatePermissions> permissions);

/**
* Allow all permissions for the Ad identity to access storage.
*
* @param the next stage of access policy definition
*/
@Method
WithAttach<ParentT> allowStorageAllPermissions();

/**
* Allow a list of permissions for the AD identity to access storage.
*
* @param permissions the list of permissions allowed
* @return the next stage of access policy definition
*/
WithAttach<ParentT> allowStoragePermissions(StoragePermissions...permissions);

/**
* Allow a list of permissions for the AD identity to access storage.
*
* @param permissions the list of permissions allowed
* @return the next stage of access policy definition
*/
WithAttach<ParentT> allowStoragePermissions(List<StoragePermissions> permissions);
}

/** The final stage of the access policy definition.
Expand Down Expand Up @@ -266,6 +307,23 @@ interface WithIdentity<ParentT> {
* @return the next stage of access policy definition
*/
WithAttach<ParentT> forUser(String userPrincipalName);

/**
* Application ID of the client making request on behalf of a principal.
*
* @param applicationId the application ID
* @return the next stage of access policy definition
*/
WithAttach<ParentT> forApplicationId(String applicationId);

/**
* Specifies the Azure Active Directory tenant ID that should be used for
* authenticating requests to the key vault.
*
* @param tenantId the tenant ID for the key vault.
* @return the next stage of access policy definition
*/
WithAttach<ParentT> forTenantId(String tenantId);

/**
* Specifies the Active Directory group this access policy is for.
Expand Down Expand Up @@ -344,6 +402,30 @@ interface WithPermissions<ParentT> {
* @return the next stage of access policy definition
*/
WithAttach<ParentT> allowSecretPermissions(List<SecretPermissions> permissions);

/**
* Allow all permissions for the Ad identity to access storage.
*
* @return the next stage of access policy definition
*/
@Method
WithAttach<ParentT> allowStorageAllPermissions();

/**
* Allow a list of permissions for the AD identity to access storage.
*
* @param permissions the list of permissions allowed
* @return the next stage of access policy definition
*/
WithAttach<ParentT> allowStoragePermissions(StoragePermissions...permissions);

/**
* Allow a list of permissions for the AD identity to access storage.
*
* @param permissions the list of permissions allowed
* @return the next stage of access policy definition
*/
WithAttach<ParentT> allowStoragePermissions(List<StoragePermissions> permissions);
}

/** The final stage of the access policy definition.
Expand Down Expand Up @@ -510,6 +592,54 @@ interface WithPermissions {
* @return the next stage of access policy update
*/
Update disallowCertificatePermissions(List<CertificatePermissions> permissions);

/**
* Allow all permissions for the Ad identity to access storage.
*
* @return the next stage of access policy definition
*/
@Method
Update allowStorageAllPermissions();

/**
* Allow a list of permissions for the AD identity to access storage.
*
* @param permissions the list of permissions allowed
* @return the next stage of access policy definition
*/
Update allowStoragePermissions(StoragePermissions...permissions);

/**
* Allow a list of permissions for the AD identity to access storage.
*
* @param permissions the list of permissions allowed
* @return the next stage of access policy definition
*/
Update allowStoragePermissions(List<StoragePermissions> permissions);

/**
* Revoke all permissions for the Ad identity to access storage.
*
* @return the next stage of access policy definition
*/
@Method
Update disallowStorageAllPermissions();

/**
* Revoke a list of permissions for the AD identity to access storage.
*
* @param permissions the list of permissions allowed
* @return the next stage of access policy definition
*/
Update disallowStoragePermissions(StoragePermissions...permissions);

/**
* Revoke a list of permissions for the AD identity to access storage.
*
* @param permissions the list of permissions allowed
* @return the next stage of access policy definition
*/
Update disallowStoragePermissions(List<StoragePermissions> permissions);
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
*/

package com.microsoft.azure.management.keyvault;

import com.microsoft.azure.management.apigeneration.Beta;
import com.microsoft.azure.management.apigeneration.Fluent;
import com.microsoft.azure.management.apigeneration.Beta.SinceVersion;
import com.microsoft.azure.management.keyvault.implementation.CheckNameAvailabilityResultInner;
import com.microsoft.azure.management.resources.fluentcore.model.HasInner;

/**
* The CheckNameAvailability operation response wrapper.
*
*/
@Fluent(ContainerName = "/Microsoft.Azure.Management.Fluent.KeyVault")
@Beta(SinceVersion.V1_11_0)
public interface CheckNameAvailabilityResult extends HasInner<CheckNameAvailabilityResultInner> {

/**
* Get the nameAvailable value.
*
* @return the nameAvailable value
*/
Boolean nameAvailable();

/**
* Get the reason value.
*
* @return the reason value
*/
Reason reason();

/**
* Get the message value.
*
* @return the message value
*/
String message();

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
*/

package com.microsoft.azure.management.keyvault;

import java.util.Map;

import org.joda.time.DateTime;

import com.microsoft.azure.management.apigeneration.Beta;
import com.microsoft.azure.management.apigeneration.Fluent;
import com.microsoft.azure.management.apigeneration.Beta.SinceVersion;
import com.microsoft.azure.management.keyvault.implementation.DeletedVaultInner;
import com.microsoft.azure.management.resources.fluentcore.arm.models.HasId;
import com.microsoft.azure.management.resources.fluentcore.arm.models.HasName;
import com.microsoft.azure.management.resources.fluentcore.model.HasInner;

/**
* An immutable client-side representation of an Azure Key Vault.
*/
@Fluent(ContainerName = "/Microsoft.Azure.Management.Fluent.KeyVault")
@Beta(SinceVersion.V1_11_0)
public interface DeletedVault extends HasInner<DeletedVaultInner>, HasName, HasId {

/**
* Get the location value.
*
* @return the location value
*/
String location();

/**
* Get the deletionDate value.
*
* @return the deletionDate value
*/
DateTime deletionDate();

/**
* Get the scheduledPurgeDate value.
*
* @return the scheduledPurgeDate value
*/
DateTime scheduledPurgeDate();

/**
* Get the tags value.
*
* @return the tags value
*/
Map<String, String> tags();
}
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,27 @@ public interface Vault extends
* retrieve secrets from the key vault.
*/
boolean enabledForTemplateDeployment();

/**
* @return whether soft delete is enabled for this key vault.
*/
@Beta(SinceVersion.V1_11_0)
boolean softDeleteEnabled();

/**
* @return whether purge protection is enabled for this key vault.
* Purge protection can only be enabled if soft delete is enabled.
*/
@Beta(SinceVersion.V1_11_0)
boolean purgeProtectionEnabled();

/**
* Get the createMode value.
*
* @return the createMode value
*/
@Beta(SinceVersion.V1_11_0)
CreateMode createMode();

/**************************************************************
* Fluent interfaces to provision a Vault
Expand Down Expand Up @@ -183,6 +204,22 @@ interface WithConfigurations {
* @return the next stage of key vault definition
*/
WithCreate withTemplateDeploymentEnabled();

/**
* Enable soft delete for the key vault.
*
* @return the next stage of key vault definition
*/
@Beta(SinceVersion.V1_11_0)
WithCreate withSoftDeleteEnabled();

/**
* Enable purge protection for the key vault; valid only if soft delete is also enabled.
*
* @return the next stage of key vault definition.
*/
@Beta(SinceVersion.V1_11_0)
WithCreate withPurgeProtectionEnabled();

/**
* Disable Azure Virtual Machines to retrieve certificates stored as secrets from the key vault.
Expand Down Expand Up @@ -285,6 +322,22 @@ interface WithConfigurations {
* @return the key vault update stage
*/
Update withTemplateDeploymentEnabled();

/**
* Enable soft delete for the key vault.
*
* @return the next stage of key vault definition
*/
@Beta(SinceVersion.V1_11_0)
Update withSoftDeleteEnabled();

/**
* Enable purge protection for the key vault; valid only if soft delete is also enabled.
*
* @return the next stage of key vault definition.
*/
@Beta(SinceVersion.V1_11_0)
Update withPurgeProtectionEnabled();

/**
* Disable Azure Virtual Machines to retrieve certificates stored as secrets from the key vault.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import com.fasterxml.jackson.annotation.JsonProperty;

/**
* The parameters used to check the availabity of the vault name.
* The parameters used to check the availability of the vault name.
*/
public class VaultCheckNameAvailabilityParameters {
/**
Expand Down
Loading