diff --git a/sdk/storage/mgmt-v2019_04_01/pom.xml b/sdk/storage/mgmt-v2019_04_01/pom.xml index 1361108dba7e..acbc4c2f4c99 100644 --- a/sdk/storage/mgmt-v2019_04_01/pom.xml +++ b/sdk/storage/mgmt-v2019_04_01/pom.xml @@ -11,11 +11,11 @@ com.microsoft.azure azure-arm-parent - 1.2.0 - ../../parents/azure-arm-parent + 1.1.0 + ../../../pom.management.xml azure-mgmt-storage - 1.0.0-beta-2 + 1.0.0-beta jar Microsoft Azure SDK for Storage Management This package contains Microsoft Storage Management SDK. diff --git a/sdk/storage/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/ActiveDirectoryProperties.java b/sdk/storage/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/ActiveDirectoryProperties.java new file mode 100644 index 000000000000..3769049e4e8a --- /dev/null +++ b/sdk/storage/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/ActiveDirectoryProperties.java @@ -0,0 +1,174 @@ +/** + * 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.storage.v2019_04_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Settings properties for Active Directory (AD). + */ +public class ActiveDirectoryProperties { + /** + * Specifies the primary domain that the AD DNS server is authoritative + * for. + */ + @JsonProperty(value = "domainName", required = true) + private String domainName; + + /** + * Specifies the NetBIOS domain name. + */ + @JsonProperty(value = "netBiosDomainName", required = true) + private String netBiosDomainName; + + /** + * Specifies the Active Directory forest to get. + */ + @JsonProperty(value = "forestName", required = true) + private String forestName; + + /** + * Specifies the domain GUID. + */ + @JsonProperty(value = "domainGuid", required = true) + private String domainGuid; + + /** + * Specifies the security identifier (SID). + */ + @JsonProperty(value = "domainSid", required = true) + private String domainSid; + + /** + * Specifies the security identifier (SID) for Azure Storage. + */ + @JsonProperty(value = "azureStorageSid", required = true) + private String azureStorageSid; + + /** + * Get specifies the primary domain that the AD DNS server is authoritative for. + * + * @return the domainName value + */ + public String domainName() { + return this.domainName; + } + + /** + * Set specifies the primary domain that the AD DNS server is authoritative for. + * + * @param domainName the domainName value to set + * @return the ActiveDirectoryProperties object itself. + */ + public ActiveDirectoryProperties withDomainName(String domainName) { + this.domainName = domainName; + return this; + } + + /** + * Get specifies the NetBIOS domain name. + * + * @return the netBiosDomainName value + */ + public String netBiosDomainName() { + return this.netBiosDomainName; + } + + /** + * Set specifies the NetBIOS domain name. + * + * @param netBiosDomainName the netBiosDomainName value to set + * @return the ActiveDirectoryProperties object itself. + */ + public ActiveDirectoryProperties withNetBiosDomainName(String netBiosDomainName) { + this.netBiosDomainName = netBiosDomainName; + return this; + } + + /** + * Get specifies the Active Directory forest to get. + * + * @return the forestName value + */ + public String forestName() { + return this.forestName; + } + + /** + * Set specifies the Active Directory forest to get. + * + * @param forestName the forestName value to set + * @return the ActiveDirectoryProperties object itself. + */ + public ActiveDirectoryProperties withForestName(String forestName) { + this.forestName = forestName; + return this; + } + + /** + * Get specifies the domain GUID. + * + * @return the domainGuid value + */ + public String domainGuid() { + return this.domainGuid; + } + + /** + * Set specifies the domain GUID. + * + * @param domainGuid the domainGuid value to set + * @return the ActiveDirectoryProperties object itself. + */ + public ActiveDirectoryProperties withDomainGuid(String domainGuid) { + this.domainGuid = domainGuid; + return this; + } + + /** + * Get specifies the security identifier (SID). + * + * @return the domainSid value + */ + public String domainSid() { + return this.domainSid; + } + + /** + * Set specifies the security identifier (SID). + * + * @param domainSid the domainSid value to set + * @return the ActiveDirectoryProperties object itself. + */ + public ActiveDirectoryProperties withDomainSid(String domainSid) { + this.domainSid = domainSid; + return this; + } + + /** + * Get specifies the security identifier (SID) for Azure Storage. + * + * @return the azureStorageSid value + */ + public String azureStorageSid() { + return this.azureStorageSid; + } + + /** + * Set specifies the security identifier (SID) for Azure Storage. + * + * @param azureStorageSid the azureStorageSid value to set + * @return the ActiveDirectoryProperties object itself. + */ + public ActiveDirectoryProperties withAzureStorageSid(String azureStorageSid) { + this.azureStorageSid = azureStorageSid; + return this; + } + +} diff --git a/sdk/storage/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/AzureFilesIdentityBasedAuthentication.java b/sdk/storage/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/AzureFilesIdentityBasedAuthentication.java index 8288488aa382..b4ff38db4818 100644 --- a/sdk/storage/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/AzureFilesIdentityBasedAuthentication.java +++ b/sdk/storage/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/AzureFilesIdentityBasedAuthentication.java @@ -16,13 +16,19 @@ public class AzureFilesIdentityBasedAuthentication { /** * Indicates the directory service used. Possible values include: 'None', - * 'AADDS'. + * 'AADDS', 'AD'. */ @JsonProperty(value = "directoryServiceOptions", required = true) private DirectoryServiceOptions directoryServiceOptions; /** - * Get indicates the directory service used. Possible values include: 'None', 'AADDS'. + * Required if choose AD. + */ + @JsonProperty(value = "activeDirectoryProperties") + private ActiveDirectoryProperties activeDirectoryProperties; + + /** + * Get indicates the directory service used. Possible values include: 'None', 'AADDS', 'AD'. * * @return the directoryServiceOptions value */ @@ -31,7 +37,7 @@ public DirectoryServiceOptions directoryServiceOptions() { } /** - * Set indicates the directory service used. Possible values include: 'None', 'AADDS'. + * Set indicates the directory service used. Possible values include: 'None', 'AADDS', 'AD'. * * @param directoryServiceOptions the directoryServiceOptions value to set * @return the AzureFilesIdentityBasedAuthentication object itself. @@ -41,4 +47,24 @@ public AzureFilesIdentityBasedAuthentication withDirectoryServiceOptions(Directo return this; } + /** + * Get required if choose AD. + * + * @return the activeDirectoryProperties value + */ + public ActiveDirectoryProperties activeDirectoryProperties() { + return this.activeDirectoryProperties; + } + + /** + * Set required if choose AD. + * + * @param activeDirectoryProperties the activeDirectoryProperties value to set + * @return the AzureFilesIdentityBasedAuthentication object itself. + */ + public AzureFilesIdentityBasedAuthentication withActiveDirectoryProperties(ActiveDirectoryProperties activeDirectoryProperties) { + this.activeDirectoryProperties = activeDirectoryProperties; + return this; + } + } diff --git a/sdk/storage/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/DirectoryServiceOptions.java b/sdk/storage/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/DirectoryServiceOptions.java index 9edcdeb415bf..7ab98383dc4b 100644 --- a/sdk/storage/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/DirectoryServiceOptions.java +++ b/sdk/storage/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/DirectoryServiceOptions.java @@ -22,6 +22,9 @@ public final class DirectoryServiceOptions extends ExpandableStringEnum { + /** Static value TLS1_0 for MinimumTlsVersion. */ + public static final MinimumTlsVersion TLS1_0 = fromString("TLS1_0"); + + /** Static value TLS1_1 for MinimumTlsVersion. */ + public static final MinimumTlsVersion TLS1_1 = fromString("TLS1_1"); + + /** Static value TLS1_2 for MinimumTlsVersion. */ + public static final MinimumTlsVersion TLS1_2 = fromString("TLS1_2"); + + /** + * Creates or finds a MinimumTlsVersion from its string representation. + * @param name a name to look for + * @return the corresponding MinimumTlsVersion + */ + @JsonCreator + public static MinimumTlsVersion fromString(String name) { + return fromString(name, MinimumTlsVersion.class); + } + + /** + * @return known MinimumTlsVersion values + */ + public static Collection values() { + return values(MinimumTlsVersion.class); + } +} diff --git a/sdk/storage/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/StorageAccount.java b/sdk/storage/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/StorageAccount.java index 5a083c7fffb2..e258ec938615 100644 --- a/sdk/storage/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/StorageAccount.java +++ b/sdk/storage/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/StorageAccount.java @@ -31,6 +31,11 @@ public interface StorageAccount extends HasInner, Resource, */ AccessTier accessTier(); + /** + * @return the allowBlobPublicAccess value. + */ + Boolean allowBlobPublicAccess(); + /** * @return the azureFilesIdentityBasedAuthentication value. */ @@ -91,6 +96,11 @@ public interface StorageAccount extends HasInner, Resource, */ DateTime lastGeoFailoverTime(); + /** + * @return the minimumTlsVersion value. + */ + MinimumTlsVersion minimumTlsVersion(); + /** * @return the networkRuleSet value. */ @@ -194,6 +204,18 @@ interface WithAccessTier { WithCreate withAccessTier(AccessTier accessTier); } + /** + * The stage of the storageaccount definition allowing to specify AllowBlobPublicAccess. + */ + interface WithAllowBlobPublicAccess { + /** + * Specifies allowBlobPublicAccess. + * @param allowBlobPublicAccess Allow or disallow public access to all blobs or containers in the storage account. The default interpretation is true for this property + * @return the next definition stage + */ + WithCreate withAllowBlobPublicAccess(Boolean allowBlobPublicAccess); + } + /** * The stage of the storageaccount definition allowing to specify AzureFilesIdentityBasedAuthentication. */ @@ -278,6 +300,18 @@ interface WithLargeFileSharesState { WithCreate withLargeFileSharesState(LargeFileSharesState largeFileSharesState); } + /** + * The stage of the storageaccount definition allowing to specify MinimumTlsVersion. + */ + interface WithMinimumTlsVersion { + /** + * Specifies minimumTlsVersion. + * @param minimumTlsVersion Set the minimum TLS version to be permitted on requests to storage. The default interpretation is TLS 1.0 for this property. Possible values include: 'TLS1_0', 'TLS1_1', 'TLS1_2' + * @return the next definition stage + */ + WithCreate withMinimumTlsVersion(MinimumTlsVersion minimumTlsVersion); + } + /** * The stage of the storageaccount definition allowing to specify NetworkRuleSet. */ @@ -295,13 +329,13 @@ interface WithNetworkRuleSet { * the resource to be created (via {@link WithCreate#create()}), but also allows * for any other optional settings to be specified. */ - interface WithCreate extends Creatable, Resource.DefinitionWithTags, DefinitionStages.WithAccessTier, DefinitionStages.WithAzureFilesIdentityBasedAuthentication, DefinitionStages.WithCustomDomain, DefinitionStages.WithEnableHttpsTrafficOnly, DefinitionStages.WithEncryption, DefinitionStages.WithIdentity, DefinitionStages.WithIsHnsEnabled, DefinitionStages.WithLargeFileSharesState, DefinitionStages.WithNetworkRuleSet { + interface WithCreate extends Creatable, Resource.DefinitionWithTags, DefinitionStages.WithAccessTier, DefinitionStages.WithAllowBlobPublicAccess, DefinitionStages.WithAzureFilesIdentityBasedAuthentication, DefinitionStages.WithCustomDomain, DefinitionStages.WithEnableHttpsTrafficOnly, DefinitionStages.WithEncryption, DefinitionStages.WithIdentity, DefinitionStages.WithIsHnsEnabled, DefinitionStages.WithLargeFileSharesState, DefinitionStages.WithMinimumTlsVersion, DefinitionStages.WithNetworkRuleSet { } } /** * The template for a StorageAccount update operation, containing all the settings that can be modified. */ - interface Update extends Appliable, Resource.UpdateWithTags, UpdateStages.WithAccessTier, UpdateStages.WithAzureFilesIdentityBasedAuthentication, UpdateStages.WithCustomDomain, UpdateStages.WithEnableHttpsTrafficOnly, UpdateStages.WithEncryption, UpdateStages.WithIdentity, UpdateStages.WithKind, UpdateStages.WithLargeFileSharesState, UpdateStages.WithNetworkRuleSet, UpdateStages.WithSku { + interface Update extends Appliable, Resource.UpdateWithTags, UpdateStages.WithAccessTier, UpdateStages.WithAllowBlobPublicAccess, UpdateStages.WithAzureFilesIdentityBasedAuthentication, UpdateStages.WithCustomDomain, UpdateStages.WithEnableHttpsTrafficOnly, UpdateStages.WithEncryption, UpdateStages.WithIdentity, UpdateStages.WithKind, UpdateStages.WithLargeFileSharesState, UpdateStages.WithMinimumTlsVersion, UpdateStages.WithNetworkRuleSet, UpdateStages.WithSku { } /** @@ -320,6 +354,18 @@ interface WithAccessTier { Update withAccessTier(AccessTier accessTier); } + /** + * The stage of the storageaccount update allowing to specify AllowBlobPublicAccess. + */ + interface WithAllowBlobPublicAccess { + /** + * Specifies allowBlobPublicAccess. + * @param allowBlobPublicAccess Allow or disallow public access to all blobs or containers in the storage account. The default interpretation is true for this property + * @return the next update stage + */ + Update withAllowBlobPublicAccess(Boolean allowBlobPublicAccess); + } + /** * The stage of the storageaccount update allowing to specify AzureFilesIdentityBasedAuthentication. */ @@ -404,6 +450,18 @@ interface WithLargeFileSharesState { Update withLargeFileSharesState(LargeFileSharesState largeFileSharesState); } + /** + * The stage of the storageaccount update allowing to specify MinimumTlsVersion. + */ + interface WithMinimumTlsVersion { + /** + * Specifies minimumTlsVersion. + * @param minimumTlsVersion Set the minimum TLS version to be permitted on requests to storage. The default interpretation is TLS 1.0 for this property. Possible values include: 'TLS1_0', 'TLS1_1', 'TLS1_2' + * @return the next update stage + */ + Update withMinimumTlsVersion(MinimumTlsVersion minimumTlsVersion); + } + /** * The stage of the storageaccount update allowing to specify NetworkRuleSet. */ diff --git a/sdk/storage/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/StorageAccountCreateParameters.java b/sdk/storage/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/StorageAccountCreateParameters.java index d8c7b7dc36f3..1335c4c60564 100644 --- a/sdk/storage/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/StorageAccountCreateParameters.java +++ b/sdk/storage/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/StorageAccountCreateParameters.java @@ -113,6 +113,21 @@ public class StorageAccountCreateParameters { @JsonProperty(value = "properties.largeFileSharesState") private LargeFileSharesState largeFileSharesState; + /** + * Allow or disallow public access to all blobs or containers in the + * storage account. The default interpretation is true for this property. + */ + @JsonProperty(value = "properties.allowBlobPublicAccess") + private Boolean allowBlobPublicAccess; + + /** + * Set the minimum TLS version to be permitted on requests to storage. The + * default interpretation is TLS 1.0 for this property. Possible values + * include: 'TLS1_0', 'TLS1_1', 'TLS1_2'. + */ + @JsonProperty(value = "properties.minimumTlsVersion") + private MinimumTlsVersion minimumTlsVersion; + /** * Get required. Gets or sets the SKU name. * @@ -373,4 +388,44 @@ public StorageAccountCreateParameters withLargeFileSharesState(LargeFileSharesSt return this; } + /** + * Get allow or disallow public access to all blobs or containers in the storage account. The default interpretation is true for this property. + * + * @return the allowBlobPublicAccess value + */ + public Boolean allowBlobPublicAccess() { + return this.allowBlobPublicAccess; + } + + /** + * Set allow or disallow public access to all blobs or containers in the storage account. The default interpretation is true for this property. + * + * @param allowBlobPublicAccess the allowBlobPublicAccess value to set + * @return the StorageAccountCreateParameters object itself. + */ + public StorageAccountCreateParameters withAllowBlobPublicAccess(Boolean allowBlobPublicAccess) { + this.allowBlobPublicAccess = allowBlobPublicAccess; + return this; + } + + /** + * Get set the minimum TLS version to be permitted on requests to storage. The default interpretation is TLS 1.0 for this property. Possible values include: 'TLS1_0', 'TLS1_1', 'TLS1_2'. + * + * @return the minimumTlsVersion value + */ + public MinimumTlsVersion minimumTlsVersion() { + return this.minimumTlsVersion; + } + + /** + * Set set the minimum TLS version to be permitted on requests to storage. The default interpretation is TLS 1.0 for this property. Possible values include: 'TLS1_0', 'TLS1_1', 'TLS1_2'. + * + * @param minimumTlsVersion the minimumTlsVersion value to set + * @return the StorageAccountCreateParameters object itself. + */ + public StorageAccountCreateParameters withMinimumTlsVersion(MinimumTlsVersion minimumTlsVersion) { + this.minimumTlsVersion = minimumTlsVersion; + return this; + } + } diff --git a/sdk/storage/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/StorageAccountRegenerateKeyParameters.java b/sdk/storage/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/StorageAccountRegenerateKeyParameters.java index 502d03a48816..270d9a9ecf34 100644 --- a/sdk/storage/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/StorageAccountRegenerateKeyParameters.java +++ b/sdk/storage/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/StorageAccountRegenerateKeyParameters.java @@ -16,13 +16,13 @@ public class StorageAccountRegenerateKeyParameters { /** * The name of storage keys that want to be regenerated, possible values - * are key1, key2. + * are key1, key2, kerb1, kerb2. */ @JsonProperty(value = "keyName", required = true) private String keyName; /** - * Get the name of storage keys that want to be regenerated, possible values are key1, key2. + * Get the name of storage keys that want to be regenerated, possible values are key1, key2, kerb1, kerb2. * * @return the keyName value */ @@ -31,7 +31,7 @@ public String keyName() { } /** - * Set the name of storage keys that want to be regenerated, possible values are key1, key2. + * Set the name of storage keys that want to be regenerated, possible values are key1, key2, kerb1, kerb2. * * @param keyName the keyName value to set * @return the StorageAccountRegenerateKeyParameters object itself. diff --git a/sdk/storage/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/StorageAccountUpdateParameters.java b/sdk/storage/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/StorageAccountUpdateParameters.java index 24f969061990..33f016b44c54 100644 --- a/sdk/storage/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/StorageAccountUpdateParameters.java +++ b/sdk/storage/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/StorageAccountUpdateParameters.java @@ -91,6 +91,21 @@ public class StorageAccountUpdateParameters { @JsonProperty(value = "properties.largeFileSharesState") private LargeFileSharesState largeFileSharesState; + /** + * Allow or disallow public access to all blobs or containers in the + * storage account. The default interpretation is true for this property. + */ + @JsonProperty(value = "properties.allowBlobPublicAccess") + private Boolean allowBlobPublicAccess; + + /** + * Set the minimum TLS version to be permitted on requests to storage. The + * default interpretation is TLS 1.0 for this property. Possible values + * include: 'TLS1_0', 'TLS1_1', 'TLS1_2'. + */ + @JsonProperty(value = "properties.minimumTlsVersion") + private MinimumTlsVersion minimumTlsVersion; + /** * Optional. Indicates the type of storage account. Currently only * StorageV2 value supported by server. Possible values include: 'Storage', @@ -299,6 +314,46 @@ public StorageAccountUpdateParameters withLargeFileSharesState(LargeFileSharesSt return this; } + /** + * Get allow or disallow public access to all blobs or containers in the storage account. The default interpretation is true for this property. + * + * @return the allowBlobPublicAccess value + */ + public Boolean allowBlobPublicAccess() { + return this.allowBlobPublicAccess; + } + + /** + * Set allow or disallow public access to all blobs or containers in the storage account. The default interpretation is true for this property. + * + * @param allowBlobPublicAccess the allowBlobPublicAccess value to set + * @return the StorageAccountUpdateParameters object itself. + */ + public StorageAccountUpdateParameters withAllowBlobPublicAccess(Boolean allowBlobPublicAccess) { + this.allowBlobPublicAccess = allowBlobPublicAccess; + return this; + } + + /** + * Get set the minimum TLS version to be permitted on requests to storage. The default interpretation is TLS 1.0 for this property. Possible values include: 'TLS1_0', 'TLS1_1', 'TLS1_2'. + * + * @return the minimumTlsVersion value + */ + public MinimumTlsVersion minimumTlsVersion() { + return this.minimumTlsVersion; + } + + /** + * Set set the minimum TLS version to be permitted on requests to storage. The default interpretation is TLS 1.0 for this property. Possible values include: 'TLS1_0', 'TLS1_1', 'TLS1_2'. + * + * @param minimumTlsVersion the minimumTlsVersion value to set + * @return the StorageAccountUpdateParameters object itself. + */ + public StorageAccountUpdateParameters withMinimumTlsVersion(MinimumTlsVersion minimumTlsVersion) { + this.minimumTlsVersion = minimumTlsVersion; + return this; + } + /** * Get optional. Indicates the type of storage account. Currently only StorageV2 value supported by server. Possible values include: 'Storage', 'StorageV2', 'BlobStorage', 'FileStorage', 'BlockBlobStorage'. * diff --git a/sdk/storage/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/StorageAccounts.java b/sdk/storage/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/StorageAccounts.java index a460ead84461..45a781046892 100644 --- a/sdk/storage/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/StorageAccounts.java +++ b/sdk/storage/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/StorageAccounts.java @@ -24,7 +24,7 @@ */ public interface StorageAccounts extends SupportsCreating, SupportsDeletingByResourceGroup, SupportsBatchDeletion, SupportsGettingByResourceGroup, SupportsListingByResourceGroup, SupportsListing, HasInner { /** - * Lists the access keys for the specified storage account. + * Lists the access keys or Kerberos keys (if active directory enabled) for the specified storage account. * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. @@ -34,11 +34,11 @@ public interface StorageAccounts extends SupportsCreating listKeysAsync(String resourceGroupName, String accountName); /** - * Regenerates one of the access keys for the specified storage account. + * Regenerates one of the access keys or Kerberos keys for the specified storage account. * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. - * @param keyName The name of storage keys that want to be regenerated, possible values are key1, key2. + * @param keyName The name of storage keys that want to be regenerated, possible values are key1, key2, kerb1, kerb2. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ diff --git a/sdk/storage/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/implementation/StorageAccountImpl.java b/sdk/storage/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/implementation/StorageAccountImpl.java index 60397ba74a9f..428a070461d7 100644 --- a/sdk/storage/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/implementation/StorageAccountImpl.java +++ b/sdk/storage/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/implementation/StorageAccountImpl.java @@ -22,6 +22,7 @@ import com.microsoft.azure.management.storage.v2019_04_01.Identity; import com.microsoft.azure.management.storage.v2019_04_01.Kind; import com.microsoft.azure.management.storage.v2019_04_01.LargeFileSharesState; +import com.microsoft.azure.management.storage.v2019_04_01.MinimumTlsVersion; import com.microsoft.azure.management.storage.v2019_04_01.NetworkRuleSet; import com.microsoft.azure.management.storage.v2019_04_01.Endpoints; import com.microsoft.azure.management.storage.v2019_04_01.ProvisioningState; @@ -89,6 +90,11 @@ public AccessTier accessTier() { return this.inner().accessTier(); } + @Override + public Boolean allowBlobPublicAccess() { + return this.inner().allowBlobPublicAccess(); + } + @Override public AzureFilesIdentityBasedAuthentication azureFilesIdentityBasedAuthentication() { return this.inner().azureFilesIdentityBasedAuthentication(); @@ -149,6 +155,11 @@ public DateTime lastGeoFailoverTime() { return this.inner().lastGeoFailoverTime(); } + @Override + public MinimumTlsVersion minimumTlsVersion() { + return this.inner().minimumTlsVersion(); + } + @Override public NetworkRuleSet networkRuleSet() { return this.inner().networkRuleSet(); @@ -235,6 +246,16 @@ public StorageAccountImpl withAccessTier(AccessTier accessTier) { return this; } + @Override + public StorageAccountImpl withAllowBlobPublicAccess(Boolean allowBlobPublicAccess) { + if (isInCreateMode()) { + this.createParameter.withAllowBlobPublicAccess(allowBlobPublicAccess); + } else { + this.updateParameter.withAllowBlobPublicAccess(allowBlobPublicAccess); + } + return this; + } + @Override public StorageAccountImpl withAzureFilesIdentityBasedAuthentication(AzureFilesIdentityBasedAuthentication azureFilesIdentityBasedAuthentication) { if (isInCreateMode()) { @@ -295,6 +316,16 @@ public StorageAccountImpl withLargeFileSharesState(LargeFileSharesState largeFil return this; } + @Override + public StorageAccountImpl withMinimumTlsVersion(MinimumTlsVersion minimumTlsVersion) { + if (isInCreateMode()) { + this.createParameter.withMinimumTlsVersion(minimumTlsVersion); + } else { + this.updateParameter.withMinimumTlsVersion(minimumTlsVersion); + } + return this; + } + @Override public StorageAccountImpl withNetworkRuleSet(NetworkRuleSet networkRuleSet) { if (isInCreateMode()) { diff --git a/sdk/storage/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/implementation/StorageAccountInner.java b/sdk/storage/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/implementation/StorageAccountInner.java index 8f4954da3403..7ca4a4b65317 100644 --- a/sdk/storage/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/implementation/StorageAccountInner.java +++ b/sdk/storage/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/implementation/StorageAccountInner.java @@ -21,6 +21,7 @@ import com.microsoft.azure.management.storage.v2019_04_01.NetworkRuleSet; import com.microsoft.azure.management.storage.v2019_04_01.GeoReplicationStats; import com.microsoft.azure.management.storage.v2019_04_01.LargeFileSharesState; +import com.microsoft.azure.management.storage.v2019_04_01.MinimumTlsVersion; import com.fasterxml.jackson.annotation.JsonProperty; import com.microsoft.rest.serializer.JsonFlatten; import com.microsoft.azure.Resource; @@ -183,6 +184,21 @@ public class StorageAccountInner extends Resource { @JsonProperty(value = "properties.largeFileSharesState") private LargeFileSharesState largeFileSharesState; + /** + * Allow or disallow public access to all blobs or containers in the + * storage account. The default interpretation is true for this property. + */ + @JsonProperty(value = "properties.allowBlobPublicAccess") + private Boolean allowBlobPublicAccess; + + /** + * Set the minimum TLS version to be permitted on requests to storage. The + * default interpretation is TLS 1.0 for this property. Possible values + * include: 'TLS1_0', 'TLS1_1', 'TLS1_2'. + */ + @JsonProperty(value = "properties.minimumTlsVersion") + private MinimumTlsVersion minimumTlsVersion; + /** * Get gets the SKU. * @@ -436,4 +452,44 @@ public StorageAccountInner withLargeFileSharesState(LargeFileSharesState largeFi return this; } + /** + * Get allow or disallow public access to all blobs or containers in the storage account. The default interpretation is true for this property. + * + * @return the allowBlobPublicAccess value + */ + public Boolean allowBlobPublicAccess() { + return this.allowBlobPublicAccess; + } + + /** + * Set allow or disallow public access to all blobs or containers in the storage account. The default interpretation is true for this property. + * + * @param allowBlobPublicAccess the allowBlobPublicAccess value to set + * @return the StorageAccountInner object itself. + */ + public StorageAccountInner withAllowBlobPublicAccess(Boolean allowBlobPublicAccess) { + this.allowBlobPublicAccess = allowBlobPublicAccess; + return this; + } + + /** + * Get set the minimum TLS version to be permitted on requests to storage. The default interpretation is TLS 1.0 for this property. Possible values include: 'TLS1_0', 'TLS1_1', 'TLS1_2'. + * + * @return the minimumTlsVersion value + */ + public MinimumTlsVersion minimumTlsVersion() { + return this.minimumTlsVersion; + } + + /** + * Set set the minimum TLS version to be permitted on requests to storage. The default interpretation is TLS 1.0 for this property. Possible values include: 'TLS1_0', 'TLS1_1', 'TLS1_2'. + * + * @param minimumTlsVersion the minimumTlsVersion value to set + * @return the StorageAccountInner object itself. + */ + public StorageAccountInner withMinimumTlsVersion(MinimumTlsVersion minimumTlsVersion) { + this.minimumTlsVersion = minimumTlsVersion; + return this; + } + } diff --git a/sdk/storage/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/implementation/StorageAccountsInner.java b/sdk/storage/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/implementation/StorageAccountsInner.java index 8d7a6fa7381c..70fe3e1ae33e 100644 --- a/sdk/storage/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/implementation/StorageAccountsInner.java +++ b/sdk/storage/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/implementation/StorageAccountsInner.java @@ -17,6 +17,7 @@ import com.microsoft.azure.CloudException; import com.microsoft.azure.ListOperationCallback; import com.microsoft.azure.management.storage.v2019_04_01.AccountSasParameters; +import com.microsoft.azure.management.storage.v2019_04_01.ListKeyExpand; import com.microsoft.azure.management.storage.v2019_04_01.ServiceSasParameters; import com.microsoft.azure.management.storage.v2019_04_01.StorageAccountCheckNameAvailabilityParameters; import com.microsoft.azure.management.storage.v2019_04_01.StorageAccountCreateParameters; @@ -48,8 +49,6 @@ import rx.Observable; import com.microsoft.azure.LongRunningFinalState; import com.microsoft.azure.LongRunningOperationOptions; -import com.microsoft.azure.LongRunningFinalState; -import com.microsoft.azure.LongRunningOperationOptions; /** * An instance of this class provides access to all the operations defined @@ -111,7 +110,7 @@ interface StorageAccountsService { @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.storage.v2019_04_01.StorageAccounts listKeys" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/listKeys") - Observable> listKeys(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> listKeys(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Query("$expand") ListKeyExpand expand, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.storage.v2019_04_01.StorageAccounts regenerateKey" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/regenerateKey") @@ -942,7 +941,7 @@ private ServiceResponse> listByResourceGroupDelega } /** - * Lists the access keys for the specified storage account. + * Lists the access keys or Kerberos keys (if active directory enabled) for the specified storage account. * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. @@ -956,7 +955,7 @@ public StorageAccountListKeysResultInner listKeys(String resourceGroupName, Stri } /** - * Lists the access keys for the specified storage account. + * Lists the access keys or Kerberos keys (if active directory enabled) for the specified storage account. * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. @@ -969,7 +968,7 @@ public ServiceFuture listKeysAsync(String res } /** - * Lists the access keys for the specified storage account. + * Lists the access keys or Kerberos keys (if active directory enabled) for the specified storage account. * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. @@ -986,7 +985,7 @@ public StorageAccountListKeysResultInner call(ServiceResponse> listKeysWi if (this.client.apiVersion() == null) { throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); } - return service.listKeys(resourceGroupName, accountName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final ListKeyExpand expand = null; + return service.listKeys(resourceGroupName, accountName, this.client.subscriptionId(), this.client.apiVersion(), expand, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = listKeysDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Lists the access keys or Kerberos keys (if active directory enabled) for the specified storage account. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param expand Specifies type of the key to be listed. Possible value is kerb. Possible values include: 'kerb' + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the StorageAccountListKeysResultInner object if successful. + */ + public StorageAccountListKeysResultInner listKeys(String resourceGroupName, String accountName, ListKeyExpand expand) { + return listKeysWithServiceResponseAsync(resourceGroupName, accountName, expand).toBlocking().single().body(); + } + + /** + * Lists the access keys or Kerberos keys (if active directory enabled) for the specified storage account. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param expand Specifies type of the key to be listed. Possible value is kerb. Possible values include: 'kerb' + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture listKeysAsync(String resourceGroupName, String accountName, ListKeyExpand expand, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(listKeysWithServiceResponseAsync(resourceGroupName, accountName, expand), serviceCallback); + } + + /** + * Lists the access keys or Kerberos keys (if active directory enabled) for the specified storage account. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param expand Specifies type of the key to be listed. Possible value is kerb. Possible values include: 'kerb' + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the StorageAccountListKeysResultInner object + */ + public Observable listKeysAsync(String resourceGroupName, String accountName, ListKeyExpand expand) { + return listKeysWithServiceResponseAsync(resourceGroupName, accountName, expand).map(new Func1, StorageAccountListKeysResultInner>() { + @Override + public StorageAccountListKeysResultInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Lists the access keys or Kerberos keys (if active directory enabled) for the specified storage account. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param expand Specifies type of the key to be listed. Possible value is kerb. Possible values include: 'kerb' + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the StorageAccountListKeysResultInner object + */ + public Observable> listKeysWithServiceResponseAsync(String resourceGroupName, String accountName, ListKeyExpand expand) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listKeys(resourceGroupName, accountName, this.client.subscriptionId(), this.client.apiVersion(), expand, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -1028,11 +1111,11 @@ private ServiceResponse listKeysDelegate(Resp } /** - * Regenerates one of the access keys for the specified storage account. + * Regenerates one of the access keys or Kerberos keys for the specified storage account. * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. - * @param keyName The name of storage keys that want to be regenerated, possible values are key1, key2. + * @param keyName The name of storage keys that want to be regenerated, possible values are key1, key2, kerb1, kerb2. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent @@ -1043,11 +1126,11 @@ public StorageAccountListKeysResultInner regenerateKey(String resourceGroupName, } /** - * Regenerates one of the access keys for the specified storage account. + * Regenerates one of the access keys or Kerberos keys for the specified storage account. * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. - * @param keyName The name of storage keys that want to be regenerated, possible values are key1, key2. + * @param keyName The name of storage keys that want to be regenerated, possible values are key1, key2, kerb1, kerb2. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object @@ -1057,11 +1140,11 @@ public ServiceFuture regenerateKeyAsync(Strin } /** - * Regenerates one of the access keys for the specified storage account. + * Regenerates one of the access keys or Kerberos keys for the specified storage account. * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. - * @param keyName The name of storage keys that want to be regenerated, possible values are key1, key2. + * @param keyName The name of storage keys that want to be regenerated, possible values are key1, key2, kerb1, kerb2. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the StorageAccountListKeysResultInner object */ @@ -1075,11 +1158,11 @@ public StorageAccountListKeysResultInner call(ServiceResponse