diff --git a/azure-mgmt-appservice/pom.xml b/azure-mgmt-appservice/pom.xml
index 64b2cb947e7..f98eef7ad7b 100644
--- a/azure-mgmt-appservice/pom.xml
+++ b/azure-mgmt-appservice/pom.xml
@@ -75,10 +75,6 @@
azure-mgmt-dns
1.40.1-SNAPSHOT
-
- com.microsoft.azure
- azure-storage
-
com.microsoft.azure
azure-client-authentication
diff --git a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/StorageAccount.java b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/StorageAccount.java
index feee6a956a3..c857cd216ca 100644
--- a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/StorageAccount.java
+++ b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/StorageAccount.java
@@ -207,6 +207,32 @@ public interface StorageAccount extends
@Beta
boolean isLargeFileSharesEnabled();
+ /**
+ * @return the minimum TLS version for HTTPS traffic.
+ */
+ MinimumTlsVersion minimumTlsVersion();
+
+ /**
+ * Checks whether storage account only allow HTTPS traffic.
+ *
+ * @return true if only allow HTTPS traffic, false otherwise
+ */
+ boolean isHttpsTrafficOnly();
+
+ /**
+ * Checks whether blob public access is allowed.
+ *
+ * @return true if blob public access is allowed, false otherwise
+ */
+ boolean isBlobPublicAccessAllowed();
+
+// /**
+// * Checks whether shared key access is allowed.
+// *
+// * @return true if shared key access is allowed, false otherwise
+// */
+// boolean isSharedKeyAccessAllowed();
+
/**
* Fetch the up-to-date access keys from Azure for this storage account.
*
@@ -485,9 +511,41 @@ interface WithAccessTraffic {
*
* @return the next stage of storage account definition
*/
- @Beta(Beta.SinceVersion.V1_5_0)
- @Method
WithCreate withOnlyHttpsTraffic();
+
+ /**
+ * Specifies that both http and https traffic should be allowed to storage account.
+ *
+ * @return the next stage of storage account definition
+ */
+ WithCreate withHttpAndHttpsTraffic();
+
+ /**
+ * Specifies the minimum TLS version for HTTPS traffic.
+ *
+ * @param minimumTlsVersion the minimum TLS version
+ * @return the next stage of storage account definition
+ */
+ WithCreate withMinimumTlsVersion(MinimumTlsVersion minimumTlsVersion);
+ }
+
+ /** The stage of storage account definition allowing to configure blob access. */
+ interface WithBlobAccess {
+ /**
+ * Disables blob public access.
+ *
+ * Disabling in storage account overrides the public access settings for individual containers.
+ *
+ * @return the next stage of storage account definition
+ */
+ WithCreate disableBlobPublicAccess();
+
+// /**
+// * Disables shared key access.
+// *
+// * @return the next stage of storage account definition
+// */
+// WithCreate disableSharedKeyAccess();
}
/**
@@ -639,6 +697,7 @@ interface WithCreate extends
DefinitionStages.WithAzureFilesAadIntegration,
DefinitionStages.WithLargeFileShares,
DefinitionStages.WithHns,
+ DefinitionStages.WithBlobAccess,
Resource.DefinitionWithTags {
}
@@ -832,8 +891,6 @@ interface WithAccessTraffic {
*
* @return the next stage of storage account update
*/
- @Beta(Beta.SinceVersion.V1_5_0)
- @Method
Update withOnlyHttpsTraffic();
/**
@@ -841,11 +898,49 @@ interface WithAccessTraffic {
*
* @return the next stage of storage account update
*/
- @Beta(Beta.SinceVersion.V1_5_0)
- @Method
Update withHttpAndHttpsTraffic();
+
+ /**
+ * Specifies the minimal TLS version for HTTPS traffic.
+ *
+ * @param minimumTlsVersion the minimum TLS version
+ * @return the next stage of storage account update
+ */
+ Update withMinimumTlsVersion(MinimumTlsVersion minimumTlsVersion);
}
+ /** The stage of storage account update allowing to configure blob access. */
+ interface WithBlobAccess {
+ /**
+ * Allows blob public access, configured by individual containers.
+ *
+ * @return the next stage of storage account update
+ */
+ Update enableBlobPublicAccess();
+
+ /**
+ * Disables blob public access.
+ *
+ * Disabling in storage account overrides the public access settings for individual containers.
+ *
+ * @return the next stage of storage account update
+ */
+ Update disableBlobPublicAccess();
+
+// /**
+// * Allows shared key access.
+// *
+// * @return the next stage of storage account update
+// */
+// Update enableSharedKeyAccess();
+//
+// /**
+// * Disables shared key access.
+// *
+// * @return the next stage of storage account update
+// */
+// Update disableSharedKeyAccess();
+ }
/**
* The stage of storage account update allowing to configure network access.
@@ -1017,6 +1112,7 @@ interface Update extends
UpdateStages.WithAccessTraffic,
UpdateStages.WithNetworkAccess,
UpdateStages.WithUpgrade,
+ UpdateStages.WithBlobAccess,
Resource.UpdateWithTags {
}
}
diff --git a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/StorageAccountImpl.java b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/StorageAccountImpl.java
index 9ac29fb3d3c..d92d6805856 100644
--- a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/StorageAccountImpl.java
+++ b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/StorageAccountImpl.java
@@ -17,6 +17,7 @@
import com.microsoft.azure.management.storage.Identity;
import com.microsoft.azure.management.storage.Kind;
import com.microsoft.azure.management.storage.LargeFileSharesState;
+import com.microsoft.azure.management.storage.MinimumTlsVersion;
import com.microsoft.azure.management.storage.ProvisioningState;
import com.microsoft.azure.management.storage.PublicEndpoints;
import com.microsoft.azure.management.storage.Sku;
@@ -215,6 +216,36 @@ public boolean isLargeFileSharesEnabled() {
return this.inner().largeFileSharesState() == LargeFileSharesState.ENABLED;
}
+ @Override
+ public MinimumTlsVersion minimumTlsVersion() {
+ return this.inner().minimumTlsVersion();
+ }
+
+
+ @Override
+ public boolean isHttpsTrafficOnly() {
+ if (this.inner().enableHttpsTrafficOnly() == null) {
+ return true;
+ }
+ return this.inner().enableHttpsTrafficOnly();
+ }
+
+ @Override
+ public boolean isBlobPublicAccessAllowed() {
+ if (this.inner().allowBlobPublicAccess() == null) {
+ return true;
+ }
+ return this.inner().allowBlobPublicAccess();
+ }
+
+// @Override
+// public boolean isSharedKeyAccessAllowed() {
+// if (this.inner().allowSharedKeyAccess() == null) {
+// return true;
+// }
+// return this.inner().allowSharedKeyAccess();
+// }
+
@Override
public List getKeys() {
return this.getKeysAsync().toBlocking().last();
@@ -433,10 +464,63 @@ public StorageAccountImpl withOnlyHttpsTraffic() {
@Override
public StorageAccountImpl withHttpAndHttpsTraffic() {
- updateParameters.withEnableHttpsTrafficOnly(false);
+ if (isInCreateMode()) {
+ createParameters.withEnableHttpsTrafficOnly(false);
+ } else {
+ updateParameters.withEnableHttpsTrafficOnly(false);
+ }
+ return this;
+ }
+
+ @Override
+ public StorageAccountImpl withMinimumTlsVersion(MinimumTlsVersion minimumTlsVersion) {
+ if (isInCreateMode()) {
+ createParameters.withMinimumTlsVersion(minimumTlsVersion);
+ } else {
+ updateParameters.withMinimumTlsVersion(minimumTlsVersion);
+ }
+ return this;
+ }
+
+ @Override
+ public StorageAccountImpl enableBlobPublicAccess() {
+ if (isInCreateMode()) {
+ createParameters.withAllowBlobPublicAccess(true);
+ } else {
+ updateParameters.withAllowBlobPublicAccess(true);
+ }
+ return this;
+ }
+
+ @Override
+ public StorageAccountImpl disableBlobPublicAccess() {
+ if (isInCreateMode()) {
+ createParameters.withAllowBlobPublicAccess(false);
+ } else {
+ updateParameters.withAllowBlobPublicAccess(false);
+ }
return this;
}
+// @Override
+// public StorageAccountImpl enableSharedKeyAccess() {
+// if (isInCreateMode()) {
+// createParameters.withAllowSharedKeyAccess(true);
+// } else {
+// updateParameters.withAllowSharedKeyAccess(true);
+// }
+// return this;
+// }
+//
+// @Override
+// public StorageAccountImpl disableSharedKeyAccess() {
+// if (isInCreateMode()) {
+// createParameters.withAllowSharedKeyAccess(false);
+// } else {
+// updateParameters.withAllowSharedKeyAccess(false);
+// }
+// return this;
+// }
@Override
public StorageAccountImpl withAccessFromAllNetworks() {
diff --git a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/StorageAccountsImpl.java b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/StorageAccountsImpl.java
index 4e01d2f2ee5..00d061a29d3 100644
--- a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/StorageAccountsImpl.java
+++ b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/StorageAccountsImpl.java
@@ -9,6 +9,7 @@
import com.microsoft.azure.management.apigeneration.LangDefinition;
import com.microsoft.azure.management.resources.fluentcore.arm.collection.implementation.TopLevelModifiableResourcesImpl;
import com.microsoft.azure.management.storage.CheckNameAvailabilityResult;
+import com.microsoft.azure.management.storage.MinimumTlsVersion;
import com.microsoft.azure.management.storage.ServiceSasParameters;
import com.microsoft.azure.management.storage.StorageAccount;
import com.microsoft.azure.management.storage.StorageAccountSkuType;
@@ -60,7 +61,9 @@ public ServiceFuture checkNameAvailabilityAsync(Str
public StorageAccountImpl define(String name) {
return wrapModel(name)
.withSku(StorageAccountSkuType.STANDARD_RAGRS)
- .withGeneralPurposeAccountKindV2();
+ .withGeneralPurposeAccountKindV2()
+ .withOnlyHttpsTraffic()
+ .withMinimumTlsVersion(MinimumTlsVersion.TLS1_2);
}
@Override