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
2 changes: 1 addition & 1 deletion api-specs.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"dir": "azure-mgmt-keyvault",
"source": "specification/keyvault/resource-manager/readme.md",
"package": "com.microsoft.azure.management.keyvault",
"args": "--payload-flattening-threshold=1 --tag=package-2016-10"
"args": "--payload-flattening-threshold=1 --tag=package-2018-02"
},
"authorization": {
"dir": "azure-mgmt-graph-rbac",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,10 @@ public void canDeployMultipleWars() throws Exception {
.create();
Assert.assertNotNull(webApp);

webApp.warDeploy(new File(WarDeployTests.class.getResource("/helloworld.war").getPath()));
webApp.warDeploy(WarDeployTests.class.getResourceAsStream("/helloworld.war"), "app2");

if (!isPlaybackMode()) {
webApp.warDeploy(new File(WarDeployTests.class.getResource("/helloworld.war").getPath()));
webApp.warDeploy(WarDeployTests.class.getResourceAsStream("/helloworld.war"), "app2");

Response response = curl("http://" + WEBAPP_NAME + "." + "azurewebsites.net");
Assert.assertEquals(200, response.code());
String body = response.body().string();
Expand Down

Large diffs are not rendered by default.

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.
*
* @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 @@ -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
Expand Up @@ -58,6 +58,12 @@ public final class CertificatePermissions extends ExpandableStringEnum<Certifica
/** Static value purge for CertificatePermissions. */
public static final CertificatePermissions PURGE = fromString("purge");

/** Static value backup for CertificatePermissions. */
public static final CertificatePermissions BACKUP = fromString("backup");

/** Static value restore for CertificatePermissions. */
public static final CertificatePermissions RESTORE = fromString("restore");

/**
* Creates or finds a CertificatePermissions from its string representation.
* @param name a name to look for
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
@@ -0,0 +1,46 @@
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
*/

package com.microsoft.azure.management.keyvault;

import com.fasterxml.jackson.annotation.JsonProperty;

/**
* A rule governing the accesibility of a vault from a specific ip address or
* ip range.
*/
public class IPRule {
/**
* An IPv4 address range in CIDR notation, such as '124.56.78.91' (simple
* IP address) or '124.56.78.0/24' (all addresses that start with
* 124.56.78).
*/
@JsonProperty(value = "value", required = true)
private String value;

/**
* Get the value value.
*
* @return the value value
*/
public String value() {
return this.value;
}

/**
* Set the value value.
*
* @param value the value value to set
* @return the IPRule object itself.
*/
public IPRule withValue(String value) {
this.value = value;
return this;
}

}
Loading