From b96eaca3118779e69a35a185deaecd2bf7fe6ecf Mon Sep 17 00:00:00 2001 From: Sima Zhu Date: Mon, 9 Dec 2019 20:34:35 -0800 Subject: [PATCH 1/8] merge from mainline --- README.md | 23 +- .../src/main/resources/revapi/revapi.json | 89 +++ .../resources/spotbugs/spotbugs-exclude.xml | 5 + eng/jacoco-test-coverage/pom.xml | 39 +- .../templates/jobs/archetype-sdk-client.yml | 15 +- eng/spotbugs-aggregate-report/pom.xml | 49 +- eng/versioning/external_dependencies.txt | 9 +- eng/versioning/set_versions.py | 2 + eng/versioning/update_versions.py | 2 + eng/versioning/version_client.txt | 39 +- eng/versioning/version_client_java_files.txt | 9 - packages.md | 227 -------- pom.client.xml | 73 ++- .../azure-data-appconfiguration/pom.xml | 2 +- .../appconfiguration/ConfigurationClient.java | 2 +- .../ConfigurationClientBuilder.java | 16 +- sdk/core/azure-core-amqp/pom.xml | 4 +- .../amqp/implementation/ClientConstants.java | 2 +- sdk/core/azure-core-http-netty/pom.xml | 6 +- sdk/core/azure-core-http-okhttp/pom.xml | 4 +- sdk/core/azure-core-management/pom.xml | 4 +- sdk/core/azure-core-test/pom.xml | 16 + .../azure/core/test/InterceptorManager.java | 139 +++-- .../java/com/azure/core/test/TestBase.java | 50 +- .../azure/core/test/TestContextManager.java | 81 +++ .../java/com/azure/core/test/TestMode.java | 4 + .../core/test/annotation/DoNotRecord.java | 32 ++ .../core/test/annotation/package-info.java | 6 + .../core/test/utils/TestResourceNamer.java | 77 ++- .../com/azure/core/test/FakeTestClass.java | 37 ++ .../core/test/InterceptorManagerTests.java | 44 ++ .../core/test/TestContextManagerTests.java | 71 +++ .../test/utils/TestResourceNamerTests.java | 113 ++++ .../azure-core-tracing-opencensus/pom.xml | 2 +- .../azure-core-tracing-opentelemetry/pom.xml | 2 +- sdk/core/azure-core/pom.xml | 2 +- .../policy/AddHeadersFromContextPolicy.java | 61 ++ .../core/http/policy/HttpLoggingPolicy.java | 120 ++-- .../core/http/policy/RequestIdPolicy.java | 29 +- .../http/BufferedHttpResponse.java | 11 +- .../java/com/azure/core/util/CoreUtils.java | 8 +- .../RequestIdPolicyJavaDocCodeSnippet.java | 20 + .../AddHeadersFromContextPolicyTest.java | 87 +++ .../http/policy/HttpLoggingPolicyTests.java | 166 +++++- .../data/cosmos/benchmark/AsyncBenchmark.java | 16 +- .../cosmos/benchmark/AsyncQueryBenchmark.java | 2 +- .../com/azure/data/cosmos/benchmark/Main.java | 9 +- .../cosmos/benchmark/ReadMyWriteWorkflow.java | 11 +- .../src/main/resources/log4j.properties | 37 +- sdk/cosmos/microsoft-azure-cosmos/pom.xml | 6 + .../azure/data/cosmos/ConsistencyPolicy.java | 7 +- .../cosmos/CosmosContainerProperties.java | 40 ++ .../RntbdTransportClient.java | 224 ++++---- .../rntbd/RntbdClientChannelHandler.java | 10 +- .../RntbdClientChannelHealthChecker.java | 8 +- .../rntbd/RntbdClientChannelPool.java | 2 +- .../rntbd/RntbdEndpoint.java | 14 +- .../rntbd/RntbdMetrics.java | 5 +- .../rntbd/RntbdObjectMapper.java | 10 +- .../rntbd/RntbdReporter.java | 6 +- .../rntbd/RntbdRequest.java | 2 +- .../rntbd/RntbdRequestDecoder.java | 2 +- .../rntbd/RntbdRequestEncoder.java | 2 +- .../rntbd/RntbdRequestManager.java | 192 ++++--- .../rntbd/RntbdRequestRecord.java | 110 +++- .../rntbd/RntbdRequestTimer.java | 38 +- .../rntbd/RntbdResponse.java | 27 +- .../rntbd/RntbdResponseHeaders.java | 1 + .../rntbd/RntbdServiceEndpoint.java | 42 +- .../directconnectivity/rntbd/RntbdToken.java | 24 +- .../rntbd/RntbdTokenStream.java | 9 +- .../rntbd/RntbdTokenType.java | 27 +- .../data/cosmos/CosmosResponseValidator.java | 13 + .../RntbdTransportClientTest.java | 2 +- .../data/cosmos/rx/CollectionCrudTest.java | 62 ++ sdk/cosmosdb/mgmt-v2019_08_01_preview/pom.xml | 2 +- ...assandraKeyspaceGetPropertiesResource.java | 90 +++ .../CassandraKeyspaceGetResults.java | 25 +- .../CassandraTableGetPropertiesResource.java | 142 +++++ .../CassandraTableGetResults.java | 29 +- .../v2019_08_01_preview/CompositePath.java | 71 +++ .../CompositePathSortOrder.java | 41 ++ .../GremlinDatabaseGetPropertiesResource.java | 90 +++ .../GremlinDatabaseGetResults.java | 25 +- .../GremlinGraphGetPropertiesResource.java | 224 ++++++++ .../GremlinGraphGetResults.java | 44 +- .../v2019_08_01_preview/IndexingPolicy.java | 52 ++ ...ongoDBCollectionGetPropertiesResource.java | 144 +++++ .../MongoDBCollectionGetResults.java | 30 +- .../MongoDBDatabaseGetPropertiesResource.java | 90 +++ .../MongoDBDatabaseGetResults.java | 23 +- .../v2019_08_01_preview/SpatialSpec.java | 71 +++ .../v2019_08_01_preview/SpatialType.java | 47 ++ .../SqlContainerGetPropertiesResource.java | 224 ++++++++ .../SqlContainerGetResults.java | 44 +- .../SqlDatabaseGetPropertiesResource.java | 144 +++++ .../SqlDatabaseGetResults.java | 29 +- ...lStoredProcedureGetPropertiesResource.java | 116 ++++ .../SqlStoredProcedureGetResults.java | 24 +- .../SqlTriggerGetPropertiesResource.java | 169 ++++++ .../SqlTriggerGetResults.java | 34 +- ...rDefinedFunctionGetPropertiesResource.java | 116 ++++ .../SqlUserDefinedFunctionGetResults.java | 24 +- .../TableGetPropertiesResource.java | 90 +++ .../v2019_08_01_preview/TableGetResults.java | 19 +- ...roughputSettingsGetPropertiesResource.java | 120 ++++ .../ThroughputSettingsGetResults.java | 14 +- .../CassandraKeyspaceGetResultsImpl.java | 26 +- .../CassandraKeyspaceGetResultsInner.java | 70 +-- .../CassandraResourcesInner.java | 4 +- .../CassandraTableGetResultsImpl.java | 31 +- .../CassandraTableGetResultsInner.java | 123 +--- .../CollectionPartitionRegionsInner.java | 4 +- .../CollectionPartitionsInner.java | 4 +- .../CollectionRegionsInner.java | 4 +- .../implementation/CollectionsInner.java | 4 +- ...java => CosmosDBManagementClientImpl.java} | 28 +- .../implementation/CosmosDBManager.java | 4 +- .../DatabaseAccountRegionsInner.java | 4 +- .../implementation/DatabaseAccountsInner.java | 4 +- .../implementation/DatabasesInner.java | 4 +- .../GremlinDatabaseGetResultsImpl.java | 26 +- .../GremlinDatabaseGetResultsInner.java | 70 +-- .../GremlinGraphGetResultsImpl.java | 49 +- .../GremlinGraphGetResultsInner.java | 208 +------ .../implementation/GremlinResourcesInner.java | 4 +- .../MongoDBCollectionGetResultsImpl.java | 32 +- .../MongoDBCollectionGetResultsInner.java | 125 +--- .../MongoDBDatabaseGetResultsImpl.java | 24 +- .../MongoDBDatabaseGetResultsInner.java | 70 +-- .../implementation/MongoDBResourcesInner.java | 4 +- .../implementation/OperationsInner.java | 4 +- .../PartitionKeyRangeIdRegionsInner.java | 4 +- .../PartitionKeyRangeIdsInner.java | 4 +- .../PercentileSourceTargetsInner.java | 4 +- .../PercentileTargetsInner.java | 4 +- .../implementation/PercentilesInner.java | 4 +- .../PrivateEndpointConnectionsInner.java | 4 +- .../PrivateLinkResourcesInner.java | 4 +- .../SqlContainerGetResultsImpl.java | 49 +- .../SqlContainerGetResultsInner.java | 208 +------ .../SqlDatabaseGetResultsImpl.java | 30 +- .../SqlDatabaseGetResultsInner.java | 124 +--- .../implementation/SqlResourcesInner.java | 4 +- .../SqlStoredProcedureGetResultsImpl.java | 25 +- .../SqlStoredProcedureGetResultsInner.java | 96 +--- .../SqlTriggerGetResultsImpl.java | 37 +- .../SqlTriggerGetResultsInner.java | 151 +---- .../SqlUserDefinedFunctionGetResultsImpl.java | 25 +- ...SqlUserDefinedFunctionGetResultsInner.java | 96 +--- .../implementation/TableGetResultsImpl.java | 20 +- .../implementation/TableGetResultsInner.java | 70 +-- .../implementation/TableResourcesInner.java | 4 +- .../ThroughputSettingsGetResultsImpl.java | 15 +- .../ThroughputSettingsGetResultsInner.java | 53 +- .../implementation/package-info.java | 2 +- .../v2019_08_01_preview/package-info.java | 2 +- .../README.md | 6 +- .../pom.xml | 4 +- .../src/samples/README.md | 36 ++ .../azure-messaging-eventhubs/README.md | 14 +- .../azure-messaging-eventhubs/pom.xml | 2 +- .../azure-messaging-eventhubs.properties | 2 + .../src/samples/README.md | 50 ++ sdk/identity/azure-identity/pom.xml | 2 +- .../CHANGELOG.md | 2 +- .../README.md | 4 +- .../pom.xml | 2 +- .../AzureKeyVaultConfiguration.java | 12 - .../CertificateClientBuilder.java | 20 +- .../azure-key-vault-certificates.properties | 2 + .../main/resources/kvErrorStrings.properties | 1 + .../CertificateClientTestBase.java | 4 +- .../azure-security-keyvault-keys/CHANGELOG.md | 7 +- .../azure-security-keyvault-keys/README.md | 4 +- .../azure-security-keyvault-keys/pom.xml | 6 - .../keyvault/keys/KeyClientBuilder.java | 13 +- .../cryptography/CryptographyAsyncClient.java | 27 +- .../CryptographyClientBuilder.java | 13 +- .../cryptography/CryptographyService.java | 26 + .../CryptographyServiceClient.java | 62 +- .../cryptography/KeyEncryptionKeyClient.java | 4 + .../keyvault/keys/cryptography/SecretKey.java | 128 +++++ .../keys/cryptography/SecretProperties.java | 335 +++++++++++ .../cryptography/SecretRequestAttributes.java | 171 ++++++ .../cryptography/SecretRequestParameters.java | 119 ++++ .../keys/cryptography/SignatureEncoding.java | 22 +- .../AzureKeyVaultConfiguration.java | 12 - .../models/Base64UrlJsonDeserializer.java | 6 +- .../keys/models/Base64UrlJsonSerializer.java | 8 +- .../keyvault/keys/models/KeyProperties.java | 34 +- .../src/main/java/module-info.java | 1 - .../resources/azure-key-vault-keys.properties | 2 + .../keyvault/keys/KeyClientTestBase.java | 5 +- .../KeyVaultKeysUserAgentPropertiesTest.java | 20 + .../CryptographyClientTestBase.java | 8 +- .../KeyEncryptionKeyClientTest.java | 61 ++ .../KeyEncryptionKeyClientTestBase.java | 181 ++++++ .../wrapUnwrapSymmetricAK128.json | 60 ++ .../wrapUnwrapSymmetricAK192.json | 60 ++ .../azure-security-keyvault-secrets/pom.xml | 2 +- .../secrets/AzureKeyVaultConfiguration.java | 12 - .../keyvault/secrets/SecretClientBuilder.java | 11 +- .../azure-key-vault-secrets.properties | 2 + ...eyVaultSecretsUserAgentPropertiesTest.java | 20 + .../secrets/SecretClientTestBase.java | 5 +- sdk/storage/azure-storage-blob-batch/pom.xml | 4 +- .../azure-storage-blob-cryptography/pom.xml | 4 +- .../BlobCryptographyConfiguration.java | 10 - .../cryptography/CryptographyConstants.java | 11 +- .../EncryptedBlobClientBuilder.java | 12 +- ...azure-storage-blob-cryptography.properties | 2 + ...CryptographyUserAgentPropertiesTest.groovy | 18 + sdk/storage/azure-storage-blob/CHANGELOG.md | 7 +- sdk/storage/azure-storage-blob/pom.xml | 6 +- .../azure/storage/blob/BlobClientBuilder.java | 2 +- .../blob/BlobContainerAsyncClient.java | 44 ++ .../storage/blob/BlobContainerClient.java | 41 ++ .../blob/BlobContainerClientBuilder.java | 2 +- .../storage/blob/BlobServiceAsyncClient.java | 22 + .../azure/storage/blob/BlobServiceClient.java | 20 + .../blob/BlobServiceClientBuilder.java | 2 +- .../com/azure/storage/blob/BlobUrlParts.java | 64 ++- .../implementation/util/BlobSasImplUtil.java | 310 ++++++++++ .../implementation/util/BuilderHelper.java | 14 +- .../sas/BlobServiceSasQueryParameters.java | 37 ++ .../sas/BlobServiceSasSignatureValues.java | 88 ++- .../blob/specialized/BlobAsyncClientBase.java | 46 ++ .../blob/specialized/BlobClientBase.java | 41 ++ .../SpecializedBlobClientBuilder.java | 2 +- .../resources/azure-storage-blob.properties | 2 + .../BlobAsyncClientJavaDocCodeSnippets.java | 3 +- .../blob/BlobClientJavaDocCodeSnippets.java | 2 + ...ntainerAsyncClientJavaDocCodeSnippets.java | 30 + ...lobContainerClientJavaDocCodeSnippets.java | 30 + ...ServiceAsyncClientJavaDocCodeSnippets.java | 25 + .../BlobServiceClientJavaDocCodeSnippets.java | 24 + .../blob/JavaDocCodeSnippetsHelpers.java | 6 + ...lobAsyncClientBaseJavaDocCodeSnippets.java | 31 + .../BlobClientBaseJavaDocCodeSnippets.java | 31 + ...SasSignatureValuesJavaDocCodeSnippets.java | 61 -- .../com/azure/storage/blob/APISpec.groovy | 6 +- .../blob/BlobUserAgentPropertiesTest.groovy | 18 + .../com/azure/storage/blob/SASTest.groovy | 44 ++ .../azure/storage/blob/SasClientTests.groovy | 544 ++++++++++++++++++ .../blob/specialized/HelperTest.groovy | 53 -- ...ntsasnetworkaccountsastokenonendpoint.json | 157 +++++ ...accountsasnetworkcreatecontainerfails.json | 112 ++++ ...ountsasnetworkcreatecontainersucceeds.json | 130 +++++ ...ntsasnetworktestblobdeletefailsnewapi.json | 112 ++++ ...entTestsaccountsasnetworktestblobread.json | 120 ++++ ...ntTestsblobsasimplutilstringtosign[0].json | 90 +++ ...ntTestsblobsasimplutilstringtosign[1].json | 90 +++ ...ntTestsblobsasimplutilstringtosign[2].json | 90 +++ ...ntTestsblobsasimplutilstringtosign[3].json | 90 +++ ...ntTestsblobsasimplutilstringtosign[4].json | 90 +++ ...ntTestsblobsasimplutilstringtosign[5].json | 90 +++ ...ntTestsblobsasimplutilstringtosign[6].json | 90 +++ ...ntTestsblobsasimplutilstringtosign[7].json | 90 +++ ...ntTestsblobsasimplutilstringtosign[8].json | 90 +++ ...ntTestsblobsasimplutilstringtosign[9].json | 90 +++ ...lutilstringtosignuserdelegationkey[0].json | 90 +++ ...utilstringtosignuserdelegationkey[10].json | 90 +++ ...utilstringtosignuserdelegationkey[11].json | 90 +++ ...utilstringtosignuserdelegationkey[12].json | 90 +++ ...utilstringtosignuserdelegationkey[13].json | 90 +++ ...utilstringtosignuserdelegationkey[14].json | 90 +++ ...lutilstringtosignuserdelegationkey[1].json | 90 +++ ...lutilstringtosignuserdelegationkey[2].json | 90 +++ ...lutilstringtosignuserdelegationkey[3].json | 90 +++ ...lutilstringtosignuserdelegationkey[4].json | 90 +++ ...lutilstringtosignuserdelegationkey[5].json | 90 +++ ...lutilstringtosignuserdelegationkey[6].json | 90 +++ ...lutilstringtosignuserdelegationkey[7].json | 90 +++ ...lutilstringtosignuserdelegationkey[8].json | 90 +++ ...lutilstringtosignuserdelegationkey[9].json | 90 +++ ...blobservicesasnetworktestblobsnapshot.json | 197 +++++++ ...ClientTestsensurestateillegalargument.json | 90 +++ ...tsensurestateresourceandpermission[0].json | 90 +++ ...tsensurestateresourceandpermission[1].json | 90 +++ ...tsensurestateresourceandpermission[2].json | 90 +++ .../SasClientTestsensurestateversion.json | 90 +++ .../SasClientTestsnetworktestblobsas.json | 158 +++++ ...SasClientTestsnetworktestblobsnapshot.json | 202 +++++++ ...networktestblobsnapshotuserdelegation.json | 219 +++++++ ...entTestsnetworktestblobuserdelegation.json | 180 ++++++ ...stsnetworktestcontaineruserdelegation.json | 133 +++++ ...assignaturevaluesnetworktestcontainer.json | 154 +++++ sdk/storage/azure-storage-common/CHANGELOG.md | 4 + sdk/storage/azure-storage-common/pom.xml | 2 +- .../implementation/AccountSasImplUtil.java | 114 ++++ .../common/implementation/SasImplUtils.java | 63 ++ .../implementation/StorageImplUtils.java | 1 + .../common/sas/AccountSasPermission.java | 2 +- .../common/sas/AccountSasQueryParameters.java | 14 + .../common/sas/AccountSasSignatureValues.java | 53 +- .../common/sas/BaseSasQueryParameters.java | 47 +- .../common/sas/CommonSasQueryParameters.java | 359 ++++++++++++ ...SasSignatureValuesJavaDocCodeSnippets.java | 35 -- .../azure-storage-file-datalake/pom.xml | 4 +- .../DataLakeFileSystemAsyncClient.java | 45 ++ .../datalake/DataLakeFileSystemClient.java | 44 ++ .../DataLakeFileSystemClientBuilder.java | 2 +- .../datalake/DataLakePathAsyncClient.java | 44 ++ .../file/datalake/DataLakePathClient.java | 42 ++ .../datalake/DataLakePathClientBuilder.java | 2 +- .../datalake/DataLakeServiceAsyncClient.java | 19 + .../file/datalake/DataLakeServiceClient.java | 19 + .../DataLakeServiceClientBuilder.java | 2 +- .../storage/file/datalake/Transforms.java | 51 ++ .../DataLakeStorageClientBuilder.java | 7 +- .../DataLakeStorageClientImpl.java | 7 +- .../models/FileSystemCreateHeaders.java | 1 - .../models/FileSystemDeleteHeaders.java | 1 - .../FileSystemGetPropertiesHeaders.java | 1 - .../models/FileSystemListPathsHeaders.java | 1 - .../FileSystemSetPropertiesHeaders.java | 1 - .../models/ModifiedAccessConditions.java | 1 - .../datalake/implementation/models/Path.java | 2 +- .../models/PathAppendDataHeaders.java | 1 - .../models/PathCreateHeaders.java | 1 - .../models/PathDeleteHeaders.java | 1 - .../models/PathFlushDataHeaders.java | 1 - .../models/PathGetPropertiesHeaders.java | 1 - .../models/PathLeaseHeaders.java | 1 - .../models/PathReadHeaders.java | 1 - .../models/PathSetAccessControlHeaders.java | 1 - .../models/PathUpdateHeaders.java | 1 - .../models/ServiceListFileSystemsHeaders.java | 1 - .../SourceModifiedAccessConditions.java | 1 - .../implementation/util/BuilderHelper.java | 12 +- .../file/datalake/models/package-info.java | 1 + .../DataLakeServiceSasQueryParameters.java | 276 --------- .../DataLakeServiceSasSignatureValues.java | 347 +---------- .../azure-storage-file-datalake.properties | 2 + ...ServiceAsyncClientJavaDocCodeSnippets.java | 25 + ...aLakeServiceClientJavaDocCodeSnippets.java | 24 + ...SasSignatureValuesJavaDocCodeSnippets.java | 61 -- ...leSystemAsyncClientJavaDocCodeSamples.java | 30 + .../FileSystemClientJavaDocCodeSamples.java | 30 + .../datalake/JavaDocCodeSnippetsHelpers.java | 6 + .../PathAsyncClientJavaDocCodeSamples.java | 31 + .../PathClientJavaDocCodeSamples.java | 31 + .../storage/file/datalake/APISpec.groovy | 13 +- .../file/datalake/FileSystemAPITest.groovy | 8 +- .../storage/file/datalake/SASTest.groovy | 283 +++++---- ...ntsasnetworkaccountsastokenonendpoint.json | 190 ++++++ ...ccountsasnetworkcreatefilesystemfails.json | 120 +++- ...untsasnetworkcreatefilesystemsucceeds.json | 134 +++-- ...taccountsasnetworktestfiledeletefails.json | 136 +++-- .../SASTestaccountsasnetworktestfileread.json | 168 ++++-- .../session-records/SASTestfilerange[0].json | 106 +++- .../session-records/SASTestfilerange[1].json | 106 +++- .../session-records/SASTestfilerange[2].json | 106 +++- .../SASTestfilerangeia[0].json | 106 +++- .../SASTestfilerangeia[1].json | 106 +++- ...ASTestfilesystemsaspermissionparse[0].json | 106 +++- ...ASTestfilesystemsaspermissionparse[1].json | 106 +++- ...ASTestfilesystemsaspermissionparse[2].json | 106 +++- ...ASTestfilesystemsaspermissionparse[3].json | 106 +++- ...ASTestfilesystemsaspermissionparse[4].json | 106 +++- ...ASTestfilesystemsaspermissionparse[5].json | 106 +++- ...ASTestfilesystemsaspermissionparse[6].json | 106 +++- ...ASTestfilesystemsaspermissionparse[7].json | 106 +++- ...SASTestfilesystemsaspermissionparseia.json | 106 +++- ...estfilesystemsaspermissiontostring[0].json | 106 +++- ...estfilesystemsaspermissiontostring[1].json | 106 +++- ...estfilesystemsaspermissiontostring[2].json | 106 +++- ...estfilesystemsaspermissiontostring[3].json | 106 +++- ...estfilesystemsaspermissiontostring[4].json | 106 +++- ...estfilesystemsaspermissiontostring[5].json | 106 +++- ...estfilesystemsaspermissiontostring[6].json | 106 +++- .../SASTestpathsaspermissionparse[0].json | 106 +++- .../SASTestpathsaspermissionparse[1].json | 106 +++- .../SASTestpathsaspermissionparse[2].json | 106 +++- .../SASTestpathsaspermissionparse[3].json | 106 +++- .../SASTestpathsaspermissionparse[4].json | 106 +++- .../SASTestpathsaspermissionparse[5].json | 106 +++- .../SASTestpathsaspermissionparse[6].json | 106 +++- .../SASTestpathsaspermissionparseia.json | 106 +++- .../SASTestpathsaspermissiontostring[0].json | 106 +++- .../SASTestpathsaspermissiontostring[1].json | 106 +++- .../SASTestpathsaspermissiontostring[2].json | 106 +++- .../SASTestpathsaspermissiontostring[3].json | 106 +++- .../SASTestpathsaspermissiontostring[4].json | 106 +++- .../SASTestpathsaspermissiontostring[5].json | 106 +++- .../SASTestsasimplutilstringtosign[0].json | 129 +++++ .../SASTestsasimplutilstringtosign[1].json | 129 +++++ .../SASTestsasimplutilstringtosign[2].json | 129 +++++ .../SASTestsasimplutilstringtosign[3].json | 129 +++++ .../SASTestsasimplutilstringtosign[4].json | 129 +++++ .../SASTestsasimplutilstringtosign[5].json | 129 +++++ .../SASTestsasimplutilstringtosign[6].json | 129 +++++ .../SASTestsasimplutilstringtosign[7].json | 129 +++++ .../SASTestsasimplutilstringtosign[8].json | 129 +++++ ...lutilstringtosignuserdelegationkey[0].json | 129 +++++ ...utilstringtosignuserdelegationkey[10].json | 129 +++++ ...utilstringtosignuserdelegationkey[11].json | 129 +++++ ...utilstringtosignuserdelegationkey[12].json | 129 +++++ ...utilstringtosignuserdelegationkey[13].json | 129 +++++ ...lutilstringtosignuserdelegationkey[1].json | 129 +++++ ...lutilstringtosignuserdelegationkey[2].json | 129 +++++ ...lutilstringtosignuserdelegationkey[3].json | 129 +++++ ...lutilstringtosignuserdelegationkey[4].json | 129 +++++ ...lutilstringtosignuserdelegationkey[5].json | 129 +++++ ...lutilstringtosignuserdelegationkey[6].json | 129 +++++ ...lutilstringtosignuserdelegationkey[7].json | 129 +++++ ...lutilstringtosignuserdelegationkey[8].json | 129 +++++ ...lutilstringtosignuserdelegationkey[9].json | 129 +++++ ...stservicesassignaturesstringtosign[0].json | 106 +++- ...stservicesassignaturesstringtosign[1].json | 106 +++- ...stservicesassignaturesstringtosign[2].json | 106 +++- ...stservicesassignaturesstringtosign[3].json | 106 +++- ...stservicesassignaturesstringtosign[4].json | 106 +++- ...stservicesassignaturesstringtosign[5].json | 106 +++- ...stservicesassignaturesstringtosign[6].json | 106 +++- ...stservicesassignaturesstringtosign[7].json | 106 +++- ...stservicesassignaturesstringtosign[8].json | 106 +++- ...turesstringtosignuserdelegationkey[0].json | 106 +++- ...uresstringtosignuserdelegationkey[10].json | 106 +++- ...uresstringtosignuserdelegationkey[11].json | 106 +++- ...uresstringtosignuserdelegationkey[12].json | 106 +++- ...uresstringtosignuserdelegationkey[13].json | 106 +++- ...turesstringtosignuserdelegationkey[1].json | 106 +++- ...turesstringtosignuserdelegationkey[2].json | 106 +++- ...turesstringtosignuserdelegationkey[3].json | 106 +++- ...turesstringtosignuserdelegationkey[4].json | 106 +++- ...turesstringtosignuserdelegationkey[5].json | 106 +++- ...turesstringtosignuserdelegationkey[6].json | 106 +++- ...turesstringtosignuserdelegationkey[7].json | 106 +++- ...turesstringtosignuserdelegationkey[8].json | 106 +++- ...turesstringtosignuserdelegationkey[9].json | 106 +++- ...vicesassignaturevaluesnetworktestfile.json | 122 ++-- ...ssignaturevaluesnetworktestfilesystem.json | 140 +++-- ...esnetworktestfilesystemuserdelegation.json | 132 +++-- ...revaluesnetworktestfileuserdelegation.json | 134 ++--- .../swagger/README.md | 8 + .../azure-storage-file-share/CHANGELOG.md | 2 + sdk/storage/azure-storage-file-share/pom.xml | 4 +- .../storage/file/share/FileConfiguration.java | 15 - .../storage/file/share/ShareAsyncClient.java | 30 + .../azure/storage/file/share/ShareClient.java | 28 + .../file/share/ShareClientBuilder.java | 5 +- .../file/share/ShareDirectoryAsyncClient.java | 30 + .../file/share/ShareDirectoryClient.java | 28 + .../file/share/ShareFileAsyncClient.java | 30 + .../storage/file/share/ShareFileClient.java | 28 + .../file/share/ShareFileClientBuilder.java | 5 +- .../file/share/ShareServiceAsyncClient.java | 31 + .../file/share/ShareServiceClient.java | 29 + .../file/share/ShareServiceClientBuilder.java | 5 +- .../implementation/util/BuilderHelper.java | 11 +- .../implementation/util/ShareSasImplUtil.java | 232 ++++++++ .../sas/ShareServiceSasQueryParameters.java | 24 + .../sas/ShareServiceSasSignatureValues.java | 78 ++- .../azure-storage-file-share.properties | 2 + ...SasSignatureValuesJavaDocCodeSnippets.java | 53 -- .../share/ShareAsyncJavaDocCodeSamples.java | 18 + ...ShareDirectoryAsyncJavaDocCodeSamples.java | 18 + .../ShareDirectoryJavaDocCodeSamples.java | 18 + .../ShareFileAsyncJavaDocCodeSamples.java | 18 + .../share/ShareFileJavaDocCodeSamples.java | 18 + .../file/share/ShareJavaDocCodeSamples.java | 18 + .../ShareServiceAsyncJavaDocCodeSamples.java | 26 + .../share/ShareServiceJavaDocCodeSamples.java | 25 + .../azure/storage/file/share/APISpec.groovy | 95 ++- .../storage/file/share/FileSASTests.groovy | 36 ++ .../file/share/FileSasClientTests.groovy | 184 ++++++ .../FileShareUserAgentPropertiesTest.groovy | 18 + ...ntSASNetworkAccountSasTokenOnEndpoint.json | 90 +++ ...stsAccountSASNetworkCreateDeleteShare.json | 94 +++ ...TestsFileSASNetworkTestDownloadUpload.json | 141 +++++ ...entTestsFileSASNetworkTestUploadFails.json | 96 ++++ ...sShareSASNetworkIdentifierPermissions.json | 172 ++++++ .../azure-storage-queue-cryptography/pom.xml | 213 ------- sdk/storage/azure-storage-queue/CHANGELOG.md | 3 + sdk/storage/azure-storage-queue/pom.xml | 4 +- .../azure/storage/queue/QueueAsyncClient.java | 30 + .../com/azure/storage/queue/QueueClient.java | 28 + .../storage/queue/QueueConfiguration.java | 15 - .../queue/QueueServiceAsyncClient.java | 31 + .../storage/queue/QueueServiceClient.java | 30 + .../implementation/util/BuilderHelper.java | 11 +- .../implementation/util/QueueSasImplUtil.java | 155 +++++ .../sas/QueueServiceSasQueryParameters.java | 12 + .../sas/QueueServiceSasSignatureValues.java | 66 ++- .../resources/azure-storage-queue.properties | 2 + .../queue/QueueAsyncJavaDocCodeSamples.java | 17 + .../queue/QueueJavaDocCodeSamples.java | 17 + .../QueueServiceAsyncJavaDocCodeSamples.java | 27 + .../queue/QueueServiceJavaDocCodeSamples.java | 26 + ...SasSignatureValuesJavaDocCodeSnippets.java | 46 -- .../com/azure/storage/queue/APISpec.groovy | 81 ++- .../azure/storage/queue/QueueSASTests.groovy | 37 ++ .../storage/queue/QueueSasClientTests.groovy | 201 +++++++ .../queue/QueueUserAgentPropertiesTest.groovy | 19 + ...ntSASNetworkAccountSasTokenOnEndpoint.json | 42 ++ ...QueueServiceSASCreateQueueDeleteQueue.json | 83 +++ ...sTestAccountQueueServiceSASListQueues.json | 45 ++ ...tQueueSASEnqueueDequeueWithIdentifier.json | 109 ++++ ...QueueSASEnqueueDequeueWithPermissions.json | 112 ++++ ...stQueueSASUpdateDeleteWithPermissions.json | 111 ++++ sdk/storage/ci.yml | 3 - sdk/storage/mgmt-v2019_06_01/pom.xml | 2 +- .../v2019_06_01/BlobServiceProperties.java | 10 +- .../v2019_06_01/DeleteRetentionPolicy.java | 14 +- .../storage/v2019_06_01/Endpoints.java | 52 ++ .../v2019_06_01/FileServiceProperties.java | 43 +- .../storage/v2019_06_01/FileShare.java | 4 +- .../storage/v2019_06_01/RoutingChoice.java | 41 ++ .../v2019_06_01/RoutingPreference.java | 100 ++++ .../{Sku.java => SkuInformation.java} | 6 +- .../management/storage/v2019_06_01/Skus.java | 2 +- .../storage/v2019_06_01/StorageAccount.java | 35 +- .../StorageAccountCreateParameters.java | 27 + .../StorageAccountInternetEndpoints.java | 78 +++ .../StorageAccountMicrosoftEndpoints.java | 108 ++++ .../StorageAccountUpdateParameters.java | 27 + .../BlobServicePropertiesImpl.java | 5 + .../BlobServicePropertiesInner.java | 21 +- .../FileServicePropertiesImpl.java | 33 +- .../FileServicePropertiesInner.java | 42 ++ .../implementation/FileServicesInner.java | 23 +- .../implementation/FileShareInner.java | 7 +- .../implementation/FileShareItemInner.java | 7 +- .../implementation/FileSharesInner.java | 16 +- .../{SkuImpl.java => SkuInformationImpl.java} | 6 +- .../implementation/SkuInformationInner.java | 169 ++++++ .../v2019_06_01/implementation/SkuInner.java | 106 +--- .../v2019_06_01/implementation/SkusImpl.java | 26 +- .../v2019_06_01/implementation/SkusInner.java | 42 +- .../implementation/StorageAccountImpl.java | 26 +- .../implementation/StorageAccountInner.java | 28 + .../implementation/StorageAccountsInner.java | 2 - .../StorageManagementClientImpl.java | 2 + sdk/storage/pom.service.xml | 1 - sdk/storage/tests.yml | 4 + 537 files changed, 25823 insertions(+), 6241 deletions(-) create mode 100644 eng/code-quality-reports/src/main/resources/revapi/revapi.json delete mode 100644 packages.md create mode 100644 sdk/core/azure-core-test/src/main/java/com/azure/core/test/TestContextManager.java create mode 100644 sdk/core/azure-core-test/src/main/java/com/azure/core/test/annotation/DoNotRecord.java create mode 100644 sdk/core/azure-core-test/src/main/java/com/azure/core/test/annotation/package-info.java create mode 100644 sdk/core/azure-core-test/src/test/java/com/azure/core/test/FakeTestClass.java create mode 100644 sdk/core/azure-core-test/src/test/java/com/azure/core/test/InterceptorManagerTests.java create mode 100644 sdk/core/azure-core-test/src/test/java/com/azure/core/test/TestContextManagerTests.java create mode 100644 sdk/core/azure-core-test/src/test/java/com/azure/core/test/utils/TestResourceNamerTests.java create mode 100644 sdk/core/azure-core/src/main/java/com/azure/core/http/policy/AddHeadersFromContextPolicy.java create mode 100644 sdk/core/azure-core/src/samples/java/com/azure/core/http/policy/RequestIdPolicyJavaDocCodeSnippet.java create mode 100644 sdk/core/azure-core/src/test/java/com/azure/core/http/policy/AddHeadersFromContextPolicyTest.java create mode 100644 sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/CassandraKeyspaceGetPropertiesResource.java create mode 100644 sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/CassandraTableGetPropertiesResource.java create mode 100644 sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/CompositePath.java create mode 100644 sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/CompositePathSortOrder.java create mode 100644 sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/GremlinDatabaseGetPropertiesResource.java create mode 100644 sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/GremlinGraphGetPropertiesResource.java create mode 100644 sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/MongoDBCollectionGetPropertiesResource.java create mode 100644 sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/MongoDBDatabaseGetPropertiesResource.java create mode 100644 sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/SpatialSpec.java create mode 100644 sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/SpatialType.java create mode 100644 sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/SqlContainerGetPropertiesResource.java create mode 100644 sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/SqlDatabaseGetPropertiesResource.java create mode 100644 sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/SqlStoredProcedureGetPropertiesResource.java create mode 100644 sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/SqlTriggerGetPropertiesResource.java create mode 100644 sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/SqlUserDefinedFunctionGetPropertiesResource.java create mode 100644 sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/TableGetPropertiesResource.java create mode 100644 sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/ThroughputSettingsGetPropertiesResource.java rename sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/{CosmosDBImpl.java => CosmosDBManagementClientImpl.java} (92%) create mode 100644 sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-blob/src/samples/README.md create mode 100644 sdk/eventhubs/azure-messaging-eventhubs/src/main/resources/azure-messaging-eventhubs.properties create mode 100644 sdk/eventhubs/azure-messaging-eventhubs/src/samples/README.md delete mode 100644 sdk/keyvault/azure-security-keyvault-certificates/src/main/java/com/azure/security/keyvault/certificates/AzureKeyVaultConfiguration.java create mode 100644 sdk/keyvault/azure-security-keyvault-certificates/src/main/resources/azure-key-vault-certificates.properties create mode 100644 sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/SecretKey.java create mode 100644 sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/SecretProperties.java create mode 100644 sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/SecretRequestAttributes.java create mode 100644 sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/SecretRequestParameters.java delete mode 100644 sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/implementation/AzureKeyVaultConfiguration.java create mode 100644 sdk/keyvault/azure-security-keyvault-keys/src/main/resources/azure-key-vault-keys.properties create mode 100644 sdk/keyvault/azure-security-keyvault-keys/src/test/java/com/azure/security/keyvault/keys/KeyVaultKeysUserAgentPropertiesTest.java create mode 100644 sdk/keyvault/azure-security-keyvault-keys/src/test/java/com/azure/security/keyvault/keys/cryptography/KeyEncryptionKeyClientTest.java create mode 100644 sdk/keyvault/azure-security-keyvault-keys/src/test/java/com/azure/security/keyvault/keys/cryptography/KeyEncryptionKeyClientTestBase.java create mode 100644 sdk/keyvault/azure-security-keyvault-keys/src/test/resources/session-records/wrapUnwrapSymmetricAK128.json create mode 100644 sdk/keyvault/azure-security-keyvault-keys/src/test/resources/session-records/wrapUnwrapSymmetricAK192.json delete mode 100644 sdk/keyvault/azure-security-keyvault-secrets/src/main/java/com/azure/security/keyvault/secrets/AzureKeyVaultConfiguration.java create mode 100644 sdk/keyvault/azure-security-keyvault-secrets/src/main/resources/azure-key-vault-secrets.properties create mode 100644 sdk/keyvault/azure-security-keyvault-secrets/src/test/java/com/azure/security/keyvault/secrets/KeyVaultSecretsUserAgentPropertiesTest.java delete mode 100644 sdk/storage/azure-storage-blob-cryptography/src/main/java/com/azure/storage/blob/specialized/cryptography/BlobCryptographyConfiguration.java create mode 100644 sdk/storage/azure-storage-blob-cryptography/src/main/resources/azure-storage-blob-cryptography.properties create mode 100644 sdk/storage/azure-storage-blob-cryptography/src/test/java/com/azure/storage/blob/specialized/cryptography/BlobCryptographyUserAgentPropertiesTest.groovy create mode 100644 sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/BlobSasImplUtil.java create mode 100644 sdk/storage/azure-storage-blob/src/main/resources/azure-storage-blob.properties delete mode 100644 sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlobServiceSasSignatureValuesJavaDocCodeSnippets.java create mode 100644 sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobUserAgentPropertiesTest.groovy create mode 100644 sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/SasClientTests.groovy create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsasnetworkaccountsastokenonendpoint.json create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsaccountsasnetworkcreatecontainerfails.json create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsaccountsasnetworkcreatecontainersucceeds.json create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsaccountsasnetworktestblobdeletefailsnewapi.json create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsaccountsasnetworktestblobread.json create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosign[0].json create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosign[1].json create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosign[2].json create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosign[3].json create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosign[4].json create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosign[5].json create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosign[6].json create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosign[7].json create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosign[8].json create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosign[9].json create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosignuserdelegationkey[0].json create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosignuserdelegationkey[10].json create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosignuserdelegationkey[11].json create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosignuserdelegationkey[12].json create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosignuserdelegationkey[13].json create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosignuserdelegationkey[14].json create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosignuserdelegationkey[1].json create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosignuserdelegationkey[2].json create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosignuserdelegationkey[3].json create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosignuserdelegationkey[4].json create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosignuserdelegationkey[5].json create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosignuserdelegationkey[6].json create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosignuserdelegationkey[7].json create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosignuserdelegationkey[8].json create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosignuserdelegationkey[9].json create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobservicesasnetworktestblobsnapshot.json create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsensurestateillegalargument.json create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsensurestateresourceandpermission[0].json create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsensurestateresourceandpermission[1].json create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsensurestateresourceandpermission[2].json create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsensurestateversion.json create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsnetworktestblobsas.json create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsnetworktestblobsnapshot.json create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsnetworktestblobsnapshotuserdelegation.json create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsnetworktestblobuserdelegation.json create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsnetworktestcontaineruserdelegation.json create mode 100644 sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsservicesassignaturevaluesnetworktestcontainer.json create mode 100644 sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/implementation/AccountSasImplUtil.java create mode 100644 sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/implementation/SasImplUtils.java create mode 100644 sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/sas/CommonSasQueryParameters.java delete mode 100644 sdk/storage/azure-storage-common/src/samples/java/com/azure/storage/common/sas/AccountSasSignatureValuesJavaDocCodeSnippets.java delete mode 100644 sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/sas/DataLakeServiceSasQueryParameters.java create mode 100644 sdk/storage/azure-storage-file-datalake/src/main/resources/azure-storage-file-datalake.properties delete mode 100644 sdk/storage/azure-storage-file-datalake/src/samples/java/com/azure/storage/file/datalake/DataLakeServiceSasSignatureValuesJavaDocCodeSnippets.java create mode 100644 sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestaccountsasnetworkaccountsastokenonendpoint.json create mode 100644 sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestsasimplutilstringtosign[0].json create mode 100644 sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestsasimplutilstringtosign[1].json create mode 100644 sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestsasimplutilstringtosign[2].json create mode 100644 sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestsasimplutilstringtosign[3].json create mode 100644 sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestsasimplutilstringtosign[4].json create mode 100644 sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestsasimplutilstringtosign[5].json create mode 100644 sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestsasimplutilstringtosign[6].json create mode 100644 sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestsasimplutilstringtosign[7].json create mode 100644 sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestsasimplutilstringtosign[8].json create mode 100644 sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestsasimplutilstringtosignuserdelegationkey[0].json create mode 100644 sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestsasimplutilstringtosignuserdelegationkey[10].json create mode 100644 sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestsasimplutilstringtosignuserdelegationkey[11].json create mode 100644 sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestsasimplutilstringtosignuserdelegationkey[12].json create mode 100644 sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestsasimplutilstringtosignuserdelegationkey[13].json create mode 100644 sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestsasimplutilstringtosignuserdelegationkey[1].json create mode 100644 sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestsasimplutilstringtosignuserdelegationkey[2].json create mode 100644 sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestsasimplutilstringtosignuserdelegationkey[3].json create mode 100644 sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestsasimplutilstringtosignuserdelegationkey[4].json create mode 100644 sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestsasimplutilstringtosignuserdelegationkey[5].json create mode 100644 sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestsasimplutilstringtosignuserdelegationkey[6].json create mode 100644 sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestsasimplutilstringtosignuserdelegationkey[7].json create mode 100644 sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestsasimplutilstringtosignuserdelegationkey[8].json create mode 100644 sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestsasimplutilstringtosignuserdelegationkey[9].json delete mode 100644 sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/FileConfiguration.java create mode 100644 sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/implementation/util/ShareSasImplUtil.java create mode 100644 sdk/storage/azure-storage-file-share/src/main/resources/azure-storage-file-share.properties delete mode 100644 sdk/storage/azure-storage-file-share/src/samples/java/com/azure/storage/file/share/FileServiceSasSignatureValuesJavaDocCodeSnippets.java create mode 100644 sdk/storage/azure-storage-file-share/src/test/java/com/azure/storage/file/share/FileSasClientTests.groovy create mode 100644 sdk/storage/azure-storage-file-share/src/test/java/com/azure/storage/file/share/FileShareUserAgentPropertiesTest.groovy create mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/FileSASTestsAccountSASNetworkAccountSasTokenOnEndpoint.json create mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/FileSasClientTestsAccountSASNetworkCreateDeleteShare.json create mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/FileSasClientTestsFileSASNetworkTestDownloadUpload.json create mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/FileSasClientTestsFileSASNetworkTestUploadFails.json create mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/FileSasClientTestsShareSASNetworkIdentifierPermissions.json delete mode 100644 sdk/storage/azure-storage-queue-cryptography/pom.xml delete mode 100644 sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueConfiguration.java create mode 100644 sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/util/QueueSasImplUtil.java create mode 100644 sdk/storage/azure-storage-queue/src/main/resources/azure-storage-queue.properties delete mode 100644 sdk/storage/azure-storage-queue/src/samples/java/com/azure/storage/queue/QueueServiceSasSignatureValuesJavaDocCodeSnippets.java create mode 100644 sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueSasClientTests.groovy create mode 100644 sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueUserAgentPropertiesTest.groovy create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSASTestsAccountSASNetworkAccountSasTokenOnEndpoint.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSasClientTestsTestAccountQueueServiceSASCreateQueueDeleteQueue.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSasClientTestsTestAccountQueueServiceSASListQueues.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSasClientTestsTestQueueSASEnqueueDequeueWithIdentifier.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSasClientTestsTestQueueSASEnqueueDequeueWithPermissions.json create mode 100644 sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSasClientTestsTestQueueSASUpdateDeleteWithPermissions.json create mode 100644 sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/RoutingChoice.java create mode 100644 sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/RoutingPreference.java rename sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/{Sku.java => SkuInformation.java} (87%) create mode 100644 sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/StorageAccountInternetEndpoints.java create mode 100644 sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/StorageAccountMicrosoftEndpoints.java rename sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/{SkuImpl.java => SkuInformationImpl.java} (86%) create mode 100644 sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/SkuInformationInner.java diff --git a/README.md b/README.md index 71c3ec286233..967697a13199 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,11 @@ # Azure SDK for Java -[![Build Status](https://dev.azure.com/azure-sdk/public/_apis/build/status/17?branchName=master)](https://dev.azure.com/azure-sdk/public/_build/latest?definitionId=17) [![Build Documentation](https://img.shields.io/badge/documentation-published-blue.svg)](https://azuresdkartifacts.blob.core.windows.net/azure-sdk-for-java/index.html) [![Dependencies](https://img.shields.io/badge/dependencies-analyzed-blue.svg)](https://azuresdkartifacts.blob.core.windows.net/azure-sdk-for-java/staging/dependencies.html) [![SpotBugs](https://img.shields.io/badge/SpotBugs-Clean-success.svg)](https://azuresdkartifacts.blob.core.windows.net/azure-sdk-for-java/staging/spotbugsXml.html) [![CheckStyle](https://img.shields.io/badge/CheckStyle-Clean-success.svg)](https://azuresdkartifacts.blob.core.windows.net/azure-sdk-for-java/staging/checkstyle-aggregate.html) +[![Packages](https://img.shields.io/badge/packages-latest-blue.svg)](https://azure.github.io/azure-sdk/releases/latest/java.html) [![Dependencies](https://img.shields.io/badge/dependencies-analyzed-blue.svg)](https://azuresdkartifacts.blob.core.windows.net/azure-sdk-for-java/staging/dependencies.html) [![Build Documentation](https://img.shields.io/badge/documentation-published-blue.svg)](https://azuresdkartifacts.blob.core.windows.net/azure-sdk-for-java/index.html) [![SpotBugs](https://img.shields.io/badge/SpotBugs-Clean-success.svg)](https://azuresdkartifacts.blob.core.windows.net/azure-sdk-for-java/staging/spotbugsXml.html) [![CheckStyle](https://img.shields.io/badge/CheckStyle-Clean-success.svg)](https://azuresdkartifacts.blob.core.windows.net/azure-sdk-for-java/staging/checkstyle-aggregate.html) +This repository is intended for active development of the Azure SDK for Java. For consumers of the SDK we recommend visiting our [public developer docs](https://docs.microsoft.com/en-us/java/azure/) or our versioned [developer docs](https://azure.github.io/azure-sdk-for-java). -This repository contains official Java libraries for Azure services. For reference documentation go to [Azure SDK for Java documentation](http://aka.ms/java-docs), and tutorials, samples, quick starts and other documentation, go to [Azure for Java Developers](https://docs.microsoft.com/java/azure/). +### Important -You can find a complete list of all the packages for these libraries [here](packages.md). - -### Important The Azure SDK team is pleased to make available the November 2019 client library General Availability (GA) release. We strongly recommend using the GA libraries in all production environments as these libraries are well tested and officially supported by Microsoft. More details, including installation instructions can be found here [here](https://azure.github.io/azure-sdk/releases/2019-11/java.html). ## Getting started @@ -17,9 +15,11 @@ To get started with a specific library, see the **README.md** file located in th For tutorials, samples, quick starts and other documentation, visit [Azure for Java Developers](https://docs.microsoft.com/java/azure/). ### Prerequisites + Java 8 or later is required to use the November 2019 client libraries, otherwise Java 7 or later is required. ## Latest Release + Each service might have a number of libraries available from each of the following categories: - [Client: GA November 2019 Releases](#Client-GA-November-2019-Releases) @@ -27,7 +27,8 @@ Each service might have a number of libraries available from each of the followi - [Management](#Management) ### Client: GA November 2019 Releases -New wave of packages that were released in November 2019 client library as General Availability (GA) and several others that were released in **preview**. These libraries follow the [Azure SDK Design Guidelines for Java](https://azure.github.io/azure-sdk/java/guidelines/) and share a number of core features such as HTTP retries, logging, transport protocols, authentication protocols, etc., so that once you learn how to use these features in one client library, you will know how to use them in other client libraries. You can learn about these shared features [here](sdk/core/README.md). + +New wave of packages that were released in November 2019 client library as General Availability (GA) and several others that were released in **preview**. These libraries follow the [Azure SDK Design Guidelines for Java](https://azure.github.io/azure-sdk/java/guidelines/) and share a number of core features such as HTTP retries, logging, transport protocols, authentication protocols, etc., so that once you learn how to use these features in one client library, you will know how to use them in other client libraries. You can learn about these shared features [here](sdk/core/README.md). These libraries can be easily identified by sdk/ folder, package, and namespaces names starting with `azure-`, e.g. `azure-keyvault`. @@ -51,12 +52,15 @@ The libraries released in the November 2019 preview: > NOTE: If you need to ensure your code is ready for production use one of the stable, non-preview libraries. ### Client: Previous Versions -Last stable versions of packages that have been provided for usage with Azure and are production-ready. These libraries provide similar functionalities to the preview libraries, as they allow you to use and consume existing resources and interact with them, for example: upload a blob. Stable library directories start with `microsoft-azure-`, e.g. `microsoft-azure-keyvault`. They might not implement the [guidelines](https://azure.github.io/azure-sdk/java_introduction.html) or have the same feature set as the Novemeber releases. They do however offer wider coverage of services. + +Last stable versions of packages that have been provided for usage with Azure and are production-ready. These libraries provide similar functionalities to the preview libraries, as they allow you to use and consume existing resources and interact with them, for example: upload a blob. Stable library directories start with `microsoft-azure-`, e.g. `microsoft-azure-keyvault`. They might not implement the [guidelines](https://azure.github.io/azure-sdk/java_introduction.html) or have the same feature set as the Novemeber releases. They do however offer wider coverage of services. ### Management + Libraries which enable you to provision specific resources. They are responsible for directly mirroring and consuming Azure service's REST endpoints. Management library directories contain `-mgmt-`, e.g. `azure-mgmt-keyvault`. ## Need help? + * For reference documentation visit the [Azure SDK for Java documentation](http://aka.ms/java-docs). * For tutorials, samples, quick starts and other documentation, visit [Azure for Java Developers](https://docs.microsoft.com/java/azure/). * For build reports on code quality, test coverage, etc, visit [Azure Java SDK](https://azuresdkartifacts.blob.core.windows.net/azure-sdk-for-java/index.html). @@ -64,14 +68,17 @@ Libraries which enable you to provision specific resources. They are responsible * Check [previous questions](https://stackoverflow.com/questions/tagged/azure-java-sdk) or ask new ones on StackOverflow using `azure-java-sdk` tag. ## Navigating the repository + ### Master branch The master branch has the most recent code with new features and bug fixes. It does **not** represent latest released **GA** SDK. See [above](#Client-GA-November-2019-Releases) for latest **GA** release.
### Release branches (Release tagging) + For each package we release there will be a unique git tag created that contains the name and the version of the package to mark the commit of the code that produced the package. This tag will be used for servicing via hotfix branches as well as debugging the code for a particular preview or stable release version. Format of the release tags are `_`. For more information please see [our branching strategy](https://github.com/Azure/azure-sdk/blob/master/docs/policies/repobranching.md#release-tagging). ## Contributing + For details on contributing to this repository, see the [contributing guide](CONTRIBUTING.md). This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit @@ -81,8 +88,8 @@ When you submit a pull request, a CLA-bot will automatically determine whether y This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. +### Additional Helpful Links for Contributors -### Additional Helpful Links for Contributors Many people all over the world have helped make this project better. You'll want to check out: * [What are some good first issues for new contributors to the repo?](https://github.com/azure/azure-sdk-for-java/issues?q=is%3Aopen+is%3Aissue+label%3A%22up+for+grabs%22) diff --git a/eng/code-quality-reports/src/main/resources/revapi/revapi.json b/eng/code-quality-reports/src/main/resources/revapi/revapi.json new file mode 100644 index 000000000000..02f850424869 --- /dev/null +++ b/eng/code-quality-reports/src/main/resources/revapi/revapi.json @@ -0,0 +1,89 @@ +[ + { + "extension": "revapi.java", + "configuration": { + "filter": { + "packages": { + "regex": true, + "exclude": [ "com\\.azure\\..+\\.implementation(\\..+)?" ] + } + } + } + }, + { + "extension": "revapi.semver.ignore", + "configuration": { + "enabled": true, + "versionIncreaseAllows": { + "major": "breaking", + "minor": "nonBreaking", + "patch": "equivalent" + }, + "passThroughDifferences": [ "java.class.nonPublicPartOfAPI" ] + } + }, + { + "extension": "revapi.ignore", + "configuration": [ + { + "regex": true, + "code": "java\\.missing\\.(oldClass|newClass)", + "new": "missing\\-class org\\.reactivestreams\\.Publisher", + "justification": "This class is part of the reactive streams initiative in Java." + }, + { + "regex": true, + "code": "java\\.missing\\.(oldClass|newClass)", + "new": "missing\\-class reactor\\.util\\.context\\.Context", + "justification": "Reactor is allowed in the public API. Since we don't analyze dependencies, these show up as being unresolved." + }, + { + "regex": true, + "code": "java\\.missing\\.(oldClass|newClass)", + "new": "missing\\-class com\\.fasterxml\\.jackson\\.databind\\.ObjectMapper", + "exampleUseChainInNewApi": ".*com\\.azure\\.core\\.util\\.serializer\\.JacksonAdapter.*", + "justification": "We allow this in com.azure.core.util.serializer.JacksonAdapter." + }, + { + "regex": true, + "code": "java\\.missing\\.(oldClass|newClass)", + "new": "missing\\-class reactor\\.core(\\..+)?", + "justification": "Reactor is allowed in the public API. Since we don't analyze dependencies, these show up as being unresolved." + }, + { + "regex": true, + "code": "java\\.missing\\.(oldClass|newClass)", + "new": "missing\\-class com\\.azure\\.core(?!\\.implementation)(\\..+)?", + "justification": "com.azure.core.* classes are allowed in the public API. Since we don't analyze dependencies, these show up as being unresolved." + }, + { + "regex": true, + "code": "java\\.missing\\.(oldClass|newClass)", + "new": "missing\\-class (io|reactor)\\.netty\\..+", + "exampleUseChainInOldApi": ".*com\\.azure\\.core\\.http\\.netty\\.NettyAsyncHttpClientBuilder.*", + "justification": "Dependencies are not checked. io.netty and reactor.netty are allowed in azure-core-http-netty." + }, + { + "regex": true, + "code": "java\\.missing\\.(oldClass|newClass)", + "new": "missing\\-class okhttp3\\..+", + "exampleUseChainInOldApi": ".*com\\.azure\\.core\\.http\\.okhttp\\.OkHttpAsyncHttpClientBuilder.*", + "justification": "Dependencies are not checked. okhttp3 is allowed in azure-core-http-okhttp." + }, + { + "regex": true, + "code": "java\\.missing\\.(oldClass|newClass)", + "new": "missing\\-class com\\.azure\\.storage\\..+", + "exampleUseChainInOldApi": ".*com\\.azure\\.storage\\..*", + "justification": "Dependencies are not checked. azure-storage-common is used in the storage modules." + }, + { + "regex": true, + "code": "java\\.missing\\.(oldClass|newClass)", + "new": "missing\\-class ((com\\.azure\\.messaging\\.eventhubs\\.models\\..+)|(com\\.azure\\.storage\\.blob\\.BlobContainerAsyncClient))", + "exampleUseChainInNewApi": ".*com\\.azure\\.messaging\\.eventhubs\\.checkpointstore\\.blob\\..*", + "justification": "azure-messaging-eventhubs and azure-storage-blob are used in the Event Hubs checkpoint store." + } + ] + } +] diff --git a/eng/code-quality-reports/src/main/resources/spotbugs/spotbugs-exclude.xml b/eng/code-quality-reports/src/main/resources/spotbugs/spotbugs-exclude.xml index 42061ffd305c..78823a5fbb88 100755 --- a/eng/code-quality-reports/src/main/resources/spotbugs/spotbugs-exclude.xml +++ b/eng/code-quality-reports/src/main/resources/spotbugs/spotbugs-exclude.xml @@ -492,6 +492,7 @@ + @@ -531,6 +532,10 @@ + + + + diff --git a/eng/jacoco-test-coverage/pom.xml b/eng/jacoco-test-coverage/pom.xml index 65605aac4bd1..10eeb49f1126 100644 --- a/eng/jacoco-test-coverage/pom.xml +++ b/eng/jacoco-test-coverage/pom.xml @@ -39,17 +39,17 @@ com.azure azure-core - 1.1.0 + 1.2.0-beta.1 com.azure azure-core-amqp - 1.0.0-beta.8 + 1.0.0-beta.9 com.azure azure-core-http-netty - 1.1.0 + 1.2.0-beta.1 com.azure @@ -70,22 +70,22 @@ com.azure azure-core-tracing-opencensus - 1.0.0-beta.5 + 1.0.0-beta.6 com.azure azure-data-appconfiguration - 1.0.0-beta.7 + 1.0.0-beta.8 com.azure azure-identity - 1.0.1 + 1.1.0-beta.1 com.azure azure-security-keyvault-certificates - 4.0.0-beta.6 + 4.0.0-beta.7 com.azure @@ -95,57 +95,52 @@ com.azure azure-security-keyvault-secrets - 4.0.1 + 4.1.0-beta.1 com.azure azure-messaging-eventhubs - 5.0.0-beta.6 + 5.0.0-beta.7 com.azure azure-messaging-eventhubs-checkpointstore-blob - 1.0.0-beta.4 + 1.0.0-beta.5 com.azure azure-storage-common - 12.1.0 + 12.2.0-beta.1 com.azure azure-storage-blob - 12.1.0 + 12.2.0-beta.1 com.azure azure-storage-blob-batch - 12.1.0 + 12.2.0-beta.1 com.azure azure-storage-blob-cryptography - 12.1.0 + 12.2.0-beta.1 com.azure azure-storage-file-share - 12.0.0 + 12.1.0-beta.1 com.azure azure-storage-file-datalake - 12.0.0-beta.7 + 12.0.0-beta.8 com.azure azure-storage-queue - 12.1.0 - - - com.azure - azure-storage-queue-cryptography - 12.0.0-beta.6 + 12.2.0-beta.1 diff --git a/eng/pipelines/templates/jobs/archetype-sdk-client.yml b/eng/pipelines/templates/jobs/archetype-sdk-client.yml index 000376166666..7bb93e757447 100644 --- a/eng/pipelines/templates/jobs/archetype-sdk-client.yml +++ b/eng/pipelines/templates/jobs/archetype-sdk-client.yml @@ -59,14 +59,16 @@ jobs: - ${{ each artifact in parameters.Artifacts }}: - script: | - python3 --version + python3 --version python3 eng/versioning/set_versions.py --update-type all --build-type client --build-qualifier dev.$(Build.BuildNumber) --artifact-id ${{artifact.name}} + python3 eng/versioning/set_versions.py --update-type all --build-type data --build-qualifier dev.$(Build.BuildNumber) --artifact-id ${{artifact.name}} condition: eq(variables['SetDevVersion'],'true') displayName: Append dev package version suffix for ${{artifact.name}} - + - script: | python3 --version python3 eng/versioning/update_versions.py --update-type all --build-type client + python3 eng/versioning/update_versions.py --update-type all --build-type data condition: eq(variables['SetDevVersion'],'true') displayName: Apply version settings to repository @@ -155,7 +157,7 @@ jobs: displayName: 'Install all client libraries (for SpotBugs analysis)' inputs: mavenPomFile: pom.client.xml - options: '$(DefaultOptions) -DskipTests -Dgpg.skip -Dmaven.javadoc.skip=true -Dcheckstyle.skip=true -Dspotbugs.skip=true -Dverify-readme' + options: '$(DefaultOptions) -DskipTests -Dgpg.skip -Dmaven.javadoc.skip=true -Dcheckstyle.skip=true -Dspotbugs.skip=true -Drevapi.skip=true -Dverify-readme' mavenOptions: '$(MemoryOptions) $(LoggingOptions)' javaHomeOption: 'JDKVersion' jdkVersionOption: '1.11' @@ -163,9 +165,9 @@ jobs: publishJUnitResults: false goals: 'install' - # Run SpotBugs, CheckStyle and JavaDoc tools to ensure high code quality - these will fail the build if issues are found + # Run SpotBugs, CheckStyle, Revapi, and JavaDoc tools to ensure high code quality - these will fail the build if issues are found - task: Maven@3 - displayName: 'Run SpotBugs, CheckStyle, and JavaDoc' + displayName: 'Run SpotBugs, CheckStyle, Revapi, and JavaDoc' inputs: mavenPomFile: pom.client.xml options: '-DskipTests -Dgpg.skip' @@ -174,7 +176,7 @@ jobs: jdkVersionOption: '1.11' jdkArchitectureOption: 'x64' publishJUnitResults: false - goals: 'spotbugs:check checkstyle:checkstyle-aggregate javadoc:aggregate' + goals: 'spotbugs:check checkstyle:checkstyle-aggregate revapi:check javadoc:aggregate' # We run a separate SpotBugs aggregate report step here to roll-up all the issues identified per-module - task: Maven@3 @@ -238,6 +240,7 @@ jobs: artifact: reports - job: 'Test' + condition: ne(variables['Skip.Test'], 'true') variables: - template: ../variables/globals.yml diff --git a/eng/spotbugs-aggregate-report/pom.xml b/eng/spotbugs-aggregate-report/pom.xml index c2ddd404b50c..d9460fc279a0 100644 --- a/eng/spotbugs-aggregate-report/pom.xml +++ b/eng/spotbugs-aggregate-report/pom.xml @@ -73,7 +73,6 @@ ..\..\sdk\storage\azure-storage-file-datalake\src\samples\java\com ..\..\sdk\storage\azure-storage-queue\src\main\java\com ..\..\sdk\storage\azure-storage-queue\src\samples\java\com - ..\..\sdk\storage\azure-storage-queue-cryptography\src\main\java\com @@ -123,6 +122,15 @@ + + + org.revapi + revapi-maven-plugin + 0.11.2 + + true + + @@ -139,22 +147,22 @@ com.azure azure-data-appconfiguration - 1.0.0-beta.7 + 1.0.0-beta.8 com.azure azure-core - 1.1.0 + 1.2.0-beta.1 com.azure azure-core-amqp - 1.0.0-beta.8 + 1.0.0-beta.9 com.azure azure-core-http-netty - 1.1.0 + 1.2.0-beta.1 com.azure @@ -174,27 +182,27 @@ com.azure azure-core-tracing-opencensus - 1.0.0-beta.5 + 1.0.0-beta.6 com.azure azure-messaging-eventhubs - 5.0.0-beta.6 + 5.0.0-beta.7 com.azure azure-messaging-eventhubs-checkpointstore-blob - 1.0.0-beta.4 + 1.0.0-beta.5 com.azure azure-identity - 1.0.1 + 1.1.0-beta.1 com.azure azure-security-keyvault-certificates - 4.0.0-beta.6 + 4.0.0-beta.7 com.azure @@ -204,47 +212,42 @@ com.azure azure-security-keyvault-secrets - 4.0.1 + 4.1.0-beta.1 com.azure azure-storage-common - 12.1.0 + 12.2.0-beta.1 com.azure azure-storage-blob - 12.1.0 + 12.2.0-beta.1 com.azure azure-storage-blob-batch - 12.1.0 + 12.2.0-beta.1 com.azure azure-storage-blob-cryptography - 12.1.0 + 12.2.0-beta.1 com.azure azure-storage-file-share - 12.0.0 + 12.1.0-beta.1 com.azure azure-storage-file-datalake - 12.0.0-beta.7 + 12.0.0-beta.8 com.azure azure-storage-queue - 12.1.0 - - - com.azure - azure-storage-queue-cryptography - 12.0.0-beta.6 + 12.2.0-beta.1 org.jacoco jacoco-maven-plugin @@ -340,6 +342,42 @@ build-helper-maven-plugin 3.0.0 + + + + org.revapi + revapi-maven-plugin + 0.11.2 + + + + revapi/revapi.json + + + ^\d+\.\d+\.\d+$ + false + true + + + + com.azure + sdk-build-tools + 1.0.0 + + + org.revapi + revapi-java + 0.20.0 + + + + + + check + + + + @@ -431,10 +469,6 @@ Azure Storage - Queues com.azure.storage.queue* - - Azure Storage Queues - Cryptography - com.azure.storage.queue.cryptography* - Azure Telemetry Azure Telemetry - OpenCensus @@ -515,7 +549,6 @@ - @@ -645,8 +678,37 @@ + + org.revapi + revapi-maven-plugin + 0.11.2 + + + + revapi/revapi.json + + + ^\d+\.\d+\.\d+$ + false + true + + + + + report + + + + false + + report-aggregate + + + + + @@ -1141,6 +1203,5 @@ sdk/storage/azure-storage-file-share sdk/storage/azure-storage-file-datalake sdk/storage/azure-storage-queue - sdk/storage/azure-storage-queue-cryptography diff --git a/sdk/appconfiguration/azure-data-appconfiguration/pom.xml b/sdk/appconfiguration/azure-data-appconfiguration/pom.xml index 56c420d8992d..0a6b96f9b9a9 100644 --- a/sdk/appconfiguration/azure-data-appconfiguration/pom.xml +++ b/sdk/appconfiguration/azure-data-appconfiguration/pom.xml @@ -13,7 +13,7 @@ com.azure azure-data-appconfiguration - 1.0.0-beta.7 + 1.0.0-beta.8 Microsoft Azure client library for App Configuration This package contains the Microsoft Azure App Configuration client library. diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/ConfigurationClient.java b/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/ConfigurationClient.java index d3a3a8b58bbf..cc68fd2e2aa2 100644 --- a/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/ConfigurationClient.java +++ b/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/ConfigurationClient.java @@ -334,7 +334,7 @@ public ConfigurationSetting setReadOnly(String key, String label, boolean isRead * *

Set the setting to read-only with the key-label "prodDBConnection"-"westUS".

* - * {@codesnippet com.azure.data.applicationconfig.configurationclient.setReadOnlyWithResponse#ConfigurationSetting-boolean-Context} + * {@codesnippet com.azure.data.applicationconfig.configurationclient.setReadOnlyWithResponse#ConfigurationSetting-Boolean-Context} * *

Clear read-only of the setting with the key-label "prodDBConnection"-"westUS".

* diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/ConfigurationClientBuilder.java b/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/ConfigurationClientBuilder.java index df4d670d247e..72bbfd03bdfe 100644 --- a/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/ConfigurationClientBuilder.java +++ b/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/ConfigurationClientBuilder.java @@ -76,16 +76,16 @@ public final class ConfigurationClientBuilder { private static final String CONTENT_TYPE_HEADER_VALUE = "application/json"; private static final String ACCEPT_HEADER = "Accept"; private static final String ACCEPT_HEADER_VALUE = "application/vnd.microsoft.azconfig.kv+json"; + // This is properties file's name. private static final String APP_CONFIG_PROPERTIES = "azure-appconfig.properties"; - private static final String NAME = "name"; - private static final String VERSION = "version"; + private static final String SDK_NAME = "name"; + private static final String SDK_VERSION = "version"; private static final RetryPolicy DEFAULT_RETRY_POLICY = new RetryPolicy("retry-after-ms", ChronoUnit.MILLIS); private final ClientLogger logger = new ClientLogger(ConfigurationClientBuilder.class); private final List policies; private final HttpHeaders headers; - private final String clientName; - private final String clientVersion; + private final Map properties; private ConfigurationClientCredentials credential; private TokenCredential tokenCredential; @@ -105,9 +105,7 @@ public ConfigurationClientBuilder() { policies = new ArrayList<>(); httpLogOptions = new HttpLogOptions(); - Map properties = CoreUtils.getProperties(APP_CONFIG_PROPERTIES); - clientName = properties.getOrDefault(NAME, "UnknownName"); - clientVersion = properties.getOrDefault(VERSION, "UnknownVersion"); + properties = CoreUtils.getProperties(APP_CONFIG_PROPERTIES); headers = new HttpHeaders() .put(ECHO_REQUEST_ID_HEADER, "true") @@ -175,8 +173,8 @@ public ConfigurationAsyncClient buildAsyncClient() { // Closest to API goes first, closest to wire goes last. final List policies = new ArrayList<>(); - policies.add(new UserAgentPolicy(httpLogOptions.getApplicationId(), clientName, clientVersion, - buildConfiguration)); + policies.add(new UserAgentPolicy(httpLogOptions.getApplicationId(), properties.get(SDK_NAME), + properties.get(SDK_VERSION), buildConfiguration)); policies.add(new RequestIdPolicy()); policies.add(new AddHeadersPolicy(headers)); policies.add(new AddDatePolicy()); diff --git a/sdk/core/azure-core-amqp/pom.xml b/sdk/core/azure-core-amqp/pom.xml index 176b0b0a73ab..722e663b3512 100644 --- a/sdk/core/azure-core-amqp/pom.xml +++ b/sdk/core/azure-core-amqp/pom.xml @@ -13,7 +13,7 @@ com.azure azure-core-amqp - 1.0.0-beta.8 + 1.0.0-beta.9 jar Microsoft Azure Java Core AMQP Library @@ -57,7 +57,7 @@ com.azure azure-core - 1.1.0 + 1.2.0-beta.1 com.microsoft.azure diff --git a/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/implementation/ClientConstants.java b/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/implementation/ClientConstants.java index e75178ab2cb3..b49ac3bb93ca 100644 --- a/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/implementation/ClientConstants.java +++ b/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/implementation/ClientConstants.java @@ -7,7 +7,7 @@ public final class ClientConstants { public static final String NOT_APPLICABLE = "n/a"; public static final String PRODUCT_NAME = "azsdk-java-eventhubs"; // {x-version-update-start;com.azure:azure-messaging-eventhubs;current} - public static final String CURRENT_JAVA_CLIENT_VERSION = "5.0.0-beta.6"; + public static final String CURRENT_JAVA_CLIENT_VERSION = "5.0.0-beta.7"; // {x-version-update-end} public static final String PLATFORM_INFO = getOSInformation(); public static final String FRAMEWORK_INFO = getFrameworkInfo(); diff --git a/sdk/core/azure-core-http-netty/pom.xml b/sdk/core/azure-core-http-netty/pom.xml index 92a8fc2abb83..c87a49b0ef01 100644 --- a/sdk/core/azure-core-http-netty/pom.xml +++ b/sdk/core/azure-core-http-netty/pom.xml @@ -15,7 +15,7 @@ com.azure azure-core-http-netty jar - 1.1.0 + 1.2.0-beta.1 Microsoft Azure Netty HTTP Client Library This package contains the Netty HTTP client plugin for azure-core. @@ -58,7 +58,7 @@ com.azure azure-core - 1.1.0 + 1.2.0-beta.1 @@ -109,7 +109,7 @@ com.azure azure-core - 1.1.0 + 1.2.0-beta.1 test-jar test diff --git a/sdk/core/azure-core-http-okhttp/pom.xml b/sdk/core/azure-core-http-okhttp/pom.xml index 1161f46d0e18..84eaa3602920 100644 --- a/sdk/core/azure-core-http-okhttp/pom.xml +++ b/sdk/core/azure-core-http-okhttp/pom.xml @@ -59,7 +59,7 @@ com.azure azure-core - 1.1.0 + 1.2.0-beta.1 @@ -72,7 +72,7 @@ com.azure azure-core - 1.1.0 + 1.2.0-beta.1 test-jar test diff --git a/sdk/core/azure-core-management/pom.xml b/sdk/core/azure-core-management/pom.xml index d07b1b640436..c71d8805b64f 100644 --- a/sdk/core/azure-core-management/pom.xml +++ b/sdk/core/azure-core-management/pom.xml @@ -57,7 +57,7 @@ com.azure azure-core - 1.1.0 + 1.2.0-beta.1 @@ -82,7 +82,7 @@ com.azure azure-core-http-netty - 1.1.0 + 1.2.0-beta.1 test diff --git a/sdk/core/azure-core-test/pom.xml b/sdk/core/azure-core-test/pom.xml index 7b8789f9786e..45501824e370 100644 --- a/sdk/core/azure-core-test/pom.xml +++ b/sdk/core/azure-core-test/pom.xml @@ -59,6 +59,12 @@ 5.4.2 test + + org.junit.jupiter + junit-jupiter-params + 5.4.2 + test + org.slf4j slf4j-api @@ -137,6 +143,16 @@ + + + + org.revapi + revapi-maven-plugin + 0.11.2 + + true + + diff --git a/sdk/core/azure-core-test/src/main/java/com/azure/core/test/InterceptorManager.java b/sdk/core/azure-core-test/src/main/java/com/azure/core/test/InterceptorManager.java index 5b07dd205165..2c411e68b96e 100644 --- a/sdk/core/azure-core-test/src/main/java/com/azure/core/test/InterceptorManager.java +++ b/sdk/core/azure-core-test/src/main/java/com/azure/core/test/InterceptorManager.java @@ -14,6 +14,7 @@ import java.io.File; import java.io.IOException; +import java.io.UncheckedIOException; import java.net.URL; import java.util.HashMap; import java.util.Map; @@ -21,14 +22,16 @@ /** * A class that keeps track of network calls by either reading the data from an existing test session record or - * recording the network calls in memory. Test session records are saved or read from: - * "session-records/{@code testName}.json" + * recording the network calls in memory. Test session records are saved or read from: "session-records/{@code + * testName}.json" * *
    *
  • If the {@code testMode} is {@link TestMode#PLAYBACK}, the manager tries to find an existing test session * record to read network calls from.
  • *
  • If the {@code testMode} is {@link TestMode#RECORD}, the manager creates a new test session record and saves * all the network calls to it.
  • + *
  • If the {@code testMode} is {@link TestMode#LIVE}, the manager won't attempt to read or create a test session + * record.
  • *
* * When the {@link InterceptorManager} is disposed, if the {@code testMode} is {@link TestMode#RECORD}, the network @@ -41,6 +44,8 @@ public class InterceptorManager implements AutoCloseable { private final Map textReplacementRules; private final String testName; private final TestMode testMode; + private final boolean allowedToReadRecordedValues; + private final boolean allowedToRecordValues; // Stores a map of all the HTTP properties in a session // A state machine ensuring a test is always reset before another one is setup @@ -60,44 +65,104 @@ public class InterceptorManager implements AutoCloseable { * * @param testName Name of the test session record. * @param testMode The {@link TestMode} for this interceptor. - * @throws IOException If {@code testMode} is {@link TestMode#PLAYBACK} and an existing test session record could - * not be located or the data could not be deserialized into an instance of {@link RecordedData}. + * @throws UncheckedIOException If {@code testMode} is {@link TestMode#PLAYBACK} and an existing test session record + * could not be located or the data could not be deserialized into an instance of {@link RecordedData}. * @throws NullPointerException If {@code testName} is {@code null}. + * @deprecated Use {@link #InterceptorManager(TestContextManager)} instead. */ - public InterceptorManager(String testName, TestMode testMode) throws IOException { + @Deprecated + public InterceptorManager(String testName, TestMode testMode) { + this(testName, testMode, false); + } + + /** + * Creates a new InterceptorManager that either replays test-session records or saves them. + * + *
    + *
  • If {@code testMode} is {@link TestMode#PLAYBACK}, the manager tries to find an existing test session + * record to read network calls from.
  • + *
  • If {@code testMode} is {@link TestMode#RECORD}, the manager creates a new test session record and saves + * all the network calls to it.
  • + *
  • If {@code testMode} is {@link TestMode#LIVE}, the manager won't attempt to read or create a test session + * record.
  • + *
+ * + * The test session records are persisted in the path: "session-records/{@code testName}.json" + * + * @param testContextManager Contextual information about the test being ran, such as test name, {@link TestMode}, + * and others. + * @throws UncheckedIOException If {@code testMode} is {@link TestMode#PLAYBACK} and an existing test session record + * could not be located or the data could not be deserialized into an instance of {@link RecordedData}. + * @throws NullPointerException If {@code testName} is {@code null}. + */ + public InterceptorManager(TestContextManager testContextManager) { + this(testContextManager.getTestName(), testContextManager.getTestMode(), testContextManager.doNotRecordTest()); + } + + private InterceptorManager(String testName, TestMode testMode, boolean doNotRecord) { Objects.requireNonNull(testName, "'testName' cannot be null."); this.testName = testName; this.testMode = testMode; this.textReplacementRules = new HashMap<>(); - this.recordedData = testMode == TestMode.PLAYBACK - ? readDataFromFile() - : new RecordedData(); + this.allowedToReadRecordedValues = (testMode == TestMode.PLAYBACK && !doNotRecord); + this.allowedToRecordValues = (testMode == TestMode.RECORD && !doNotRecord); + + if (allowedToReadRecordedValues) { + this.recordedData = readDataFromFile(); + } else if (allowedToRecordValues) { + this.recordedData = new RecordedData(); + } else { + this.recordedData = null; + } } /** * Creates a new InterceptorManager that replays test session records. It takes a set of - * {@code textReplacementRules}, that can be used by {@link PlaybackClient} to replace values in a - * {@link NetworkCallRecord#getResponse()}. + * {@code textReplacementRules}, that can be used by {@link PlaybackClient} to replace values in a {@link + * NetworkCallRecord#getResponse()}. * * The test session records are read from: "session-records/{@code testName}.json" * * @param testName Name of the test session record. - * @param textReplacementRules A set of rules to replace text in {@link NetworkCallRecord#getResponse()} when playing - * back network calls. - * @throws IOException An existing test session record could not be located or the data could not be deserialized - * into an instance of {@link RecordedData}. + * @param textReplacementRules A set of rules to replace text in {@link NetworkCallRecord#getResponse()} when + * playing back network calls. + * @throws UncheckedIOException An existing test session record could not be located or the data could not be + * deserialized into an instance of {@link RecordedData}. * @throws NullPointerException If {@code testName} or {@code textReplacementRules} is {@code null}. + * @deprecated Use {@link #InterceptorManager(String, Map, boolean)} instead. */ - public InterceptorManager(String testName, Map textReplacementRules) throws IOException { + @Deprecated + public InterceptorManager(String testName, Map textReplacementRules) { + this(testName, textReplacementRules, false); + } + + /** + * Creates a new InterceptorManager that replays test session records. It takes a set of + * {@code textReplacementRules}, that can be used by {@link PlaybackClient} to replace values in a {@link + * NetworkCallRecord#getResponse()}. + * + * The test session records are read from: "session-records/{@code testName}.json" + * + * @param testName Name of the test session record. + * @param textReplacementRules A set of rules to replace text in {@link NetworkCallRecord#getResponse()} when + * playing back network calls. + * @param doNotRecord Flag indicating whether network calls should be record or played back. + * @throws UncheckedIOException An existing test session record could not be located or the data could not be + * deserialized into an instance of {@link RecordedData}. + * @throws NullPointerException If {@code testName} or {@code textReplacementRules} is {@code null}. + */ + public InterceptorManager(String testName, Map textReplacementRules, boolean doNotRecord) { Objects.requireNonNull(testName, "'testName' cannot be null."); Objects.requireNonNull(textReplacementRules, "'textReplacementRules' cannot be null."); this.testName = testName; this.testMode = TestMode.PLAYBACK; + this.allowedToReadRecordedValues = !doNotRecord; + this.allowedToRecordValues = false; - this.recordedData = readDataFromFile(); + this.recordedData = allowedToReadRecordedValues ? readDataFromFile() : null; this.textReplacementRules = textReplacementRules; } @@ -120,7 +185,8 @@ public RecordedData getRecordedData() { } /** - * Gets a new HTTP pipeline policy that records network calls and its data is managed by {@link InterceptorManager}. + * Gets a new HTTP pipeline policy that records network calls and its data is managed by {@link + * InterceptorManager}. * * @return HttpPipelinePolicy to record network calls. */ @@ -145,27 +211,24 @@ public HttpClient getPlaybackClient() { */ @Override public void close() { - switch (testMode) { - case RECORD: - try { - writeDataToFile(); - } catch (IOException e) { - logger.error("Unable to write data to playback file.", e); - } - break; - case PLAYBACK: - // Do nothing - break; - default: - logger.error("==> Unknown AZURE_TEST_MODE: {}", testMode); - break; + if (allowedToRecordValues) { + try { + writeDataToFile(); + } catch (IOException e) { + logger.error("Unable to write data to playback file.", e); + } } } - private RecordedData readDataFromFile() throws IOException { + private RecordedData readDataFromFile() { File recordFile = getRecordFile(testName); ObjectMapper mapper = new ObjectMapper().enable(SerializationFeature.INDENT_OUTPUT); - return mapper.readValue(recordFile, RecordedData.class); + + try { + return mapper.readValue(recordFile, RecordedData.class); + } catch (IOException ex) { + throw logger.logExceptionAsWarning(new UncheckedIOException(ex)); + } } /* @@ -183,10 +246,11 @@ private File getRecordFile(String testName) { File playbackFile = new File(getRecordFolder(), testName + ".json"); if (!playbackFile.exists()) { - throw logger.logExceptionAsError(new RuntimeException(String.format( - "Missing playback file. File path: %s. ", playbackFile))); + throw logger.logExceptionAsError(new RuntimeException(String.format( + "Missing playback file. File path: %s. ", playbackFile.getPath()))); } - logger.info("==> Playback file path: " + playbackFile); + + logger.info("==> Playback file path: " + playbackFile.getPath()); return playbackFile; } @@ -218,7 +282,8 @@ private File createRecordFile(String testName) throws IOException { } /** - * Add text replacement rule (regex as key, the replacement text as value) into {@link InterceptorManager#textReplacementRules} + * Add text replacement rule (regex as key, the replacement text as value) into {@link + * InterceptorManager#textReplacementRules} * * @param regex the pattern to locate the position of replacement * @param replacement the replacement text diff --git a/sdk/core/azure-core-test/src/main/java/com/azure/core/test/TestBase.java b/sdk/core/azure-core-test/src/main/java/com/azure/core/test/TestBase.java index e1d16afb4d10..a1294ddebbe4 100644 --- a/sdk/core/azure-core-test/src/main/java/com/azure/core/test/TestBase.java +++ b/sdk/core/azure-core-test/src/main/java/com/azure/core/test/TestBase.java @@ -2,21 +2,21 @@ // Licensed under the MIT License. package com.azure.core.test; -import com.azure.core.util.Configuration; import com.azure.core.test.utils.TestResourceNamer; +import com.azure.core.util.Configuration; import com.azure.core.util.logging.ClientLogger; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.BeforeAll; - -import java.io.IOException; -import java.lang.reflect.Method; -import java.util.Locale; +import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.TestInfo; import org.junit.jupiter.api.extension.BeforeEachCallback; import org.junit.jupiter.api.extension.ExtensionContext; +import java.io.UncheckedIOException; +import java.lang.reflect.Method; +import java.util.Locale; + /** * Base class for running live and playback tests using {@link InterceptorManager}. */ @@ -29,6 +29,8 @@ public abstract class TestBase implements BeforeEachCallback { protected InterceptorManager interceptorManager; protected TestResourceNamer testResourceNamer; + protected TestContextManager testContextManager; + private ExtensionContext extensionContext; /** @@ -53,16 +55,16 @@ public void beforeEach(ExtensionContext extensionContext) { */ @BeforeEach public void setupTest(TestInfo testInfo) { - final String testName = testInfo.getTestMethod().get().getName(); - logger.info("Test Mode: {}, Name: {}", testMode, testName); + this.testContextManager = new TestContextManager(testInfo.getTestMethod().get(), testMode); + logger.info("Test Mode: {}, Name: {}", testMode, testContextManager.getTestName()); try { - interceptorManager = new InterceptorManager(testName, testMode); - } catch (IOException e) { - logger.error("Could not create interceptor for {}", testName, e); + interceptorManager = new InterceptorManager(testContextManager); + } catch (UncheckedIOException e) { + logger.error("Could not create interceptor for {}", testContextManager.getTestName(), e); Assertions.fail(); } - testResourceNamer = new TestResourceNamer(testName, testMode, interceptorManager.getRecordedData()); + testResourceNamer = new TestResourceNamer(testContextManager, interceptorManager.getRecordedData()); beforeTest(); } @@ -73,8 +75,10 @@ public void setupTest(TestInfo testInfo) { */ @AfterEach public void teardownTest(TestInfo testInfo) { - afterTest(); - interceptorManager.close(); + if (testContextManager.didTestRun()) { + afterTest(); + interceptorManager.close(); + } } /** @@ -133,4 +137,22 @@ private static TestMode initializeTestMode() { logger.info("Environment variable '{}' has not been set yet. Using 'Playback' mode.", AZURE_TEST_MODE); return TestMode.PLAYBACK; } + + /** + * Sleeps the test for the given amount of milliseconds if {@link TestMode} isn't {@link TestMode#PLAYBACK}. + * + * @param millis Number of milliseconds to sleep the test. + * @throws IllegalStateException If the sleep is interrupted. + */ + protected void sleepIfRunningAgainstService(long millis) { + if (testMode == TestMode.PLAYBACK) { + return; + } + + try { + Thread.sleep(millis); + } catch (InterruptedException ex) { + throw logger.logExceptionAsWarning(new IllegalStateException(ex)); + } + } } diff --git a/sdk/core/azure-core-test/src/main/java/com/azure/core/test/TestContextManager.java b/sdk/core/azure-core-test/src/main/java/com/azure/core/test/TestContextManager.java new file mode 100644 index 000000000000..6e7eb696b77c --- /dev/null +++ b/sdk/core/azure-core-test/src/main/java/com/azure/core/test/TestContextManager.java @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.core.test; + +import com.azure.core.test.annotation.DoNotRecord; + +import java.lang.reflect.Method; + +import static org.junit.jupiter.api.Assumptions.assumeTrue; + +/** + * This class handles managing context about a test, such as custom testing annotations and verifying whether the test + * is capable of running. + */ +public class TestContextManager { + private final String testName; + private final TestMode testMode; + private final boolean doNotRecord; + private final boolean skipInPlayback; + private final boolean testRan; + + /** + * Constructs a {@link TestContextManager} based on the test method. + * + * @param testMethod Test method being ran. + * @param testMode The {@link TestMode} the test is running in. + */ + public TestContextManager(Method testMethod, TestMode testMode) { + this.testName = testMethod.getName(); + this.testMode = testMode; + + DoNotRecord doNotRecordAnnotation = testMethod.getAnnotation(DoNotRecord.class); + if (doNotRecordAnnotation != null) { + this.doNotRecord = true; + this.skipInPlayback = doNotRecordAnnotation.skipInPlayback(); + } else { + this.doNotRecord = false; + this.skipInPlayback = false; + } + + this.testRan = !(skipInPlayback && testMode == TestMode.PLAYBACK); + assumeTrue(testRan, "Test does not allow playback and was ran in 'TestMode.PLAYBACK'"); + } + + /** + * Returns the name of the test being ran. + * + * @return The test name. + */ + public String getTestName() { + return testName; + } + + /** + * Returns the mode being used to run tests. + * + * @return The {@link TestMode} being used to run tests. + */ + public TestMode getTestMode() { + return testMode; + } + + /** + * Returns whether the test should have its network calls recorded during a {@link TestMode#RECORD record} test + * run. + * + * @return Flag indicating whether to record test network calls. + */ + public boolean doNotRecordTest() { + return doNotRecord; + } + + /** + * Returns whether the current test was ran. + * + * @return Flag indicating whether the current test was ran. + */ + public boolean didTestRun() { + return testRan; + } +} diff --git a/sdk/core/azure-core-test/src/main/java/com/azure/core/test/TestMode.java b/sdk/core/azure-core-test/src/main/java/com/azure/core/test/TestMode.java index 27b1224ff19f..5d89b4de093e 100644 --- a/sdk/core/azure-core-test/src/main/java/com/azure/core/test/TestMode.java +++ b/sdk/core/azure-core-test/src/main/java/com/azure/core/test/TestMode.java @@ -10,6 +10,10 @@ public enum TestMode { * Record data from a live test. */ RECORD, + /** + * Run a live test without recording. + */ + LIVE, /** * Playback data from an existing test session. */ diff --git a/sdk/core/azure-core-test/src/main/java/com/azure/core/test/annotation/DoNotRecord.java b/sdk/core/azure-core-test/src/main/java/com/azure/core/test/annotation/DoNotRecord.java new file mode 100644 index 000000000000..f2241c79de29 --- /dev/null +++ b/sdk/core/azure-core-test/src/main/java/com/azure/core/test/annotation/DoNotRecord.java @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.core.test.annotation; + +import com.azure.core.test.TestMode; + +import java.lang.annotation.Retention; +import java.lang.annotation.Target; + +import static java.lang.annotation.ElementType.METHOD; +import static java.lang.annotation.RetentionPolicy.RUNTIME; + +/** + * Annotation given to some tests to indicate that network calls made during the test shouldn't be recorded. + * + *

+ * Pass {@code true} for {@link #skipInPlayback() skipInPlayback} to indicate that the test shouldn't run when tests are + * ran in {@link TestMode#PLAYBACK}. A common case for setting this to {@code true} is when the test has either + * sensitive content that cannot be redacted or calls into code that cannot be mocked. + */ +@Retention(RUNTIME) +@Target({METHOD}) +public @interface DoNotRecord { + + /** + * Returns whether the test will be ignored during a {@link TestMode#PLAYBACK playback} test run. + * + * @return Flag indicating if the test will be ignored during a playback test run. + */ + boolean skipInPlayback() default false; +} diff --git a/sdk/core/azure-core-test/src/main/java/com/azure/core/test/annotation/package-info.java b/sdk/core/azure-core-test/src/main/java/com/azure/core/test/annotation/package-info.java new file mode 100644 index 000000000000..f114506b11ef --- /dev/null +++ b/sdk/core/azure-core-test/src/main/java/com/azure/core/test/annotation/package-info.java @@ -0,0 +1,6 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +/** + * Package containing annotations test classes for Azure client libraries. + */ +package com.azure.core.test.annotation; diff --git a/sdk/core/azure-core-test/src/main/java/com/azure/core/test/utils/TestResourceNamer.java b/sdk/core/azure-core-test/src/main/java/com/azure/core/test/utils/TestResourceNamer.java index 481d6be0607b..3b38a1d2e085 100644 --- a/sdk/core/azure-core-test/src/main/java/com/azure/core/test/utils/TestResourceNamer.java +++ b/sdk/core/azure-core-test/src/main/java/com/azure/core/test/utils/TestResourceNamer.java @@ -3,12 +3,15 @@ package com.azure.core.test.utils; +import com.azure.core.test.TestContextManager; import com.azure.core.test.TestMode; import com.azure.core.test.models.RecordedData; import java.time.OffsetDateTime; import java.time.ZoneOffset; import java.util.Objects; +import java.util.function.Function; +import java.util.function.Supplier; /** * Provides random string names. If the test mode is {@link TestMode#PLAYBACK}, then names are fetched from @@ -16,21 +19,48 @@ * persisted to {@link RecordedData}. */ public class TestResourceNamer extends ResourceNamer { - private final TestMode testMode; private final RecordedData recordedData; + private final boolean allowedToReadRecordedValues; + private final boolean allowedToRecordValues; /** * Constructor of TestResourceNamer * + * @deprecated Use {@link #TestResourceNamer(TestContextManager, RecordedData)} instead. * @param name test name as prefix - * @param testMode the test mode {@link TestMode#PLAYBACK} or {@link TestMode#RECORD} + * @param testMode The {@link TestMode} which the test is running in. * @param recordedData the recorded data with list of network call */ + @Deprecated public TestResourceNamer(String name, TestMode testMode, RecordedData recordedData) { + this(name, testMode, false, recordedData); + } + + /** + * Constructor of TestResourceNamer + * + * @param testContextManager Contextual information about the test being ran, such as test name, {@link TestMode}, + * and others. + * @param recordedData the recorded data with list of network call + * @throws NullPointerException If {@code testMode} isn't {@link TestMode#LIVE}, {@code doNotRecord} is + * {@code false}, and {@code recordedData} is {@code null}. + */ + public TestResourceNamer(TestContextManager testContextManager, RecordedData recordedData) { + this(testContextManager.getTestName(), testContextManager.getTestMode(), testContextManager.doNotRecordTest(), + recordedData); + } + + private TestResourceNamer(String name, TestMode testMode, boolean doNotRecord, RecordedData recordedData) { super(name); - Objects.requireNonNull(recordedData, "'recordedData' cannot be null."); + + // Only need recordedData if the test is running in playback or record. + if (testMode != TestMode.LIVE && !doNotRecord) { + Objects.requireNonNull(recordedData, "'recordedData' cannot be null."); + } + this.recordedData = recordedData; - this.testMode = testMode; + this.allowedToReadRecordedValues = (testMode == TestMode.PLAYBACK && !doNotRecord); + this.allowedToRecordValues = (testMode == TestMode.RECORD && !doNotRecord); } /** @@ -42,13 +72,7 @@ public TestResourceNamer(String name, TestMode testMode, RecordedData recordedDa */ @Override public String randomName(String prefix, int maxLen) { - if (testMode == TestMode.PLAYBACK) { - return recordedData.removeVariable(); - } else { - String name = super.randomName(prefix, maxLen); - recordedData.addVariable(name); - return name; - } + return getValue(readValue -> readValue, () -> super.randomName(prefix, maxLen)); } /** @@ -58,13 +82,7 @@ public String randomName(String prefix, int maxLen) { */ @Override public String randomUuid() { - if (testMode == TestMode.PLAYBACK) { - return recordedData.removeVariable(); - } else { - String uuid = super.randomUuid(); - recordedData.addVariable(uuid); - return uuid; - } + return getValue(readValue -> readValue, super::randomUuid); } /** @@ -73,13 +91,7 @@ public String randomUuid() { * @return OffsetDateTime of UTC now. */ public OffsetDateTime now() { - if (testMode == TestMode.PLAYBACK) { - return OffsetDateTime.parse(recordedData.removeVariable()); - } else { - OffsetDateTime now = OffsetDateTime.now(ZoneOffset.UTC); - recordedData.addVariable(now.toString()); - return now; - } + return getValue(OffsetDateTime::parse, () -> OffsetDateTime.now(ZoneOffset.UTC)); } /** @@ -89,10 +101,19 @@ public OffsetDateTime now() { * @return the recorded value. */ public String recordValueFromConfig(String value) { - if (testMode == TestMode.PLAYBACK) { - return recordedData.removeVariable(); + return getValue(readValue -> readValue, () -> value); + } + + private T getValue(Function readHandler, Supplier valueSupplier) { + if (allowedToReadRecordedValues) { + return readHandler.apply(recordedData.removeVariable()); } else { - recordedData.addVariable(value); + T value = valueSupplier.get(); + + if (allowedToRecordValues) { + recordedData.addVariable(value.toString()); + } + return value; } } diff --git a/sdk/core/azure-core-test/src/test/java/com/azure/core/test/FakeTestClass.java b/sdk/core/azure-core-test/src/test/java/com/azure/core/test/FakeTestClass.java new file mode 100644 index 000000000000..7dfe22900ffb --- /dev/null +++ b/sdk/core/azure-core-test/src/test/java/com/azure/core/test/FakeTestClass.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.core.test; + +import com.azure.core.test.annotation.DoNotRecord; +import com.azure.core.util.logging.ClientLogger; + +import java.lang.reflect.Method; + +/** + * This is a dummy class used to mock scenarios for {@link TestContextManager}. + */ +public final class FakeTestClass { + public static final Method METHOD_WITHOUT_DONOTRECORD = getTestMethod("testWithoutDoNotRecord"); + public static final Method DONOTRECORD_FALSE_SKIPINPLAYBACK = getTestMethod("testWithDoNotRecordRunInPlayback"); + public static final Method DONOTRECORD_SKIPINPLAYBACK = getTestMethod("testWithDoNotRecordSkipInPlayback"); + + public void testWithoutDoNotRecord() { + } + + @DoNotRecord + public void testWithDoNotRecordRunInPlayback() { + + } + + @DoNotRecord(skipInPlayback = true) + public void testWithDoNotRecordSkipInPlayback() { + } + + private static Method getTestMethod(String methodName) { + try { + return FakeTestClass.class.getMethod(methodName); + } catch (NoSuchMethodException e) { + throw new ClientLogger(FakeTestClass.class).logExceptionAsWarning(new RuntimeException(e)); + } + } +} diff --git a/sdk/core/azure-core-test/src/test/java/com/azure/core/test/InterceptorManagerTests.java b/sdk/core/azure-core-test/src/test/java/com/azure/core/test/InterceptorManagerTests.java new file mode 100644 index 000000000000..4d953e8a278e --- /dev/null +++ b/sdk/core/azure-core-test/src/test/java/com/azure/core/test/InterceptorManagerTests.java @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.core.test; + +import org.junit.jupiter.api.Test; + +import java.util.HashMap; + +import static com.azure.core.test.FakeTestClass.DONOTRECORD_FALSE_SKIPINPLAYBACK; +import static com.azure.core.test.FakeTestClass.METHOD_WITHOUT_DONOTRECORD; +import static org.junit.jupiter.api.Assertions.assertNull; + +/** + * Tests for {@link InterceptorManager}. + */ +public class InterceptorManagerTests { + /** + * Validates that {@link InterceptorManager#getRecordedData()} is {@code null} when testing in {@link + * TestMode#LIVE}. + */ + @Test + public void recordedDataIsNullInLiveMode() { + assertNull(new InterceptorManager(new TestContextManager(METHOD_WITHOUT_DONOTRECORD, TestMode.LIVE)) + .getRecordedData()); + assertNull(new InterceptorManager(new TestContextManager(DONOTRECORD_FALSE_SKIPINPLAYBACK, TestMode.LIVE)) + .getRecordedData()); + } + + /** + * Validates that {@link InterceptorManager#getRecordedData()} is {@code null} when {@code doNotRecord} is passed as + * {@code true}. + */ + @Test + public void recordedDataIsNullWhenDoNotRecord() { + assertNull(new InterceptorManager(new TestContextManager(DONOTRECORD_FALSE_SKIPINPLAYBACK, TestMode.RECORD)) + .getRecordedData()); + assertNull(new InterceptorManager(new TestContextManager(DONOTRECORD_FALSE_SKIPINPLAYBACK, TestMode.LIVE)) + .getRecordedData()); + assertNull(new InterceptorManager(new TestContextManager(DONOTRECORD_FALSE_SKIPINPLAYBACK, TestMode.PLAYBACK)) + .getRecordedData()); + assertNull(new InterceptorManager("testName", new HashMap<>(), true).getRecordedData()); + } +} diff --git a/sdk/core/azure-core-test/src/test/java/com/azure/core/test/TestContextManagerTests.java b/sdk/core/azure-core-test/src/test/java/com/azure/core/test/TestContextManagerTests.java new file mode 100644 index 000000000000..b36654d276b3 --- /dev/null +++ b/sdk/core/azure-core-test/src/test/java/com/azure/core/test/TestContextManagerTests.java @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.core.test; + +import com.azure.core.test.annotation.DoNotRecord; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.EnumSource; +import org.opentest4j.TestAbortedException; + +import java.lang.reflect.Method; + +import static com.azure.core.test.FakeTestClass.DONOTRECORD_FALSE_SKIPINPLAYBACK; +import static com.azure.core.test.FakeTestClass.DONOTRECORD_SKIPINPLAYBACK; +import static com.azure.core.test.FakeTestClass.METHOD_WITHOUT_DONOTRECORD; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.junit.jupiter.api.Assertions.assertTrue; + +/** + * Tests for {@link TestContextManager}. + */ +public class TestContextManagerTests { + + /** + * Validates that a test method without the {@link DoNotRecord} annotation is allowed to run in all test modes and + * will record network calls and test values. + */ + @ParameterizedTest(name = "[{index}] {displayName}") + @EnumSource(TestMode.class) + public void testWithoutDoNotRecord(TestMode testMode) { + TestContextManager testContextManager = new TestContextManager(METHOD_WITHOUT_DONOTRECORD, testMode); + + assertFalse(testContextManager.doNotRecordTest()); + assertTrue(testContextManager.didTestRun()); + } + + /** + * Validates that a test method with the default {@link DoNotRecord} annotation is allowed to run in all test modes + * but doesn't have its network calls or test values recorded. + */ + @ParameterizedTest(name = "[{index}] {displayName}") + @EnumSource(TestMode.class) + public void testWithDoNotRecordRunInPlayback(TestMode testMode) { + TestContextManager testContextManager = new TestContextManager(DONOTRECORD_FALSE_SKIPINPLAYBACK, testMode); + + assertTrue(testContextManager.doNotRecordTest()); + assertTrue(testContextManager.didTestRun()); + } + + /** + * Validates that a test method with the {@link DoNotRecord} annotation having {@code skipInPlayback} set to true is + * only allowed to run in {@link TestMode#RECORD} and {@link TestMode#LIVE} and won't have its network calls or test + * values recorded. + */ + @Test + public void testWithDoNotRecordSkipInPlayback() { + Method testMethod = DONOTRECORD_SKIPINPLAYBACK; + + assertThrows(TestAbortedException.class, () -> new TestContextManager(testMethod, TestMode.PLAYBACK)); + + TestContextManager testContextManager = new TestContextManager(testMethod, TestMode.LIVE); + assertTrue(testContextManager.doNotRecordTest()); + assertTrue(testContextManager.didTestRun()); + + testContextManager = new TestContextManager(testMethod, TestMode.RECORD); + assertTrue(testContextManager.doNotRecordTest()); + assertTrue(testContextManager.didTestRun()); + } +} diff --git a/sdk/core/azure-core-test/src/test/java/com/azure/core/test/utils/TestResourceNamerTests.java b/sdk/core/azure-core-test/src/test/java/com/azure/core/test/utils/TestResourceNamerTests.java new file mode 100644 index 000000000000..94046262148f --- /dev/null +++ b/sdk/core/azure-core-test/src/test/java/com/azure/core/test/utils/TestResourceNamerTests.java @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.core.test.utils; + +import com.azure.core.test.TestContextManager; +import com.azure.core.test.TestMode; +import com.azure.core.test.models.RecordedData; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.function.Executable; + +import java.util.NoSuchElementException; + +import static com.azure.core.test.FakeTestClass.DONOTRECORD_FALSE_SKIPINPLAYBACK; +import static com.azure.core.test.FakeTestClass.METHOD_WITHOUT_DONOTRECORD; +import static org.junit.jupiter.api.Assertions.assertDoesNotThrow; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotEquals; +import static org.junit.jupiter.api.Assertions.assertThrows; + +/** + * Tests for {@link TestResourceNamer}. + */ +public class TestResourceNamerTests { + private static final String A_VARIABLE = "aVariable"; + private static final String RANDOM_NAME_PREFIX = "prefix"; + private static final int RANDOM_NAME_LENGTH = 12; + private static final String CONFIG_VALUE = "value"; + + /** + * Validates that a {@link NullPointerException} is thrown if {@code testMode} isn't {@link TestMode#LIVE} and + * {@code doNotRecord} is {@code false}, otherwise no exception is thrown as having no {@link RecordedData} is + * valid in those cases. + */ + @Test + public void nullRecordedData() { + // Doesn't throw when TestMode.LIVE. + assertDoesNotThrow(() -> + new TestResourceNamer(new TestContextManager(METHOD_WITHOUT_DONOTRECORD, TestMode.LIVE), null)); + + // Doesn't throw when 'doNotRecord' is true. + assertDoesNotThrow(() -> + new TestResourceNamer(new TestContextManager(DONOTRECORD_FALSE_SKIPINPLAYBACK, TestMode.RECORD), null)); + + // Does throw when TestMode isn't LIVE and doNotRecord = false + assertThrows(NullPointerException.class, () -> + new TestResourceNamer(new TestContextManager(METHOD_WITHOUT_DONOTRECORD, TestMode.RECORD), null)); + assertThrows(NullPointerException.class, () -> + new TestResourceNamer(new TestContextManager(METHOD_WITHOUT_DONOTRECORD, TestMode.PLAYBACK), null)); + } + + /** + * Validates that when {@code doNotRecord} is {@code true} and {@code testMode} is {@link TestMode#PLAYBACK} then + * the {@link RecordedData} within the {@link TestResourceNamer} cannot be read. + */ + @Test + public void recordedDataIsNotAllowedToReadRecordedValues() { + TestResourceNamer resourceNamer = new TestResourceNamer(new TestContextManager( + DONOTRECORD_FALSE_SKIPINPLAYBACK, TestMode.PLAYBACK), getRecordedDataWithValue()); + + assertNotEquals(A_VARIABLE, resourceNamer.randomName("prefix", 12)); + assertNotEquals(A_VARIABLE, resourceNamer.randomUuid()); + assertNotEquals(A_VARIABLE, resourceNamer.now()); + assertEquals(A_VARIABLE, resourceNamer.recordValueFromConfig(A_VARIABLE)); + } + + /** + * Validates that when {@code testMode} is {@link TestMode#LIVE} or {@code doNotRecord} is {@code true} then the + * {@link RecordedData} within the {@link TestResourceNamer} cannot record values generated. + */ + @Test + public void recordedDataIsNotAllowedToRecordValues() { + RecordedData recordedData = new RecordedData(); + + callNamerMethds(new TestResourceNamer( + new TestContextManager(METHOD_WITHOUT_DONOTRECORD, TestMode.LIVE), recordedData)); + validateNoRecordingsMade(new TestResourceNamer( + new TestContextManager(METHOD_WITHOUT_DONOTRECORD, TestMode.PLAYBACK), recordedData)); + + // Reset the recording data. + recordedData = new RecordedData(); + + callNamerMethds(new TestResourceNamer( + new TestContextManager(DONOTRECORD_FALSE_SKIPINPLAYBACK, TestMode.RECORD), recordedData)); + validateNoRecordingsMade(new TestResourceNamer( + new TestContextManager(METHOD_WITHOUT_DONOTRECORD, TestMode.PLAYBACK), recordedData)); + } + + private void callNamerMethds(TestResourceNamer resourceNamer) { + resourceNamer.randomName(RANDOM_NAME_PREFIX, RANDOM_NAME_LENGTH); + resourceNamer.randomUuid(); + resourceNamer.now(); + resourceNamer.recordValueFromConfig(CONFIG_VALUE); + } + + private void validateNoRecordingsMade(TestResourceNamer resourceNamer) { + assertNoSuchElementException(() -> resourceNamer.randomName(RANDOM_NAME_PREFIX, RANDOM_NAME_LENGTH)); + assertNoSuchElementException(resourceNamer::randomUuid); + assertNoSuchElementException(resourceNamer::now); + assertNoSuchElementException(() -> resourceNamer.recordValueFromConfig(CONFIG_VALUE)); + } + + private void assertNoSuchElementException(Executable executable) { + assertThrows(NoSuchElementException.class, executable, "Expected 'NoSuchElementException' to be thrown."); + } + + private RecordedData getRecordedDataWithValue() { + RecordedData recordedData = new RecordedData(); + recordedData.addVariable(A_VARIABLE); + + return recordedData; + } +} diff --git a/sdk/core/azure-core-tracing-opencensus/pom.xml b/sdk/core/azure-core-tracing-opencensus/pom.xml index ed3bb8a2a8e3..851458135a78 100644 --- a/sdk/core/azure-core-tracing-opencensus/pom.xml +++ b/sdk/core/azure-core-tracing-opencensus/pom.xml @@ -12,7 +12,7 @@ com.azure azure-core-tracing-opencensus - 1.0.0-beta.5 + 1.0.0-beta.6 Microsoft Azure OpenCensus tracing plugin This package contains the OpenCensus tracing plugin for Azure client libraries. diff --git a/sdk/core/azure-core-tracing-opentelemetry/pom.xml b/sdk/core/azure-core-tracing-opentelemetry/pom.xml index 8f668db15ec1..222309473689 100644 --- a/sdk/core/azure-core-tracing-opentelemetry/pom.xml +++ b/sdk/core/azure-core-tracing-opentelemetry/pom.xml @@ -12,7 +12,7 @@ com.azure azure-core-tracing-opentelemetry - 1.0.0-beta.1 + 1.0.0-beta.2 Microsoft Azure OpenTelemetry tracing plugin This package contains the OpenTelemetry tracing plugin for Azure client libraries. diff --git a/sdk/core/azure-core/pom.xml b/sdk/core/azure-core/pom.xml index 28ff43d3d3a2..0cae6624246b 100644 --- a/sdk/core/azure-core/pom.xml +++ b/sdk/core/azure-core/pom.xml @@ -14,7 +14,7 @@ com.azure azure-core jar - 1.1.0 + 1.2.0-beta.1 Microsoft Azure Java Core Library This package contains core types for Azure Java clients. diff --git a/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/AddHeadersFromContextPolicy.java b/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/AddHeadersFromContextPolicy.java new file mode 100644 index 000000000000..26caf06f4bb6 --- /dev/null +++ b/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/AddHeadersFromContextPolicy.java @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.core.http.policy; + +import com.azure.core.http.HttpHeader; +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpPipelineCallContext; +import com.azure.core.http.HttpPipelineNextPolicy; +import com.azure.core.http.HttpResponse; +import com.azure.core.util.Context; +import com.azure.core.http.HttpRequest; +import reactor.core.publisher.Mono; + +import java.util.Objects; + +/** + * The pipeline policy that override or add {@link HttpHeaders} in {@link HttpRequest} by reading values from + * {@link Context} with key 'azure-http-headers-key'. The value for this key should be of type {@link HttpHeaders} for + * it to be added in {@link HttpRequest}. + * + *

Code Sample: Add multiple HttpHeader in Context and call client

+ *
+ * // Create ConfigurationClient for example
+ * ConfigurationClient configurationClient = new ConfigurationClientBuilder()
+ *       .connectionString("endpoint={endpoint_value};id={id_value};secret={secret_value}")
+ *       .buildClient();
+ * // Add your headers
+ * HttpHeaders headers = new HttpHeaders();
+ * headers.put("my-header1", "my-header1-value");
+ * headers.put("my-header2", "my-header2-value");
+ * headers.put("my-header3", "my-header3-value");
+ * // Call API by passing headers in Context.
+ * configurationClient.addConfigurationSettingWithResponse(
+ *       new ConfigurationSetting().setKey("key").setValue("value"),
+ *       new Context(AddHeadersFromContextPolicy.AZURE_REQUEST_HTTP_HEADERS_KEY, headers));
+ * // Above three HttpHeader will be added in outgoing HttpRequest.
+ * 
+ */ +public class AddHeadersFromContextPolicy implements HttpPipelinePolicy { + + /**Key used to override headers in HttpRequest. The Value for this key should be {@link HttpHeaders}.*/ + public static final String AZURE_REQUEST_HTTP_HEADERS_KEY = "azure-http-headers-key"; + + @Override + public Mono process(HttpPipelineCallContext context, HttpPipelineNextPolicy next) { + context.getData(AZURE_REQUEST_HTTP_HEADERS_KEY).ifPresent(headers -> { + if (headers instanceof HttpHeaders) { + HttpHeaders customHttpHeaders = (HttpHeaders) headers; + // loop through customHttpHeaders and add headers in HttpRequest + for (HttpHeader httpHeader : customHttpHeaders) { + if (!Objects.isNull(httpHeader.getName()) && !Objects.isNull(httpHeader.getValue())) { + context.getHttpRequest().getHeaders().put(httpHeader.getName(), httpHeader.getValue()); + } + } + } + }); + return next.process(); + + } +} diff --git a/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/HttpLoggingPolicy.java b/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/HttpLoggingPolicy.java index fd1f8acf8542..50f6a5f196ad 100644 --- a/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/HttpLoggingPolicy.java +++ b/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/HttpLoggingPolicy.java @@ -13,13 +13,13 @@ import com.azure.core.implementation.LogLevel; import com.azure.core.implementation.LoggingUtil; import com.azure.core.util.CoreUtils; -import com.azure.core.util.FluxUtil; import com.azure.core.util.UrlBuilder; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.SerializationFeature; import reactor.core.publisher.Mono; +import java.io.ByteArrayOutputStream; import java.net.URL; import java.nio.charset.StandardCharsets; import java.util.Collections; @@ -100,7 +100,7 @@ public Mono process(HttpPipelineCallContext context, HttpPipelineN * @param request HTTP request being sent to Azure. * @return A Mono which will emit the string to log. */ - private Mono logRequest(final ClientLogger logger, final HttpRequest request) { + private Mono logRequest(final ClientLogger logger, final HttpRequest request) { int numericLogLevel = LoggingUtil.getEnvironmentLoggingLevel().toNumeric(); if (shouldLoggingBeSkipped(numericLogLevel)) { return Mono.empty(); @@ -117,44 +117,59 @@ private Mono logRequest(final ClientLogger logger, final HttpRequest req addHeadersToLogMessage(request.getHeaders(), requestLogMessage, numericLogLevel); - Mono requestLoggingMono = Mono.defer(() -> Mono.just(requestLogMessage.toString())); + if (!httpLogDetailLevel.shouldLogBody()) { + return logAndReturn(logger, requestLogMessage, null); + } - if (httpLogDetailLevel.shouldLogBody()) { - if (request.getBody() == null) { - requestLogMessage.append("(empty body)") - .append(System.lineSeparator()) - .append("--> END ") - .append(request.getHttpMethod()) - .append(System.lineSeparator()); - } else { - String contentType = request.getHeaders().getValue("Content-Type"); - long contentLength = getContentLength(logger, request.getHeaders()); + if (request.getBody() == null) { + requestLogMessage.append("(empty body)") + .append(System.lineSeparator()) + .append("--> END ") + .append(request.getHttpMethod()) + .append(System.lineSeparator()); - if (shouldBodyBeLogged(contentType, contentLength)) { - requestLoggingMono = FluxUtil.collectBytesInByteBufferStream(request.getBody()).flatMap(bytes -> { + return logAndReturn(logger, requestLogMessage, null); + } + + String contentType = request.getHeaders().getValue("Content-Type"); + long contentLength = getContentLength(logger, request.getHeaders()); + + if (shouldBodyBeLogged(contentType, contentLength)) { + ByteArrayOutputStream outputStream = new ByteArrayOutputStream((int) contentLength); + + // Add non-mutating operators to the data stream. + request.setBody( + request.getBody() + .doOnNext(byteBuffer -> { + for (int i = byteBuffer.position(); i < byteBuffer.limit(); i++) { + outputStream.write(byteBuffer.get(i)); + } + }) + .doFinally(ignored -> { requestLogMessage.append(contentLength) .append("-byte body:") .append(System.lineSeparator()) - .append(prettyPrintIfNeeded(logger, contentType, new String(bytes, StandardCharsets.UTF_8))) + .append(prettyPrintIfNeeded(logger, contentType, + new String(outputStream.toByteArray(), StandardCharsets.UTF_8))) .append(System.lineSeparator()) .append("--> END ") .append(request.getHttpMethod()) .append(System.lineSeparator()); - return Mono.just(requestLogMessage.toString()); - }); - } else { - requestLogMessage.append(contentLength) - .append("-byte body: (content not logged)") - .append(System.lineSeparator()) - .append("--> END ") - .append(request.getHttpMethod()) - .append(System.lineSeparator()); - } - } - } + logger.info(requestLogMessage.toString()); + })); - return requestLoggingMono.doOnNext(logger::info); + return Mono.empty(); + } else { + requestLogMessage.append(contentLength) + .append("-byte body: (content not logged)") + .append(System.lineSeparator()) + .append("--> END ") + .append(request.getHttpMethod()) + .append(System.lineSeparator()); + + return logAndReturn(logger, requestLogMessage, null); + } } /* @@ -194,32 +209,45 @@ private Mono logResponse(final ClientLogger logger, final HttpResp addHeadersToLogMessage(response.getHeaders(), responseLogMessage, numericLogLevel); - Mono responseLoggingMono = Mono.defer(() -> Mono.just(responseLogMessage.toString())); - - if (httpLogDetailLevel.shouldLogBody()) { - final String contentTypeHeader = response.getHeaderValue("Content-Type"); + if (!httpLogDetailLevel.shouldLogBody()) { + responseLogMessage.append("<-- END HTTP"); + return logAndReturn(logger, responseLogMessage, response); + } - if (shouldBodyBeLogged(contentTypeHeader, getContentLength(logger, response.getHeaders()))) { - final HttpResponse bufferedResponse = response.buffer(); - responseLoggingMono = bufferedResponse.getBodyAsString().flatMap(body -> { + String contentTypeHeader = response.getHeaderValue("Content-Type"); + long contentLength = getContentLength(logger, response.getHeaders()); + + if (shouldBodyBeLogged(contentTypeHeader, contentLength)) { + HttpResponse bufferedResponse = response.buffer(); + ByteArrayOutputStream outputStream = new ByteArrayOutputStream((int) contentLength); + return bufferedResponse.getBody() + .doOnNext(byteBuffer -> { + for (int i = byteBuffer.position(); i < byteBuffer.limit(); i++) { + outputStream.write(byteBuffer.get(i)); + } + }) + .doFinally(ignored -> { responseLogMessage.append("Response body:") .append(System.lineSeparator()) - .append(prettyPrintIfNeeded(logger, contentTypeHeader, body)) + .append(prettyPrintIfNeeded(logger, contentTypeHeader, + new String(outputStream.toByteArray(), StandardCharsets.UTF_8))) .append(System.lineSeparator()) .append("<-- END HTTP"); - return Mono.just(responseLogMessage.toString()); - }).switchIfEmpty(responseLoggingMono); - } else { - responseLogMessage.append("(body content not logged)") - .append(System.lineSeparator()) - .append("<-- END HTTP"); - } + logger.info(responseLogMessage.toString()); + }).then(Mono.just(bufferedResponse)); } else { - responseLogMessage.append("<-- END HTTP"); + responseLogMessage.append("(body content not logged)") + .append(System.lineSeparator()) + .append("<-- END HTTP"); + + return logAndReturn(logger, responseLogMessage, response); } + } - return responseLoggingMono.doOnNext(logger::info).thenReturn(response); + private Mono logAndReturn(ClientLogger logger, StringBuilder logMessageBuilder, T data) { + logger.info(logMessageBuilder.toString()); + return Mono.justOrEmpty(data); } /* diff --git a/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/RequestIdPolicy.java b/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/RequestIdPolicy.java index 389386519cf9..e9634030fe6d 100644 --- a/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/RequestIdPolicy.java +++ b/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/RequestIdPolicy.java @@ -6,22 +6,47 @@ import com.azure.core.http.HttpPipelineCallContext; import com.azure.core.http.HttpPipelineNextPolicy; import com.azure.core.http.HttpResponse; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.HttpHeader; import reactor.core.publisher.Mono; +import java.util.Objects; import java.util.UUID; /** * The pipeline policy that puts a UUID in the request header. Azure uses the request id as * the unique identifier for the request. + * + *

The default {@link HttpHeader} name can be overwritten as shown below + *

Code sample

+ * {@codesnippet com.azure.core.http.policy.RequestIdPolicy.constructor.overrideRequestIdHeaderName} */ public class RequestIdPolicy implements HttpPipelinePolicy { + private static final String REQUEST_ID_HEADER = "x-ms-client-request-id"; + private final String requestIdHeaderName; + + /** + * Creates {@link RequestIdPolicy} with provided {@code requestIdHeaderName}. + * @param requestIdHeaderName to be used to set in {@link HttpRequest}. + */ + public RequestIdPolicy(String requestIdHeaderName) { + this.requestIdHeaderName = Objects.requireNonNull(requestIdHeaderName, + "requestIdHeaderName can not be null."); + } + + /** + * Creates default {@link RequestIdPolicy} with default header name 'x-ms-client-request-id'. + */ + public RequestIdPolicy() { + requestIdHeaderName = REQUEST_ID_HEADER; + } @Override public Mono process(HttpPipelineCallContext context, HttpPipelineNextPolicy next) { - String requestId = context.getHttpRequest().getHeaders().getValue(REQUEST_ID_HEADER); + String requestId = context.getHttpRequest().getHeaders().getValue(requestIdHeaderName); if (requestId == null) { - context.getHttpRequest().getHeaders().put(REQUEST_ID_HEADER, UUID.randomUUID().toString()); + context.getHttpRequest().getHeaders().put(requestIdHeaderName, UUID.randomUUID().toString()); } return next.process(); } diff --git a/sdk/core/azure-core/src/main/java/com/azure/core/implementation/http/BufferedHttpResponse.java b/sdk/core/azure-core/src/main/java/com/azure/core/implementation/http/BufferedHttpResponse.java index 02dbe1eda46c..532f5a9e274e 100644 --- a/sdk/core/azure-core/src/main/java/com/azure/core/implementation/http/BufferedHttpResponse.java +++ b/sdk/core/azure-core/src/main/java/com/azure/core/implementation/http/BufferedHttpResponse.java @@ -5,6 +5,7 @@ import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpResponse; +import com.azure.core.util.FluxUtil; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -17,7 +18,7 @@ */ public final class BufferedHttpResponse extends HttpResponse { private final HttpResponse innerHttpResponse; - private final Mono cachedBody; + private final Flux cachedBody; /** * Creates a buffered HTTP response. @@ -27,7 +28,7 @@ public final class BufferedHttpResponse extends HttpResponse { public BufferedHttpResponse(HttpResponse innerHttpResponse) { super(innerHttpResponse.getRequest()); this.innerHttpResponse = innerHttpResponse; - this.cachedBody = innerHttpResponse.getBodyAsByteArray().cache(); + this.cachedBody = innerHttpResponse.getBody().cache(); } @Override @@ -46,13 +47,13 @@ public HttpHeaders getHeaders() { } @Override - public Mono getBodyAsByteArray() { + public Flux getBody() { return cachedBody; } @Override - public Flux getBody() { - return getBodyAsByteArray().flatMapMany(bytes -> Flux.just(ByteBuffer.wrap(bytes))); + public Mono getBodyAsByteArray() { + return FluxUtil.collectBytesInByteBufferStream(cachedBody.map(ByteBuffer::duplicate)); } @Override diff --git a/sdk/core/azure-core/src/main/java/com/azure/core/util/CoreUtils.java b/sdk/core/azure-core/src/main/java/com/azure/core/util/CoreUtils.java index b9b34cdd8be9..377e49bbfcbc 100644 --- a/sdk/core/azure-core/src/main/java/com/azure/core/util/CoreUtils.java +++ b/sdk/core/azure-core/src/main/java/com/azure/core/util/CoreUtils.java @@ -24,6 +24,10 @@ */ public final class CoreUtils { private static final String COMMA = ","; + private static final String NAME = "name"; + private static final String VERSION = "version"; + private static final String UNKNOWN_NAME = "UnknownName"; + private static final String UNKNOWN_VERSION = "UnknownVersion"; private CoreUtils() { // Exists only to defeat instantiation. @@ -162,10 +166,10 @@ public static Publisher extractAndFetch(PagedResponse page, Context co /** - * Helper method that returns an immutable {@link Map} of properties defined in {@code propertiesFileName}. + * Helper method that returns {@link UserAgentProperties} from properties defined in {@code propertiesFileName}. * * @param propertiesFileName The file name defining the properties. - * @return an immutable {@link Map}. + * @return {@link UserAgentProperties}. */ public static Map getProperties(String propertiesFileName) { ClientLogger logger = new ClientLogger(CoreUtils.class); diff --git a/sdk/core/azure-core/src/samples/java/com/azure/core/http/policy/RequestIdPolicyJavaDocCodeSnippet.java b/sdk/core/azure-core/src/samples/java/com/azure/core/http/policy/RequestIdPolicyJavaDocCodeSnippet.java new file mode 100644 index 000000000000..64eaa194ad07 --- /dev/null +++ b/sdk/core/azure-core/src/samples/java/com/azure/core/http/policy/RequestIdPolicyJavaDocCodeSnippet.java @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.core.http.policy; + +/** + * Code snippets for {@link RequestIdPolicy} + */ +public class RequestIdPolicyJavaDocCodeSnippet { + + /** + * Code snippets for using {@link RequestIdPolicy#RequestIdPolicy(String)} } + */ + public void overrideRequestIdHeaderName() { + + // BEGIN: com.azure.core.http.policy.RequestIdPolicy.constructor.overrideRequestIdHeaderName + new RequestIdPolicy("x-ms-my-custom-request-id"); + // END: com.azure.core.http.policy.RequestIdPolicy.constructor.overrideRequestIdHeaderName + } +} diff --git a/sdk/core/azure-core/src/test/java/com/azure/core/http/policy/AddHeadersFromContextPolicyTest.java b/sdk/core/azure-core/src/test/java/com/azure/core/http/policy/AddHeadersFromContextPolicyTest.java new file mode 100644 index 000000000000..856b49957376 --- /dev/null +++ b/sdk/core/azure-core/src/test/java/com/azure/core/http/policy/AddHeadersFromContextPolicyTest.java @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.core.http.policy; + +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpMethod; +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.HttpResponse; +import com.azure.core.http.clients.NoOpHttpClient; +import com.azure.core.util.Context; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +import java.net.URL; +import java.nio.ByteBuffer; +import java.nio.charset.Charset; + +public class AddHeadersFromContextPolicyTest { + + private final HttpResponse mockResponse = new HttpResponse(null) { + @Override + public int getStatusCode() { + return 500; + } + + @Override + public String getHeaderValue(String name) { + return null; + } + + @Override + public HttpHeaders getHeaders() { + return new HttpHeaders(); + } + + @Override + public Mono getBodyAsByteArray() { + return Mono.empty(); + } + + @Override + public Flux getBody() { + return Flux.empty(); + } + + @Override + public Mono getBodyAsString() { + return Mono.empty(); + } + + @Override + public Mono getBodyAsString(Charset charset) { + return Mono.empty(); + } + }; + + @Test + public void clientProvidedMultipleHeaderTest() throws Exception { + // Create custom Headers + String customRequestId = "request-id-value"; + final HttpHeaders headers = new HttpHeaders(); + headers.put("x-ms-client-request-id", customRequestId); + headers.put("my-header1", "my-header1-value"); + headers.put("my-header2", "my-header2-value"); + + final HttpPipeline pipeline = new HttpPipelineBuilder() + .httpClient(new NoOpHttpClient() { + @Override + public Mono send(HttpRequest request) { + Assertions.assertEquals(request.getHeaders().getValue("x-ms-client-request-id"), customRequestId); + Assertions.assertEquals(request.getHeaders().getValue("my-header1"), "my-header1-value"); + Assertions.assertEquals(request.getHeaders().getValue("my-header2"), "my-header2-value"); + return Mono.just(mockResponse); + } + }) + .policies(new RequestIdPolicy()) + .policies(new AddHeadersFromContextPolicy()) + .build(); + + pipeline.send(new HttpRequest(HttpMethod.GET, new URL("http://localhost/")), new Context(AddHeadersFromContextPolicy.AZURE_REQUEST_HTTP_HEADERS_KEY, headers)).block(); + } +} diff --git a/sdk/core/azure-core/src/test/java/com/azure/core/http/policy/HttpLoggingPolicyTests.java b/sdk/core/azure-core/src/test/java/com/azure/core/http/policy/HttpLoggingPolicyTests.java index 90da7d462c2a..df464a9dbf01 100644 --- a/sdk/core/azure-core/src/test/java/com/azure/core/http/policy/HttpLoggingPolicyTests.java +++ b/sdk/core/azure-core/src/test/java/com/azure/core/http/policy/HttpLoggingPolicyTests.java @@ -3,34 +3,48 @@ package com.azure.core.http.policy; +import com.azure.core.http.ContentType; +import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpMethod; import com.azure.core.http.HttpPipeline; import com.azure.core.http.HttpPipelineBuilder; import com.azure.core.http.HttpRequest; +import com.azure.core.http.HttpResponse; import com.azure.core.http.clients.NoOpHttpClient; import com.azure.core.util.Configuration; +import com.azure.core.util.Context; import com.azure.core.util.CoreUtils; +import com.azure.core.util.FluxUtil; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; import reactor.test.StepVerifier; import java.io.ByteArrayOutputStream; import java.io.PrintStream; +import java.net.MalformedURLException; +import java.net.URL; +import java.nio.ByteBuffer; +import java.nio.charset.Charset; import java.nio.charset.StandardCharsets; import java.util.Collections; import java.util.HashSet; import java.util.Set; import java.util.stream.Stream; +import static org.junit.jupiter.api.Assertions.assertArrayEquals; + /** * This class contains tests for {@link HttpLoggingPolicy}. */ public class HttpLoggingPolicyTests { private static final String REDACTED = "REDACTED"; + private static final Context CONTEXT = new Context("caller-method", "HttpLoggingPolicyTests"); private String originalLogLevel; private PrintStream originalErr; @@ -42,6 +56,13 @@ public void prepareForTest() { originalLogLevel = System.getProperty(Configuration.PROPERTY_AZURE_LOG_LEVEL); System.setProperty(Configuration.PROPERTY_AZURE_LOG_LEVEL, "2"); + /* + * Indicate to SLF4J to enable trace level logging for a logger named + * com.azure.core.util.logging.ClientLoggerTests. Trace is the maximum level of logging supported by the + * ClientLogger. + */ + System.setProperty("org.slf4j.simpleLogger.log.com.azure.core.util.logging.HttpLoggingPolicyTests", "trace"); + // Override System.err as that is where SLF4J will log by default. originalErr = System.err; logCaptureStream = new ByteArrayOutputStream(); @@ -57,6 +78,8 @@ public void cleanupAfterTest() { System.setProperty(Configuration.PROPERTY_AZURE_LOG_LEVEL, originalLogLevel); } + System.clearProperty("org.slf4j.simpleLogger.log.com.azure.core.util.logging.HttpLoggingPolicyTests"); + // Reset System.err to the original PrintStream. System.setErr(originalErr); } @@ -75,7 +98,7 @@ public void redactQueryParameters(String requestUrl, String expectedQueryString, .httpClient(new NoOpHttpClient()) .build(); - StepVerifier.create(pipeline.send(new HttpRequest(HttpMethod.POST, requestUrl))) + StepVerifier.create(pipeline.send(new HttpRequest(HttpMethod.POST, requestUrl), CONTEXT)) .verifyComplete(); String logString = new String(logCaptureStream.toByteArray(), StandardCharsets.UTF_8); @@ -105,4 +128,145 @@ private static Stream redactQueryParametersSupplier() { Arguments.of(requestUrl, fullyAllowedQueryString, allQueryParameters) ); } + + /** + * Tests that logging the request body doesn't consume the stream before it is sent over the network. + */ + @ParameterizedTest(name = "[{index}] {displayName}") + @MethodSource("validateLoggingDoesNotConsumeSupplier") + public void validateLoggingDoesNotConsumeRequest(Flux stream, byte[] data, int contentLength) + throws MalformedURLException { + URL requestUrl = new URL("https://test.com"); + HttpHeaders requestHeaders = new HttpHeaders() + .put("Content-Type", ContentType.APPLICATION_JSON) + .put("Content-Length", Integer.toString(contentLength)); + + HttpPipeline pipeline = new HttpPipelineBuilder() + .policies(new HttpLoggingPolicy(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BODY))) + .httpClient(request -> FluxUtil.collectBytesInByteBufferStream(request.getBody()) + .doOnSuccess(bytes -> assertArrayEquals(data, bytes)) + .then(Mono.empty())) + .build(); + + StepVerifier.create(pipeline.send(new HttpRequest(HttpMethod.POST, requestUrl, requestHeaders, stream), + CONTEXT)) + .verifyComplete(); + + String logString = new String(logCaptureStream.toByteArray(), StandardCharsets.UTF_8); + System.out.println(logString); + Assertions.assertTrue(logString.contains(new String(data, StandardCharsets.UTF_8))); + } + + /** + * Tests that logging the response body doesn't consume the stream before it is returned from the service call. + */ + @ParameterizedTest(name = "[{index}] {displayName}") + @MethodSource("validateLoggingDoesNotConsumeSupplier") + public void validateLoggingDoesNotConsumeResponse(Flux stream, byte[] data, int contentLength) { + HttpRequest request = new HttpRequest(HttpMethod.GET, "https://test.com"); + HttpHeaders responseHeaders = new HttpHeaders() + .put("Content-Type", ContentType.APPLICATION_JSON) + .put("Content-Length", Integer.toString(contentLength)); + + HttpPipeline pipeline = new HttpPipelineBuilder() + .policies(new HttpLoggingPolicy(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BODY))) + .httpClient(ignored -> Mono.just(new MockHttpResponse(ignored, responseHeaders, stream))) + .build(); + + StepVerifier.create(pipeline.send(request, CONTEXT)) + .assertNext(response -> StepVerifier.create(FluxUtil.collectBytesInByteBufferStream(response.getBody())) + .assertNext(bytes -> assertArrayEquals(data, bytes)) + .verifyComplete()) + .verifyComplete(); + + String logString = new String(logCaptureStream.toByteArray(), StandardCharsets.UTF_8); + System.out.println(logString); + Assertions.assertTrue(logString.contains(new String(data, StandardCharsets.UTF_8))); + } + + private static Stream validateLoggingDoesNotConsumeSupplier() { + byte[] data = "this is a test".getBytes(StandardCharsets.UTF_8); + byte[] repeatingData = new byte[data.length * 3]; + for (int i = 0; i < 3; i++) { + System.arraycopy(data, 0, repeatingData, i * data.length, data.length); + } + + return Stream.of( + // Single emission cold flux. + Arguments.of(Flux.just(ByteBuffer.wrap(data)), data, data.length), + + // Single emission Stream based Flux. + Arguments.of(Flux.fromStream(Stream.of(ByteBuffer.wrap(data))), data, data.length), + + // Single emission hot flux. + Arguments.of(Flux.just(ByteBuffer.wrap(data)).publish().autoConnect(), data, data.length), + + // Multiple emission cold flux. + Arguments.of(Flux.fromArray(new ByteBuffer[]{ + ByteBuffer.wrap(data), + ByteBuffer.wrap(data), + ByteBuffer.wrap(data) + }), repeatingData, repeatingData.length), + + // Multiple emission Stream based flux. + Arguments.of(Flux.fromStream(Stream.of( + ByteBuffer.wrap(data), + ByteBuffer.wrap(data), + ByteBuffer.wrap(data) + )), repeatingData, repeatingData.length), + + // Multiple emission hot flux. + Arguments.of(Flux.just( + ByteBuffer.wrap(data), + ByteBuffer.wrap(data), + ByteBuffer.wrap(data) + ).publish().autoConnect(), repeatingData, repeatingData.length) + ); + } + + private static class MockHttpResponse extends HttpResponse { + private final HttpHeaders headers; + private final Flux body; + + MockHttpResponse(HttpRequest request, HttpHeaders headers, Flux body) { + super(request); + this.headers = headers; + this.body = body; + } + + @Override + public int getStatusCode() { + return 200; + } + + @Override + public String getHeaderValue(String name) { + return headers.getValue(name); + } + + @Override + public HttpHeaders getHeaders() { + return headers; + } + + @Override + public Flux getBody() { + return body; + } + + @Override + public Mono getBodyAsByteArray() { + return FluxUtil.collectBytesInByteBufferStream(body); + } + + @Override + public Mono getBodyAsString() { + return getBodyAsByteArray().map(String::new); + } + + @Override + public Mono getBodyAsString(Charset charset) { + return getBodyAsByteArray().map(bytes -> new String(bytes, StandardCharsets.UTF_8)); + } + } } diff --git a/sdk/cosmos/microsoft-azure-cosmos-benchmark/src/main/java/com/azure/data/cosmos/benchmark/AsyncBenchmark.java b/sdk/cosmos/microsoft-azure-cosmos-benchmark/src/main/java/com/azure/data/cosmos/benchmark/AsyncBenchmark.java index cc654b35fb7b..a1d979a3b31f 100644 --- a/sdk/cosmos/microsoft-azure-cosmos-benchmark/src/main/java/com/azure/data/cosmos/benchmark/AsyncBenchmark.java +++ b/sdk/cosmos/microsoft-azure-cosmos-benchmark/src/main/java/com/azure/data/cosmos/benchmark/AsyncBenchmark.java @@ -34,6 +34,7 @@ import java.util.ArrayList; import java.util.List; import java.util.UUID; +import java.util.concurrent.CancellationException; import java.util.concurrent.Semaphore; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicLong; @@ -161,8 +162,10 @@ protected String getDocumentLink(Document doc) { protected abstract void performWorkload(BaseSubscriber baseSubscriber, long i) throws Exception; private boolean shouldContinue(long startTimeMillis, long iterationCount) { + Duration maxDurationTime = configuration.getMaxRunningTimeDuration(); int maxNumberOfOperations = configuration.getNumberOfOperations(); + if (maxDurationTime == null) { return iterationCount < maxNumberOfOperations; } @@ -182,17 +185,19 @@ void run() throws Exception { successMeter = metricsRegistry.meter("#Successful Operations"); failureMeter = metricsRegistry.meter("#Unsuccessful Operations"); + if (configuration.getOperationType() == Operation.ReadLatency - || configuration.getOperationType() == Operation.WriteLatency) + || configuration.getOperationType() == Operation.WriteLatency) { latency = metricsRegistry.timer("Latency"); + } reporter.start(configuration.getPrintingInterval(), TimeUnit.SECONDS); - long startTime = System.currentTimeMillis(); AtomicLong count = new AtomicLong(0); long i; - for ( i = 0; shouldContinue(startTime, i); i++) { + + for (i = 0; shouldContinue(startTime, i); i++) { BaseSubscriber baseSubscriber = new BaseSubscriber() { @Override @@ -202,7 +207,12 @@ protected void hookOnSubscribe(Subscription subscription) { @Override protected void hookOnNext(T value) { + logger.debug("hookOnNext: {}, count:{}", value, count.get()); + } + @Override + protected void hookOnCancel() { + this.hookOnError(new CancellationException()); } @Override diff --git a/sdk/cosmos/microsoft-azure-cosmos-benchmark/src/main/java/com/azure/data/cosmos/benchmark/AsyncQueryBenchmark.java b/sdk/cosmos/microsoft-azure-cosmos-benchmark/src/main/java/com/azure/data/cosmos/benchmark/AsyncQueryBenchmark.java index ecb875087261..e793274529a0 100644 --- a/sdk/cosmos/microsoft-azure-cosmos-benchmark/src/main/java/com/azure/data/cosmos/benchmark/AsyncQueryBenchmark.java +++ b/sdk/cosmos/microsoft-azure-cosmos-benchmark/src/main/java/com/azure/data/cosmos/benchmark/AsyncQueryBenchmark.java @@ -83,8 +83,8 @@ protected void performWorkload(BaseSubscriber> baseSubscr } else { throw new IllegalArgumentException("Unsupported Operation: " + configuration.getOperationType()); } - concurrencyControlSemaphore.acquire(); + concurrencyControlSemaphore.acquire(); obs.subscribeOn(Schedulers.parallel()).subscribe(baseSubscriber); } } diff --git a/sdk/cosmos/microsoft-azure-cosmos-benchmark/src/main/java/com/azure/data/cosmos/benchmark/Main.java b/sdk/cosmos/microsoft-azure-cosmos-benchmark/src/main/java/com/azure/data/cosmos/benchmark/Main.java index 91cdc12a9e67..8dc20f7b64bc 100644 --- a/sdk/cosmos/microsoft-azure-cosmos-benchmark/src/main/java/com/azure/data/cosmos/benchmark/Main.java +++ b/sdk/cosmos/microsoft-azure-cosmos-benchmark/src/main/java/com/azure/data/cosmos/benchmark/Main.java @@ -14,7 +14,7 @@ public class Main { public static void main(String[] args) throws Exception { org.apache.log4j.Logger.getLogger("io.netty").setLevel(org.apache.log4j.Level.OFF); - + AsyncBenchmark benchmark = null; try { LOGGER.debug("Parsing the arguments ..."); Configuration cfg = new Configuration(); @@ -27,7 +27,6 @@ public static void main(String[] args) throws Exception { return; } - AsyncBenchmark benchmark; switch (cfg.getOperationType()) { case WriteThroughput: case WriteLatency: @@ -65,14 +64,18 @@ public static void main(String[] args) throws Exception { throw new RuntimeException(cfg.getOperationType() + " is not supported"); } + LOGGER.info("Starting {}", cfg.getOperationType()); benchmark.run(); - benchmark.shutdown(); } catch (ParameterException e) { // if any error in parsing the cmd-line options print out the usage help System.err.println("INVALID Usage: " + e.getMessage()); System.err.println("Try '-help' for more information."); throw e; + } finally { + if (benchmark != null) { + benchmark.shutdown(); + } } } } diff --git a/sdk/cosmos/microsoft-azure-cosmos-benchmark/src/main/java/com/azure/data/cosmos/benchmark/ReadMyWriteWorkflow.java b/sdk/cosmos/microsoft-azure-cosmos-benchmark/src/main/java/com/azure/data/cosmos/benchmark/ReadMyWriteWorkflow.java index ee85ba33a4d4..4551dad6db3d 100644 --- a/sdk/cosmos/microsoft-azure-cosmos-benchmark/src/main/java/com/azure/data/cosmos/benchmark/ReadMyWriteWorkflow.java +++ b/sdk/cosmos/microsoft-azure-cosmos-benchmark/src/main/java/com/azure/data/cosmos/benchmark/ReadMyWriteWorkflow.java @@ -54,14 +54,19 @@ protected void init() { @Override protected void performWorkload(BaseSubscriber baseSubscriber, long i) throws Exception { + Flux obs; boolean readyMyWrite = RandomUtils.nextBoolean(); + if (readyMyWrite) { + // will do a write and immediately upon success will either // do a point read // or single partition query // or cross partition query to find the write. + int j = Math.toIntExact(Math.floorMod(i, 3)); + switch (j) { case 0: // write a random document to cosmodb and update the cache. @@ -78,7 +83,7 @@ protected void performWorkload(BaseSubscriber baseSubscriber, long i) "couldn't find my write in a single partition query!")))); break; case 2: - // write a random document to cosmodb and update the cache. + // write a random document to cosmosdb and update the cache. // then try to query for the document which just was written obs = writeDocument() .flatMap(d -> xPartitionQuery(generateQuery(d)) @@ -90,12 +95,15 @@ protected void performWorkload(BaseSubscriber baseSubscriber, long i) throw new IllegalStateException(); } } else { + // will either do // a write // a point read for a in memory cached document // or single partition query for a in memory cached document // or cross partition query for a in memory cached document + int j = Math.toIntExact(Math.floorMod(i, 4)); + switch (j) { case 0: // write a random document to cosmosdb and update the cache @@ -125,6 +133,7 @@ protected void performWorkload(BaseSubscriber baseSubscriber, long i) concurrencyControlSemaphore.acquire(); + logger.debug("concurrencyControlSemaphore: {}", concurrencyControlSemaphore); obs.subscribeOn(Schedulers.parallel()).subscribe(baseSubscriber); } diff --git a/sdk/cosmos/microsoft-azure-cosmos-benchmark/src/main/resources/log4j.properties b/sdk/cosmos/microsoft-azure-cosmos-benchmark/src/main/resources/log4j.properties index 7a31b9cb1817..eed9c4895995 100644 --- a/sdk/cosmos/microsoft-azure-cosmos-benchmark/src/main/resources/log4j.properties +++ b/sdk/cosmos/microsoft-azure-cosmos-benchmark/src/main/resources/log4j.properties @@ -1,14 +1,29 @@ -# this is the log4j configuration for tests +# This is the log4j configuration for benchmarks -# Set root logger level to DEBUG and its only appender to A1. -log4j.rootLogger=INFO, A1 +log4j.rootLogger=INFO, Console -log4j.category.com.azure.data.cosmos.internal.directconnectivity.rntbd=WARN -log4j.category.io.netty=INFO -log4j.category.io.reactivex=INFO -# A1 is set to be a ConsoleAppender. -log4j.appender.A1=org.apache.log4j.ConsoleAppender +log4j.category.com.azure.cosmos=INFO +log4j.category.com.azure.cosmos.benchmark=INFO +log4j.category.com.azure.cosmos.internal=INFO +log4j.category.com.azure.cosmos.internal.caches=INFO +log4j.category.com.azure.cosmos.internal.changefeed=INFO +log4j.category.com.azure.cosmos.internal.directconnectivity=INFO +log4j.category.com.azure.cosmos.internal.directconnectivity.rntbd=INFO +log4j.category.com.azure.cosmos.internal.http=INFO +log4j.category.com.azure.cosmos.internal.query=INFO +log4j.category.com.azure.cosmos.internal.query.aggregation=INFO +log4j.category.com.azure.cosmos.internal.query.metrics=INFO +log4j.category.com.azure.cosmos.internal.query.orderbyquery=INFO +log4j.category.com.azure.cosmos.internal.routing=INFO -# A1 uses PatternLayout. -log4j.appender.A1.layout=org.apache.log4j.PatternLayout -log4j.appender.A1.layout.ConversionPattern=%d %5X{pid} [%t] %-5p %c - %m%n \ No newline at end of file +log4j.category.com.azure.cosmos.internal.directconnectivity.RntbdTransportClient=INFO +log4j.category.com.azure.cosmos.internal.directconnectivity.rntbd.RntbdRequestManager=INFO + +log4j.appender.Console=org.apache.log4j.ConsoleAppender +log4j.appender.Console.layout=org.apache.log4j.PatternLayout +log4j.appender.Console.layout.ConversionPattern=%d %5X{pid} [%t] %-5p %c - %m%n + +log4j.appender.LogFile=org.apache.log4j.FileAppender +log4j.appender.LogFile.File=${azure.cosmos.logger.directory}/azure-cosmos-benchmark.log +log4j.appender.LogFile.layout=org.apache.log4j.PatternLayout +log4j.appender.LogFile.layout.ConversionPattern=[%d][%p][${azure.cosmos.hostname}][thread:%t][logger:%c] %m%n diff --git a/sdk/cosmos/microsoft-azure-cosmos/pom.xml b/sdk/cosmos/microsoft-azure-cosmos/pom.xml index 76374aa0b7cd..1e4e938a3e28 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/pom.xml +++ b/sdk/cosmos/microsoft-azure-cosmos/pom.xml @@ -52,6 +52,12 @@ Licensed under the MIT License. commons-validator commons-validator 1.6 + + + commons-beanutils + commons-beanutils + +
diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/ConsistencyPolicy.java b/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/ConsistencyPolicy.java index 17f12bf13097..d4ea30605bd2 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/ConsistencyPolicy.java +++ b/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/ConsistencyPolicy.java @@ -5,6 +5,7 @@ import com.azure.data.cosmos.internal.Constants; +import com.google.common.base.CaseFormat; import org.apache.commons.lang3.StringUtils; /** @@ -41,12 +42,12 @@ public ConsistencyPolicy() { public ConsistencyLevel defaultConsistencyLevel() { ConsistencyLevel result = ConsistencyPolicy.DEFAULT_DEFAULT_CONSISTENCY_LEVEL; + String consistencyLevelString = super.getString(Constants.Properties.DEFAULT_CONSISTENCY_LEVEL); try { - result = ConsistencyLevel.valueOf( - StringUtils.upperCase(super.getString(Constants.Properties.DEFAULT_CONSISTENCY_LEVEL))); + result = ConsistencyLevel.valueOf(CaseFormat.UPPER_CAMEL.to(CaseFormat.UPPER_UNDERSCORE, consistencyLevelString)); } catch (IllegalArgumentException e) { // ignore the exception and return the default - this.getLogger().warn("Unknown consistency level {}, value ignored.", super.getString(Constants.Properties.DEFAULT_CONSISTENCY_LEVEL)); + this.getLogger().warn("Unknown consistency level {}, value ignored.", consistencyLevelString); } return result; } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosContainerProperties.java b/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosContainerProperties.java index 6f53467e2e2b..1c5351aa48d5 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosContainerProperties.java +++ b/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosContainerProperties.java @@ -187,6 +187,46 @@ public CosmosContainerProperties conflictResolutionPolicy(ConflictResolutionPoli return this; } + /** + * Gets the collection's default time-to-live value. + * + * @return the default time-to-live value in seconds. + */ + public Integer defaultTimeToLive() { + if (super.has(Constants.Properties.DEFAULT_TTL)) { + return super.getInt(Constants.Properties.DEFAULT_TTL); + } + + return null; + } + + /** + * Sets the collection's default time-to-live value. + *

+ * The default time-to-live value on a collection is an optional property. If set, the documents within the collection + * expires after the specified number of seconds since their last write time. The value of this property should be one of the following: + *

+ * null - indicates evaluation of time-to-live is disabled and documents within the collection will never expire, regardless whether + * individual documents have their time-to-live set. + *

+ * nonzero positive integer - indicates the default time-to-live value for all documents within the collection. This value can be overridden + * by individual documents' time-to-live value. + *

+ * -1 - indicates by default all documents within the collection never expire. This value can be overridden by individual documents' + * time-to-live value. + * + * @param timeToLive the default time-to-live value in seconds. + */ + public void defaultTimeToLive(Integer timeToLive) { + // a "null" value is represented as a missing element on the wire. + // setting timeToLive to null should remove the property from the property bag. + if (timeToLive != null) { + super.set(Constants.Properties.DEFAULT_TTL, timeToLive); + } else if (super.has(Constants.Properties.DEFAULT_TTL)) { + super.remove(Constants.Properties.DEFAULT_TTL); + } + } + DocumentCollection getV2Collection(){ DocumentCollection collection = new DocumentCollection(this.toJson()); collection.setPartitionKey(this.partitionKeyDefinition()); diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/RntbdTransportClient.java b/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/RntbdTransportClient.java index 52007f9e426e..930a371e6a79 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/RntbdTransportClient.java +++ b/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/RntbdTransportClient.java @@ -26,6 +26,7 @@ import java.io.IOException; import java.net.URI; import java.time.Duration; +import java.util.Iterator; import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicLong; @@ -70,114 +71,89 @@ public final class RntbdTransportClient extends TransportClient { // endregion - // region Accessors - - public int endpointCount() { - return this.endpointProvider.count(); - } - - public int endpointEvictionCount() { - return this.endpointProvider.evictions(); - } - - public long id() { - return this.id; - } + // region Methods public boolean isClosed() { return this.closed.get(); } - public Tag tag() { - return this.tag; - } - - // endregion - - // region Methods - @Override public void close() { - logger.debug("\n [{}] CLOSE", this); - if (this.closed.compareAndSet(false, true)) { + logger.debug("close {}", this); this.endpointProvider.close(); return; } - logger.debug("\n [{}]\n already closed", this); + logger.debug("already closed {}", this); + } + + public int endpointCount() { + return this.endpointProvider.count(); + } + + public int endpointEvictionCount() { + return this.endpointProvider.evictions(); + } + + public long id() { + return this.id; } @Override - public Mono invokeStoreAsync(final URI physicalAddress, final RxDocumentServiceRequest request) { + public Mono invokeStoreAsync(final URI address, final RxDocumentServiceRequest request) { + + logger.debug("RntbdTransportClient.invokeStoreAsync({}, {})", address, request); - checkNotNull(physicalAddress, "physicalAddress"); - checkNotNull(request, "request"); + checkNotNull(address, "expected non-null address"); + checkNotNull(request, "expected non-null request"); this.throwIfClosed(); - final RntbdRequestArgs requestArgs = new RntbdRequestArgs(request, physicalAddress); + final RntbdRequestArgs requestArgs = new RntbdRequestArgs(request, address); requestArgs.traceOperation(logger, null, "invokeStoreAsync"); - final RntbdEndpoint endpoint = this.endpointProvider.get(physicalAddress); - final RntbdRequestRecord requestRecord = endpoint.request(requestArgs); + final RntbdEndpoint endpoint = this.endpointProvider.get(address); + final RntbdRequestRecord record = endpoint.request(requestArgs); - return Mono.fromFuture(requestRecord).doFinally(signal -> { - if (signal == SignalType.CANCEL) { - requestRecord.cancel(false); + logger.debug("RntbdTransportClient.invokeStoreAsync({}, {}): {}", address, request, record); + + return Mono.fromFuture(record).doFinally(signalType -> { + logger.debug("SignalType.{} received from reactor: {\n endpoint: {},\n record: {}\n}", + signalType.name(), + endpoint, + record); + if (signalType == SignalType.CANCEL) { + record.stage(RntbdRequestRecord.Stage.CANCELLED_BY_CLIENT); } }); } + public Tag tag() { + return this.tag; + } + @Override public String toString() { return RntbdObjectMapper.toString(this); } - private void throwIfClosed() { - checkState(!this.closed.get(), "%s is closed", this); + private static Tag tag(long id) { + return Tag.of(TAG_NAME, Strings.padStart(Long.toHexString(id).toUpperCase(), 4, '0')); } // endregion // region Privates - private static Tag tag(long id) { - return Tag.of(TAG_NAME, Strings.padStart(Long.toHexString(id).toUpperCase(), 4, '0')); + private void throwIfClosed() { + checkState(!this.closed.get(), "%s is closed", this); } // endregion // region Types - static final class JsonSerializer extends StdSerializer { - - public JsonSerializer() { - super(RntbdTransportClient.class); - } - - @Override - public void serialize(RntbdTransportClient value, JsonGenerator generator, SerializerProvider provider) throws IOException { - - generator.writeStartObject(); - generator.writeNumberField("id", value.id()); - generator.writeBooleanField("isClosed", value.isClosed()); - generator.writeObjectField("configuration", value.endpointProvider.config()); - generator.writeArrayFieldStart("serviceEndpoints"); - - value.endpointProvider.list().forEach(endpoint -> { - try { - generator.writeObject(endpoint); - } catch (IOException error) { - logger.error("failed to serialize instance {} due to:", value.id(), error); - } - }); - - generator.writeEndArray(); - generator.writeEndObject(); - } - } - public static final class Options { // region Fields @@ -192,6 +168,7 @@ public static final class Options { private final int maxRequestsPerChannel; private final int partitionCount; private final Duration receiveHangDetectionTime; + private final Duration requestExpiryInterval; private final Duration requestTimeout; private final Duration sendHangDetectionTime; private final Duration shutdownTimeout; @@ -212,6 +189,7 @@ private Options(Builder builder) { this.maxRequestsPerChannel = builder.maxRequestsPerChannel; this.partitionCount = builder.partitionCount; this.receiveHangDetectionTime = builder.receiveHangDetectionTime; + this.requestExpiryInterval = builder.requestExpiryInterval; this.requestTimeout = builder.requestTimeout; this.sendHangDetectionTime = builder.sendHangDetectionTime; this.shutdownTimeout = builder.shutdownTimeout; @@ -262,6 +240,10 @@ public Duration receiveHangDetectionTime() { return this.receiveHangDetectionTime; } + public Duration requestExpiryInterval() { + return this.requestExpiryInterval; + } + public Duration requestTimeout() { return this.requestTimeout; } @@ -297,6 +279,7 @@ public static class Builder { private static final UserAgentContainer DEFAULT_USER_AGENT_CONTAINER = new UserAgentContainer(); private static final Duration FIFTEEN_SECONDS = Duration.ofSeconds(15L); + private static final Duration FIVE_SECONDS =Duration.ofSeconds(5L); private static final Duration SEVENTY_SECONDS = Duration.ofSeconds(70L); private static final Duration SIXTY_FIVE_SECONDS = Duration.ofSeconds(65L); private static final Duration TEN_SECONDS = Duration.ofSeconds(10L); @@ -311,6 +294,7 @@ public static class Builder { private int maxRequestsPerChannel = 30; private int partitionCount = 1; private Duration receiveHangDetectionTime = SIXTY_FIVE_SECONDS; + private Duration requestExpiryInterval = FIVE_SECONDS; private Duration requestTimeout; private Duration sendHangDetectionTime = TEN_SECONDS; private Duration shutdownTimeout = FIFTEEN_SECONDS; @@ -332,104 +316,117 @@ public Builder(int requestTimeoutInSeconds) { // region Methods - public Options build() { - checkState(this.bufferPageSize <= this.maxBufferCapacity, "bufferPageSize (%s) > maxBufferCapacity (%s)", - this.bufferPageSize, this.maxBufferCapacity - ); - return new Options(this); - } - public Builder bufferPageSize(final int value) { - checkArgument(value >= 4096 && (value & (value - 1)) == 0, "value: %s", value); + checkArgument(value >= 4096 && (value & (value - 1)) == 0, + "expected value to be a power of 2 >= 4096, not %s", + value); this.bufferPageSize = value; return this; } + public Options build() { + checkState(this.bufferPageSize <= this.maxBufferCapacity, + "expected bufferPageSize (%s) <= maxBufferCapacity (%s)", + this.bufferPageSize, + this.maxBufferCapacity); + return new Options(this); + } + public Builder certificateHostNameOverride(final String value) { this.certificateHostNameOverride = value; return this; } public Builder connectionTimeout(final Duration value) { - checkArgument(value == null || value.compareTo(Duration.ZERO) > 0, "value: %s", value); + checkArgument(value == null || value.compareTo(Duration.ZERO) > 0, + "expected positive value, not %s", + value); this.connectionTimeout = value; return this; } public Builder idleChannelTimeout(final Duration value) { - checkNotNull(value, "value: null"); + checkNotNull(value, "expected non-null value"); this.idleChannelTimeout = value; return this; } public Builder idleEndpointTimeout(final Duration value) { - checkArgument(value != null && value.compareTo(Duration.ZERO) > 0, "value: %s", value); + checkArgument(value != null && value.compareTo(Duration.ZERO) > 0, + "expected positive value, not %s", + value); this.idleEndpointTimeout = value; return this; } public Builder maxBufferCapacity(final int value) { - checkArgument(value > 0 && (value & (value - 1)) == 0, "value: %s", value); + checkArgument(value > 0 && (value & (value - 1)) == 0, + "expected positive value, not %s", + value); this.maxBufferCapacity = value; return this; } public Builder maxChannelsPerEndpoint(final int value) { - checkArgument(value > 0, "value: %s", value); + checkArgument(value > 0, "expected positive value, not %s", value); this.maxChannelsPerEndpoint = value; return this; } public Builder maxRequestsPerChannel(final int value) { - checkArgument(value > 0, "value: %s", value); + checkArgument(value > 0, "expected positive value, not %s", value); this.maxRequestsPerChannel = value; return this; } public Builder partitionCount(final int value) { - checkArgument(value > 0, "value: %s", value); + checkArgument(value > 0, "expected positive value, not %s", value); this.partitionCount = value; return this; } public Builder receiveHangDetectionTime(final Duration value) { - - checkNotNull(value, "value: null"); - checkArgument(value.compareTo(Duration.ZERO) > 0, "value: %s", value); - + checkArgument(value != null && value.compareTo(Duration.ZERO) > 0, + "expected positive value, not %s", + value); this.receiveHangDetectionTime = value; return this; } - public Builder requestTimeout(final Duration value) { - - checkNotNull(value, "value: null"); - checkArgument(value.compareTo(Duration.ZERO) > 0, "value: %s", value); + public Builder requestExpiryInterval(final Duration value) { + checkArgument(value != null && value.compareTo(Duration.ZERO) > 0, + "expected positive value, not %s", + value); + this.requestExpiryInterval = value; + return this; + } + public Builder requestTimeout(final Duration value) { + checkArgument(value != null && value.compareTo(Duration.ZERO) > 0, + "expected positive value, not %s", + value); this.requestTimeout = value; return this; } public Builder sendHangDetectionTime(final Duration value) { - - checkNotNull(value, "value: null"); - checkArgument(value.compareTo(Duration.ZERO) > 0, "value: %s", value); - + checkArgument(value != null && value.compareTo(Duration.ZERO) > 0, + "expected positive value, not %s", + value); this.sendHangDetectionTime = value; return this; } public Builder shutdownTimeout(final Duration value) { - - checkNotNull(value, "value: null"); - checkArgument(value.compareTo(Duration.ZERO) > 0, "value: %s", value); - + checkArgument(value != null && value.compareTo(Duration.ZERO) > 0, + "expected positive value, not %s", + value); this.shutdownTimeout = value; return this; } public Builder userAgent(final UserAgentContainer value) { - checkNotNull(value, "value: null"); + checkNotNull(value, "expected non-null value"); this.userAgent = value; return this; } @@ -440,5 +437,38 @@ public Builder userAgent(final UserAgentContainer value) { // endregion } + static final class JsonSerializer extends StdSerializer { + + public JsonSerializer() { + super(RntbdTransportClient.class); + } + + @Override + public void serialize( + + final RntbdTransportClient value, + final JsonGenerator generator, + final SerializerProvider provider + + ) throws IOException { + + generator.writeStartObject(); + generator.writeNumberField("id", value.id()); + generator.writeBooleanField("isClosed", value.isClosed()); + generator.writeObjectField("configuration", value.endpointProvider.config()); + generator.writeObjectFieldStart("serviceEndpoints"); + generator.writeNumberField("count", value.endpointCount()); + generator.writeArrayFieldStart("items"); + + for (final Iterator iterator = value.endpointProvider.list().iterator(); iterator.hasNext(); ) { + generator.writeObject(iterator.next()); + } + + generator.writeEndArray(); + generator.writeEndObject(); + generator.writeEndObject(); + } + } + // endregion } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdClientChannelHandler.java b/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdClientChannelHandler.java index 5d8fcf81fe1a..bd5bcc38d3f7 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdClientChannelHandler.java +++ b/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdClientChannelHandler.java @@ -29,8 +29,8 @@ public class RntbdClientChannelHandler extends ChannelInitializer imple private final Config config; RntbdClientChannelHandler(final Config config, final ChannelHealthChecker healthChecker) { - checkNotNull(healthChecker, "healthChecker"); - checkNotNull(config, "config"); + checkNotNull(healthChecker, "expected non-null healthChecker"); + checkNotNull(config, "expected non-null config"); this.healthChecker = healthChecker; this.config = config; } @@ -96,9 +96,9 @@ protected void initChannel(final Channel channel) { checkNotNull(channel); final RntbdRequestManager requestManager = new RntbdRequestManager(this.healthChecker, this.config.maxRequestsPerChannel()); - final long readerIdleTime = this.config.receiveHangDetectionTime(); - final long writerIdleTime = this.config.sendHangDetectionTime(); - final long allIdleTime = this.config.idleConnectionTimeout(); + final long readerIdleTime = this.config.receiveHangDetectionTimeInNanos(); + final long writerIdleTime = this.config.sendHangDetectionTimeInNanos(); + final long allIdleTime = this.config.idleConnectionTimeoutInNanos(); final ChannelPipeline pipeline = channel.pipeline(); pipeline.addFirst( diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdClientChannelHealthChecker.java b/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdClientChannelHealthChecker.java index 934e05e4fabc..39d09c241a0f 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdClientChannelHealthChecker.java +++ b/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdClientChannelHealthChecker.java @@ -69,12 +69,12 @@ public RntbdClientChannelHealthChecker(final Config config) { checkNotNull(config, "config: null"); - this.idleConnectionTimeout = config.idleConnectionTimeout(); + this.idleConnectionTimeout = config.idleConnectionTimeoutInNanos(); - this.readDelayLimit = config.receiveHangDetectionTime(); + this.readDelayLimit = config.receiveHangDetectionTimeInNanos(); checkArgument(this.readDelayLimit > readHangGracePeriod, "config.receiveHangDetectionTime: %s", this.readDelayLimit); - this.writeDelayLimit = config.sendHangDetectionTime(); + this.writeDelayLimit = config.sendHangDetectionTimeInNanos(); checkArgument(this.writeDelayLimit > writeHangGracePeriod, "config.sendHangDetectionTime: %s", this.writeDelayLimit); } @@ -96,7 +96,7 @@ public long writeDelayLimit() { public Future isHealthy(final Channel channel) { - checkNotNull(channel, "channel: null"); + checkNotNull(channel, "expected non-null channel"); final RntbdRequestManager requestManager = channel.pipeline().get(RntbdRequestManager.class); final Promise promise = channel.eventLoop().newPromise(); diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdClientChannelPool.java b/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdClientChannelPool.java index 8e834d6b75bf..96aa1053f659 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdClientChannelPool.java +++ b/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdClientChannelPool.java @@ -146,7 +146,7 @@ public void onTimeout(AcquireTask task) { } } - final long idleEndpointTimeout = config.idleEndpointTimeout(); + final long idleEndpointTimeout = config.idleEndpointTimeoutInNanos(); this.idleStateDetectionScheduledFuture = this.executor.scheduleAtFixedRate( () -> { diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdEndpoint.java b/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdEndpoint.java index 33ebc20ec124..6efe322a7aeb 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdEndpoint.java +++ b/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdEndpoint.java @@ -105,19 +105,19 @@ public int bufferPageSize() { } @JsonProperty - public int connectionTimeout() { + public int connectionTimeoutInMillis() { final long value = this.options.connectionTimeout().toMillis(); assert value <= Integer.MAX_VALUE; return (int)value; } @JsonProperty - public long idleConnectionTimeout() { + public long idleConnectionTimeoutInNanos() { return this.options.idleChannelTimeout().toNanos(); } @JsonProperty - public long idleEndpointTimeout() { + public long idleEndpointTimeoutInNanos() { return this.options.idleEndpointTimeout().toNanos(); } @@ -137,22 +137,22 @@ public int maxRequestsPerChannel() { } @JsonProperty - public long receiveHangDetectionTime() { + public long receiveHangDetectionTimeInNanos() { return this.options.receiveHangDetectionTime().toNanos(); } @JsonProperty - public long requestTimeout() { + public long requestTimeoutInNanos() { return this.options.requestTimeout().toNanos(); } @JsonProperty - public long sendHangDetectionTime() { + public long sendHangDetectionTimeInNanos() { return this.options.sendHangDetectionTime().toNanos(); } @JsonProperty - public long shutdownTimeout() { + public long shutdownTimeoutInNanos() { return this.options.shutdownTimeout().toNanos(); } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdMetrics.java b/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdMetrics.java index a6f9dc5a5c91..090bfc46dfe0 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdMetrics.java +++ b/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdMetrics.java @@ -24,6 +24,7 @@ import io.micrometer.core.instrument.util.HierarchicalNameMapper; import io.micrometer.core.lang.Nullable; +import javax.annotation.Nonnull; import java.util.concurrent.TimeUnit; @SuppressWarnings("UnstableApiUsage") @@ -148,9 +149,9 @@ public String prefix() { consoleLoggingRegistry = new DropwizardMeterRegistry(dropwizardConfig, dropwizardRegistry, HierarchicalNameMapper.DEFAULT, Clock.SYSTEM) { @Override - @Nullable + @Nonnull protected Double nullGaugeValue() { - return null; + return Double.NaN; } }; diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdObjectMapper.java b/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdObjectMapper.java index 6b82c43f93af..57f776164b9a 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdObjectMapper.java +++ b/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdObjectMapper.java @@ -11,7 +11,6 @@ import com.fasterxml.jackson.databind.node.ObjectNode; import com.fasterxml.jackson.databind.ser.PropertyFilter; import com.fasterxml.jackson.databind.ser.impl.SimpleFilterProvider; -import com.google.common.base.Strings; import io.netty.buffer.ByteBuf; import io.netty.buffer.ByteBufInputStream; import io.netty.handler.codec.CorruptedFrameException; @@ -23,6 +22,7 @@ import java.util.concurrent.ConcurrentHashMap; import static com.google.common.base.Preconditions.checkNotNull; +import static com.google.common.base.Strings.lenientFormat; public final class RntbdObjectMapper { @@ -39,9 +39,9 @@ public static String toJson(final Object value) { try { return objectWriter.writeValueAsString(value); } catch (final JsonProcessingException error) { - logger.error("could not convert {} value to JSON due to:", value.getClass(), error); + logger.debug("could not convert {} value to JSON due to:", value.getClass(), error); try { - return Strings.lenientFormat("{\"error\":%s", objectWriter.writeValueAsString(error.toString())); + return lenientFormat("{\"error\":%s}", objectWriter.writeValueAsString(error.toString())); } catch (final JsonProcessingException exception) { return "null"; } @@ -50,7 +50,7 @@ public static String toJson(final Object value) { public static String toString(final Object value) { final String name = simpleClassNames.computeIfAbsent(value.getClass(), Class::getSimpleName); - return Strings.lenientFormat("%s(%s)", name, toJson(value)); + return lenientFormat("%s(%s)", name, toJson(value)); } public static ObjectWriter writer() { @@ -77,7 +77,7 @@ static ObjectNode readTree(final ByteBuf in) { return (ObjectNode)node; } - final String cause = Strings.lenientFormat("Expected %s, not %s", JsonNodeType.OBJECT, node.getNodeType()); + final String cause = lenientFormat("Expected %s, not %s", JsonNodeType.OBJECT, node.getNodeType()); throw new CorruptedFrameException(cause); } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdReporter.java b/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdReporter.java index 91f36e67f7ad..68098e844ba1 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdReporter.java +++ b/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdReporter.java @@ -47,16 +47,16 @@ public static void reportIssueUnless( private static void doReportIssue(Logger logger, Object subject, String format, Object[] arguments) { FormattingTuple formattingTuple = MessageFormatter.arrayFormat(format, arguments); - StackTraceElement[] stackTraceElements = new Exception().getStackTrace(); + StackTraceElement[] stackTrace = new Exception().getStackTrace(); Throwable throwable = formattingTuple.getThrowable(); if (throwable == null) { logger.error("Report this {} issue to ensure it is addressed:\n[{}]\n[{}]\n[{}]", - codeSource, subject, stackTraceElements[2], formattingTuple.getMessage() + codeSource, subject, stackTrace[2], formattingTuple.getMessage() ); } else { logger.error("Report this {} issue to ensure it is addressed:\n[{}]\n[{}]\n[{}{}]", - codeSource, subject, stackTraceElements[2], formattingTuple.getMessage(), + codeSource, subject, stackTrace[2], formattingTuple.getMessage(), ExceptionUtils.getStackTrace(throwable) ); } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdRequest.java b/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdRequest.java index deba9ea0d2c5..86664cf2c784 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdRequest.java +++ b/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdRequest.java @@ -38,7 +38,7 @@ public UUID getActivityId() { @JsonIgnore @SuppressWarnings("unchecked") public T getHeader(final RntbdRequestHeader header) { - return (T)this.headers.get(header).getValue(); + return (T) this.headers.get(header).getValue(); } public Long getTransportRequestId() { diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdRequestDecoder.java b/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdRequestDecoder.java index f6be8310fb4a..3192bd80c62c 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdRequestDecoder.java +++ b/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdRequestDecoder.java @@ -22,7 +22,7 @@ public void channelRead(final ChannelHandlerContext context, final Object messag if (message instanceof ByteBuf) { - final ByteBuf in = (ByteBuf)message; + final ByteBuf in = (ByteBuf) message; final int resourceOperationType = in.getInt(in.readerIndex() + Integer.BYTES); if (resourceOperationType != 0) { diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdRequestEncoder.java b/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdRequestEncoder.java index 5b6520632008..87e31bbf6227 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdRequestEncoder.java +++ b/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdRequestEncoder.java @@ -39,7 +39,7 @@ public boolean acceptOutboundMessage(final Object message) { @Override protected void encode(final ChannelHandlerContext context, final Object message, final ByteBuf out) throws Exception { - final RntbdRequest request = RntbdRequest.from((RntbdRequestArgs)message); + final RntbdRequest request = RntbdRequest.from((RntbdRequestArgs) message); final int start = out.writerIndex(); try { diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdRequestManager.java b/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdRequestManager.java index 04aa6d484018..77a309bd10d1 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdRequestManager.java +++ b/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdRequestManager.java @@ -26,7 +26,6 @@ import com.azure.data.cosmos.ServiceUnavailableException; import com.azure.data.cosmos.UnauthorizedException; import com.azure.data.cosmos.internal.directconnectivity.StoreResponse; -import com.google.common.base.Strings; import io.netty.buffer.ByteBuf; import io.netty.channel.Channel; import io.netty.channel.ChannelException; @@ -40,6 +39,7 @@ import io.netty.channel.CoalescingBufferQueue; import io.netty.channel.EventLoop; import io.netty.channel.pool.ChannelHealthChecker; +import io.netty.handler.codec.CorruptedFrameException; import io.netty.handler.codec.http.HttpResponseStatus; import io.netty.handler.ssl.SslHandler; import io.netty.handler.timeout.IdleStateEvent; @@ -66,6 +66,7 @@ import static com.azure.data.cosmos.internal.directconnectivity.rntbd.RntbdConstants.RntbdResponseHeader; import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkNotNull; +import static com.google.common.base.Strings.lenientFormat; public final class RntbdRequestManager implements ChannelHandler, ChannelInboundHandler, ChannelOutboundHandler { @@ -171,7 +172,9 @@ public void channelRead(final ChannelHandlerContext context, final Object messag if (message instanceof RntbdResponse) { try { - this.messageReceived(context, (RntbdResponse)message); + this.messageReceived(context, (RntbdResponse) message); + } catch (CorruptedFrameException error) { + this.exceptionCaught(context, error); } catch (Throwable throwable) { reportIssue(context, "{} ", message, throwable); this.exceptionCaught(context, throwable); @@ -180,17 +183,17 @@ public void channelRead(final ChannelHandlerContext context, final Object messag } else { final IllegalStateException error = new IllegalStateException( - Strings.lenientFormat("expected message of %s, not %s: %s", - RntbdResponse.class, message.getClass(), message - ) - ); + lenientFormat("expected message of %s, not %s: %s", + RntbdResponse.class, + message.getClass(), + message)); reportIssue(context, "", error); this.exceptionCaught(context, error); } } finally { if (message instanceof ReferenceCounted) { - boolean released = ((ReferenceCounted)message).release(); + boolean released = ((ReferenceCounted) message).release(); reportIssueUnless(released, context, "failed to release message: {}", message); } } @@ -288,7 +291,7 @@ public void exceptionCaught(final ChannelHandlerContext context, final Throwable if (!this.closingExceptionally) { this.completeAllPendingRequestsExceptionally(context, cause); - logger.warn("{} closing due to:", context, cause); + logger.debug("{} closing due to:", context, cause); context.flush().close(); } } @@ -329,12 +332,12 @@ public void userEventTriggered(final ChannelHandlerContext context, final Object return; } if (event instanceof RntbdContext) { - this.contextFuture.complete((RntbdContext)event); + this.contextFuture.complete((RntbdContext) event); this.removeContextNegotiatorAndFlushPendingWrites(context); return; } if (event instanceof RntbdContextException) { - this.contextFuture.completeExceptionally((RntbdContextException)event); + this.contextFuture.completeExceptionally((RntbdContextException) event); context.pipeline().flush().close(); return; } @@ -377,7 +380,7 @@ public void close(final ChannelHandlerContext context, final ChannelPromise prom if (!this.closingExceptionally) { this.completeAllPendingRequestsExceptionally(context, ON_CLOSE); } else { - logger.warn("{} closed exceptionally", context); + logger.debug("{} closed exceptionally", context); } final SslHandler sslHandler = context.pipeline().get(SslHandler.class); @@ -423,7 +426,7 @@ public void deregister(final ChannelHandlerContext context, final ChannelPromise if (!this.closingExceptionally) { this.completeAllPendingRequestsExceptionally(context, ON_DEREGISTER); } else { - logger.warn("{} deregistered exceptionally", context); + logger.debug("{} deregistered exceptionally", context); } context.deregister(promise); @@ -478,18 +481,19 @@ public void read(final ChannelHandlerContext context) { @Override public void write(final ChannelHandlerContext context, final Object message, final ChannelPromise promise) { - // TODO: DANOBLE: Ensure that all write errors are reported with a root cause of type EncoderException - // Requires a full scan of the rntbd code - this.traceOperation(context, "write", message); if (message instanceof RntbdRequestRecord) { + RntbdRequestRecord record = (RntbdRequestRecord) message; this.timestamps.channelWriteAttempted(); - context.write(this.addPendingRequestRecord(context, (RntbdRequestRecord)message), promise).addListener(completed -> { + context.writeAndFlush(this.addPendingRequestRecord(context, record), promise).addListener(completed -> { if (completed.isSuccess()) { + record.stage(RntbdRequestRecord.Stage.SENT); this.timestamps.channelWriteCompleted(); + } else { + record.stage(RntbdRequestRecord.Stage.UNSENT); } }); @@ -498,7 +502,7 @@ public void write(final ChannelHandlerContext context, final Object message, fin if (message == RntbdHealthCheckRequest.MESSAGE) { - context.write(RntbdHealthCheckRequest.MESSAGE, promise).addListener(completed -> { + context.writeAndFlush(RntbdHealthCheckRequest.MESSAGE, promise).addListener(completed -> { if (completed.isSuccess()) { this.timestamps.channelPingCompleted(); } @@ -507,7 +511,7 @@ public void write(final ChannelHandlerContext context, final Object message, fin return; } - final IllegalStateException error = new IllegalStateException(Strings.lenientFormat("message of %s: %s", message.getClass(), message)); + final IllegalStateException error = new IllegalStateException(lenientFormat("message of %s: %s", message.getClass(), message)); reportIssue(context, "", error); this.exceptionCaught(context, error); } @@ -545,8 +549,8 @@ void pendWrite(final ByteBuf out, final ChannelPromise promise) { this.pendingWrites.add(out, promise); } - RntbdClientChannelHealthChecker.Timestamps snapshotTimestamps() { - return new RntbdClientChannelHealthChecker.Timestamps(this.timestamps); + Timestamps snapshotTimestamps() { + return new Timestamps(this.timestamps); } // endregion @@ -557,16 +561,13 @@ private RntbdRequestArgs addPendingRequestRecord(final ChannelHandlerContext con return this.pendingRequests.compute(record.transportRequestId(), (id, current) -> { - boolean predicate = current == null; - String format = "id: {}, current: {}, request: {}"; - - reportIssueUnless(predicate, context, format, record); + reportIssueUnless(current == null, context, "id: {}, current: {}, request: {}", record); + record.stage(RntbdRequestRecord.Stage.QUEUED); final Timeout pendingRequestTimeout = record.newTimeout(timeout -> { // We don't wish to complete on the timeout thread, but rather on a thread doled out by our executor - - EventExecutor executor = context.executor(); + final EventExecutor executor = context.executor(); if (executor.inEventLoop()) { record.expire(); @@ -580,12 +581,14 @@ private RntbdRequestArgs addPendingRequestRecord(final ChannelHandlerContext con pendingRequestTimeout.cancel(); }); - return record; + return record.stage(RntbdRequestRecord.Stage.QUEUED); }).args(); } - private void completeAllPendingRequestsExceptionally(final ChannelHandlerContext context, final Throwable throwable) { + private void completeAllPendingRequestsExceptionally( + final ChannelHandlerContext context, final Throwable throwable + ) { reportIssueUnless(!this.closingExceptionally, context, "", throwable); this.closingExceptionally = true; @@ -595,81 +598,82 @@ private void completeAllPendingRequestsExceptionally(final ChannelHandlerContext this.pendingWrites.releaseAndFailAll(context, throwable); } - if (!this.pendingRequests.isEmpty()) { - - if (!this.contextRequestFuture.isDone()) { - this.contextRequestFuture.completeExceptionally(throwable); - } - - if (!this.contextFuture.isDone()) { - this.contextFuture.completeExceptionally(throwable); - } - - final int count = this.pendingRequests.size(); - Exception contextRequestException = null; - String phrase = null; + if (this.pendingRequests.isEmpty()) { + return; + } - if (this.contextRequestFuture.isCompletedExceptionally()) { + if (!this.contextRequestFuture.isDone()) { + this.contextRequestFuture.completeExceptionally(throwable); + } - try { - this.contextRequestFuture.get(); - } catch (final CancellationException error) { - phrase = "RNTBD context request write cancelled"; - contextRequestException = error; - } catch (final Exception error) { - phrase = "RNTBD context request write failed"; - contextRequestException = error; - } catch (final Throwable error) { - phrase = "RNTBD context request write failed"; - contextRequestException = new ChannelException(error); - } + if (!this.contextFuture.isDone()) { + this.contextFuture.completeExceptionally(throwable); + } - } else if (this.contextFuture.isCompletedExceptionally()) { + final int count = this.pendingRequests.size(); + Exception contextRequestException = null; + String phrase = null; + + if (this.contextRequestFuture.isCompletedExceptionally()) { + + try { + this.contextRequestFuture.get(); + } catch (final CancellationException error) { + phrase = "RNTBD context request write cancelled"; + contextRequestException = error; + } catch (final Exception error) { + phrase = "RNTBD context request write failed"; + contextRequestException = error; + } catch (final Throwable error) { + phrase = "RNTBD context request write failed"; + contextRequestException = new ChannelException(error); + } - try { - this.contextFuture.get(); - } catch (final CancellationException error) { - phrase = "RNTBD context request read cancelled"; - contextRequestException = error; - } catch (final Exception error) { - phrase = "RNTBD context request read failed"; - contextRequestException = error; - } catch (final Throwable error) { - phrase = "RNTBD context request read failed"; - contextRequestException = new ChannelException(error); - } + } else if (this.contextFuture.isCompletedExceptionally()) { + + try { + this.contextFuture.get(); + } catch (final CancellationException error) { + phrase = "RNTBD context request read cancelled"; + contextRequestException = error; + } catch (final Exception error) { + phrase = "RNTBD context request read failed"; + contextRequestException = error; + } catch (final Throwable error) { + phrase = "RNTBD context request read failed"; + contextRequestException = new ChannelException(error); + } - } else { + } else { - phrase = "closed exceptionally"; - } + phrase = "closed exceptionally"; + } - final String message = Strings.lenientFormat("%s %s with %s pending requests", context, phrase, count); - final Exception cause; + final String message = lenientFormat("%s %s with %s pending requests", context, phrase, count); + final Exception cause; - if (throwable instanceof ClosedChannelException) { + if (throwable instanceof ClosedChannelException) { - cause = contextRequestException == null - ? (ClosedChannelException)throwable - : contextRequestException; + cause = contextRequestException == null + ? (ClosedChannelException) throwable + : contextRequestException; - } else { + } else { - cause = throwable instanceof Exception - ? (Exception)throwable - : new ChannelException(throwable); - } + cause = throwable instanceof Exception + ? (Exception) throwable + : new ChannelException(throwable); + } - for (RntbdRequestRecord record : this.pendingRequests.values()) { + for (RntbdRequestRecord record : this.pendingRequests.values()) { - final Map requestHeaders = record.args().serviceRequest().getHeaders(); - final String requestUri = record.args().physicalAddress().toString(); + final Map requestHeaders = record.args().serviceRequest().getHeaders(); + final String requestUri = record.args().physicalAddress().toString(); - final GoneException error = new GoneException(message, cause, (Map)null, requestUri); - BridgeInternal.setRequestHeaders(error, requestHeaders); + final GoneException error = new GoneException(message, cause, (Map) null, requestUri); + BridgeInternal.setRequestHeaders(error, requestHeaders); - record.completeExceptionally(error); - } + record.completeExceptionally(error); } } @@ -684,14 +688,14 @@ private void messageReceived(final ChannelHandlerContext context, final RntbdRes final Long transportRequestId = response.getTransportRequestId(); if (transportRequestId == null) { - reportIssue(context, "response ignored because its transport request identifier is missing: {}", response); + reportIssue(context, "response ignored because its transportRequestId is missing: {}", response); return; } - final RntbdRequestRecord pendingRequest = this.pendingRequests.get(transportRequestId); + final RntbdRequestRecord requestRecord = this.pendingRequests.get(transportRequestId); - if (pendingRequest == null) { - logger.warn("{} response ignored because there is no matching pending request: {}", context, response); + if (requestRecord == null) { + logger.debug("response {} ignored because its requestRecord is missing: {}", transportRequestId, response); return; } @@ -701,7 +705,7 @@ private void messageReceived(final ChannelHandlerContext context, final RntbdRes if (HttpResponseStatus.OK.code() <= status.code() && status.code() < HttpResponseStatus.MULTIPLE_CHOICES.code()) { final StoreResponse storeResponse = response.toStoreResponse(this.contextFuture.getNow(null)); - pendingRequest.complete(storeResponse); + requestRecord.complete(storeResponse); } else { @@ -814,7 +818,7 @@ private void messageReceived(final ChannelHandlerContext context, final RntbdRes break; } - pendingRequest.completeExceptionally(cause); + requestRecord.completeExceptionally(cause); } } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdRequestRecord.java b/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdRequestRecord.java index d983db42b347..61123179ffe8 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdRequestRecord.java +++ b/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdRequestRecord.java @@ -6,27 +6,42 @@ import com.azure.data.cosmos.BridgeInternal; import com.azure.data.cosmos.RequestTimeoutException; import com.azure.data.cosmos.internal.directconnectivity.StoreResponse; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; import io.micrometer.core.instrument.Timer; import io.netty.util.Timeout; import io.netty.util.TimerTask; +import java.io.IOException; import java.time.Duration; import java.util.UUID; +import java.util.concurrent.CancellationException; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; import java.util.concurrent.TimeUnit; +import java.util.concurrent.atomic.AtomicReferenceFieldUpdater; import static com.google.common.base.Preconditions.checkNotNull; +@JsonSerialize(using = RntbdRequestRecord.JsonSerializer.class) public final class RntbdRequestRecord extends CompletableFuture { + private static final AtomicReferenceFieldUpdater + stageUpdater = AtomicReferenceFieldUpdater.newUpdater(RntbdRequestRecord.class, Stage.class, "stage"); + private final RntbdRequestArgs args; private final RntbdRequestTimer timer; + private volatile Stage stage; public RntbdRequestRecord(final RntbdRequestArgs args, final RntbdRequestTimer timer) { checkNotNull(args, "args"); checkNotNull(timer, "timer"); + this.stage = Stage.CREATED; this.args = args; this.timer = timer; } @@ -45,41 +60,104 @@ public long creationTime() { return this.args.creationTime(); } + public boolean expire() { + final RequestTimeoutException error = new RequestTimeoutException(this.toString(), this.args.physicalAddress()); + BridgeInternal.setRequestHeaders(error, this.args.serviceRequest().getHeaders()); + return this.completeExceptionally(error); + } + public Duration lifetime() { return this.args.lifetime(); } - public long transportRequestId() { - return this.args.transportRequestId(); + public Timeout newTimeout(final TimerTask task) { + return this.timer.newTimeout(task); } - // endregion - - // region Methods - - public boolean expire() { - - final long timeoutInterval = this.timer.getRequestTimeout(TimeUnit.MILLISECONDS); - final String message = String.format("Request timeout interval (%,d ms) elapsed", timeoutInterval); - final RequestTimeoutException error = new RequestTimeoutException(message, this.args.physicalAddress()); + public Stage stage() { + return stageUpdater.get(this); + } - BridgeInternal.setRequestHeaders(error, this.args.serviceRequest().getHeaders()); + public RntbdRequestRecord stage(Stage value) { + stageUpdater.set(this, value); + return this; + } - return this.completeExceptionally(error); + public long timeoutIntervalInMillis() { + return this.timer.getRequestTimeout(TimeUnit.MILLISECONDS); } - public Timeout newTimeout(final TimerTask task) { - return this.timer.newTimeout(task); + public long transportRequestId() { + return this.args.transportRequestId(); } + // endregion + + // region Methods + public long stop(Timer requests, Timer responses) { return this.args.stop(requests, responses); } @Override public String toString() { - return RntbdObjectMapper.toString(this.args); + return RntbdObjectMapper.toString(this); + } + + // endregion + + // region Types + + public enum Stage { + CREATED, QUEUED, SENT, UNSENT, CANCELLED_BY_CLIENT } + static final class JsonSerializer extends StdSerializer { + + JsonSerializer() { + super(RntbdRequestRecord.class); + } + + @Override + public void serialize( + final RntbdRequestRecord value, + final JsonGenerator generator, + final SerializerProvider provider) throws IOException { + + generator.writeStartObject(); + generator.writeObjectFieldStart("status"); + generator.writeBooleanField("done", value.isDone()); + generator.writeBooleanField("cancelled", value.isCancelled()); + generator.writeBooleanField("completedExceptionally", value.isCompletedExceptionally()); + + if (value.isCompletedExceptionally()) { + + try { + + value.get(); + + } catch (final ExecutionException executionException) { + + final Throwable error = executionException.getCause(); + + generator.writeObjectFieldStart("error"); + generator.writeStringField("type", error.getClass().getName()); + generator.writeObjectField("value", error); + generator.writeEndObject(); + + } catch (CancellationException | InterruptedException exception) { + + generator.writeObjectFieldStart("error"); + generator.writeStringField("type", exception.getClass().getName()); + generator.writeObjectField("value", exception); + generator.writeEndObject(); + } + } + + generator.writeEndObject(); + generator.writeObjectField("args", value.args); + generator.writeEndObject(); + } + } // endregion } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdRequestTimer.java b/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdRequestTimer.java index 2b67953b7c46..0af684d857b7 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdRequestTimer.java +++ b/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdRequestTimer.java @@ -7,32 +7,58 @@ import io.netty.util.Timeout; import io.netty.util.Timer; import io.netty.util.TimerTask; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import java.util.Set; import java.util.concurrent.TimeUnit; +import static com.google.common.base.Strings.lenientFormat; + public final class RntbdRequestTimer implements AutoCloseable { private static final long FIVE_MILLISECONDS = 5000000L; + + private static final Logger logger = LoggerFactory.getLogger(RntbdRequestTimer.class); private final long requestTimeout; private final Timer timer; public RntbdRequestTimer(final long requestTimeout) { - // Inspection of the HashWheelTimer code indicates that our choice of a 5 millisecond timer resolution ensures - // a request will timeout within 10 milliseconds of the specified requestTimeout interval. This is because + // a request will expire within 10 milliseconds of the specified requestTimeout interval. This is because // cancellation of a timeout takes two timer resolution units to complete. - this.timer = new HashedWheelTimer(FIVE_MILLISECONDS, TimeUnit.NANOSECONDS); this.requestTimeout = requestTimeout; } - public long getRequestTimeout(TimeUnit unit) { + public long getRequestTimeout(final TimeUnit unit) { return unit.convert(requestTimeout, TimeUnit.NANOSECONDS); } @Override - public void close() throws RuntimeException { - this.timer.stop(); + public void close() { + + final Set timeouts = this.timer.stop(); + final int count = timeouts.size(); + + if (count == 0) { + logger.debug("no outstanding request timeout tasks"); + return; + } + + logger.debug("stopping {} request timeout tasks", count); + + for (final Timeout timeout : timeouts) { + if (!timeout.isExpired()) { + try { + timeout.task().run(timeout); + } catch (Throwable error) { + logger.warn(lenientFormat("request timeout task failed due to ", error)); + } + } + } + + logger.debug("{} request timeout tasks stopped", count); } public Timeout newTimeout(final TimerTask task) { diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdResponse.java b/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdResponse.java index 279189b1247e..d1b8fdb31673 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdResponse.java +++ b/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdResponse.java @@ -71,6 +71,7 @@ private RntbdResponse( this.content = content.retain(); } + @JsonIgnore public UUID getActivityId() { return this.frame.getActivityId(); } @@ -97,10 +98,9 @@ public Long getTransportRequestId() { static RntbdResponse decode(final ByteBuf in) { - int start = in.markReaderIndex().readerIndex(); + final int start = in.markReaderIndex().readerIndex(); final RntbdResponseStatus frame = RntbdResponseStatus.decode(in); - final RntbdResponseHeaders headers = RntbdResponseHeaders.decode(in.readSlice(frame.getHeadersLength())); final boolean hasPayload = headers.isPayloadPresent(); final ByteBuf content; @@ -120,7 +120,7 @@ static RntbdResponse decode(final ByteBuf in) { content = Unpooled.EMPTY_BUFFER; } - int end = in.readerIndex(); + final int end = in.readerIndex(); in.resetReaderIndex(); return new RntbdResponse(in.readSlice(end - start), frame, headers, content); @@ -163,9 +163,9 @@ public int refCnt() { } /** - * Decreases the reference count by {@code 1} and deallocate this object if the reference count reaches {@code 0} + * Decreases the reference count by {@code 1} and deallocate this response if the count reaches {@code 0}. * - * @return {@code true} if and only if the reference count became {@code 0} and this object is de-allocated + * @return {@code true} if and only if the reference count became {@code 0} and this response is deallocated. */ @Override public boolean release() { @@ -173,10 +173,10 @@ public boolean release() { } /** - * Decreases the reference count by {@code decrement} and de-allocates this object if the reference count reaches {@code 0} + * Decreases the reference count by {@code decrement} and deallocates this response if the count reaches {@code 0}. * - * @param decrement amount of the decrease - * @return {@code true} if and only if the reference count became {@code 0} and this object has been de-allocated + * @param decrement amount of the decrease. + * @return {@code true} if and only if the reference count became {@code 0} and this response has been deallocated. */ @Override public boolean release(final int decrement) { @@ -198,8 +198,10 @@ public boolean release(final int decrement) { this.content.release(); } - checkState(this.in == Unpooled.EMPTY_BUFFER || this.in.refCnt() == 0); - checkState(this.content == Unpooled.EMPTY_BUFFER || this.content.refCnt() == 0); + // TODO: DANOBLE: figure out why PooledUnsafeDirectByteBuf violates these expectations: + // checkState(this.in == Unpooled.EMPTY_BUFFER || this.in.refCnt() == 0); + // checkState(this.content == Unpooled.EMPTY_BUFFER || this.content.refCnt() == 0); + // Specifically, why are this.in.refCnt() and this.content.refCnt() equal to 1? } return value; @@ -280,8 +282,9 @@ public void serialize(final ByteBuf value, final JsonGenerator generator, final final int length = value.readableBytes(); generator.writeStartObject(); - generator.writeObjectField("length", length); - generator.writeObjectField("content", ByteBufUtil.hexDump(value, 0, length)); + generator.writeObjectField("lengthInBytes", length); + generator.writeObjectField("hexDump", ByteBufUtil.hexDump(value, 0, length)); + generator.writeObjectField("string", value.getCharSequence(0, length, StandardCharsets.UTF_8)); generator.writeEndObject(); } } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdResponseHeaders.java b/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdResponseHeaders.java index c2732927b90c..3b4b08e1da06 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdResponseHeaders.java +++ b/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdResponseHeaders.java @@ -26,6 +26,7 @@ import static com.azure.data.cosmos.internal.directconnectivity.rntbd.RntbdConstants.RntbdIndexingDirective; import static com.azure.data.cosmos.internal.directconnectivity.rntbd.RntbdConstants.RntbdResponseHeader; +@SuppressWarnings("UnstableApiUsage") @JsonFilter("RntbdToken") class RntbdResponseHeaders extends RntbdTokenStream { diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdServiceEndpoint.java b/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdServiceEndpoint.java index d3a4e6466b2e..e29d65468518 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdServiceEndpoint.java +++ b/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdServiceEndpoint.java @@ -31,7 +31,6 @@ import java.net.URI; import java.util.UUID; import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicLong; @@ -41,6 +40,7 @@ import static com.azure.data.cosmos.internal.directconnectivity.RntbdTransportClient.Options; import static com.google.common.base.Preconditions.checkNotNull; import static com.google.common.base.Preconditions.checkState; +import static java.util.concurrent.TimeUnit.NANOSECONDS; @JsonSerialize(using = RntbdServiceEndpoint.JsonSerializer.class) public final class RntbdServiceEndpoint implements RntbdEndpoint { @@ -48,7 +48,7 @@ public final class RntbdServiceEndpoint implements RntbdEndpoint { // region Fields private static final String TAG_NAME = RntbdServiceEndpoint.class.getSimpleName(); - private static final long QUIET_PERIOD = 2L * 1_000_000_000L; + private static final long QUIET_PERIOD = 2_000_000_000L; // 2 seconds private static final AtomicLong instanceCount = new AtomicLong(); private static final Logger logger = LoggerFactory.getLogger(RntbdServiceEndpoint.class); @@ -79,7 +79,7 @@ private RntbdServiceEndpoint( .group(group) .option(ChannelOption.ALLOCATOR, config.allocator()) .option(ChannelOption.AUTO_READ, true) - .option(ChannelOption.CONNECT_TIMEOUT_MILLIS, config.connectionTimeout()) + .option(ChannelOption.CONNECT_TIMEOUT_MILLIS, config.connectionTimeoutInMillis()) .option(ChannelOption.RCVBUF_ALLOCATOR, receiveBufferAllocator) .option(ChannelOption.SO_KEEPALIVE, true) .remoteAddress(physicalAddress.getHost(), physicalAddress.getPort()); @@ -312,12 +312,12 @@ public static final class Provider implements RntbdEndpoint.Provider { public Provider(final RntbdTransportClient transportClient, final Options options, final SslContext sslContext) { - checkNotNull(transportClient, "provider"); - checkNotNull(options, "options"); - checkNotNull(sslContext, "sslContext"); + checkNotNull(transportClient, "expected non-null provider"); + checkNotNull(options, "expected non-null options"); + checkNotNull(sslContext, "expected non-null sslContext"); - final DefaultThreadFactory threadFactory = new DefaultThreadFactory("CosmosEventLoop", true); - final int threadCount = Runtime.getRuntime().availableProcessors(); + final DefaultThreadFactory threadFactory = new DefaultThreadFactory("cosmos-rntbd-nio", true); + final int threadCount = 2 * Runtime.getRuntime().availableProcessors(); final LogLevel wireLogLevel; if (logger.isTraceEnabled()) { @@ -330,7 +330,7 @@ public Provider(final RntbdTransportClient transportClient, final Options option this.transportClient = transportClient; this.config = new Config(options, sslContext, wireLogLevel); - this.requestTimer = new RntbdRequestTimer(config.requestTimeout()); + this.requestTimer = new RntbdRequestTimer(config.requestTimeoutInNanos()); this.eventLoopGroup = new NioEventLoopGroup(threadCount, threadFactory); this.endpoints = new ConcurrentHashMap<>(); @@ -349,13 +349,15 @@ public void close() { endpoint.close(); } - this.eventLoopGroup.shutdownGracefully(QUIET_PERIOD, this.config.shutdownTimeout(), TimeUnit.NANOSECONDS).addListener(future -> { - if (future.isSuccess()) { - logger.debug("\n [{}]\n closed endpoints", this); - return; - } - logger.error("\n [{}]\n failed to close endpoints due to ", this, future.cause()); - }); + this.eventLoopGroup.shutdownGracefully(QUIET_PERIOD, this.config.shutdownTimeoutInNanos(), NANOSECONDS) + .addListener(future -> { + if (future.isSuccess()) { + logger.debug("\n [{}]\n closed endpoints", this); + return; + } + logger.error("\n [{}]\n failed to close endpoints due to ", this, future.cause()); + }); + return; } @@ -390,14 +392,6 @@ public Stream list() { } private void evict(RntbdEndpoint endpoint) { - - // TODO: DANOBLE: Utilize this method of tearing down unhealthy endpoints - // Specifically, ensure that this method is called when a Read/WriteTimeoutException occurs or a health - // check request fails. This perhaps likely requires a change to RntbdClientChannelPool. - // Links: - // https://msdata.visualstudio.com/CosmosDB/_workitems/edit/331552 - // https://msdata.visualstudio.com/CosmosDB/_workitems/edit/331593 - if (this.endpoints.remove(endpoint.remoteAddress().toString()) != null) { this.evictions.incrementAndGet(); } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdToken.java b/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdToken.java index 8bb5f7f7f095..a1374e25a6f1 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdToken.java +++ b/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdToken.java @@ -10,13 +10,14 @@ import com.fasterxml.jackson.databind.SerializerProvider; import com.fasterxml.jackson.databind.ser.PropertyWriter; import com.fasterxml.jackson.databind.ser.impl.SimpleBeanPropertyFilter; -import com.google.common.base.Strings; import io.netty.buffer.ByteBuf; +import io.netty.handler.codec.CorruptedFrameException; import static com.azure.data.cosmos.internal.directconnectivity.rntbd.RntbdConstants.RntbdHeader; import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkNotNull; import static com.google.common.base.Preconditions.checkState; +import static com.google.common.base.Strings.lenientFormat; @JsonPropertyOrder({ "id", "name", "type", "present", "required", "value" }) final class RntbdToken { @@ -66,16 +67,25 @@ public RntbdTokenType getTokenType() { @JsonProperty public Object getValue() { + final RntbdTokenType.Codec codec = this.header.type().codec(); + if (this.value == null) { - return this.header.type().codec().defaultValue(); + return codec.defaultValue(); } if (this.value instanceof ByteBuf) { final ByteBuf buffer = (ByteBuf)this.value; - this.value = this.header.type().codec().read(buffer); - buffer.release(); + this.value = codec.defaultValue(); + try { + this.value = codec.read(buffer); + } catch (final CorruptedFrameException error) { + String message = lenientFormat("failed to read %s value: %s", this.getName(), error.getMessage()); + throw new CorruptedFrameException(message); + } finally { + buffer.release(); + } } else { - this.value = this.header.type().codec().convert(this.value); + this.value = codec.convert(this.value); } return this.value; @@ -137,7 +147,7 @@ public static RntbdToken create(final RntbdHeader header) { public void decode(final ByteBuf in) { - checkNotNull(in, "in"); + checkNotNull(in, "expected non-null in"); if (this.value instanceof ByteBuf) { ((ByteBuf)this.value).release(); @@ -152,7 +162,7 @@ public void encode(final ByteBuf out) { if (!this.isPresent()) { if (this.isRequired()) { - final String message = Strings.lenientFormat("Missing value for required header: %s", this); + final String message = lenientFormat("Missing value for required header: %s", this); throw new IllegalStateException(message); } return; diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdTokenStream.java b/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdTokenStream.java index 9c60d50d71f7..805be2ec9af1 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdTokenStream.java +++ b/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdTokenStream.java @@ -8,11 +8,13 @@ import com.google.common.collect.ImmutableSet; import com.google.common.collect.Maps; import io.netty.buffer.ByteBuf; +import io.netty.handler.codec.CorruptedFrameException; import java.util.stream.Collector; import static com.azure.data.cosmos.internal.directconnectivity.rntbd.RntbdConstants.RntbdHeader; import static com.google.common.base.Preconditions.checkNotNull; +import static com.google.common.base.Strings.lenientFormat; @SuppressWarnings("UnstableApiUsage") abstract class RntbdTokenStream & RntbdHeader> { @@ -59,7 +61,7 @@ final int computeLength() { static > T decode(final T stream) { - ByteBuf in = stream.in; + final ByteBuf in = stream.in; while (in.readableBytes() > 0) { @@ -77,9 +79,8 @@ static > T decode(final T stream) { for (final RntbdToken token : stream.tokens.values()) { if (!token.isPresent() && token.isRequired()) { - final String reason = Strings.lenientFormat("Required token not found on token stream: type=%s, identifier=%s", - token.getTokenType(), token.getId()); - throw new IllegalStateException(reason); + final String message = lenientFormat("Required header not found on token stream: %s", token); + throw new CorruptedFrameException(message); } } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdTokenType.java b/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdTokenType.java index 3d31340966d7..337dbcc43c8a 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdTokenType.java +++ b/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/directconnectivity/rntbd/RntbdTokenType.java @@ -3,17 +3,16 @@ package com.azure.data.cosmos.internal.directconnectivity.rntbd; -import com.google.common.base.Strings; import com.google.common.base.Utf8; import io.netty.buffer.ByteBuf; import io.netty.buffer.ByteBufUtil; import io.netty.handler.codec.CorruptedFrameException; -import io.netty.handler.codec.DecoderException; import java.nio.charset.StandardCharsets; import java.util.UUID; import static com.google.common.base.Preconditions.checkState; +import static com.google.common.base.Strings.lenientFormat; enum RntbdTokenType { @@ -93,10 +92,17 @@ public interface Codec { void write(Object value, ByteBuf out); static void checkReadableBytes(final ByteBuf in, final long length, final long maxLength) { - if (length != in.readableBytes() || length > maxLength) { - String message = Strings.lenientFormat("maxLength: %s, length: %s, readableBytes: %s", - maxLength, length, in.readableBytes()); - throw new CorruptedFrameException(message); + + if (length > maxLength) { + throw new CorruptedFrameException( + lenientFormat("value length (%s) is greater than maxLength (%s)", length, maxLength)); + } + + final int readableBytes = in.readableBytes(); + + if (length != readableBytes) { + throw new CorruptedFrameException( + lenientFormat("readableBytes (%s) does not match value length (%s)", readableBytes, length)); } } } @@ -681,6 +687,7 @@ private static class RntbdString implements Codec { private RntbdString() { } + @SuppressWarnings("UnstableApiUsage") final int computeLength(final Object value, final int maxLength) { assert this.isValid(value); @@ -696,16 +703,16 @@ final int computeLength(final Object value, final int maxLength) { final byte[] string = (byte[])value; if (!Utf8.isWellFormed(string)) { - final String reason = Strings.lenientFormat("UTF-8 byte string is ill-formed: %s", ByteBufUtil.hexDump(string)); - throw new DecoderException(reason); + final String reason = lenientFormat("UTF-8 byte string is ill-formed: %s", ByteBufUtil.hexDump(string)); + throw new CorruptedFrameException(reason); } length = string.length; } if (length > maxLength) { - final String reason = Strings.lenientFormat("UTF-8 byte string exceeds %s bytes: %s bytes", maxLength, length); - throw new DecoderException(reason); + final String reason = lenientFormat("UTF-8 byte string exceeds %s bytes: %s bytes", maxLength, length); + throw new CorruptedFrameException(reason); } return length; diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/CosmosResponseValidator.java b/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/CosmosResponseValidator.java index e0e0afe4d42b..a9590fe1e0fb 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/CosmosResponseValidator.java +++ b/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/CosmosResponseValidator.java @@ -86,6 +86,19 @@ public void validate(CosmosContainerResponse resourceResponse) { return this; } + public Builder withDefaultTimeToLive(Integer timeToLive) { + validators.add(new CosmosResponseValidator() { + + @Override + public void validate(CosmosContainerResponse resourceResponse) { + assertThat(resourceResponse.properties()).isNotNull(); + assertThat(resourceResponse.properties().defaultTimeToLive()).isNotNull(); + assertThat(resourceResponse.properties().defaultTimeToLive()).isEqualTo(timeToLive); + } + }); + return this; + } + public Builder withProperty(String propertyName, String value) { validators.add(new CosmosResponseValidator() { @Override diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/RntbdTransportClientTest.java b/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/RntbdTransportClientTest.java index be84e94dfcb0..b6201b086f23 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/RntbdTransportClientTest.java +++ b/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/internal/directconnectivity/RntbdTransportClientTest.java @@ -914,7 +914,7 @@ static class Provider implements RntbdEndpoint.Provider { Provider(RntbdTransportClient.Options options, SslContext sslContext, RntbdResponse expected) { this.config = new Config(options, sslContext, LogLevel.WARN); - this.timer = new RntbdRequestTimer(config.requestTimeout()); + this.timer = new RntbdRequestTimer(config.requestTimeoutInNanos()); this.expected = expected; } diff --git a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/CollectionCrudTest.java b/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/CollectionCrudTest.java index 215c3889c6ff..4288f93864f3 100644 --- a/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/CollectionCrudTest.java +++ b/sdk/cosmos/microsoft-azure-cosmos/src/test/java/com/azure/data/cosmos/rx/CollectionCrudTest.java @@ -95,6 +95,23 @@ public void createCollection(String collectionName) throws InterruptedException safeDeleteAllCollections(database); } + @Test(groups = { "emulator" }, timeOut = TIMEOUT, dataProvider = "collectionCrudArgProvider") + public void createCollectionWithTTL(String collectionName) throws InterruptedException { + CosmosContainerProperties collectionDefinition = getCollectionDefinition(collectionName); + + Integer defaultTimeToLive = 300; + collectionDefinition.defaultTimeToLive(defaultTimeToLive); + + Mono createObservable = database + .createContainer(collectionDefinition); + + CosmosResponseValidator validator = new CosmosResponseValidator.Builder() + .withId(collectionDefinition.id()).withDefaultTimeToLive(defaultTimeToLive).build(); + + validateSuccess(createObservable, validator); + safeDeleteAllCollections(database); + } + @Test(groups = { "emulator" }, timeOut = TIMEOUT) public void createCollectionWithCompositeIndexAndSpatialSpec() throws InterruptedException { PartitionKeyDefinition partitionKeyDef = new PartitionKeyDefinition(); @@ -189,6 +206,24 @@ public void readCollection(String collectionName) throws InterruptedException { safeDeleteAllCollections(database); } + @Test(groups = { "emulator" }, timeOut = TIMEOUT, dataProvider = "collectionCrudArgProvider") + public void readCollectionWithTTL(String collectionName) throws InterruptedException { + CosmosContainerProperties collectionDefinition = getCollectionDefinition(collectionName); + + Integer defaultTimeToLive = 200; + collectionDefinition.defaultTimeToLive(defaultTimeToLive); + + Mono createObservable = database.createContainer(collectionDefinition); + CosmosContainer collection = createObservable.block().container(); + + Mono readObservable = collection.read(); + + CosmosResponseValidator validator = new CosmosResponseValidator.Builder() + .withId(collection.id()).withDefaultTimeToLive(defaultTimeToLive).build(); + validateSuccess(readObservable, validator); + safeDeleteAllCollections(database); + } + @Test(groups = { "emulator" }, timeOut = TIMEOUT, dataProvider = "collectionCrudArgProvider") public void readCollection_DoesntExist(String collectionName) throws Exception { @@ -236,6 +271,33 @@ public void replaceCollection(String collectionName) throws InterruptedException safeDeleteAllCollections(database); } + @Test(groups = { "emulator" }, timeOut = TIMEOUT, dataProvider = "collectionCrudArgProvider") + public void replaceCollectionWithTTL(String collectionName) throws InterruptedException { + // create a collection + CosmosContainerProperties collectionDefinition = getCollectionDefinition(collectionName); + Integer defaultTimeToLive = 120; + collectionDefinition.defaultTimeToLive(defaultTimeToLive); + Mono createObservable = database.createContainer(collectionDefinition); + CosmosContainer collection = createObservable.block().container(); + CosmosContainerProperties collectionSettings = collection.read().block().properties(); + // sanity check + assertThat(collectionSettings.indexingPolicy().indexingMode()).isEqualTo(IndexingMode.CONSISTENT); + assertThat(collectionSettings.defaultTimeToLive()).isEqualTo(defaultTimeToLive); + + // replace indexing mode + IndexingPolicy indexingMode = new IndexingPolicy(); + indexingMode.indexingMode(IndexingMode.LAZY); + collectionSettings.indexingPolicy(indexingMode); + collectionSettings.defaultTimeToLive(defaultTimeToLive * 2); + Mono readObservable = collection.replace(collectionSettings, new CosmosContainerRequestOptions()); + + // validate + CosmosResponseValidator validator = new CosmosResponseValidator.Builder() + .indexingMode(IndexingMode.LAZY).withDefaultTimeToLive(defaultTimeToLive * 2).build(); + validateSuccess(readObservable, validator); + safeDeleteAllCollections(database); + } + @Test(groups = { "emulator" }, timeOut = 10 * TIMEOUT, retryAnalyzer = RetryAnalyzer.class) public void sessionTokenConsistencyCollectionDeleteCreateSameName() { CosmosClient client1 = clientBuilder().build(); diff --git a/sdk/cosmosdb/mgmt-v2019_08_01_preview/pom.xml b/sdk/cosmosdb/mgmt-v2019_08_01_preview/pom.xml index 28cf7b1d7dbd..5d27a686283c 100644 --- a/sdk/cosmosdb/mgmt-v2019_08_01_preview/pom.xml +++ b/sdk/cosmosdb/mgmt-v2019_08_01_preview/pom.xml @@ -15,7 +15,7 @@ ../../../pom.management.xml azure-mgmt-cosmosdb - 1.0.0-beta + 1.0.0-beta-2 jar Microsoft Azure SDK for CosmosDB Management This package contains Microsoft CosmosDB Management SDK. diff --git a/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/CassandraKeyspaceGetPropertiesResource.java b/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/CassandraKeyspaceGetPropertiesResource.java new file mode 100644 index 000000000000..a0c630e73913 --- /dev/null +++ b/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/CassandraKeyspaceGetPropertiesResource.java @@ -0,0 +1,90 @@ +/** + * 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.cosmosdb.v2019_08_01_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The CassandraKeyspaceGetPropertiesResource model. + */ +public class CassandraKeyspaceGetPropertiesResource { + /** + * Name of the Cosmos DB Cassandra keyspace. + */ + @JsonProperty(value = "id", required = true) + private String id; + + /** + * A system generated property. A unique identifier. + */ + @JsonProperty(value = "_rid", access = JsonProperty.Access.WRITE_ONLY) + private String _rid; + + /** + * A system generated property that denotes the last updated timestamp of + * the resource. + */ + @JsonProperty(value = "_ts", access = JsonProperty.Access.WRITE_ONLY) + private Object _ts; + + /** + * A system generated property representing the resource etag required for + * optimistic concurrency control. + */ + @JsonProperty(value = "_etag", access = JsonProperty.Access.WRITE_ONLY) + private String _etag; + + /** + * Get name of the Cosmos DB Cassandra keyspace. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set name of the Cosmos DB Cassandra keyspace. + * + * @param id the id value to set + * @return the CassandraKeyspaceGetPropertiesResource object itself. + */ + public CassandraKeyspaceGetPropertiesResource withId(String id) { + this.id = id; + return this; + } + + /** + * Get a system generated property. A unique identifier. + * + * @return the _rid value + */ + public String _rid() { + return this._rid; + } + + /** + * Get a system generated property that denotes the last updated timestamp of the resource. + * + * @return the _ts value + */ + public Object _ts() { + return this._ts; + } + + /** + * Get a system generated property representing the resource etag required for optimistic concurrency control. + * + * @return the _etag value + */ + public String _etag() { + return this._etag; + } + +} diff --git a/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/CassandraKeyspaceGetResults.java b/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/CassandraKeyspaceGetResults.java index 73827636bbfa..450befd60206 100644 --- a/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/CassandraKeyspaceGetResults.java +++ b/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/CassandraKeyspaceGetResults.java @@ -23,26 +23,6 @@ * Type representing CassandraKeyspaceGetResults. */ public interface CassandraKeyspaceGetResults extends HasInner, Indexable, Refreshable, Updatable, HasManager { - /** - * @return the _etag value. - */ - String _etag(); - - /** - * @return the _rid value. - */ - String _rid(); - - /** - * @return the _ts value. - */ - Object _ts(); - - /** - * @return the cassandraKeyspaceGetResultsId value. - */ - String cassandraKeyspaceGetResultsId(); - /** * @return the id value. */ @@ -58,6 +38,11 @@ public interface CassandraKeyspaceGetResults extends HasInner, Indexable, Refreshable, Updatable, HasManager { - /** - * @return the _etag value. - */ - String _etag(); - - /** - * @return the _rid value. - */ - String _rid(); - - /** - * @return the _ts value. - */ - Object _ts(); - - /** - * @return the cassandraTableGetResultsId value. - */ - String cassandraTableGetResultsId(); - - /** - * @return the defaultTtl value. - */ - Integer defaultTtl(); - /** * @return the id value. */ @@ -64,9 +39,9 @@ public interface CassandraTableGetResults extends HasInner { + /** Static value Ascending for CompositePathSortOrder. */ + public static final CompositePathSortOrder ASCENDING = fromString("Ascending"); + + /** Static value Descending for CompositePathSortOrder. */ + public static final CompositePathSortOrder DESCENDING = fromString("Descending"); + + /** + * Creates or finds a CompositePathSortOrder from its string representation. + * @param name a name to look for + * @return the corresponding CompositePathSortOrder + */ + @JsonCreator + public static CompositePathSortOrder fromString(String name) { + return fromString(name, CompositePathSortOrder.class); + } + + /** + * @return known CompositePathSortOrder values + */ + public static Collection values() { + return values(CompositePathSortOrder.class); + } +} diff --git a/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/GremlinDatabaseGetPropertiesResource.java b/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/GremlinDatabaseGetPropertiesResource.java new file mode 100644 index 000000000000..61b56d5ffbae --- /dev/null +++ b/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/GremlinDatabaseGetPropertiesResource.java @@ -0,0 +1,90 @@ +/** + * 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.cosmosdb.v2019_08_01_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The GremlinDatabaseGetPropertiesResource model. + */ +public class GremlinDatabaseGetPropertiesResource { + /** + * Name of the Cosmos DB Gremlin database. + */ + @JsonProperty(value = "id", required = true) + private String id; + + /** + * A system generated property. A unique identifier. + */ + @JsonProperty(value = "_rid", access = JsonProperty.Access.WRITE_ONLY) + private String _rid; + + /** + * A system generated property that denotes the last updated timestamp of + * the resource. + */ + @JsonProperty(value = "_ts", access = JsonProperty.Access.WRITE_ONLY) + private Object _ts; + + /** + * A system generated property representing the resource etag required for + * optimistic concurrency control. + */ + @JsonProperty(value = "_etag", access = JsonProperty.Access.WRITE_ONLY) + private String _etag; + + /** + * Get name of the Cosmos DB Gremlin database. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set name of the Cosmos DB Gremlin database. + * + * @param id the id value to set + * @return the GremlinDatabaseGetPropertiesResource object itself. + */ + public GremlinDatabaseGetPropertiesResource withId(String id) { + this.id = id; + return this; + } + + /** + * Get a system generated property. A unique identifier. + * + * @return the _rid value + */ + public String _rid() { + return this._rid; + } + + /** + * Get a system generated property that denotes the last updated timestamp of the resource. + * + * @return the _ts value + */ + public Object _ts() { + return this._ts; + } + + /** + * Get a system generated property representing the resource etag required for optimistic concurrency control. + * + * @return the _etag value + */ + public String _etag() { + return this._etag; + } + +} diff --git a/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/GremlinDatabaseGetResults.java b/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/GremlinDatabaseGetResults.java index b3109996d22b..e78b923ee9cb 100644 --- a/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/GremlinDatabaseGetResults.java +++ b/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/GremlinDatabaseGetResults.java @@ -23,26 +23,6 @@ * Type representing GremlinDatabaseGetResults. */ public interface GremlinDatabaseGetResults extends HasInner, Indexable, Refreshable, Updatable, HasManager { - /** - * @return the _etag value. - */ - String _etag(); - - /** - * @return the _rid value. - */ - String _rid(); - - /** - * @return the _ts value. - */ - Object _ts(); - - /** - * @return the gremlinDatabaseGetResultsId value. - */ - String gremlinDatabaseGetResultsId(); - /** * @return the id value. */ @@ -58,6 +38,11 @@ public interface GremlinDatabaseGetResults extends HasInner, Indexable, Refreshable, Updatable, HasManager { - /** - * @return the _etag value. - */ - String _etag(); - - /** - * @return the _rid value. - */ - String _rid(); - - /** - * @return the _ts value. - */ - Object _ts(); - - /** - * @return the conflictResolutionPolicy value. - */ - ConflictResolutionPolicy conflictResolutionPolicy(); - - /** - * @return the defaultTtl value. - */ - Integer defaultTtl(); - - /** - * @return the gremlinGraphGetResultsId value. - */ - String gremlinGraphGetResultsId(); - /** * @return the id value. */ String id(); - /** - * @return the indexingPolicy value. - */ - IndexingPolicy indexingPolicy(); - /** * @return the location value. */ @@ -74,9 +39,9 @@ public interface GremlinGraphGetResults extends HasInner excludedPaths; + /** + * List of composite path list. + */ + @JsonProperty(value = "compositeIndexes") + private List> compositeIndexes; + + /** + * List of spatial specifics. + */ + @JsonProperty(value = "spatialIndexes") + private List spatialIndexes; + /** * Get indicates if the indexing policy is automatic. * @@ -120,4 +132,44 @@ public IndexingPolicy withExcludedPaths(List excludedPaths) { return this; } + /** + * Get list of composite path list. + * + * @return the compositeIndexes value + */ + public List> compositeIndexes() { + return this.compositeIndexes; + } + + /** + * Set list of composite path list. + * + * @param compositeIndexes the compositeIndexes value to set + * @return the IndexingPolicy object itself. + */ + public IndexingPolicy withCompositeIndexes(List> compositeIndexes) { + this.compositeIndexes = compositeIndexes; + return this; + } + + /** + * Get list of spatial specifics. + * + * @return the spatialIndexes value + */ + public List spatialIndexes() { + return this.spatialIndexes; + } + + /** + * Set list of spatial specifics. + * + * @param spatialIndexes the spatialIndexes value to set + * @return the IndexingPolicy object itself. + */ + public IndexingPolicy withSpatialIndexes(List spatialIndexes) { + this.spatialIndexes = spatialIndexes; + return this; + } + } diff --git a/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/MongoDBCollectionGetPropertiesResource.java b/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/MongoDBCollectionGetPropertiesResource.java new file mode 100644 index 000000000000..9dd646941c2e --- /dev/null +++ b/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/MongoDBCollectionGetPropertiesResource.java @@ -0,0 +1,144 @@ +/** + * 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.cosmosdb.v2019_08_01_preview; + +import java.util.Map; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The MongoDBCollectionGetPropertiesResource model. + */ +public class MongoDBCollectionGetPropertiesResource { + /** + * Name of the Cosmos DB MongoDB collection. + */ + @JsonProperty(value = "id", required = true) + private String id; + + /** + * A key-value pair of shard keys to be applied for the request. + */ + @JsonProperty(value = "shardKey") + private Map shardKey; + + /** + * List of index keys. + */ + @JsonProperty(value = "indexes") + private List indexes; + + /** + * A system generated property. A unique identifier. + */ + @JsonProperty(value = "_rid", access = JsonProperty.Access.WRITE_ONLY) + private String _rid; + + /** + * A system generated property that denotes the last updated timestamp of + * the resource. + */ + @JsonProperty(value = "_ts", access = JsonProperty.Access.WRITE_ONLY) + private Object _ts; + + /** + * A system generated property representing the resource etag required for + * optimistic concurrency control. + */ + @JsonProperty(value = "_etag", access = JsonProperty.Access.WRITE_ONLY) + private String _etag; + + /** + * Get name of the Cosmos DB MongoDB collection. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set name of the Cosmos DB MongoDB collection. + * + * @param id the id value to set + * @return the MongoDBCollectionGetPropertiesResource object itself. + */ + public MongoDBCollectionGetPropertiesResource withId(String id) { + this.id = id; + return this; + } + + /** + * Get a key-value pair of shard keys to be applied for the request. + * + * @return the shardKey value + */ + public Map shardKey() { + return this.shardKey; + } + + /** + * Set a key-value pair of shard keys to be applied for the request. + * + * @param shardKey the shardKey value to set + * @return the MongoDBCollectionGetPropertiesResource object itself. + */ + public MongoDBCollectionGetPropertiesResource withShardKey(Map shardKey) { + this.shardKey = shardKey; + return this; + } + + /** + * Get list of index keys. + * + * @return the indexes value + */ + public List indexes() { + return this.indexes; + } + + /** + * Set list of index keys. + * + * @param indexes the indexes value to set + * @return the MongoDBCollectionGetPropertiesResource object itself. + */ + public MongoDBCollectionGetPropertiesResource withIndexes(List indexes) { + this.indexes = indexes; + return this; + } + + /** + * Get a system generated property. A unique identifier. + * + * @return the _rid value + */ + public String _rid() { + return this._rid; + } + + /** + * Get a system generated property that denotes the last updated timestamp of the resource. + * + * @return the _ts value + */ + public Object _ts() { + return this._ts; + } + + /** + * Get a system generated property representing the resource etag required for optimistic concurrency control. + * + * @return the _etag value + */ + public String _etag() { + return this._etag; + } + +} diff --git a/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/MongoDBCollectionGetResults.java b/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/MongoDBCollectionGetResults.java index b0ad4e306b14..827def08cbe4 100644 --- a/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/MongoDBCollectionGetResults.java +++ b/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/MongoDBCollectionGetResults.java @@ -18,56 +18,30 @@ import com.microsoft.azure.arm.resources.models.HasManager; import com.microsoft.azure.management.cosmosdb.v2019_08_01_preview.implementation.CosmosDBManager; import java.util.Map; -import java.util.List; /** * Type representing MongoDBCollectionGetResults. */ public interface MongoDBCollectionGetResults extends HasInner, Indexable, Refreshable, Updatable, HasManager { - /** - * @return the _etag value. - */ - String _etag(); - - /** - * @return the _rid value. - */ - String _rid(); - - /** - * @return the _ts value. - */ - Object _ts(); - /** * @return the id value. */ String id(); - /** - * @return the indexes value. - */ - List indexes(); - /** * @return the location value. */ String location(); - /** - * @return the mongoDBCollectionGetResultsId value. - */ - String mongoDBCollectionGetResultsId(); - /** * @return the name value. */ String name(); /** - * @return the shardKey value. + * @return the resource value. */ - Map shardKey(); + MongoDBCollectionGetPropertiesResource resource(); /** * @return the tags value. diff --git a/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/MongoDBDatabaseGetPropertiesResource.java b/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/MongoDBDatabaseGetPropertiesResource.java new file mode 100644 index 000000000000..99f33f9fa9cc --- /dev/null +++ b/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/MongoDBDatabaseGetPropertiesResource.java @@ -0,0 +1,90 @@ +/** + * 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.cosmosdb.v2019_08_01_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The MongoDBDatabaseGetPropertiesResource model. + */ +public class MongoDBDatabaseGetPropertiesResource { + /** + * Name of the Cosmos DB MongoDB database. + */ + @JsonProperty(value = "id", required = true) + private String id; + + /** + * A system generated property. A unique identifier. + */ + @JsonProperty(value = "_rid", access = JsonProperty.Access.WRITE_ONLY) + private String _rid; + + /** + * A system generated property that denotes the last updated timestamp of + * the resource. + */ + @JsonProperty(value = "_ts", access = JsonProperty.Access.WRITE_ONLY) + private Object _ts; + + /** + * A system generated property representing the resource etag required for + * optimistic concurrency control. + */ + @JsonProperty(value = "_etag", access = JsonProperty.Access.WRITE_ONLY) + private String _etag; + + /** + * Get name of the Cosmos DB MongoDB database. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set name of the Cosmos DB MongoDB database. + * + * @param id the id value to set + * @return the MongoDBDatabaseGetPropertiesResource object itself. + */ + public MongoDBDatabaseGetPropertiesResource withId(String id) { + this.id = id; + return this; + } + + /** + * Get a system generated property. A unique identifier. + * + * @return the _rid value + */ + public String _rid() { + return this._rid; + } + + /** + * Get a system generated property that denotes the last updated timestamp of the resource. + * + * @return the _ts value + */ + public Object _ts() { + return this._ts; + } + + /** + * Get a system generated property representing the resource etag required for optimistic concurrency control. + * + * @return the _etag value + */ + public String _etag() { + return this._etag; + } + +} diff --git a/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/MongoDBDatabaseGetResults.java b/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/MongoDBDatabaseGetResults.java index 058089cb2bbf..b9d0de4c4b2b 100644 --- a/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/MongoDBDatabaseGetResults.java +++ b/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/MongoDBDatabaseGetResults.java @@ -23,21 +23,6 @@ * Type representing MongoDBDatabaseGetResults. */ public interface MongoDBDatabaseGetResults extends HasInner, Indexable, Refreshable, Updatable, HasManager { - /** - * @return the _etag value. - */ - String _etag(); - - /** - * @return the _rid value. - */ - String _rid(); - - /** - * @return the _ts value. - */ - Object _ts(); - /** * @return the id value. */ @@ -49,14 +34,14 @@ public interface MongoDBDatabaseGetResults extends HasInner types; + + /** + * Get the path for which the indexing behavior applies to. Index paths typically start with root and end with wildcard (/path/*). + * + * @return the path value + */ + public String path() { + return this.path; + } + + /** + * Set the path for which the indexing behavior applies to. Index paths typically start with root and end with wildcard (/path/*). + * + * @param path the path value to set + * @return the SpatialSpec object itself. + */ + public SpatialSpec withPath(String path) { + this.path = path; + return this; + } + + /** + * Get list of path's spatial type. + * + * @return the types value + */ + public List types() { + return this.types; + } + + /** + * Set list of path's spatial type. + * + * @param types the types value to set + * @return the SpatialSpec object itself. + */ + public SpatialSpec withTypes(List types) { + this.types = types; + return this; + } + +} diff --git a/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/SpatialType.java b/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/SpatialType.java new file mode 100644 index 000000000000..483c08cfe392 --- /dev/null +++ b/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/SpatialType.java @@ -0,0 +1,47 @@ +/** + * 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.cosmosdb.v2019_08_01_preview; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for SpatialType. + */ +public final class SpatialType extends ExpandableStringEnum { + /** Static value Point for SpatialType. */ + public static final SpatialType POINT = fromString("Point"); + + /** Static value LineString for SpatialType. */ + public static final SpatialType LINE_STRING = fromString("LineString"); + + /** Static value Polygon for SpatialType. */ + public static final SpatialType POLYGON = fromString("Polygon"); + + /** Static value MultiPolygon for SpatialType. */ + public static final SpatialType MULTI_POLYGON = fromString("MultiPolygon"); + + /** + * Creates or finds a SpatialType from its string representation. + * @param name a name to look for + * @return the corresponding SpatialType + */ + @JsonCreator + public static SpatialType fromString(String name) { + return fromString(name, SpatialType.class); + } + + /** + * @return known SpatialType values + */ + public static Collection values() { + return values(SpatialType.class); + } +} diff --git a/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/SqlContainerGetPropertiesResource.java b/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/SqlContainerGetPropertiesResource.java new file mode 100644 index 000000000000..3c181e1b0369 --- /dev/null +++ b/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/SqlContainerGetPropertiesResource.java @@ -0,0 +1,224 @@ +/** + * 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.cosmosdb.v2019_08_01_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The SqlContainerGetPropertiesResource model. + */ +public class SqlContainerGetPropertiesResource { + /** + * Name of the Cosmos DB SQL container. + */ + @JsonProperty(value = "id", required = true) + private String id; + + /** + * The configuration of the indexing policy. By default, the indexing is + * automatic for all document paths within the container. + */ + @JsonProperty(value = "indexingPolicy") + private IndexingPolicy indexingPolicy; + + /** + * The configuration of the partition key to be used for partitioning data + * into multiple partitions. + */ + @JsonProperty(value = "partitionKey") + private ContainerPartitionKey partitionKey; + + /** + * Default time to live. + */ + @JsonProperty(value = "defaultTtl") + private Integer defaultTtl; + + /** + * The unique key policy configuration for specifying uniqueness + * constraints on documents in the collection in the Azure Cosmos DB + * service. + */ + @JsonProperty(value = "uniqueKeyPolicy") + private UniqueKeyPolicy uniqueKeyPolicy; + + /** + * The conflict resolution policy for the container. + */ + @JsonProperty(value = "conflictResolutionPolicy") + private ConflictResolutionPolicy conflictResolutionPolicy; + + /** + * A system generated property. A unique identifier. + */ + @JsonProperty(value = "_rid", access = JsonProperty.Access.WRITE_ONLY) + private String _rid; + + /** + * A system generated property that denotes the last updated timestamp of + * the resource. + */ + @JsonProperty(value = "_ts", access = JsonProperty.Access.WRITE_ONLY) + private Object _ts; + + /** + * A system generated property representing the resource etag required for + * optimistic concurrency control. + */ + @JsonProperty(value = "_etag", access = JsonProperty.Access.WRITE_ONLY) + private String _etag; + + /** + * Get name of the Cosmos DB SQL container. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set name of the Cosmos DB SQL container. + * + * @param id the id value to set + * @return the SqlContainerGetPropertiesResource object itself. + */ + public SqlContainerGetPropertiesResource withId(String id) { + this.id = id; + return this; + } + + /** + * Get the configuration of the indexing policy. By default, the indexing is automatic for all document paths within the container. + * + * @return the indexingPolicy value + */ + public IndexingPolicy indexingPolicy() { + return this.indexingPolicy; + } + + /** + * Set the configuration of the indexing policy. By default, the indexing is automatic for all document paths within the container. + * + * @param indexingPolicy the indexingPolicy value to set + * @return the SqlContainerGetPropertiesResource object itself. + */ + public SqlContainerGetPropertiesResource withIndexingPolicy(IndexingPolicy indexingPolicy) { + this.indexingPolicy = indexingPolicy; + return this; + } + + /** + * Get the configuration of the partition key to be used for partitioning data into multiple partitions. + * + * @return the partitionKey value + */ + public ContainerPartitionKey partitionKey() { + return this.partitionKey; + } + + /** + * Set the configuration of the partition key to be used for partitioning data into multiple partitions. + * + * @param partitionKey the partitionKey value to set + * @return the SqlContainerGetPropertiesResource object itself. + */ + public SqlContainerGetPropertiesResource withPartitionKey(ContainerPartitionKey partitionKey) { + this.partitionKey = partitionKey; + return this; + } + + /** + * Get default time to live. + * + * @return the defaultTtl value + */ + public Integer defaultTtl() { + return this.defaultTtl; + } + + /** + * Set default time to live. + * + * @param defaultTtl the defaultTtl value to set + * @return the SqlContainerGetPropertiesResource object itself. + */ + public SqlContainerGetPropertiesResource withDefaultTtl(Integer defaultTtl) { + this.defaultTtl = defaultTtl; + return this; + } + + /** + * Get the unique key policy configuration for specifying uniqueness constraints on documents in the collection in the Azure Cosmos DB service. + * + * @return the uniqueKeyPolicy value + */ + public UniqueKeyPolicy uniqueKeyPolicy() { + return this.uniqueKeyPolicy; + } + + /** + * Set the unique key policy configuration for specifying uniqueness constraints on documents in the collection in the Azure Cosmos DB service. + * + * @param uniqueKeyPolicy the uniqueKeyPolicy value to set + * @return the SqlContainerGetPropertiesResource object itself. + */ + public SqlContainerGetPropertiesResource withUniqueKeyPolicy(UniqueKeyPolicy uniqueKeyPolicy) { + this.uniqueKeyPolicy = uniqueKeyPolicy; + return this; + } + + /** + * Get the conflict resolution policy for the container. + * + * @return the conflictResolutionPolicy value + */ + public ConflictResolutionPolicy conflictResolutionPolicy() { + return this.conflictResolutionPolicy; + } + + /** + * Set the conflict resolution policy for the container. + * + * @param conflictResolutionPolicy the conflictResolutionPolicy value to set + * @return the SqlContainerGetPropertiesResource object itself. + */ + public SqlContainerGetPropertiesResource withConflictResolutionPolicy(ConflictResolutionPolicy conflictResolutionPolicy) { + this.conflictResolutionPolicy = conflictResolutionPolicy; + return this; + } + + /** + * Get a system generated property. A unique identifier. + * + * @return the _rid value + */ + public String _rid() { + return this._rid; + } + + /** + * Get a system generated property that denotes the last updated timestamp of the resource. + * + * @return the _ts value + */ + public Object _ts() { + return this._ts; + } + + /** + * Get a system generated property representing the resource etag required for optimistic concurrency control. + * + * @return the _etag value + */ + public String _etag() { + return this._etag; + } + +} diff --git a/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/SqlContainerGetResults.java b/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/SqlContainerGetResults.java index dc085b6e78b5..e3f977a60272 100644 --- a/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/SqlContainerGetResults.java +++ b/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/SqlContainerGetResults.java @@ -23,41 +23,11 @@ * Type representing SqlContainerGetResults. */ public interface SqlContainerGetResults extends HasInner, Indexable, Refreshable, Updatable, HasManager { - /** - * @return the _etag value. - */ - String _etag(); - - /** - * @return the _rid value. - */ - String _rid(); - - /** - * @return the _ts value. - */ - Object _ts(); - - /** - * @return the conflictResolutionPolicy value. - */ - ConflictResolutionPolicy conflictResolutionPolicy(); - - /** - * @return the defaultTtl value. - */ - Integer defaultTtl(); - /** * @return the id value. */ String id(); - /** - * @return the indexingPolicy value. - */ - IndexingPolicy indexingPolicy(); - /** * @return the location value. */ @@ -69,14 +39,9 @@ public interface SqlContainerGetResults extends HasInner, Indexable, Refreshable, Updatable, HasManager { - /** - * @return the _colls value. - */ - String _colls(); - - /** - * @return the _etag value. - */ - String _etag(); - - /** - * @return the _rid value. - */ - String _rid(); - - /** - * @return the _ts value. - */ - Object _ts(); - - /** - * @return the _users value. - */ - String _users(); - /** * @return the id value. */ @@ -64,9 +39,9 @@ public interface SqlDatabaseGetResults extends HasInner, Indexable, Refreshable, Updatable, HasManager { - /** - * @return the _etag value. - */ - String _etag(); - - /** - * @return the _rid value. - */ - String _rid(); - - /** - * @return the _ts value. - */ - Object _ts(); - - /** - * @return the body value. - */ - String body(); - /** * @return the id value. */ @@ -59,9 +39,9 @@ public interface SqlStoredProcedureGetResults extends HasInner, Indexable, Refreshable, Updatable, HasManager { - /** - * @return the _etag value. - */ - String _etag(); - - /** - * @return the _rid value. - */ - String _rid(); - - /** - * @return the _ts value. - */ - Object _ts(); - - /** - * @return the body value. - */ - String body(); - /** * @return the id value. */ @@ -59,25 +39,15 @@ public interface SqlTriggerGetResults extends HasInner tags(); - /** - * @return the triggerOperation value. - */ - TriggerOperation triggerOperation(); - - /** - * @return the triggerType value. - */ - TriggerType triggerType(); - /** * @return the type value. */ diff --git a/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/SqlUserDefinedFunctionGetPropertiesResource.java b/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/SqlUserDefinedFunctionGetPropertiesResource.java new file mode 100644 index 000000000000..8feae65721d3 --- /dev/null +++ b/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/SqlUserDefinedFunctionGetPropertiesResource.java @@ -0,0 +1,116 @@ +/** + * 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.cosmosdb.v2019_08_01_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The SqlUserDefinedFunctionGetPropertiesResource model. + */ +public class SqlUserDefinedFunctionGetPropertiesResource { + /** + * Name of the Cosmos DB SQL userDefinedFunction. + */ + @JsonProperty(value = "id", required = true) + private String id; + + /** + * Body of the User Defined Function. + */ + @JsonProperty(value = "body") + private String body; + + /** + * A system generated property. A unique identifier. + */ + @JsonProperty(value = "_rid", access = JsonProperty.Access.WRITE_ONLY) + private String _rid; + + /** + * A system generated property that denotes the last updated timestamp of + * the resource. + */ + @JsonProperty(value = "_ts", access = JsonProperty.Access.WRITE_ONLY) + private Object _ts; + + /** + * A system generated property representing the resource etag required for + * optimistic concurrency control. + */ + @JsonProperty(value = "_etag", access = JsonProperty.Access.WRITE_ONLY) + private String _etag; + + /** + * Get name of the Cosmos DB SQL userDefinedFunction. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set name of the Cosmos DB SQL userDefinedFunction. + * + * @param id the id value to set + * @return the SqlUserDefinedFunctionGetPropertiesResource object itself. + */ + public SqlUserDefinedFunctionGetPropertiesResource withId(String id) { + this.id = id; + return this; + } + + /** + * Get body of the User Defined Function. + * + * @return the body value + */ + public String body() { + return this.body; + } + + /** + * Set body of the User Defined Function. + * + * @param body the body value to set + * @return the SqlUserDefinedFunctionGetPropertiesResource object itself. + */ + public SqlUserDefinedFunctionGetPropertiesResource withBody(String body) { + this.body = body; + return this; + } + + /** + * Get a system generated property. A unique identifier. + * + * @return the _rid value + */ + public String _rid() { + return this._rid; + } + + /** + * Get a system generated property that denotes the last updated timestamp of the resource. + * + * @return the _ts value + */ + public Object _ts() { + return this._ts; + } + + /** + * Get a system generated property representing the resource etag required for optimistic concurrency control. + * + * @return the _etag value + */ + public String _etag() { + return this._etag; + } + +} diff --git a/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/SqlUserDefinedFunctionGetResults.java b/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/SqlUserDefinedFunctionGetResults.java index d403b6cf237d..e9523f232b48 100644 --- a/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/SqlUserDefinedFunctionGetResults.java +++ b/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/SqlUserDefinedFunctionGetResults.java @@ -23,26 +23,6 @@ * Type representing SqlUserDefinedFunctionGetResults. */ public interface SqlUserDefinedFunctionGetResults extends HasInner, Indexable, Refreshable, Updatable, HasManager { - /** - * @return the _etag value. - */ - String _etag(); - - /** - * @return the _rid value. - */ - String _rid(); - - /** - * @return the _ts value. - */ - Object _ts(); - - /** - * @return the body value. - */ - String body(); - /** * @return the id value. */ @@ -59,9 +39,9 @@ public interface SqlUserDefinedFunctionGetResults extends HasInner, Indexable, Refreshable, Updatable, HasManager { - /** - * @return the _etag value. - */ - String _etag(); - - /** - * @return the _rid value. - */ - String _rid(); - - /** - * @return the _ts value. - */ - Object _ts(); - /** * @return the id value. */ @@ -55,9 +40,9 @@ public interface TableGetResults extends HasInner, Indexab String name(); /** - * @return the tableGetResultsId value. + * @return the resource value. */ - String tableGetResultsId(); + TableGetPropertiesResource resource(); /** * @return the tags value. diff --git a/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/ThroughputSettingsGetPropertiesResource.java b/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/ThroughputSettingsGetPropertiesResource.java new file mode 100644 index 000000000000..cb5d0cf45fbe --- /dev/null +++ b/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/ThroughputSettingsGetPropertiesResource.java @@ -0,0 +1,120 @@ +/** + * 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.cosmosdb.v2019_08_01_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The ThroughputSettingsGetPropertiesResource model. + */ +public class ThroughputSettingsGetPropertiesResource { + /** + * Value of the Cosmos DB resource throughput. + */ + @JsonProperty(value = "throughput", required = true) + private int throughput; + + /** + * The minimum throughput of the resource. + */ + @JsonProperty(value = "minimumThroughput", access = JsonProperty.Access.WRITE_ONLY) + private String minimumThroughput; + + /** + * The throughput replace is pending. + */ + @JsonProperty(value = "offerReplacePending", access = JsonProperty.Access.WRITE_ONLY) + private String offerReplacePending; + + /** + * A system generated property. A unique identifier. + */ + @JsonProperty(value = "_rid", access = JsonProperty.Access.WRITE_ONLY) + private String _rid; + + /** + * A system generated property that denotes the last updated timestamp of + * the resource. + */ + @JsonProperty(value = "_ts", access = JsonProperty.Access.WRITE_ONLY) + private Object _ts; + + /** + * A system generated property representing the resource etag required for + * optimistic concurrency control. + */ + @JsonProperty(value = "_etag", access = JsonProperty.Access.WRITE_ONLY) + private String _etag; + + /** + * Get value of the Cosmos DB resource throughput. + * + * @return the throughput value + */ + public int throughput() { + return this.throughput; + } + + /** + * Set value of the Cosmos DB resource throughput. + * + * @param throughput the throughput value to set + * @return the ThroughputSettingsGetPropertiesResource object itself. + */ + public ThroughputSettingsGetPropertiesResource withThroughput(int throughput) { + this.throughput = throughput; + return this; + } + + /** + * Get the minimum throughput of the resource. + * + * @return the minimumThroughput value + */ + public String minimumThroughput() { + return this.minimumThroughput; + } + + /** + * Get the throughput replace is pending. + * + * @return the offerReplacePending value + */ + public String offerReplacePending() { + return this.offerReplacePending; + } + + /** + * Get a system generated property. A unique identifier. + * + * @return the _rid value + */ + public String _rid() { + return this._rid; + } + + /** + * Get a system generated property that denotes the last updated timestamp of the resource. + * + * @return the _ts value + */ + public Object _ts() { + return this._ts; + } + + /** + * Get a system generated property representing the resource etag required for optimistic concurrency control. + * + * @return the _etag value + */ + public String _etag() { + return this._etag; + } + +} diff --git a/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/ThroughputSettingsGetResults.java b/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/ThroughputSettingsGetResults.java index 2417c5b5b285..545e46fbef24 100644 --- a/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/ThroughputSettingsGetResults.java +++ b/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/ThroughputSettingsGetResults.java @@ -28,31 +28,21 @@ public interface ThroughputSettingsGetResults extends HasInner tags(); - /** - * @return the throughput value. - */ - int throughput(); - /** * @return the type value. */ diff --git a/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/CassandraKeyspaceGetResultsImpl.java b/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/CassandraKeyspaceGetResultsImpl.java index 09d032440ed0..d429bebcbad2 100644 --- a/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/CassandraKeyspaceGetResultsImpl.java +++ b/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/CassandraKeyspaceGetResultsImpl.java @@ -13,6 +13,7 @@ import rx.Observable; import com.microsoft.azure.management.cosmosdb.v2019_08_01_preview.CassandraKeyspaceCreateUpdateParameters; import java.util.Map; +import com.microsoft.azure.management.cosmosdb.v2019_08_01_preview.CassandraKeyspaceGetPropertiesResource; import com.microsoft.azure.management.cosmosdb.v2019_08_01_preview.CassandraKeyspaceResource; import rx.functions.Func1; @@ -93,26 +94,6 @@ private void resetCreateUpdateParameters() { this.createOrUpdateParameter = new CassandraKeyspaceCreateUpdateParameters(); } - @Override - public String _etag() { - return this.inner()._etag(); - } - - @Override - public String _rid() { - return this.inner()._rid(); - } - - @Override - public Object _ts() { - return this.inner()._ts(); - } - - @Override - public String cassandraKeyspaceGetResultsId() { - return this.inner().cassandraKeyspaceGetResultsId(); - } - @Override public String id() { return this.inner().id(); @@ -128,6 +109,11 @@ public String name() { return this.inner().name(); } + @Override + public CassandraKeyspaceGetPropertiesResource resource() { + return this.inner().resource(); + } + @Override public Map tags() { return this.inner().getTags(); diff --git a/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/CassandraKeyspaceGetResultsInner.java b/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/CassandraKeyspaceGetResultsInner.java index 2daa8df739e1..2f3817c70b9a 100644 --- a/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/CassandraKeyspaceGetResultsInner.java +++ b/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/CassandraKeyspaceGetResultsInner.java @@ -8,6 +8,7 @@ package com.microsoft.azure.management.cosmosdb.v2019_08_01_preview.implementation; +import com.microsoft.azure.management.cosmosdb.v2019_08_01_preview.CassandraKeyspaceGetPropertiesResource; import com.fasterxml.jackson.annotation.JsonProperty; import com.microsoft.rest.serializer.JsonFlatten; import com.microsoft.azure.management.cosmosdb.v2019_08_01_preview.ARMResourceProperties; @@ -18,76 +19,29 @@ @JsonFlatten public class CassandraKeyspaceGetResultsInner extends ARMResourceProperties { /** - * Name of the Cosmos DB Cassandra keyspace. + * The resource property. */ - @JsonProperty(value = "properties.id", required = true) - private String cassandraKeyspaceGetResultsId; + @JsonProperty(value = "properties.resource") + private CassandraKeyspaceGetPropertiesResource resource; /** - * A system generated property. A unique identifier. - */ - @JsonProperty(value = "properties._rid", access = JsonProperty.Access.WRITE_ONLY) - private String _rid; - - /** - * A system generated property that denotes the last updated timestamp of - * the resource. - */ - @JsonProperty(value = "properties._ts", access = JsonProperty.Access.WRITE_ONLY) - private Object _ts; - - /** - * A system generated property representing the resource etag required for - * optimistic concurrency control. - */ - @JsonProperty(value = "properties._etag", access = JsonProperty.Access.WRITE_ONLY) - private String _etag; - - /** - * Get name of the Cosmos DB Cassandra keyspace. + * Get the resource value. * - * @return the cassandraKeyspaceGetResultsId value + * @return the resource value */ - public String cassandraKeyspaceGetResultsId() { - return this.cassandraKeyspaceGetResultsId; + public CassandraKeyspaceGetPropertiesResource resource() { + return this.resource; } /** - * Set name of the Cosmos DB Cassandra keyspace. + * Set the resource value. * - * @param cassandraKeyspaceGetResultsId the cassandraKeyspaceGetResultsId value to set + * @param resource the resource value to set * @return the CassandraKeyspaceGetResultsInner object itself. */ - public CassandraKeyspaceGetResultsInner withCassandraKeyspaceGetResultsId(String cassandraKeyspaceGetResultsId) { - this.cassandraKeyspaceGetResultsId = cassandraKeyspaceGetResultsId; + public CassandraKeyspaceGetResultsInner withResource(CassandraKeyspaceGetPropertiesResource resource) { + this.resource = resource; return this; } - /** - * Get a system generated property. A unique identifier. - * - * @return the _rid value - */ - public String _rid() { - return this._rid; - } - - /** - * Get a system generated property that denotes the last updated timestamp of the resource. - * - * @return the _ts value - */ - public Object _ts() { - return this._ts; - } - - /** - * Get a system generated property representing the resource etag required for optimistic concurrency control. - * - * @return the _etag value - */ - public String _etag() { - return this._etag; - } - } diff --git a/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/CassandraResourcesInner.java b/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/CassandraResourcesInner.java index 3afd719a402f..46637dd3ca33 100644 --- a/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/CassandraResourcesInner.java +++ b/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/CassandraResourcesInner.java @@ -41,7 +41,7 @@ public class CassandraResourcesInner { /** The Retrofit service to perform REST calls. */ private CassandraResourcesService service; /** The service client containing this operation class. */ - private CosmosDBImpl client; + private CosmosDBManagementClientImpl client; /** * Initializes an instance of CassandraResourcesInner. @@ -49,7 +49,7 @@ public class CassandraResourcesInner { * @param retrofit the Retrofit instance built from a Retrofit Builder. * @param client the instance of the service client containing this operation class. */ - public CassandraResourcesInner(Retrofit retrofit, CosmosDBImpl client) { + public CassandraResourcesInner(Retrofit retrofit, CosmosDBManagementClientImpl client) { this.service = retrofit.create(CassandraResourcesService.class); this.client = client; } diff --git a/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/CassandraTableGetResultsImpl.java b/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/CassandraTableGetResultsImpl.java index db570c82c0f7..02982bbcf1b2 100644 --- a/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/CassandraTableGetResultsImpl.java +++ b/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/CassandraTableGetResultsImpl.java @@ -13,7 +13,7 @@ import rx.Observable; import com.microsoft.azure.management.cosmosdb.v2019_08_01_preview.CassandraTableCreateUpdateParameters; import java.util.Map; -import com.microsoft.azure.management.cosmosdb.v2019_08_01_preview.CassandraSchema; +import com.microsoft.azure.management.cosmosdb.v2019_08_01_preview.CassandraTableGetPropertiesResource; import com.microsoft.azure.management.cosmosdb.v2019_08_01_preview.CassandraTableResource; import rx.functions.Func1; @@ -96,31 +96,6 @@ private void resetCreateUpdateParameters() { this.createOrUpdateParameter = new CassandraTableCreateUpdateParameters(); } - @Override - public String _etag() { - return this.inner()._etag(); - } - - @Override - public String _rid() { - return this.inner()._rid(); - } - - @Override - public Object _ts() { - return this.inner()._ts(); - } - - @Override - public String cassandraTableGetResultsId() { - return this.inner().cassandraTableGetResultsId(); - } - - @Override - public Integer defaultTtl() { - return this.inner().defaultTtl(); - } - @Override public String id() { return this.inner().id(); @@ -137,8 +112,8 @@ public String name() { } @Override - public CassandraSchema schema() { - return this.inner().schema(); + public CassandraTableGetPropertiesResource resource() { + return this.inner().resource(); } @Override diff --git a/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/CassandraTableGetResultsInner.java b/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/CassandraTableGetResultsInner.java index eba81aa7bb56..02349a1ea4ab 100644 --- a/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/CassandraTableGetResultsInner.java +++ b/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/CassandraTableGetResultsInner.java @@ -8,7 +8,7 @@ package com.microsoft.azure.management.cosmosdb.v2019_08_01_preview.implementation; -import com.microsoft.azure.management.cosmosdb.v2019_08_01_preview.CassandraSchema; +import com.microsoft.azure.management.cosmosdb.v2019_08_01_preview.CassandraTableGetPropertiesResource; import com.fasterxml.jackson.annotation.JsonProperty; import com.microsoft.rest.serializer.JsonFlatten; import com.microsoft.azure.management.cosmosdb.v2019_08_01_preview.ARMResourceProperties; @@ -19,128 +19,29 @@ @JsonFlatten public class CassandraTableGetResultsInner extends ARMResourceProperties { /** - * Name of the Cosmos DB Cassandra table. + * The resource property. */ - @JsonProperty(value = "properties.id", required = true) - private String cassandraTableGetResultsId; + @JsonProperty(value = "properties.resource") + private CassandraTableGetPropertiesResource resource; /** - * Time to live of the Cosmos DB Cassandra table. - */ - @JsonProperty(value = "properties.defaultTtl") - private Integer defaultTtl; - - /** - * Schema of the Cosmos DB Cassandra table. - */ - @JsonProperty(value = "properties.schema") - private CassandraSchema schema; - - /** - * A system generated property. A unique identifier. - */ - @JsonProperty(value = "properties._rid", access = JsonProperty.Access.WRITE_ONLY) - private String _rid; - - /** - * A system generated property that denotes the last updated timestamp of - * the resource. - */ - @JsonProperty(value = "properties._ts", access = JsonProperty.Access.WRITE_ONLY) - private Object _ts; - - /** - * A system generated property representing the resource etag required for - * optimistic concurrency control. - */ - @JsonProperty(value = "properties._etag", access = JsonProperty.Access.WRITE_ONLY) - private String _etag; - - /** - * Get name of the Cosmos DB Cassandra table. - * - * @return the cassandraTableGetResultsId value - */ - public String cassandraTableGetResultsId() { - return this.cassandraTableGetResultsId; - } - - /** - * Set name of the Cosmos DB Cassandra table. - * - * @param cassandraTableGetResultsId the cassandraTableGetResultsId value to set - * @return the CassandraTableGetResultsInner object itself. - */ - public CassandraTableGetResultsInner withCassandraTableGetResultsId(String cassandraTableGetResultsId) { - this.cassandraTableGetResultsId = cassandraTableGetResultsId; - return this; - } - - /** - * Get time to live of the Cosmos DB Cassandra table. + * Get the resource value. * - * @return the defaultTtl value + * @return the resource value */ - public Integer defaultTtl() { - return this.defaultTtl; + public CassandraTableGetPropertiesResource resource() { + return this.resource; } /** - * Set time to live of the Cosmos DB Cassandra table. + * Set the resource value. * - * @param defaultTtl the defaultTtl value to set + * @param resource the resource value to set * @return the CassandraTableGetResultsInner object itself. */ - public CassandraTableGetResultsInner withDefaultTtl(Integer defaultTtl) { - this.defaultTtl = defaultTtl; + public CassandraTableGetResultsInner withResource(CassandraTableGetPropertiesResource resource) { + this.resource = resource; return this; } - /** - * Get schema of the Cosmos DB Cassandra table. - * - * @return the schema value - */ - public CassandraSchema schema() { - return this.schema; - } - - /** - * Set schema of the Cosmos DB Cassandra table. - * - * @param schema the schema value to set - * @return the CassandraTableGetResultsInner object itself. - */ - public CassandraTableGetResultsInner withSchema(CassandraSchema schema) { - this.schema = schema; - return this; - } - - /** - * Get a system generated property. A unique identifier. - * - * @return the _rid value - */ - public String _rid() { - return this._rid; - } - - /** - * Get a system generated property that denotes the last updated timestamp of the resource. - * - * @return the _ts value - */ - public Object _ts() { - return this._ts; - } - - /** - * Get a system generated property representing the resource etag required for optimistic concurrency control. - * - * @return the _etag value - */ - public String _etag() { - return this._etag; - } - } diff --git a/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/CollectionPartitionRegionsInner.java b/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/CollectionPartitionRegionsInner.java index 9ed453c34451..af8c8d654343 100644 --- a/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/CollectionPartitionRegionsInner.java +++ b/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/CollectionPartitionRegionsInner.java @@ -34,7 +34,7 @@ public class CollectionPartitionRegionsInner { /** The Retrofit service to perform REST calls. */ private CollectionPartitionRegionsService service; /** The service client containing this operation class. */ - private CosmosDBImpl client; + private CosmosDBManagementClientImpl client; /** * Initializes an instance of CollectionPartitionRegionsInner. @@ -42,7 +42,7 @@ public class CollectionPartitionRegionsInner { * @param retrofit the Retrofit instance built from a Retrofit Builder. * @param client the instance of the service client containing this operation class. */ - public CollectionPartitionRegionsInner(Retrofit retrofit, CosmosDBImpl client) { + public CollectionPartitionRegionsInner(Retrofit retrofit, CosmosDBManagementClientImpl client) { this.service = retrofit.create(CollectionPartitionRegionsService.class); this.client = client; } diff --git a/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/CollectionPartitionsInner.java b/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/CollectionPartitionsInner.java index 4a8372fa7b27..8609f2714bfe 100644 --- a/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/CollectionPartitionsInner.java +++ b/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/CollectionPartitionsInner.java @@ -34,7 +34,7 @@ public class CollectionPartitionsInner { /** The Retrofit service to perform REST calls. */ private CollectionPartitionsService service; /** The service client containing this operation class. */ - private CosmosDBImpl client; + private CosmosDBManagementClientImpl client; /** * Initializes an instance of CollectionPartitionsInner. @@ -42,7 +42,7 @@ public class CollectionPartitionsInner { * @param retrofit the Retrofit instance built from a Retrofit Builder. * @param client the instance of the service client containing this operation class. */ - public CollectionPartitionsInner(Retrofit retrofit, CosmosDBImpl client) { + public CollectionPartitionsInner(Retrofit retrofit, CosmosDBManagementClientImpl client) { this.service = retrofit.create(CollectionPartitionsService.class); this.client = client; } diff --git a/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/CollectionRegionsInner.java b/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/CollectionRegionsInner.java index 5ededb11f163..d05373e76dc1 100644 --- a/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/CollectionRegionsInner.java +++ b/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/CollectionRegionsInner.java @@ -34,7 +34,7 @@ public class CollectionRegionsInner { /** The Retrofit service to perform REST calls. */ private CollectionRegionsService service; /** The service client containing this operation class. */ - private CosmosDBImpl client; + private CosmosDBManagementClientImpl client; /** * Initializes an instance of CollectionRegionsInner. @@ -42,7 +42,7 @@ public class CollectionRegionsInner { * @param retrofit the Retrofit instance built from a Retrofit Builder. * @param client the instance of the service client containing this operation class. */ - public CollectionRegionsInner(Retrofit retrofit, CosmosDBImpl client) { + public CollectionRegionsInner(Retrofit retrofit, CosmosDBManagementClientImpl client) { this.service = retrofit.create(CollectionRegionsService.class); this.client = client; } diff --git a/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/CollectionsInner.java b/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/CollectionsInner.java index b2096dd878ca..9fa42097f086 100644 --- a/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/CollectionsInner.java +++ b/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/CollectionsInner.java @@ -34,7 +34,7 @@ public class CollectionsInner { /** The Retrofit service to perform REST calls. */ private CollectionsService service; /** The service client containing this operation class. */ - private CosmosDBImpl client; + private CosmosDBManagementClientImpl client; /** * Initializes an instance of CollectionsInner. @@ -42,7 +42,7 @@ public class CollectionsInner { * @param retrofit the Retrofit instance built from a Retrofit Builder. * @param client the instance of the service client containing this operation class. */ - public CollectionsInner(Retrofit retrofit, CosmosDBImpl client) { + public CollectionsInner(Retrofit retrofit, CosmosDBManagementClientImpl client) { this.service = retrofit.create(CollectionsService.class); this.client = client; } diff --git a/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/CosmosDBImpl.java b/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/CosmosDBManagementClientImpl.java similarity index 92% rename from sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/CosmosDBImpl.java rename to sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/CosmosDBManagementClientImpl.java index b2a7c5b3b121..78270e426c9e 100644 --- a/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/CosmosDBImpl.java +++ b/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/CosmosDBManagementClientImpl.java @@ -14,9 +14,9 @@ import com.microsoft.rest.RestClient; /** - * Initializes a new instance of the CosmosDBImpl class. + * Initializes a new instance of the CosmosDBManagementClientImpl class. */ -public class CosmosDBImpl extends AzureServiceClient { +public class CosmosDBManagementClientImpl extends AzureServiceClient { /** the {@link AzureClient} used for long running operations. */ private AzureClient azureClient; @@ -46,7 +46,7 @@ public String subscriptionId() { * @param subscriptionId the subscriptionId value. * @return the service client itself */ - public CosmosDBImpl withSubscriptionId(String subscriptionId) { + public CosmosDBManagementClientImpl withSubscriptionId(String subscriptionId) { this.subscriptionId = subscriptionId; return this; } @@ -69,7 +69,7 @@ public String subscriptionId1() { * @param subscriptionId1 the subscriptionId1 value. * @return the service client itself */ - public CosmosDBImpl withSubscriptionId1(String subscriptionId1) { + public CosmosDBManagementClientImpl withSubscriptionId1(String subscriptionId1) { this.subscriptionId1 = subscriptionId1; return this; } @@ -92,7 +92,7 @@ public String acceptLanguage() { * @param acceptLanguage the acceptLanguage value. * @return the service client itself */ - public CosmosDBImpl withAcceptLanguage(String acceptLanguage) { + public CosmosDBManagementClientImpl withAcceptLanguage(String acceptLanguage) { this.acceptLanguage = acceptLanguage; return this; } @@ -115,7 +115,7 @@ public int longRunningOperationRetryTimeout() { * @param longRunningOperationRetryTimeout the longRunningOperationRetryTimeout value. * @return the service client itself */ - public CosmosDBImpl withLongRunningOperationRetryTimeout(int longRunningOperationRetryTimeout) { + public CosmosDBManagementClientImpl withLongRunningOperationRetryTimeout(int longRunningOperationRetryTimeout) { this.longRunningOperationRetryTimeout = longRunningOperationRetryTimeout; return this; } @@ -138,7 +138,7 @@ public boolean generateClientRequestId() { * @param generateClientRequestId the generateClientRequestId value. * @return the service client itself */ - public CosmosDBImpl withGenerateClientRequestId(boolean generateClientRequestId) { + public CosmosDBManagementClientImpl withGenerateClientRequestId(boolean generateClientRequestId) { this.generateClientRequestId = generateClientRequestId; return this; } @@ -404,31 +404,31 @@ public PrivateEndpointConnectionsInner privateEndpointConnections() { } /** - * Initializes an instance of CosmosDB client. + * Initializes an instance of CosmosDBManagementClient client. * * @param credentials the management credentials for Azure */ - public CosmosDBImpl(ServiceClientCredentials credentials) { + public CosmosDBManagementClientImpl(ServiceClientCredentials credentials) { this("https://management.azure.com", credentials); } /** - * Initializes an instance of CosmosDB client. + * Initializes an instance of CosmosDBManagementClient client. * * @param baseUrl the base URL of the host * @param credentials the management credentials for Azure */ - public CosmosDBImpl(String baseUrl, ServiceClientCredentials credentials) { + public CosmosDBManagementClientImpl(String baseUrl, ServiceClientCredentials credentials) { super(baseUrl, credentials); initialize(); } /** - * Initializes an instance of CosmosDB client. + * Initializes an instance of CosmosDBManagementClient client. * * @param restClient the REST client to connect to Azure. */ - public CosmosDBImpl(RestClient restClient) { + public CosmosDBManagementClientImpl(RestClient restClient) { super(restClient); initialize(); } @@ -467,6 +467,6 @@ protected void initialize() { */ @Override public String userAgent() { - return String.format("%s (%s, %s, auto-generated)", super.userAgent(), "CosmosDB", "2019-08-01-preiew"); + return String.format("%s (%s, %s, auto-generated)", super.userAgent(), "CosmosDBManagementClient", "2019-08-01-preiew"); } } diff --git a/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/CosmosDBManager.java b/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/CosmosDBManager.java index 8962470c932d..140c5c37cbec 100644 --- a/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/CosmosDBManager.java +++ b/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/CosmosDBManager.java @@ -42,7 +42,7 @@ /** * Entry point to Azure CosmosDB resource management. */ -public final class CosmosDBManager extends ManagerCore { +public final class CosmosDBManager extends ManagerCore { private DatabaseAccounts databaseAccounts; private Operations operations; private Databases databases; @@ -322,6 +322,6 @@ private CosmosDBManager(RestClient restClient, String subscriptionId) { super( restClient, subscriptionId, - new CosmosDBImpl(restClient).withSubscriptionId(subscriptionId)); + new CosmosDBManagementClientImpl(restClient).withSubscriptionId(subscriptionId)); } } diff --git a/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/DatabaseAccountRegionsInner.java b/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/DatabaseAccountRegionsInner.java index cbabd594d01f..b568b06cb884 100644 --- a/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/DatabaseAccountRegionsInner.java +++ b/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/DatabaseAccountRegionsInner.java @@ -34,7 +34,7 @@ public class DatabaseAccountRegionsInner { /** The Retrofit service to perform REST calls. */ private DatabaseAccountRegionsService service; /** The service client containing this operation class. */ - private CosmosDBImpl client; + private CosmosDBManagementClientImpl client; /** * Initializes an instance of DatabaseAccountRegionsInner. @@ -42,7 +42,7 @@ public class DatabaseAccountRegionsInner { * @param retrofit the Retrofit instance built from a Retrofit Builder. * @param client the instance of the service client containing this operation class. */ - public DatabaseAccountRegionsInner(Retrofit retrofit, CosmosDBImpl client) { + public DatabaseAccountRegionsInner(Retrofit retrofit, CosmosDBManagementClientImpl client) { this.service = retrofit.create(DatabaseAccountRegionsService.class); this.client = client; } diff --git a/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/DatabaseAccountsInner.java b/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/DatabaseAccountsInner.java index 0b63bb4d72d5..d8691b75bc88 100644 --- a/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/DatabaseAccountsInner.java +++ b/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/DatabaseAccountsInner.java @@ -54,7 +54,7 @@ public class DatabaseAccountsInner implements InnerSupportsGet tags() { return this.inner().getTags(); diff --git a/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/GremlinDatabaseGetResultsInner.java b/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/GremlinDatabaseGetResultsInner.java index 1e11d10a10a8..bee35bbd9acf 100644 --- a/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/GremlinDatabaseGetResultsInner.java +++ b/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/GremlinDatabaseGetResultsInner.java @@ -8,6 +8,7 @@ package com.microsoft.azure.management.cosmosdb.v2019_08_01_preview.implementation; +import com.microsoft.azure.management.cosmosdb.v2019_08_01_preview.GremlinDatabaseGetPropertiesResource; import com.fasterxml.jackson.annotation.JsonProperty; import com.microsoft.rest.serializer.JsonFlatten; import com.microsoft.azure.management.cosmosdb.v2019_08_01_preview.ARMResourceProperties; @@ -18,76 +19,29 @@ @JsonFlatten public class GremlinDatabaseGetResultsInner extends ARMResourceProperties { /** - * Name of the Cosmos DB Gremlin database. + * The resource property. */ - @JsonProperty(value = "properties.id", required = true) - private String gremlinDatabaseGetResultsId; + @JsonProperty(value = "properties.resource") + private GremlinDatabaseGetPropertiesResource resource; /** - * A system generated property. A unique identifier. - */ - @JsonProperty(value = "properties._rid", access = JsonProperty.Access.WRITE_ONLY) - private String _rid; - - /** - * A system generated property that denotes the last updated timestamp of - * the resource. - */ - @JsonProperty(value = "properties._ts", access = JsonProperty.Access.WRITE_ONLY) - private Object _ts; - - /** - * A system generated property representing the resource etag required for - * optimistic concurrency control. - */ - @JsonProperty(value = "properties._etag", access = JsonProperty.Access.WRITE_ONLY) - private String _etag; - - /** - * Get name of the Cosmos DB Gremlin database. + * Get the resource value. * - * @return the gremlinDatabaseGetResultsId value + * @return the resource value */ - public String gremlinDatabaseGetResultsId() { - return this.gremlinDatabaseGetResultsId; + public GremlinDatabaseGetPropertiesResource resource() { + return this.resource; } /** - * Set name of the Cosmos DB Gremlin database. + * Set the resource value. * - * @param gremlinDatabaseGetResultsId the gremlinDatabaseGetResultsId value to set + * @param resource the resource value to set * @return the GremlinDatabaseGetResultsInner object itself. */ - public GremlinDatabaseGetResultsInner withGremlinDatabaseGetResultsId(String gremlinDatabaseGetResultsId) { - this.gremlinDatabaseGetResultsId = gremlinDatabaseGetResultsId; + public GremlinDatabaseGetResultsInner withResource(GremlinDatabaseGetPropertiesResource resource) { + this.resource = resource; return this; } - /** - * Get a system generated property. A unique identifier. - * - * @return the _rid value - */ - public String _rid() { - return this._rid; - } - - /** - * Get a system generated property that denotes the last updated timestamp of the resource. - * - * @return the _ts value - */ - public Object _ts() { - return this._ts; - } - - /** - * Get a system generated property representing the resource etag required for optimistic concurrency control. - * - * @return the _etag value - */ - public String _etag() { - return this._etag; - } - } diff --git a/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/GremlinGraphGetResultsImpl.java b/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/GremlinGraphGetResultsImpl.java index d597e6aa05fb..e5f5e1ab9b1e 100644 --- a/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/GremlinGraphGetResultsImpl.java +++ b/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/GremlinGraphGetResultsImpl.java @@ -13,10 +13,7 @@ import rx.Observable; import com.microsoft.azure.management.cosmosdb.v2019_08_01_preview.GremlinGraphCreateUpdateParameters; import java.util.Map; -import com.microsoft.azure.management.cosmosdb.v2019_08_01_preview.ConflictResolutionPolicy; -import com.microsoft.azure.management.cosmosdb.v2019_08_01_preview.IndexingPolicy; -import com.microsoft.azure.management.cosmosdb.v2019_08_01_preview.ContainerPartitionKey; -import com.microsoft.azure.management.cosmosdb.v2019_08_01_preview.UniqueKeyPolicy; +import com.microsoft.azure.management.cosmosdb.v2019_08_01_preview.GremlinGraphGetPropertiesResource; import com.microsoft.azure.management.cosmosdb.v2019_08_01_preview.GremlinGraphResource; import rx.functions.Func1; @@ -99,46 +96,11 @@ private void resetCreateUpdateParameters() { this.createOrUpdateParameter = new GremlinGraphCreateUpdateParameters(); } - @Override - public String _etag() { - return this.inner()._etag(); - } - - @Override - public String _rid() { - return this.inner()._rid(); - } - - @Override - public Object _ts() { - return this.inner()._ts(); - } - - @Override - public ConflictResolutionPolicy conflictResolutionPolicy() { - return this.inner().conflictResolutionPolicy(); - } - - @Override - public Integer defaultTtl() { - return this.inner().defaultTtl(); - } - - @Override - public String gremlinGraphGetResultsId() { - return this.inner().gremlinGraphGetResultsId(); - } - @Override public String id() { return this.inner().id(); } - @Override - public IndexingPolicy indexingPolicy() { - return this.inner().indexingPolicy(); - } - @Override public String location() { return this.inner().location(); @@ -150,8 +112,8 @@ public String name() { } @Override - public ContainerPartitionKey partitionKey() { - return this.inner().partitionKey(); + public GremlinGraphGetPropertiesResource resource() { + return this.inner().resource(); } @Override @@ -164,11 +126,6 @@ public String type() { return this.inner().type(); } - @Override - public UniqueKeyPolicy uniqueKeyPolicy() { - return this.inner().uniqueKeyPolicy(); - } - @Override public GremlinGraphGetResultsImpl withExistingGremlinDatabasis(String resourceGroupName, String accountName, String databaseName) { this.resourceGroupName = resourceGroupName; diff --git a/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/GremlinGraphGetResultsInner.java b/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/GremlinGraphGetResultsInner.java index 53c53c423a71..62c98c51b448 100644 --- a/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/GremlinGraphGetResultsInner.java +++ b/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/GremlinGraphGetResultsInner.java @@ -8,10 +8,7 @@ package com.microsoft.azure.management.cosmosdb.v2019_08_01_preview.implementation; -import com.microsoft.azure.management.cosmosdb.v2019_08_01_preview.IndexingPolicy; -import com.microsoft.azure.management.cosmosdb.v2019_08_01_preview.ContainerPartitionKey; -import com.microsoft.azure.management.cosmosdb.v2019_08_01_preview.UniqueKeyPolicy; -import com.microsoft.azure.management.cosmosdb.v2019_08_01_preview.ConflictResolutionPolicy; +import com.microsoft.azure.management.cosmosdb.v2019_08_01_preview.GremlinGraphGetPropertiesResource; import com.fasterxml.jackson.annotation.JsonProperty; import com.microsoft.rest.serializer.JsonFlatten; import com.microsoft.azure.management.cosmosdb.v2019_08_01_preview.ARMResourceProperties; @@ -22,210 +19,29 @@ @JsonFlatten public class GremlinGraphGetResultsInner extends ARMResourceProperties { /** - * Name of the Cosmos DB Gremlin graph. + * The resource property. */ - @JsonProperty(value = "properties.id", required = true) - private String gremlinGraphGetResultsId; + @JsonProperty(value = "properties.resource") + private GremlinGraphGetPropertiesResource resource; /** - * The configuration of the indexing policy. By default, the indexing is - * automatic for all document paths within the graph. - */ - @JsonProperty(value = "properties.indexingPolicy") - private IndexingPolicy indexingPolicy; - - /** - * The configuration of the partition key to be used for partitioning data - * into multiple partitions. - */ - @JsonProperty(value = "properties.partitionKey") - private ContainerPartitionKey partitionKey; - - /** - * Default time to live. - */ - @JsonProperty(value = "properties.defaultTtl") - private Integer defaultTtl; - - /** - * The unique key policy configuration for specifying uniqueness - * constraints on documents in the collection in the Azure Cosmos DB - * service. - */ - @JsonProperty(value = "properties.uniqueKeyPolicy") - private UniqueKeyPolicy uniqueKeyPolicy; - - /** - * The conflict resolution policy for the graph. - */ - @JsonProperty(value = "properties.conflictResolutionPolicy") - private ConflictResolutionPolicy conflictResolutionPolicy; - - /** - * A system generated property. A unique identifier. - */ - @JsonProperty(value = "properties._rid", access = JsonProperty.Access.WRITE_ONLY) - private String _rid; - - /** - * A system generated property that denotes the last updated timestamp of - * the resource. - */ - @JsonProperty(value = "properties._ts", access = JsonProperty.Access.WRITE_ONLY) - private Object _ts; - - /** - * A system generated property representing the resource etag required for - * optimistic concurrency control. - */ - @JsonProperty(value = "properties._etag", access = JsonProperty.Access.WRITE_ONLY) - private String _etag; - - /** - * Get name of the Cosmos DB Gremlin graph. - * - * @return the gremlinGraphGetResultsId value - */ - public String gremlinGraphGetResultsId() { - return this.gremlinGraphGetResultsId; - } - - /** - * Set name of the Cosmos DB Gremlin graph. + * Get the resource value. * - * @param gremlinGraphGetResultsId the gremlinGraphGetResultsId value to set - * @return the GremlinGraphGetResultsInner object itself. + * @return the resource value */ - public GremlinGraphGetResultsInner withGremlinGraphGetResultsId(String gremlinGraphGetResultsId) { - this.gremlinGraphGetResultsId = gremlinGraphGetResultsId; - return this; + public GremlinGraphGetPropertiesResource resource() { + return this.resource; } /** - * Get the configuration of the indexing policy. By default, the indexing is automatic for all document paths within the graph. + * Set the resource value. * - * @return the indexingPolicy value - */ - public IndexingPolicy indexingPolicy() { - return this.indexingPolicy; - } - - /** - * Set the configuration of the indexing policy. By default, the indexing is automatic for all document paths within the graph. - * - * @param indexingPolicy the indexingPolicy value to set + * @param resource the resource value to set * @return the GremlinGraphGetResultsInner object itself. */ - public GremlinGraphGetResultsInner withIndexingPolicy(IndexingPolicy indexingPolicy) { - this.indexingPolicy = indexingPolicy; + public GremlinGraphGetResultsInner withResource(GremlinGraphGetPropertiesResource resource) { + this.resource = resource; return this; } - /** - * Get the configuration of the partition key to be used for partitioning data into multiple partitions. - * - * @return the partitionKey value - */ - public ContainerPartitionKey partitionKey() { - return this.partitionKey; - } - - /** - * Set the configuration of the partition key to be used for partitioning data into multiple partitions. - * - * @param partitionKey the partitionKey value to set - * @return the GremlinGraphGetResultsInner object itself. - */ - public GremlinGraphGetResultsInner withPartitionKey(ContainerPartitionKey partitionKey) { - this.partitionKey = partitionKey; - return this; - } - - /** - * Get default time to live. - * - * @return the defaultTtl value - */ - public Integer defaultTtl() { - return this.defaultTtl; - } - - /** - * Set default time to live. - * - * @param defaultTtl the defaultTtl value to set - * @return the GremlinGraphGetResultsInner object itself. - */ - public GremlinGraphGetResultsInner withDefaultTtl(Integer defaultTtl) { - this.defaultTtl = defaultTtl; - return this; - } - - /** - * Get the unique key policy configuration for specifying uniqueness constraints on documents in the collection in the Azure Cosmos DB service. - * - * @return the uniqueKeyPolicy value - */ - public UniqueKeyPolicy uniqueKeyPolicy() { - return this.uniqueKeyPolicy; - } - - /** - * Set the unique key policy configuration for specifying uniqueness constraints on documents in the collection in the Azure Cosmos DB service. - * - * @param uniqueKeyPolicy the uniqueKeyPolicy value to set - * @return the GremlinGraphGetResultsInner object itself. - */ - public GremlinGraphGetResultsInner withUniqueKeyPolicy(UniqueKeyPolicy uniqueKeyPolicy) { - this.uniqueKeyPolicy = uniqueKeyPolicy; - return this; - } - - /** - * Get the conflict resolution policy for the graph. - * - * @return the conflictResolutionPolicy value - */ - public ConflictResolutionPolicy conflictResolutionPolicy() { - return this.conflictResolutionPolicy; - } - - /** - * Set the conflict resolution policy for the graph. - * - * @param conflictResolutionPolicy the conflictResolutionPolicy value to set - * @return the GremlinGraphGetResultsInner object itself. - */ - public GremlinGraphGetResultsInner withConflictResolutionPolicy(ConflictResolutionPolicy conflictResolutionPolicy) { - this.conflictResolutionPolicy = conflictResolutionPolicy; - return this; - } - - /** - * Get a system generated property. A unique identifier. - * - * @return the _rid value - */ - public String _rid() { - return this._rid; - } - - /** - * Get a system generated property that denotes the last updated timestamp of the resource. - * - * @return the _ts value - */ - public Object _ts() { - return this._ts; - } - - /** - * Get a system generated property representing the resource etag required for optimistic concurrency control. - * - * @return the _etag value - */ - public String _etag() { - return this._etag; - } - } diff --git a/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/GremlinResourcesInner.java b/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/GremlinResourcesInner.java index c50dca1ec378..bca6b1a01378 100644 --- a/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/GremlinResourcesInner.java +++ b/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/GremlinResourcesInner.java @@ -41,7 +41,7 @@ public class GremlinResourcesInner { /** The Retrofit service to perform REST calls. */ private GremlinResourcesService service; /** The service client containing this operation class. */ - private CosmosDBImpl client; + private CosmosDBManagementClientImpl client; /** * Initializes an instance of GremlinResourcesInner. @@ -49,7 +49,7 @@ public class GremlinResourcesInner { * @param retrofit the Retrofit instance built from a Retrofit Builder. * @param client the instance of the service client containing this operation class. */ - public GremlinResourcesInner(Retrofit retrofit, CosmosDBImpl client) { + public GremlinResourcesInner(Retrofit retrofit, CosmosDBManagementClientImpl client) { this.service = retrofit.create(GremlinResourcesService.class); this.client = client; } diff --git a/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/MongoDBCollectionGetResultsImpl.java b/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/MongoDBCollectionGetResultsImpl.java index 70154d509a4b..a497a0fd85d1 100644 --- a/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/MongoDBCollectionGetResultsImpl.java +++ b/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/MongoDBCollectionGetResultsImpl.java @@ -13,8 +13,7 @@ import rx.Observable; import com.microsoft.azure.management.cosmosdb.v2019_08_01_preview.MongoDBCollectionCreateUpdateParameters; import java.util.Map; -import java.util.List; -import com.microsoft.azure.management.cosmosdb.v2019_08_01_preview.MongoIndex; +import com.microsoft.azure.management.cosmosdb.v2019_08_01_preview.MongoDBCollectionGetPropertiesResource; import com.microsoft.azure.management.cosmosdb.v2019_08_01_preview.MongoDBCollectionResource; import rx.functions.Func1; @@ -97,49 +96,24 @@ private void resetCreateUpdateParameters() { this.createOrUpdateParameter = new MongoDBCollectionCreateUpdateParameters(); } - @Override - public String _etag() { - return this.inner()._etag(); - } - - @Override - public String _rid() { - return this.inner()._rid(); - } - - @Override - public Object _ts() { - return this.inner()._ts(); - } - @Override public String id() { return this.inner().id(); } - @Override - public List indexes() { - return this.inner().indexes(); - } - @Override public String location() { return this.inner().location(); } - @Override - public String mongoDBCollectionGetResultsId() { - return this.inner().mongoDBCollectionGetResultsId(); - } - @Override public String name() { return this.inner().name(); } @Override - public Map shardKey() { - return this.inner().shardKey(); + public MongoDBCollectionGetPropertiesResource resource() { + return this.inner().resource(); } @Override diff --git a/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/MongoDBCollectionGetResultsInner.java b/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/MongoDBCollectionGetResultsInner.java index f31e984e2e46..5ca35220f18d 100644 --- a/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/MongoDBCollectionGetResultsInner.java +++ b/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/MongoDBCollectionGetResultsInner.java @@ -8,9 +8,7 @@ package com.microsoft.azure.management.cosmosdb.v2019_08_01_preview.implementation; -import java.util.Map; -import java.util.List; -import com.microsoft.azure.management.cosmosdb.v2019_08_01_preview.MongoIndex; +import com.microsoft.azure.management.cosmosdb.v2019_08_01_preview.MongoDBCollectionGetPropertiesResource; import com.fasterxml.jackson.annotation.JsonProperty; import com.microsoft.rest.serializer.JsonFlatten; import com.microsoft.azure.management.cosmosdb.v2019_08_01_preview.ARMResourceProperties; @@ -21,128 +19,29 @@ @JsonFlatten public class MongoDBCollectionGetResultsInner extends ARMResourceProperties { /** - * Name of the Cosmos DB MongoDB collection. + * The resource property. */ - @JsonProperty(value = "properties.id", required = true) - private String mongoDBCollectionGetResultsId; + @JsonProperty(value = "properties.resource") + private MongoDBCollectionGetPropertiesResource resource; /** - * A key-value pair of shard keys to be applied for the request. - */ - @JsonProperty(value = "properties.shardKey") - private Map shardKey; - - /** - * List of index keys. - */ - @JsonProperty(value = "properties.indexes") - private List indexes; - - /** - * A system generated property. A unique identifier. - */ - @JsonProperty(value = "properties._rid", access = JsonProperty.Access.WRITE_ONLY) - private String _rid; - - /** - * A system generated property that denotes the last updated timestamp of - * the resource. - */ - @JsonProperty(value = "properties._ts", access = JsonProperty.Access.WRITE_ONLY) - private Object _ts; - - /** - * A system generated property representing the resource etag required for - * optimistic concurrency control. - */ - @JsonProperty(value = "properties._etag", access = JsonProperty.Access.WRITE_ONLY) - private String _etag; - - /** - * Get name of the Cosmos DB MongoDB collection. - * - * @return the mongoDBCollectionGetResultsId value - */ - public String mongoDBCollectionGetResultsId() { - return this.mongoDBCollectionGetResultsId; - } - - /** - * Set name of the Cosmos DB MongoDB collection. - * - * @param mongoDBCollectionGetResultsId the mongoDBCollectionGetResultsId value to set - * @return the MongoDBCollectionGetResultsInner object itself. - */ - public MongoDBCollectionGetResultsInner withMongoDBCollectionGetResultsId(String mongoDBCollectionGetResultsId) { - this.mongoDBCollectionGetResultsId = mongoDBCollectionGetResultsId; - return this; - } - - /** - * Get a key-value pair of shard keys to be applied for the request. + * Get the resource value. * - * @return the shardKey value + * @return the resource value */ - public Map shardKey() { - return this.shardKey; + public MongoDBCollectionGetPropertiesResource resource() { + return this.resource; } /** - * Set a key-value pair of shard keys to be applied for the request. + * Set the resource value. * - * @param shardKey the shardKey value to set + * @param resource the resource value to set * @return the MongoDBCollectionGetResultsInner object itself. */ - public MongoDBCollectionGetResultsInner withShardKey(Map shardKey) { - this.shardKey = shardKey; + public MongoDBCollectionGetResultsInner withResource(MongoDBCollectionGetPropertiesResource resource) { + this.resource = resource; return this; } - /** - * Get list of index keys. - * - * @return the indexes value - */ - public List indexes() { - return this.indexes; - } - - /** - * Set list of index keys. - * - * @param indexes the indexes value to set - * @return the MongoDBCollectionGetResultsInner object itself. - */ - public MongoDBCollectionGetResultsInner withIndexes(List indexes) { - this.indexes = indexes; - return this; - } - - /** - * Get a system generated property. A unique identifier. - * - * @return the _rid value - */ - public String _rid() { - return this._rid; - } - - /** - * Get a system generated property that denotes the last updated timestamp of the resource. - * - * @return the _ts value - */ - public Object _ts() { - return this._ts; - } - - /** - * Get a system generated property representing the resource etag required for optimistic concurrency control. - * - * @return the _etag value - */ - public String _etag() { - return this._etag; - } - } diff --git a/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/MongoDBDatabaseGetResultsImpl.java b/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/MongoDBDatabaseGetResultsImpl.java index 1565b4c3995f..ad3eb51eb650 100644 --- a/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/MongoDBDatabaseGetResultsImpl.java +++ b/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/MongoDBDatabaseGetResultsImpl.java @@ -13,6 +13,7 @@ import rx.Observable; import com.microsoft.azure.management.cosmosdb.v2019_08_01_preview.MongoDBDatabaseCreateUpdateParameters; import java.util.Map; +import com.microsoft.azure.management.cosmosdb.v2019_08_01_preview.MongoDBDatabaseGetPropertiesResource; import com.microsoft.azure.management.cosmosdb.v2019_08_01_preview.MongoDBDatabaseResource; import rx.functions.Func1; @@ -93,21 +94,6 @@ private void resetCreateUpdateParameters() { this.createOrUpdateParameter = new MongoDBDatabaseCreateUpdateParameters(); } - @Override - public String _etag() { - return this.inner()._etag(); - } - - @Override - public String _rid() { - return this.inner()._rid(); - } - - @Override - public Object _ts() { - return this.inner()._ts(); - } - @Override public String id() { return this.inner().id(); @@ -119,13 +105,13 @@ public String location() { } @Override - public String mongoDBDatabaseGetResultsId() { - return this.inner().mongoDBDatabaseGetResultsId(); + public String name() { + return this.inner().name(); } @Override - public String name() { - return this.inner().name(); + public MongoDBDatabaseGetPropertiesResource resource() { + return this.inner().resource(); } @Override diff --git a/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/MongoDBDatabaseGetResultsInner.java b/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/MongoDBDatabaseGetResultsInner.java index e90ec7bf36b5..5ffc493acfac 100644 --- a/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/MongoDBDatabaseGetResultsInner.java +++ b/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/MongoDBDatabaseGetResultsInner.java @@ -8,6 +8,7 @@ package com.microsoft.azure.management.cosmosdb.v2019_08_01_preview.implementation; +import com.microsoft.azure.management.cosmosdb.v2019_08_01_preview.MongoDBDatabaseGetPropertiesResource; import com.fasterxml.jackson.annotation.JsonProperty; import com.microsoft.rest.serializer.JsonFlatten; import com.microsoft.azure.management.cosmosdb.v2019_08_01_preview.ARMResourceProperties; @@ -18,76 +19,29 @@ @JsonFlatten public class MongoDBDatabaseGetResultsInner extends ARMResourceProperties { /** - * Name of the Cosmos DB MongoDB database. + * The resource property. */ - @JsonProperty(value = "properties.id", required = true) - private String mongoDBDatabaseGetResultsId; + @JsonProperty(value = "properties.resource") + private MongoDBDatabaseGetPropertiesResource resource; /** - * A system generated property. A unique identifier. - */ - @JsonProperty(value = "properties._rid", access = JsonProperty.Access.WRITE_ONLY) - private String _rid; - - /** - * A system generated property that denotes the last updated timestamp of - * the resource. - */ - @JsonProperty(value = "properties._ts", access = JsonProperty.Access.WRITE_ONLY) - private Object _ts; - - /** - * A system generated property representing the resource etag required for - * optimistic concurrency control. - */ - @JsonProperty(value = "properties._etag", access = JsonProperty.Access.WRITE_ONLY) - private String _etag; - - /** - * Get name of the Cosmos DB MongoDB database. + * Get the resource value. * - * @return the mongoDBDatabaseGetResultsId value + * @return the resource value */ - public String mongoDBDatabaseGetResultsId() { - return this.mongoDBDatabaseGetResultsId; + public MongoDBDatabaseGetPropertiesResource resource() { + return this.resource; } /** - * Set name of the Cosmos DB MongoDB database. + * Set the resource value. * - * @param mongoDBDatabaseGetResultsId the mongoDBDatabaseGetResultsId value to set + * @param resource the resource value to set * @return the MongoDBDatabaseGetResultsInner object itself. */ - public MongoDBDatabaseGetResultsInner withMongoDBDatabaseGetResultsId(String mongoDBDatabaseGetResultsId) { - this.mongoDBDatabaseGetResultsId = mongoDBDatabaseGetResultsId; + public MongoDBDatabaseGetResultsInner withResource(MongoDBDatabaseGetPropertiesResource resource) { + this.resource = resource; return this; } - /** - * Get a system generated property. A unique identifier. - * - * @return the _rid value - */ - public String _rid() { - return this._rid; - } - - /** - * Get a system generated property that denotes the last updated timestamp of the resource. - * - * @return the _ts value - */ - public Object _ts() { - return this._ts; - } - - /** - * Get a system generated property representing the resource etag required for optimistic concurrency control. - * - * @return the _etag value - */ - public String _etag() { - return this._etag; - } - } diff --git a/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/MongoDBResourcesInner.java b/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/MongoDBResourcesInner.java index faf2aa455582..f6de25ecf2aa 100644 --- a/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/MongoDBResourcesInner.java +++ b/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/MongoDBResourcesInner.java @@ -41,7 +41,7 @@ public class MongoDBResourcesInner { /** The Retrofit service to perform REST calls. */ private MongoDBResourcesService service; /** The service client containing this operation class. */ - private CosmosDBImpl client; + private CosmosDBManagementClientImpl client; /** * Initializes an instance of MongoDBResourcesInner. @@ -49,7 +49,7 @@ public class MongoDBResourcesInner { * @param retrofit the Retrofit instance built from a Retrofit Builder. * @param client the instance of the service client containing this operation class. */ - public MongoDBResourcesInner(Retrofit retrofit, CosmosDBImpl client) { + public MongoDBResourcesInner(Retrofit retrofit, CosmosDBManagementClientImpl client) { this.service = retrofit.create(MongoDBResourcesService.class); this.client = client; } diff --git a/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/OperationsInner.java b/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/OperationsInner.java index 4b6ee001b48f..e93fb333b893 100644 --- a/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/OperationsInner.java +++ b/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/OperationsInner.java @@ -37,7 +37,7 @@ public class OperationsInner { /** The Retrofit service to perform REST calls. */ private OperationsService service; /** The service client containing this operation class. */ - private CosmosDBImpl client; + private CosmosDBManagementClientImpl client; /** * Initializes an instance of OperationsInner. @@ -45,7 +45,7 @@ public class OperationsInner { * @param retrofit the Retrofit instance built from a Retrofit Builder. * @param client the instance of the service client containing this operation class. */ - public OperationsInner(Retrofit retrofit, CosmosDBImpl client) { + public OperationsInner(Retrofit retrofit, CosmosDBManagementClientImpl client) { this.service = retrofit.create(OperationsService.class); this.client = client; } diff --git a/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/PartitionKeyRangeIdRegionsInner.java b/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/PartitionKeyRangeIdRegionsInner.java index fbe666725c16..6f7fbd10fa48 100644 --- a/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/PartitionKeyRangeIdRegionsInner.java +++ b/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/PartitionKeyRangeIdRegionsInner.java @@ -34,7 +34,7 @@ public class PartitionKeyRangeIdRegionsInner { /** The Retrofit service to perform REST calls. */ private PartitionKeyRangeIdRegionsService service; /** The service client containing this operation class. */ - private CosmosDBImpl client; + private CosmosDBManagementClientImpl client; /** * Initializes an instance of PartitionKeyRangeIdRegionsInner. @@ -42,7 +42,7 @@ public class PartitionKeyRangeIdRegionsInner { * @param retrofit the Retrofit instance built from a Retrofit Builder. * @param client the instance of the service client containing this operation class. */ - public PartitionKeyRangeIdRegionsInner(Retrofit retrofit, CosmosDBImpl client) { + public PartitionKeyRangeIdRegionsInner(Retrofit retrofit, CosmosDBManagementClientImpl client) { this.service = retrofit.create(PartitionKeyRangeIdRegionsService.class); this.client = client; } diff --git a/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/PartitionKeyRangeIdsInner.java b/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/PartitionKeyRangeIdsInner.java index 21dba0857781..5afa58a23853 100644 --- a/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/PartitionKeyRangeIdsInner.java +++ b/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/PartitionKeyRangeIdsInner.java @@ -34,7 +34,7 @@ public class PartitionKeyRangeIdsInner { /** The Retrofit service to perform REST calls. */ private PartitionKeyRangeIdsService service; /** The service client containing this operation class. */ - private CosmosDBImpl client; + private CosmosDBManagementClientImpl client; /** * Initializes an instance of PartitionKeyRangeIdsInner. @@ -42,7 +42,7 @@ public class PartitionKeyRangeIdsInner { * @param retrofit the Retrofit instance built from a Retrofit Builder. * @param client the instance of the service client containing this operation class. */ - public PartitionKeyRangeIdsInner(Retrofit retrofit, CosmosDBImpl client) { + public PartitionKeyRangeIdsInner(Retrofit retrofit, CosmosDBManagementClientImpl client) { this.service = retrofit.create(PartitionKeyRangeIdsService.class); this.client = client; } diff --git a/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/PercentileSourceTargetsInner.java b/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/PercentileSourceTargetsInner.java index 1c1f12c1b2a7..189b78ee555e 100644 --- a/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/PercentileSourceTargetsInner.java +++ b/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/PercentileSourceTargetsInner.java @@ -34,7 +34,7 @@ public class PercentileSourceTargetsInner { /** The Retrofit service to perform REST calls. */ private PercentileSourceTargetsService service; /** The service client containing this operation class. */ - private CosmosDBImpl client; + private CosmosDBManagementClientImpl client; /** * Initializes an instance of PercentileSourceTargetsInner. @@ -42,7 +42,7 @@ public class PercentileSourceTargetsInner { * @param retrofit the Retrofit instance built from a Retrofit Builder. * @param client the instance of the service client containing this operation class. */ - public PercentileSourceTargetsInner(Retrofit retrofit, CosmosDBImpl client) { + public PercentileSourceTargetsInner(Retrofit retrofit, CosmosDBManagementClientImpl client) { this.service = retrofit.create(PercentileSourceTargetsService.class); this.client = client; } diff --git a/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/PercentileTargetsInner.java b/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/PercentileTargetsInner.java index c8d8ea4975ab..5d6cd04ac79f 100644 --- a/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/PercentileTargetsInner.java +++ b/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/PercentileTargetsInner.java @@ -34,7 +34,7 @@ public class PercentileTargetsInner { /** The Retrofit service to perform REST calls. */ private PercentileTargetsService service; /** The service client containing this operation class. */ - private CosmosDBImpl client; + private CosmosDBManagementClientImpl client; /** * Initializes an instance of PercentileTargetsInner. @@ -42,7 +42,7 @@ public class PercentileTargetsInner { * @param retrofit the Retrofit instance built from a Retrofit Builder. * @param client the instance of the service client containing this operation class. */ - public PercentileTargetsInner(Retrofit retrofit, CosmosDBImpl client) { + public PercentileTargetsInner(Retrofit retrofit, CosmosDBManagementClientImpl client) { this.service = retrofit.create(PercentileTargetsService.class); this.client = client; } diff --git a/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/PercentilesInner.java b/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/PercentilesInner.java index 375fd3e88741..6cda4c4eea6b 100644 --- a/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/PercentilesInner.java +++ b/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/PercentilesInner.java @@ -34,7 +34,7 @@ public class PercentilesInner { /** The Retrofit service to perform REST calls. */ private PercentilesService service; /** The service client containing this operation class. */ - private CosmosDBImpl client; + private CosmosDBManagementClientImpl client; /** * Initializes an instance of PercentilesInner. @@ -42,7 +42,7 @@ public class PercentilesInner { * @param retrofit the Retrofit instance built from a Retrofit Builder. * @param client the instance of the service client containing this operation class. */ - public PercentilesInner(Retrofit retrofit, CosmosDBImpl client) { + public PercentilesInner(Retrofit retrofit, CosmosDBManagementClientImpl client) { this.service = retrofit.create(PercentilesService.class); this.client = client; } diff --git a/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/PrivateEndpointConnectionsInner.java b/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/PrivateEndpointConnectionsInner.java index 3bf5994f49be..1d69a18a81fa 100644 --- a/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/PrivateEndpointConnectionsInner.java +++ b/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/PrivateEndpointConnectionsInner.java @@ -39,7 +39,7 @@ public class PrivateEndpointConnectionsInner { /** The Retrofit service to perform REST calls. */ private PrivateEndpointConnectionsService service; /** The service client containing this operation class. */ - private CosmosDBImpl client; + private CosmosDBManagementClientImpl client; /** * Initializes an instance of PrivateEndpointConnectionsInner. @@ -47,7 +47,7 @@ public class PrivateEndpointConnectionsInner { * @param retrofit the Retrofit instance built from a Retrofit Builder. * @param client the instance of the service client containing this operation class. */ - public PrivateEndpointConnectionsInner(Retrofit retrofit, CosmosDBImpl client) { + public PrivateEndpointConnectionsInner(Retrofit retrofit, CosmosDBManagementClientImpl client) { this.service = retrofit.create(PrivateEndpointConnectionsService.class); this.client = client; } diff --git a/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/PrivateLinkResourcesInner.java b/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/PrivateLinkResourcesInner.java index 39322307f506..7e3a96be7327 100644 --- a/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/PrivateLinkResourcesInner.java +++ b/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/PrivateLinkResourcesInner.java @@ -34,7 +34,7 @@ public class PrivateLinkResourcesInner { /** The Retrofit service to perform REST calls. */ private PrivateLinkResourcesService service; /** The service client containing this operation class. */ - private CosmosDBImpl client; + private CosmosDBManagementClientImpl client; /** * Initializes an instance of PrivateLinkResourcesInner. @@ -42,7 +42,7 @@ public class PrivateLinkResourcesInner { * @param retrofit the Retrofit instance built from a Retrofit Builder. * @param client the instance of the service client containing this operation class. */ - public PrivateLinkResourcesInner(Retrofit retrofit, CosmosDBImpl client) { + public PrivateLinkResourcesInner(Retrofit retrofit, CosmosDBManagementClientImpl client) { this.service = retrofit.create(PrivateLinkResourcesService.class); this.client = client; } diff --git a/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/SqlContainerGetResultsImpl.java b/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/SqlContainerGetResultsImpl.java index db6b09747667..2a5ff08dc925 100644 --- a/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/SqlContainerGetResultsImpl.java +++ b/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/SqlContainerGetResultsImpl.java @@ -13,10 +13,7 @@ import rx.Observable; import com.microsoft.azure.management.cosmosdb.v2019_08_01_preview.SqlContainerCreateUpdateParameters; import java.util.Map; -import com.microsoft.azure.management.cosmosdb.v2019_08_01_preview.ConflictResolutionPolicy; -import com.microsoft.azure.management.cosmosdb.v2019_08_01_preview.IndexingPolicy; -import com.microsoft.azure.management.cosmosdb.v2019_08_01_preview.ContainerPartitionKey; -import com.microsoft.azure.management.cosmosdb.v2019_08_01_preview.UniqueKeyPolicy; +import com.microsoft.azure.management.cosmosdb.v2019_08_01_preview.SqlContainerGetPropertiesResource; import com.microsoft.azure.management.cosmosdb.v2019_08_01_preview.SqlContainerResource; import rx.functions.Func1; @@ -99,41 +96,11 @@ private void resetCreateUpdateParameters() { this.createOrUpdateParameter = new SqlContainerCreateUpdateParameters(); } - @Override - public String _etag() { - return this.inner()._etag(); - } - - @Override - public String _rid() { - return this.inner()._rid(); - } - - @Override - public Object _ts() { - return this.inner()._ts(); - } - - @Override - public ConflictResolutionPolicy conflictResolutionPolicy() { - return this.inner().conflictResolutionPolicy(); - } - - @Override - public Integer defaultTtl() { - return this.inner().defaultTtl(); - } - @Override public String id() { return this.inner().id(); } - @Override - public IndexingPolicy indexingPolicy() { - return this.inner().indexingPolicy(); - } - @Override public String location() { return this.inner().location(); @@ -145,13 +112,8 @@ public String name() { } @Override - public ContainerPartitionKey partitionKey() { - return this.inner().partitionKey(); - } - - @Override - public String sqlContainerGetResultsId() { - return this.inner().sqlContainerGetResultsId(); + public SqlContainerGetPropertiesResource resource() { + return this.inner().resource(); } @Override @@ -164,11 +126,6 @@ public String type() { return this.inner().type(); } - @Override - public UniqueKeyPolicy uniqueKeyPolicy() { - return this.inner().uniqueKeyPolicy(); - } - @Override public SqlContainerGetResultsImpl withExistingSqlDatabasis(String resourceGroupName, String accountName, String databaseName) { this.resourceGroupName = resourceGroupName; diff --git a/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/SqlContainerGetResultsInner.java b/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/SqlContainerGetResultsInner.java index 26aa345bd3f0..0d3856c45d42 100644 --- a/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/SqlContainerGetResultsInner.java +++ b/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/SqlContainerGetResultsInner.java @@ -8,10 +8,7 @@ package com.microsoft.azure.management.cosmosdb.v2019_08_01_preview.implementation; -import com.microsoft.azure.management.cosmosdb.v2019_08_01_preview.IndexingPolicy; -import com.microsoft.azure.management.cosmosdb.v2019_08_01_preview.ContainerPartitionKey; -import com.microsoft.azure.management.cosmosdb.v2019_08_01_preview.UniqueKeyPolicy; -import com.microsoft.azure.management.cosmosdb.v2019_08_01_preview.ConflictResolutionPolicy; +import com.microsoft.azure.management.cosmosdb.v2019_08_01_preview.SqlContainerGetPropertiesResource; import com.fasterxml.jackson.annotation.JsonProperty; import com.microsoft.rest.serializer.JsonFlatten; import com.microsoft.azure.management.cosmosdb.v2019_08_01_preview.ARMResourceProperties; @@ -22,210 +19,29 @@ @JsonFlatten public class SqlContainerGetResultsInner extends ARMResourceProperties { /** - * Name of the Cosmos DB SQL container. + * The resource property. */ - @JsonProperty(value = "properties.id", required = true) - private String sqlContainerGetResultsId; + @JsonProperty(value = "properties.resource") + private SqlContainerGetPropertiesResource resource; /** - * The configuration of the indexing policy. By default, the indexing is - * automatic for all document paths within the container. - */ - @JsonProperty(value = "properties.indexingPolicy") - private IndexingPolicy indexingPolicy; - - /** - * The configuration of the partition key to be used for partitioning data - * into multiple partitions. - */ - @JsonProperty(value = "properties.partitionKey") - private ContainerPartitionKey partitionKey; - - /** - * Default time to live. - */ - @JsonProperty(value = "properties.defaultTtl") - private Integer defaultTtl; - - /** - * The unique key policy configuration for specifying uniqueness - * constraints on documents in the collection in the Azure Cosmos DB - * service. - */ - @JsonProperty(value = "properties.uniqueKeyPolicy") - private UniqueKeyPolicy uniqueKeyPolicy; - - /** - * The conflict resolution policy for the container. - */ - @JsonProperty(value = "properties.conflictResolutionPolicy") - private ConflictResolutionPolicy conflictResolutionPolicy; - - /** - * A system generated property. A unique identifier. - */ - @JsonProperty(value = "properties._rid", access = JsonProperty.Access.WRITE_ONLY) - private String _rid; - - /** - * A system generated property that denotes the last updated timestamp of - * the resource. - */ - @JsonProperty(value = "properties._ts", access = JsonProperty.Access.WRITE_ONLY) - private Object _ts; - - /** - * A system generated property representing the resource etag required for - * optimistic concurrency control. - */ - @JsonProperty(value = "properties._etag", access = JsonProperty.Access.WRITE_ONLY) - private String _etag; - - /** - * Get name of the Cosmos DB SQL container. - * - * @return the sqlContainerGetResultsId value - */ - public String sqlContainerGetResultsId() { - return this.sqlContainerGetResultsId; - } - - /** - * Set name of the Cosmos DB SQL container. + * Get the resource value. * - * @param sqlContainerGetResultsId the sqlContainerGetResultsId value to set - * @return the SqlContainerGetResultsInner object itself. + * @return the resource value */ - public SqlContainerGetResultsInner withSqlContainerGetResultsId(String sqlContainerGetResultsId) { - this.sqlContainerGetResultsId = sqlContainerGetResultsId; - return this; + public SqlContainerGetPropertiesResource resource() { + return this.resource; } /** - * Get the configuration of the indexing policy. By default, the indexing is automatic for all document paths within the container. + * Set the resource value. * - * @return the indexingPolicy value - */ - public IndexingPolicy indexingPolicy() { - return this.indexingPolicy; - } - - /** - * Set the configuration of the indexing policy. By default, the indexing is automatic for all document paths within the container. - * - * @param indexingPolicy the indexingPolicy value to set + * @param resource the resource value to set * @return the SqlContainerGetResultsInner object itself. */ - public SqlContainerGetResultsInner withIndexingPolicy(IndexingPolicy indexingPolicy) { - this.indexingPolicy = indexingPolicy; + public SqlContainerGetResultsInner withResource(SqlContainerGetPropertiesResource resource) { + this.resource = resource; return this; } - /** - * Get the configuration of the partition key to be used for partitioning data into multiple partitions. - * - * @return the partitionKey value - */ - public ContainerPartitionKey partitionKey() { - return this.partitionKey; - } - - /** - * Set the configuration of the partition key to be used for partitioning data into multiple partitions. - * - * @param partitionKey the partitionKey value to set - * @return the SqlContainerGetResultsInner object itself. - */ - public SqlContainerGetResultsInner withPartitionKey(ContainerPartitionKey partitionKey) { - this.partitionKey = partitionKey; - return this; - } - - /** - * Get default time to live. - * - * @return the defaultTtl value - */ - public Integer defaultTtl() { - return this.defaultTtl; - } - - /** - * Set default time to live. - * - * @param defaultTtl the defaultTtl value to set - * @return the SqlContainerGetResultsInner object itself. - */ - public SqlContainerGetResultsInner withDefaultTtl(Integer defaultTtl) { - this.defaultTtl = defaultTtl; - return this; - } - - /** - * Get the unique key policy configuration for specifying uniqueness constraints on documents in the collection in the Azure Cosmos DB service. - * - * @return the uniqueKeyPolicy value - */ - public UniqueKeyPolicy uniqueKeyPolicy() { - return this.uniqueKeyPolicy; - } - - /** - * Set the unique key policy configuration for specifying uniqueness constraints on documents in the collection in the Azure Cosmos DB service. - * - * @param uniqueKeyPolicy the uniqueKeyPolicy value to set - * @return the SqlContainerGetResultsInner object itself. - */ - public SqlContainerGetResultsInner withUniqueKeyPolicy(UniqueKeyPolicy uniqueKeyPolicy) { - this.uniqueKeyPolicy = uniqueKeyPolicy; - return this; - } - - /** - * Get the conflict resolution policy for the container. - * - * @return the conflictResolutionPolicy value - */ - public ConflictResolutionPolicy conflictResolutionPolicy() { - return this.conflictResolutionPolicy; - } - - /** - * Set the conflict resolution policy for the container. - * - * @param conflictResolutionPolicy the conflictResolutionPolicy value to set - * @return the SqlContainerGetResultsInner object itself. - */ - public SqlContainerGetResultsInner withConflictResolutionPolicy(ConflictResolutionPolicy conflictResolutionPolicy) { - this.conflictResolutionPolicy = conflictResolutionPolicy; - return this; - } - - /** - * Get a system generated property. A unique identifier. - * - * @return the _rid value - */ - public String _rid() { - return this._rid; - } - - /** - * Get a system generated property that denotes the last updated timestamp of the resource. - * - * @return the _ts value - */ - public Object _ts() { - return this._ts; - } - - /** - * Get a system generated property representing the resource etag required for optimistic concurrency control. - * - * @return the _etag value - */ - public String _etag() { - return this._etag; - } - } diff --git a/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/SqlDatabaseGetResultsImpl.java b/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/SqlDatabaseGetResultsImpl.java index 15cc870b0181..d74a2f291eb5 100644 --- a/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/SqlDatabaseGetResultsImpl.java +++ b/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/SqlDatabaseGetResultsImpl.java @@ -13,6 +13,7 @@ import rx.Observable; import com.microsoft.azure.management.cosmosdb.v2019_08_01_preview.SqlDatabaseCreateUpdateParameters; import java.util.Map; +import com.microsoft.azure.management.cosmosdb.v2019_08_01_preview.SqlDatabaseGetPropertiesResource; import com.microsoft.azure.management.cosmosdb.v2019_08_01_preview.SqlDatabaseResource; import rx.functions.Func1; @@ -93,31 +94,6 @@ private void resetCreateUpdateParameters() { this.createOrUpdateParameter = new SqlDatabaseCreateUpdateParameters(); } - @Override - public String _colls() { - return this.inner()._colls(); - } - - @Override - public String _etag() { - return this.inner()._etag(); - } - - @Override - public String _rid() { - return this.inner()._rid(); - } - - @Override - public Object _ts() { - return this.inner()._ts(); - } - - @Override - public String _users() { - return this.inner()._users(); - } - @Override public String id() { return this.inner().id(); @@ -134,8 +110,8 @@ public String name() { } @Override - public String sqlDatabaseGetResultsId() { - return this.inner().sqlDatabaseGetResultsId(); + public SqlDatabaseGetPropertiesResource resource() { + return this.inner().resource(); } @Override diff --git a/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/SqlDatabaseGetResultsInner.java b/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/SqlDatabaseGetResultsInner.java index b28328192b2d..3d4cbe7d55ad 100644 --- a/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/SqlDatabaseGetResultsInner.java +++ b/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/SqlDatabaseGetResultsInner.java @@ -8,6 +8,7 @@ package com.microsoft.azure.management.cosmosdb.v2019_08_01_preview.implementation; +import com.microsoft.azure.management.cosmosdb.v2019_08_01_preview.SqlDatabaseGetPropertiesResource; import com.fasterxml.jackson.annotation.JsonProperty; import com.microsoft.rest.serializer.JsonFlatten; import com.microsoft.azure.management.cosmosdb.v2019_08_01_preview.ARMResourceProperties; @@ -18,129 +19,28 @@ @JsonFlatten public class SqlDatabaseGetResultsInner extends ARMResourceProperties { /** - * Name of the Cosmos DB SQL database. + * The resource property. */ - @JsonProperty(value = "properties.id", required = true) - private String sqlDatabaseGetResultsId; + @JsonProperty(value = "properties.resource") + private SqlDatabaseGetPropertiesResource resource; /** - * A system generated property. A unique identifier. - */ - @JsonProperty(value = "properties._rid", access = JsonProperty.Access.WRITE_ONLY) - private String _rid; - - /** - * A system generated property that denotes the last updated timestamp of - * the resource. - */ - @JsonProperty(value = "properties._ts", access = JsonProperty.Access.WRITE_ONLY) - private Object _ts; - - /** - * A system generated property representing the resource etag required for - * optimistic concurrency control. - */ - @JsonProperty(value = "properties._etag", access = JsonProperty.Access.WRITE_ONLY) - private String _etag; - - /** - * A system generated property that specified the addressable path of the - * collections resource. - */ - @JsonProperty(value = "properties._colls") - private String _colls; - - /** - * A system generated property that specifies the addressable path of the - * users resource. - */ - @JsonProperty(value = "properties._users") - private String _users; - - /** - * Get name of the Cosmos DB SQL database. - * - * @return the sqlDatabaseGetResultsId value - */ - public String sqlDatabaseGetResultsId() { - return this.sqlDatabaseGetResultsId; - } - - /** - * Set name of the Cosmos DB SQL database. - * - * @param sqlDatabaseGetResultsId the sqlDatabaseGetResultsId value to set - * @return the SqlDatabaseGetResultsInner object itself. - */ - public SqlDatabaseGetResultsInner withSqlDatabaseGetResultsId(String sqlDatabaseGetResultsId) { - this.sqlDatabaseGetResultsId = sqlDatabaseGetResultsId; - return this; - } - - /** - * Get a system generated property. A unique identifier. - * - * @return the _rid value - */ - public String _rid() { - return this._rid; - } - - /** - * Get a system generated property that denotes the last updated timestamp of the resource. - * - * @return the _ts value - */ - public Object _ts() { - return this._ts; - } - - /** - * Get a system generated property representing the resource etag required for optimistic concurrency control. - * - * @return the _etag value - */ - public String _etag() { - return this._etag; - } - - /** - * Get a system generated property that specified the addressable path of the collections resource. - * - * @return the _colls value - */ - public String _colls() { - return this._colls; - } - - /** - * Set a system generated property that specified the addressable path of the collections resource. - * - * @param _colls the _colls value to set - * @return the SqlDatabaseGetResultsInner object itself. - */ - public SqlDatabaseGetResultsInner with_colls(String _colls) { - this._colls = _colls; - return this; - } - - /** - * Get a system generated property that specifies the addressable path of the users resource. + * Get the resource value. * - * @return the _users value + * @return the resource value */ - public String _users() { - return this._users; + public SqlDatabaseGetPropertiesResource resource() { + return this.resource; } /** - * Set a system generated property that specifies the addressable path of the users resource. + * Set the resource value. * - * @param _users the _users value to set + * @param resource the resource value to set * @return the SqlDatabaseGetResultsInner object itself. */ - public SqlDatabaseGetResultsInner with_users(String _users) { - this._users = _users; + public SqlDatabaseGetResultsInner withResource(SqlDatabaseGetPropertiesResource resource) { + this.resource = resource; return this; } diff --git a/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/SqlResourcesInner.java b/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/SqlResourcesInner.java index 8399b042bf2f..7bb21c05af4f 100644 --- a/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/SqlResourcesInner.java +++ b/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/SqlResourcesInner.java @@ -44,7 +44,7 @@ public class SqlResourcesInner { /** The Retrofit service to perform REST calls. */ private SqlResourcesService service; /** The service client containing this operation class. */ - private CosmosDBImpl client; + private CosmosDBManagementClientImpl client; /** * Initializes an instance of SqlResourcesInner. @@ -52,7 +52,7 @@ public class SqlResourcesInner { * @param retrofit the Retrofit instance built from a Retrofit Builder. * @param client the instance of the service client containing this operation class. */ - public SqlResourcesInner(Retrofit retrofit, CosmosDBImpl client) { + public SqlResourcesInner(Retrofit retrofit, CosmosDBManagementClientImpl client) { this.service = retrofit.create(SqlResourcesService.class); this.client = client; } diff --git a/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/SqlStoredProcedureGetResultsImpl.java b/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/SqlStoredProcedureGetResultsImpl.java index de5ca8414f09..8285e760ab14 100644 --- a/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/SqlStoredProcedureGetResultsImpl.java +++ b/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/SqlStoredProcedureGetResultsImpl.java @@ -13,6 +13,7 @@ import rx.Observable; import com.microsoft.azure.management.cosmosdb.v2019_08_01_preview.SqlStoredProcedureCreateUpdateParameters; import java.util.Map; +import com.microsoft.azure.management.cosmosdb.v2019_08_01_preview.SqlStoredProcedureGetPropertiesResource; import com.microsoft.azure.management.cosmosdb.v2019_08_01_preview.SqlStoredProcedureResource; import rx.functions.Func1; @@ -97,26 +98,6 @@ private void resetCreateUpdateParameters() { this.createOrUpdateParameter = new SqlStoredProcedureCreateUpdateParameters(); } - @Override - public String _etag() { - return this.inner()._etag(); - } - - @Override - public String _rid() { - return this.inner()._rid(); - } - - @Override - public Object _ts() { - return this.inner()._ts(); - } - - @Override - public String body() { - return this.inner().body(); - } - @Override public String id() { return this.inner().id(); @@ -133,8 +114,8 @@ public String name() { } @Override - public String sqlStoredProcedureGetResultsId() { - return this.inner().sqlStoredProcedureGetResultsId(); + public SqlStoredProcedureGetPropertiesResource resource() { + return this.inner().resource(); } @Override diff --git a/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/SqlStoredProcedureGetResultsInner.java b/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/SqlStoredProcedureGetResultsInner.java index 79ddda182d21..5cee713d2c55 100644 --- a/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/SqlStoredProcedureGetResultsInner.java +++ b/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/SqlStoredProcedureGetResultsInner.java @@ -8,6 +8,7 @@ package com.microsoft.azure.management.cosmosdb.v2019_08_01_preview.implementation; +import com.microsoft.azure.management.cosmosdb.v2019_08_01_preview.SqlStoredProcedureGetPropertiesResource; import com.fasterxml.jackson.annotation.JsonProperty; import com.microsoft.rest.serializer.JsonFlatten; import com.microsoft.azure.management.cosmosdb.v2019_08_01_preview.ARMResourceProperties; @@ -18,102 +19,29 @@ @JsonFlatten public class SqlStoredProcedureGetResultsInner extends ARMResourceProperties { /** - * Name of the Cosmos DB SQL storedProcedure. + * The resource property. */ - @JsonProperty(value = "properties.id", required = true) - private String sqlStoredProcedureGetResultsId; + @JsonProperty(value = "properties.resource") + private SqlStoredProcedureGetPropertiesResource resource; /** - * Body of the Stored Procedure. - */ - @JsonProperty(value = "properties.body") - private String body; - - /** - * A system generated property. A unique identifier. - */ - @JsonProperty(value = "properties._rid", access = JsonProperty.Access.WRITE_ONLY) - private String _rid; - - /** - * A system generated property that denotes the last updated timestamp of - * the resource. - */ - @JsonProperty(value = "properties._ts", access = JsonProperty.Access.WRITE_ONLY) - private Object _ts; - - /** - * A system generated property representing the resource etag required for - * optimistic concurrency control. - */ - @JsonProperty(value = "properties._etag", access = JsonProperty.Access.WRITE_ONLY) - private String _etag; - - /** - * Get name of the Cosmos DB SQL storedProcedure. + * Get the resource value. * - * @return the sqlStoredProcedureGetResultsId value + * @return the resource value */ - public String sqlStoredProcedureGetResultsId() { - return this.sqlStoredProcedureGetResultsId; + public SqlStoredProcedureGetPropertiesResource resource() { + return this.resource; } /** - * Set name of the Cosmos DB SQL storedProcedure. + * Set the resource value. * - * @param sqlStoredProcedureGetResultsId the sqlStoredProcedureGetResultsId value to set + * @param resource the resource value to set * @return the SqlStoredProcedureGetResultsInner object itself. */ - public SqlStoredProcedureGetResultsInner withSqlStoredProcedureGetResultsId(String sqlStoredProcedureGetResultsId) { - this.sqlStoredProcedureGetResultsId = sqlStoredProcedureGetResultsId; + public SqlStoredProcedureGetResultsInner withResource(SqlStoredProcedureGetPropertiesResource resource) { + this.resource = resource; return this; } - /** - * Get body of the Stored Procedure. - * - * @return the body value - */ - public String body() { - return this.body; - } - - /** - * Set body of the Stored Procedure. - * - * @param body the body value to set - * @return the SqlStoredProcedureGetResultsInner object itself. - */ - public SqlStoredProcedureGetResultsInner withBody(String body) { - this.body = body; - return this; - } - - /** - * Get a system generated property. A unique identifier. - * - * @return the _rid value - */ - public String _rid() { - return this._rid; - } - - /** - * Get a system generated property that denotes the last updated timestamp of the resource. - * - * @return the _ts value - */ - public Object _ts() { - return this._ts; - } - - /** - * Get a system generated property representing the resource etag required for optimistic concurrency control. - * - * @return the _etag value - */ - public String _etag() { - return this._etag; - } - } diff --git a/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/SqlTriggerGetResultsImpl.java b/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/SqlTriggerGetResultsImpl.java index 408e1d653f93..b198b73c6d4a 100644 --- a/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/SqlTriggerGetResultsImpl.java +++ b/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/SqlTriggerGetResultsImpl.java @@ -13,8 +13,7 @@ import rx.Observable; import com.microsoft.azure.management.cosmosdb.v2019_08_01_preview.SqlTriggerCreateUpdateParameters; import java.util.Map; -import com.microsoft.azure.management.cosmosdb.v2019_08_01_preview.TriggerOperation; -import com.microsoft.azure.management.cosmosdb.v2019_08_01_preview.TriggerType; +import com.microsoft.azure.management.cosmosdb.v2019_08_01_preview.SqlTriggerGetPropertiesResource; import com.microsoft.azure.management.cosmosdb.v2019_08_01_preview.SqlTriggerResource; import rx.functions.Func1; @@ -99,26 +98,6 @@ private void resetCreateUpdateParameters() { this.createOrUpdateParameter = new SqlTriggerCreateUpdateParameters(); } - @Override - public String _etag() { - return this.inner()._etag(); - } - - @Override - public String _rid() { - return this.inner()._rid(); - } - - @Override - public Object _ts() { - return this.inner()._ts(); - } - - @Override - public String body() { - return this.inner().body(); - } - @Override public String id() { return this.inner().id(); @@ -135,8 +114,8 @@ public String name() { } @Override - public String sqlTriggerGetResultsId() { - return this.inner().sqlTriggerGetResultsId(); + public SqlTriggerGetPropertiesResource resource() { + return this.inner().resource(); } @Override @@ -144,16 +123,6 @@ public Map tags() { return this.inner().getTags(); } - @Override - public TriggerOperation triggerOperation() { - return this.inner().triggerOperation(); - } - - @Override - public TriggerType triggerType() { - return this.inner().triggerType(); - } - @Override public String type() { return this.inner().type(); diff --git a/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/SqlTriggerGetResultsInner.java b/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/SqlTriggerGetResultsInner.java index c2ce1d2a239a..b8044cf3bdac 100644 --- a/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/SqlTriggerGetResultsInner.java +++ b/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/SqlTriggerGetResultsInner.java @@ -8,8 +8,7 @@ package com.microsoft.azure.management.cosmosdb.v2019_08_01_preview.implementation; -import com.microsoft.azure.management.cosmosdb.v2019_08_01_preview.TriggerType; -import com.microsoft.azure.management.cosmosdb.v2019_08_01_preview.TriggerOperation; +import com.microsoft.azure.management.cosmosdb.v2019_08_01_preview.SqlTriggerGetPropertiesResource; import com.fasterxml.jackson.annotation.JsonProperty; import com.microsoft.rest.serializer.JsonFlatten; import com.microsoft.azure.management.cosmosdb.v2019_08_01_preview.ARMResourceProperties; @@ -20,155 +19,29 @@ @JsonFlatten public class SqlTriggerGetResultsInner extends ARMResourceProperties { /** - * Name of the Cosmos DB SQL trigger. + * The resource property. */ - @JsonProperty(value = "properties.id", required = true) - private String sqlTriggerGetResultsId; + @JsonProperty(value = "properties.resource") + private SqlTriggerGetPropertiesResource resource; /** - * Body of the Trigger. - */ - @JsonProperty(value = "properties.body") - private String body; - - /** - * Type of the Trigger. Possible values include: 'Pre', 'Post'. - */ - @JsonProperty(value = "properties.triggerType") - private TriggerType triggerType; - - /** - * The operation the trigger is associated with. Possible values include: - * 'All', 'Create', 'Update', 'Delete', 'Replace'. - */ - @JsonProperty(value = "properties.triggerOperation") - private TriggerOperation triggerOperation; - - /** - * A system generated property. A unique identifier. - */ - @JsonProperty(value = "properties._rid", access = JsonProperty.Access.WRITE_ONLY) - private String _rid; - - /** - * A system generated property that denotes the last updated timestamp of - * the resource. - */ - @JsonProperty(value = "properties._ts", access = JsonProperty.Access.WRITE_ONLY) - private Object _ts; - - /** - * A system generated property representing the resource etag required for - * optimistic concurrency control. - */ - @JsonProperty(value = "properties._etag", access = JsonProperty.Access.WRITE_ONLY) - private String _etag; - - /** - * Get name of the Cosmos DB SQL trigger. + * Get the resource value. * - * @return the sqlTriggerGetResultsId value + * @return the resource value */ - public String sqlTriggerGetResultsId() { - return this.sqlTriggerGetResultsId; + public SqlTriggerGetPropertiesResource resource() { + return this.resource; } /** - * Set name of the Cosmos DB SQL trigger. + * Set the resource value. * - * @param sqlTriggerGetResultsId the sqlTriggerGetResultsId value to set + * @param resource the resource value to set * @return the SqlTriggerGetResultsInner object itself. */ - public SqlTriggerGetResultsInner withSqlTriggerGetResultsId(String sqlTriggerGetResultsId) { - this.sqlTriggerGetResultsId = sqlTriggerGetResultsId; + public SqlTriggerGetResultsInner withResource(SqlTriggerGetPropertiesResource resource) { + this.resource = resource; return this; } - /** - * Get body of the Trigger. - * - * @return the body value - */ - public String body() { - return this.body; - } - - /** - * Set body of the Trigger. - * - * @param body the body value to set - * @return the SqlTriggerGetResultsInner object itself. - */ - public SqlTriggerGetResultsInner withBody(String body) { - this.body = body; - return this; - } - - /** - * Get type of the Trigger. Possible values include: 'Pre', 'Post'. - * - * @return the triggerType value - */ - public TriggerType triggerType() { - return this.triggerType; - } - - /** - * Set type of the Trigger. Possible values include: 'Pre', 'Post'. - * - * @param triggerType the triggerType value to set - * @return the SqlTriggerGetResultsInner object itself. - */ - public SqlTriggerGetResultsInner withTriggerType(TriggerType triggerType) { - this.triggerType = triggerType; - return this; - } - - /** - * Get the operation the trigger is associated with. Possible values include: 'All', 'Create', 'Update', 'Delete', 'Replace'. - * - * @return the triggerOperation value - */ - public TriggerOperation triggerOperation() { - return this.triggerOperation; - } - - /** - * Set the operation the trigger is associated with. Possible values include: 'All', 'Create', 'Update', 'Delete', 'Replace'. - * - * @param triggerOperation the triggerOperation value to set - * @return the SqlTriggerGetResultsInner object itself. - */ - public SqlTriggerGetResultsInner withTriggerOperation(TriggerOperation triggerOperation) { - this.triggerOperation = triggerOperation; - return this; - } - - /** - * Get a system generated property. A unique identifier. - * - * @return the _rid value - */ - public String _rid() { - return this._rid; - } - - /** - * Get a system generated property that denotes the last updated timestamp of the resource. - * - * @return the _ts value - */ - public Object _ts() { - return this._ts; - } - - /** - * Get a system generated property representing the resource etag required for optimistic concurrency control. - * - * @return the _etag value - */ - public String _etag() { - return this._etag; - } - } diff --git a/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/SqlUserDefinedFunctionGetResultsImpl.java b/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/SqlUserDefinedFunctionGetResultsImpl.java index 50ca19a33a15..f55051b696f4 100644 --- a/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/SqlUserDefinedFunctionGetResultsImpl.java +++ b/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/SqlUserDefinedFunctionGetResultsImpl.java @@ -13,6 +13,7 @@ import rx.Observable; import com.microsoft.azure.management.cosmosdb.v2019_08_01_preview.SqlUserDefinedFunctionCreateUpdateParameters; import java.util.Map; +import com.microsoft.azure.management.cosmosdb.v2019_08_01_preview.SqlUserDefinedFunctionGetPropertiesResource; import com.microsoft.azure.management.cosmosdb.v2019_08_01_preview.SqlUserDefinedFunctionResource; import rx.functions.Func1; @@ -97,26 +98,6 @@ private void resetCreateUpdateParameters() { this.createOrUpdateParameter = new SqlUserDefinedFunctionCreateUpdateParameters(); } - @Override - public String _etag() { - return this.inner()._etag(); - } - - @Override - public String _rid() { - return this.inner()._rid(); - } - - @Override - public Object _ts() { - return this.inner()._ts(); - } - - @Override - public String body() { - return this.inner().body(); - } - @Override public String id() { return this.inner().id(); @@ -133,8 +114,8 @@ public String name() { } @Override - public String sqlUserDefinedFunctionGetResultsId() { - return this.inner().sqlUserDefinedFunctionGetResultsId(); + public SqlUserDefinedFunctionGetPropertiesResource resource() { + return this.inner().resource(); } @Override diff --git a/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/SqlUserDefinedFunctionGetResultsInner.java b/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/SqlUserDefinedFunctionGetResultsInner.java index c0ef3e2774c1..1e8f04d19454 100644 --- a/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/SqlUserDefinedFunctionGetResultsInner.java +++ b/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/SqlUserDefinedFunctionGetResultsInner.java @@ -8,6 +8,7 @@ package com.microsoft.azure.management.cosmosdb.v2019_08_01_preview.implementation; +import com.microsoft.azure.management.cosmosdb.v2019_08_01_preview.SqlUserDefinedFunctionGetPropertiesResource; import com.fasterxml.jackson.annotation.JsonProperty; import com.microsoft.rest.serializer.JsonFlatten; import com.microsoft.azure.management.cosmosdb.v2019_08_01_preview.ARMResourceProperties; @@ -18,102 +19,29 @@ @JsonFlatten public class SqlUserDefinedFunctionGetResultsInner extends ARMResourceProperties { /** - * Name of the Cosmos DB SQL userDefinedFunction. + * The resource property. */ - @JsonProperty(value = "properties.id", required = true) - private String sqlUserDefinedFunctionGetResultsId; + @JsonProperty(value = "properties.resource") + private SqlUserDefinedFunctionGetPropertiesResource resource; /** - * Body of the User Defined Function. - */ - @JsonProperty(value = "properties.body") - private String body; - - /** - * A system generated property. A unique identifier. - */ - @JsonProperty(value = "properties._rid", access = JsonProperty.Access.WRITE_ONLY) - private String _rid; - - /** - * A system generated property that denotes the last updated timestamp of - * the resource. - */ - @JsonProperty(value = "properties._ts", access = JsonProperty.Access.WRITE_ONLY) - private Object _ts; - - /** - * A system generated property representing the resource etag required for - * optimistic concurrency control. - */ - @JsonProperty(value = "properties._etag", access = JsonProperty.Access.WRITE_ONLY) - private String _etag; - - /** - * Get name of the Cosmos DB SQL userDefinedFunction. + * Get the resource value. * - * @return the sqlUserDefinedFunctionGetResultsId value + * @return the resource value */ - public String sqlUserDefinedFunctionGetResultsId() { - return this.sqlUserDefinedFunctionGetResultsId; + public SqlUserDefinedFunctionGetPropertiesResource resource() { + return this.resource; } /** - * Set name of the Cosmos DB SQL userDefinedFunction. + * Set the resource value. * - * @param sqlUserDefinedFunctionGetResultsId the sqlUserDefinedFunctionGetResultsId value to set + * @param resource the resource value to set * @return the SqlUserDefinedFunctionGetResultsInner object itself. */ - public SqlUserDefinedFunctionGetResultsInner withSqlUserDefinedFunctionGetResultsId(String sqlUserDefinedFunctionGetResultsId) { - this.sqlUserDefinedFunctionGetResultsId = sqlUserDefinedFunctionGetResultsId; + public SqlUserDefinedFunctionGetResultsInner withResource(SqlUserDefinedFunctionGetPropertiesResource resource) { + this.resource = resource; return this; } - /** - * Get body of the User Defined Function. - * - * @return the body value - */ - public String body() { - return this.body; - } - - /** - * Set body of the User Defined Function. - * - * @param body the body value to set - * @return the SqlUserDefinedFunctionGetResultsInner object itself. - */ - public SqlUserDefinedFunctionGetResultsInner withBody(String body) { - this.body = body; - return this; - } - - /** - * Get a system generated property. A unique identifier. - * - * @return the _rid value - */ - public String _rid() { - return this._rid; - } - - /** - * Get a system generated property that denotes the last updated timestamp of the resource. - * - * @return the _ts value - */ - public Object _ts() { - return this._ts; - } - - /** - * Get a system generated property representing the resource etag required for optimistic concurrency control. - * - * @return the _etag value - */ - public String _etag() { - return this._etag; - } - } diff --git a/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/TableGetResultsImpl.java b/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/TableGetResultsImpl.java index a5ffd35772c3..329da139ff3d 100644 --- a/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/TableGetResultsImpl.java +++ b/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/TableGetResultsImpl.java @@ -13,6 +13,7 @@ import rx.Observable; import com.microsoft.azure.management.cosmosdb.v2019_08_01_preview.TableCreateUpdateParameters; import java.util.Map; +import com.microsoft.azure.management.cosmosdb.v2019_08_01_preview.TableGetPropertiesResource; import rx.functions.Func1; class TableGetResultsImpl extends CreatableUpdatableImpl implements TableGetResults, TableGetResults.Definition, TableGetResults.Update { @@ -92,21 +93,6 @@ private void resetCreateUpdateParameters() { this.createOrUpdateParameter = new TableCreateUpdateParameters(); } - @Override - public String _etag() { - return this.inner()._etag(); - } - - @Override - public String _rid() { - return this.inner()._rid(); - } - - @Override - public Object _ts() { - return this.inner()._ts(); - } - @Override public String id() { return this.inner().id(); @@ -123,8 +109,8 @@ public String name() { } @Override - public String tableGetResultsId() { - return this.inner().tableGetResultsId(); + public TableGetPropertiesResource resource() { + return this.inner().resource(); } @Override diff --git a/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/TableGetResultsInner.java b/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/TableGetResultsInner.java index f132e0158432..de2f10ff2ae4 100644 --- a/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/TableGetResultsInner.java +++ b/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/TableGetResultsInner.java @@ -8,6 +8,7 @@ package com.microsoft.azure.management.cosmosdb.v2019_08_01_preview.implementation; +import com.microsoft.azure.management.cosmosdb.v2019_08_01_preview.TableGetPropertiesResource; import com.fasterxml.jackson.annotation.JsonProperty; import com.microsoft.rest.serializer.JsonFlatten; import com.microsoft.azure.management.cosmosdb.v2019_08_01_preview.ARMResourceProperties; @@ -18,76 +19,29 @@ @JsonFlatten public class TableGetResultsInner extends ARMResourceProperties { /** - * Name of the Cosmos DB table. + * The resource property. */ - @JsonProperty(value = "properties.id", required = true) - private String tableGetResultsId; + @JsonProperty(value = "properties.resource") + private TableGetPropertiesResource resource; /** - * A system generated property. A unique identifier. - */ - @JsonProperty(value = "properties._rid", access = JsonProperty.Access.WRITE_ONLY) - private String _rid; - - /** - * A system generated property that denotes the last updated timestamp of - * the resource. - */ - @JsonProperty(value = "properties._ts", access = JsonProperty.Access.WRITE_ONLY) - private Object _ts; - - /** - * A system generated property representing the resource etag required for - * optimistic concurrency control. - */ - @JsonProperty(value = "properties._etag", access = JsonProperty.Access.WRITE_ONLY) - private String _etag; - - /** - * Get name of the Cosmos DB table. + * Get the resource value. * - * @return the tableGetResultsId value + * @return the resource value */ - public String tableGetResultsId() { - return this.tableGetResultsId; + public TableGetPropertiesResource resource() { + return this.resource; } /** - * Set name of the Cosmos DB table. + * Set the resource value. * - * @param tableGetResultsId the tableGetResultsId value to set + * @param resource the resource value to set * @return the TableGetResultsInner object itself. */ - public TableGetResultsInner withTableGetResultsId(String tableGetResultsId) { - this.tableGetResultsId = tableGetResultsId; + public TableGetResultsInner withResource(TableGetPropertiesResource resource) { + this.resource = resource; return this; } - /** - * Get a system generated property. A unique identifier. - * - * @return the _rid value - */ - public String _rid() { - return this._rid; - } - - /** - * Get a system generated property that denotes the last updated timestamp of the resource. - * - * @return the _ts value - */ - public Object _ts() { - return this._ts; - } - - /** - * Get a system generated property representing the resource etag required for optimistic concurrency control. - * - * @return the _etag value - */ - public String _etag() { - return this._etag; - } - } diff --git a/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/TableResourcesInner.java b/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/TableResourcesInner.java index 1167dc0c0086..184c6fdfc04b 100644 --- a/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/TableResourcesInner.java +++ b/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/TableResourcesInner.java @@ -40,7 +40,7 @@ public class TableResourcesInner { /** The Retrofit service to perform REST calls. */ private TableResourcesService service; /** The service client containing this operation class. */ - private CosmosDBImpl client; + private CosmosDBManagementClientImpl client; /** * Initializes an instance of TableResourcesInner. @@ -48,7 +48,7 @@ public class TableResourcesInner { * @param retrofit the Retrofit instance built from a Retrofit Builder. * @param client the instance of the service client containing this operation class. */ - public TableResourcesInner(Retrofit retrofit, CosmosDBImpl client) { + public TableResourcesInner(Retrofit retrofit, CosmosDBManagementClientImpl client) { this.service = retrofit.create(TableResourcesService.class); this.client = client; } diff --git a/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/ThroughputSettingsGetResultsImpl.java b/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/ThroughputSettingsGetResultsImpl.java index 6eb863f05110..4262a5609747 100644 --- a/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/ThroughputSettingsGetResultsImpl.java +++ b/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/ThroughputSettingsGetResultsImpl.java @@ -10,6 +10,7 @@ import com.microsoft.azure.management.cosmosdb.v2019_08_01_preview.ThroughputSettingsGetResults; import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.cosmosdb.v2019_08_01_preview.ThroughputSettingsGetPropertiesResource; import java.util.Map; class ThroughputSettingsGetResultsImpl extends WrapperImpl implements ThroughputSettingsGetResults { @@ -34,19 +35,14 @@ public String location() { return this.inner().location(); } - @Override - public String minimumThroughput() { - return this.inner().minimumThroughput(); - } - @Override public String name() { return this.inner().name(); } @Override - public String offerReplacePending() { - return this.inner().offerReplacePending(); + public ThroughputSettingsGetPropertiesResource resource() { + return this.inner().resource(); } @Override @@ -54,11 +50,6 @@ public Map tags() { return this.inner().getTags(); } - @Override - public int throughput() { - return this.inner().throughput(); - } - @Override public String type() { return this.inner().type(); diff --git a/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/ThroughputSettingsGetResultsInner.java b/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/ThroughputSettingsGetResultsInner.java index bca21db12632..ae3c30ff0183 100644 --- a/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/ThroughputSettingsGetResultsInner.java +++ b/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/ThroughputSettingsGetResultsInner.java @@ -8,6 +8,7 @@ package com.microsoft.azure.management.cosmosdb.v2019_08_01_preview.implementation; +import com.microsoft.azure.management.cosmosdb.v2019_08_01_preview.ThroughputSettingsGetPropertiesResource; import com.fasterxml.jackson.annotation.JsonProperty; import com.microsoft.rest.serializer.JsonFlatten; import com.microsoft.azure.management.cosmosdb.v2019_08_01_preview.ARMResourceProperties; @@ -18,59 +19,29 @@ @JsonFlatten public class ThroughputSettingsGetResultsInner extends ARMResourceProperties { /** - * Value of the Cosmos DB resource throughput. + * The resource property. */ - @JsonProperty(value = "properties.throughput", required = true) - private int throughput; + @JsonProperty(value = "properties.resource") + private ThroughputSettingsGetPropertiesResource resource; /** - * The minimum throughput of the resource. - */ - @JsonProperty(value = "properties.minimumThroughput", access = JsonProperty.Access.WRITE_ONLY) - private String minimumThroughput; - - /** - * The throughput replace is pending. - */ - @JsonProperty(value = "properties.offerReplacePending", access = JsonProperty.Access.WRITE_ONLY) - private String offerReplacePending; - - /** - * Get value of the Cosmos DB resource throughput. + * Get the resource value. * - * @return the throughput value + * @return the resource value */ - public int throughput() { - return this.throughput; + public ThroughputSettingsGetPropertiesResource resource() { + return this.resource; } /** - * Set value of the Cosmos DB resource throughput. + * Set the resource value. * - * @param throughput the throughput value to set + * @param resource the resource value to set * @return the ThroughputSettingsGetResultsInner object itself. */ - public ThroughputSettingsGetResultsInner withThroughput(int throughput) { - this.throughput = throughput; + public ThroughputSettingsGetResultsInner withResource(ThroughputSettingsGetPropertiesResource resource) { + this.resource = resource; return this; } - /** - * Get the minimum throughput of the resource. - * - * @return the minimumThroughput value - */ - public String minimumThroughput() { - return this.minimumThroughput; - } - - /** - * Get the throughput replace is pending. - * - * @return the offerReplacePending value - */ - public String offerReplacePending() { - return this.offerReplacePending; - } - } diff --git a/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/package-info.java b/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/package-info.java index 270445d2a414..79fa794c9e0a 100644 --- a/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/package-info.java +++ b/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/package-info.java @@ -5,7 +5,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. /** - * This package contains the implementation classes for CosmosDB. + * This package contains the implementation classes for CosmosDBManagementClient. * Azure Cosmos DB Database Service Resource Provider REST API. */ package com.microsoft.azure.management.cosmosdb.v2019_08_01_preview.implementation; diff --git a/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/package-info.java b/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/package-info.java index 11fc9c6970cb..7d6f290b41a9 100644 --- a/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/package-info.java +++ b/sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/package-info.java @@ -5,7 +5,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. /** - * This package contains the classes for CosmosDB. + * This package contains the classes for CosmosDBManagementClient. * Azure Cosmos DB Database Service Resource Provider REST API. */ package com.microsoft.azure.management.cosmosdb.v2019_08_01_preview; diff --git a/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-blob/README.md b/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-blob/README.md index ee1050e85bbd..6035fe08f718 100644 --- a/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-blob/README.md +++ b/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-blob/README.md @@ -128,10 +128,7 @@ example, setting `AZURE_LOG_LEVEL=2` would show all informational, warning, and be found here: [log levels][source_loglevels]. ## Next steps -Get started by exploring the following samples: - -1. [Blob Event Processor Store samples][sample_examples] -1. [Event Hubs and Event Processor samples][sample_event_hubs] +Get started by exploring the samples [here][samples_readme]. ## Contributing @@ -144,6 +141,7 @@ Guidelines](./CONTRIBUTING.md) for more information. [java_8_sdk_javadocs]: https://docs.oracle.com/javase/8/docs/api/java/util/logging/package-summary.html [maven]: https://maven.apache.org/ [performance_tuning]: https://github.com/Azure/azure-sdk-for-java/wiki/Performance-Tuning +[samples_readme]: ./src/samples/README.md [sample_container_client]: ./src/samples/java/com/azure/messaging/eventhubs/checkpointstore/blob/BlobCheckpointStoreSample.java [sample_event_hubs]: ./src/samples/java/com/azure/messaging/eventhubs [sample_event_processor]: ./src/samples/java/com/azure/messaging/eventhubs/checkpointstore/blob/EventProcessorBlobCheckpointStoreSample.java diff --git a/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-blob/pom.xml b/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-blob/pom.xml index ecc43769ced7..d8c49d919632 100644 --- a/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-blob/pom.xml +++ b/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-blob/pom.xml @@ -17,7 +17,7 @@ com.azure azure-messaging-eventhubs-checkpointstore-blob - 1.0.0-beta.4 + 1.0.0-beta.5 Microsoft Azure client library for storing checkpoints in Storage Blobs Library for using storing checkpoints in Storage Blobs @@ -40,7 +40,7 @@ com.azure azure-messaging-eventhubs - 5.0.0-beta.6 + 5.0.0-beta.7 com.azure diff --git a/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-blob/src/samples/README.md b/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-blob/src/samples/README.md new file mode 100644 index 000000000000..ffcc5d928853 --- /dev/null +++ b/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-blob/src/samples/README.md @@ -0,0 +1,36 @@ +# Azure Event Hubs Checkpoint Store client library for Java - Samples + +Azure Event Hubs Checkpoint Store samples are a set of self-contained Java programs that demonstrate interacting +with Azure Event Hubs Checkpoint Store using the client library. + +## Key concepts +Key concepts are explained in detail [here][sdk_readme_key_concepts]. + +## Getting started +Please refer to the [Getting Started][sdk_readme_getting_started] section. + +## Examples + +- [Create an instance of Storage Container client][sample_container_client] +- [Consume events from all Event Hub partitions][sample_event_processor] + +## Troubleshooting +See [Troubleshooting][sdk_readme_troubleshooting]. + +## Next steps +See [Next steps][sdk_readme_next_steps]. + +## Contributing + +If you would like to become an active contributor to this project please refer to our [Contribution +Guidelines](../../CONTRIBUTING.md) for more information. + + +[sdk_readme_key_concepts]: ../../README.md#key-concepts +[sdk_readme_getting_started]: ../../README.md#getting-started +[sdk_readme_troubleshooting]: ../../README.md#troubleshooting +[sdk_readme_next_steps]: ../../README.md#next-steps +[sample_container_client]: ./java/com/azure/messaging/eventhubs/checkpointstore/blob/BlobCheckpointStoreSample.java +[sample_event_processor]: ./java/com/azure/messaging/eventhubs/checkpointstore/blob/EventProcessorBlobCheckpointStoreSample.java + +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-java%2Fsdk%2Feventhubs%2Fazure-messaging-eventhubs-checkpointstore-blob%2Fsrc%2Fsamples%2FREADME.png) diff --git a/sdk/eventhubs/azure-messaging-eventhubs/README.md b/sdk/eventhubs/azure-messaging-eventhubs/README.md index bd1efca45f11..2e2d9783ed75 100644 --- a/sdk/eventhubs/azure-messaging-eventhubs/README.md +++ b/sdk/eventhubs/azure-messaging-eventhubs/README.md @@ -412,17 +412,8 @@ Exceptions][event_hubs_messaging_exceptions]. Beyond those discussed, the Azure Event Hubs client library offers support for many additional scenarios to help take advantage of the full feature set of the Azure Event Hubs service. In order to help explore some of the these scenarios, -the following set of sample is available: - -- [Inspect Event Hub and partition properties][sample_get_event_hubs_metadata] -- [Publish events using Microsoft identity platform][sample_publish_identity] -- [Publish events to a specific Event Hub partition with partition identifier][sample_publish_partitionId] -- [Publish events to a specific Event Hub partition with partition key][sample_publish_partitionKey] -- [Publish events to an Event Hub with a size-limited batch][sample_publish_size_limited] -- [Publish events with custom metadata][sample_publish_custom_metadata] -- [Consume events from an Event Hub partition][sample_consume_event] -- [Consume events starting from an event sequence number][sample_consume_sequence_number] -- [Consume events from all partitions using EventProcessorClient][sample_event_processor] +the following set of sample is available [here][samples_readme]. + ## Contributing @@ -446,6 +437,7 @@ Guidelines](./CONTRIBUTING.md) for more information. [oasis_amqp_v1]: http://docs.oasis-open.org/amqp/core/v1.0/os/amqp-core-overview-v1.0-os.html [performance_tuning]: https://github.com/Azure/azure-sdk-for-java/wiki/Performance-Tuning [qpid_proton_j_apache]: http://qpid.apache.org/proton/ +[samples_readme]: ./src/samples/README.md [sample_examples]: ./src/samples/java/com/azure/messaging/eventhubs/ [sample_consume_event]: ./src/samples/java/com/azure/messaging/eventhubs/ConsumeEvents.java [sample_consume_sequence_number]: ./src/samples/java/com/azure/messaging/eventhubs/ConsumeEventsFromKnownSequenceNumberPosition.java diff --git a/sdk/eventhubs/azure-messaging-eventhubs/pom.xml b/sdk/eventhubs/azure-messaging-eventhubs/pom.xml index 79ebeb999013..7d09471ab11e 100644 --- a/sdk/eventhubs/azure-messaging-eventhubs/pom.xml +++ b/sdk/eventhubs/azure-messaging-eventhubs/pom.xml @@ -14,7 +14,7 @@ com.azure azure-messaging-eventhubs - 5.0.0-beta.6 + 5.0.0-beta.7 Microsoft Azure client library for Event Hubs Libraries built on Microsoft Azure Event Hubs diff --git a/sdk/eventhubs/azure-messaging-eventhubs/src/main/resources/azure-messaging-eventhubs.properties b/sdk/eventhubs/azure-messaging-eventhubs/src/main/resources/azure-messaging-eventhubs.properties new file mode 100644 index 000000000000..ca812989b4f2 --- /dev/null +++ b/sdk/eventhubs/azure-messaging-eventhubs/src/main/resources/azure-messaging-eventhubs.properties @@ -0,0 +1,2 @@ +name=${project.artifactId} +version=${project.version} diff --git a/sdk/eventhubs/azure-messaging-eventhubs/src/samples/README.md b/sdk/eventhubs/azure-messaging-eventhubs/src/samples/README.md new file mode 100644 index 000000000000..e4149dc57766 --- /dev/null +++ b/sdk/eventhubs/azure-messaging-eventhubs/src/samples/README.md @@ -0,0 +1,50 @@ +# Azure Event Hubs client library for Java - Samples + +Azure Event Hubs samples are a set of self-contained Java programs that demonstrate interacting with Azure Event Hubs +using the client library. Each sample focuses on a specific scenario and can be executed independently. + +## Key concepts +Key concepts are explained in detail [here][sdk_readme_key_concepts]. + +## Getting started +Please refer to the [Getting Started][sdk_readme_getting_started] section. + +## Examples + +- [Inspect Event Hub and partition properties][sample_get_event_hubs_metadata] +- [Publish events using Microsoft identity platform][sample_publish_identity] +- [Publish events to a specific Event Hub partition with partition identifier][sample_publish_partitionId] +- [Publish events to a specific Event Hub partition with partition key][sample_publish_partitionKey] +- [Publish events to an Event Hub with a size-limited batch][sample_publish_size_limited] +- [Publish events with custom metadata][sample_publish_custom_metadata] +- [Consume events from an Event Hub partition][sample_consume_event] +- [Consume events starting from an event sequence number][sample_consume_sequence_number] +- [Consume events from all partitions using EventProcessorClient][sample_event_processor] + +## Troubleshooting +See [Troubleshooting][sdk_readme_troubleshooting]. + +## Next steps +See [Next steps][sdk_readme_next_steps]. + +## Contributing + +If you would like to become an active contributor to this project please refer to our [Contribution +Guidelines](../../CONTRIBUTING.md) for more information. + + +[sdk_readme_key_concepts]: ../../README.md#key-concepts +[sdk_readme_getting_started]: ../../README.md#getting-started +[sdk_readme_troubleshooting]: ../../README.md#troubleshooting +[sdk_readme_next_steps]: ../../README.md#next-steps +[sample_consume_event]: ./java/com/azure/messaging/eventhubs/ConsumeEvents.java +[sample_consume_sequence_number]: ./java/com/azure/messaging/eventhubs/ConsumeEventsFromKnownSequenceNumberPosition.java +[sample_event_processor]: ./java/com/azure/messaging/eventhubs/EventProcessorSample.java +[sample_get_event_hubs_metadata]: ./java/com/azure/messaging/eventhubs/GetEventHubMetadata.java +[sample_publish_custom_metadata]: ./java/com/azure/messaging/eventhubs/PublishEventsWithCustomMetadata.java +[sample_publish_identity]: ./java/com/azure/messaging/eventhubs/PublishEventsWithAzureIdentity.java +[sample_publish_partitionId]: ./java/com/azure/messaging/eventhubs/PublishEventsToSpecificPartition.java +[sample_publish_partitionKey]: ./java/com/azure/messaging/eventhubs/PublishEventsWithPartitionKey.java +[sample_publish_size_limited]: ./java/com/azure/messaging/eventhubs/PublishEventsWithSizeLimitedBatches.java + +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-java%2Fsdk%2Feventhubs%2Fazure-messaging-eventhubs%2Fsrc%2Fsamples%2README.png) diff --git a/sdk/identity/azure-identity/pom.xml b/sdk/identity/azure-identity/pom.xml index e930a9a15b19..e6ca9c3ae917 100644 --- a/sdk/identity/azure-identity/pom.xml +++ b/sdk/identity/azure-identity/pom.xml @@ -6,7 +6,7 @@ com.azure azure-identity - 1.0.1 + 1.1.0-beta.1 Microsoft Azure client library for Identity This module contains client library for Microsoft Azure Identity. diff --git a/sdk/keyvault/azure-security-keyvault-certificates/CHANGELOG.md b/sdk/keyvault/azure-security-keyvault-certificates/CHANGELOG.md index 358ad81ef91a..92b54f181fb0 100644 --- a/sdk/keyvault/azure-security-keyvault-certificates/CHANGELOG.md +++ b/sdk/keyvault/azure-security-keyvault-certificates/CHANGELOG.md @@ -1,5 +1,5 @@ # Release History -## 4.0.0-preview.6 (2019-12-04) +## 4.0.0-beta.6 (2019-12-04) For details on the Azure SDK for Java (November 2019 Preview) release refer to the [release announcement](https://aka.ms/azure-sdk-preview5-java). diff --git a/sdk/keyvault/azure-security-keyvault-certificates/README.md b/sdk/keyvault/azure-security-keyvault-certificates/README.md index e3eb9be5059d..a6fabbb864a5 100644 --- a/sdk/keyvault/azure-security-keyvault-certificates/README.md +++ b/sdk/keyvault/azure-security-keyvault-certificates/README.md @@ -15,7 +15,7 @@ Maven dependency for Azure Key Client library. Add it to your project's pom file com.azure azure-security-keyvault-certificates - 4.0.0-preview.5 + 4.0.0-beta.6 ``` [//]: # ({x-version-update-end}) @@ -34,7 +34,7 @@ Netty and include OkHTTP client in your pom.xml. com.azure azure-security-keyvault-certificates - 4.0.0-preview.5 + 4.0.0-beta.6 com.azure diff --git a/sdk/keyvault/azure-security-keyvault-certificates/pom.xml b/sdk/keyvault/azure-security-keyvault-certificates/pom.xml index 5d73978295bf..8446aa3545d4 100644 --- a/sdk/keyvault/azure-security-keyvault-certificates/pom.xml +++ b/sdk/keyvault/azure-security-keyvault-certificates/pom.xml @@ -12,7 +12,7 @@ com.azure azure-security-keyvault-certificates - 4.0.0-beta.6 + 4.0.0-beta.7 Microsoft Azure client library for KeyVault Certificates This module contains client library for Microsoft Azure KeyVault Certificates. diff --git a/sdk/keyvault/azure-security-keyvault-certificates/src/main/java/com/azure/security/keyvault/certificates/AzureKeyVaultConfiguration.java b/sdk/keyvault/azure-security-keyvault-certificates/src/main/java/com/azure/security/keyvault/certificates/AzureKeyVaultConfiguration.java deleted file mode 100644 index 802163cc7f08..000000000000 --- a/sdk/keyvault/azure-security-keyvault-certificates/src/main/java/com/azure/security/keyvault/certificates/AzureKeyVaultConfiguration.java +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.security.keyvault.certificates; - -class AzureKeyVaultConfiguration { - //TODO: Eventually remove these hardcoded strings with https://github.com/Azure/azure-sdk-for-java/issues/3141 - static final String SDK_NAME = "Azure-Keyvault"; - // {x-version-update-start;com.azure:azure-security-keyvault-certificates;current} - static final String SDK_VERSION = "4.0.0-beta.6"; - // {x-version-update-end} -} diff --git a/sdk/keyvault/azure-security-keyvault-certificates/src/main/java/com/azure/security/keyvault/certificates/CertificateClientBuilder.java b/sdk/keyvault/azure-security-keyvault-certificates/src/main/java/com/azure/security/keyvault/certificates/CertificateClientBuilder.java index 8fbc0583e74e..1469e6cfcec0 100644 --- a/sdk/keyvault/azure-security-keyvault-certificates/src/main/java/com/azure/security/keyvault/certificates/CertificateClientBuilder.java +++ b/sdk/keyvault/azure-security-keyvault-certificates/src/main/java/com/azure/security/keyvault/certificates/CertificateClientBuilder.java @@ -24,6 +24,7 @@ import java.net.URL; import java.util.ArrayList; import java.util.List; +import java.util.Map; import java.util.Objects; /** @@ -57,8 +58,12 @@ @ServiceClientBuilder(serviceClients = {CertificateClient.class, CertificateAsyncClient.class}) public final class CertificateClientBuilder { private final ClientLogger logger = new ClientLogger(CertificateClientBuilder.class); - + // This is properties file's name. + private static final String AZURE_KEY_VAULT_CERTIFICATES_PROPERTIES = "azure-key-vault-certificates.properties"; + private static final String SDK_NAME = "name"; + private static final String SDK_VERSION = "version"; private final List policies; + private final Map properties; private TokenCredential credential; private HttpPipeline pipeline; private URL vaultUrl; @@ -75,6 +80,7 @@ public CertificateClientBuilder() { retryPolicy = new RetryPolicy(); httpLogOptions = new HttpLogOptions(); policies = new ArrayList<>(); + properties = CoreUtils.getProperties(AZURE_KEY_VAULT_CERTIFICATES_PROPERTIES); } /** @@ -110,11 +116,13 @@ public CertificateClient buildClient() { * {@link CertificateClientBuilder#vaultUrl(String)} have not been set. */ public CertificateAsyncClient buildAsyncClient() { - Configuration buildConfiguration = (configuration == null) ? Configuration.getGlobalConfiguration().clone() : configuration; + 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))); + throw logger.logExceptionAsError(new IllegalStateException( + KeyVaultErrorCodeStrings.getErrorString(KeyVaultErrorCodeStrings.VAULT_END_POINT_REQUIRED))); } CertificateServiceVersion serviceVersion = version != null ? version : CertificateServiceVersion.getLatest(); @@ -123,12 +131,14 @@ public CertificateAsyncClient buildAsyncClient() { } if (credential == null) { - throw logger.logExceptionAsError(new IllegalStateException(KeyVaultErrorCodeStrings.getErrorString(KeyVaultErrorCodeStrings.CREDENTIALS_REQUIRED))); + throw logger.logExceptionAsError(new IllegalStateException( + KeyVaultErrorCodeStrings.getErrorString(KeyVaultErrorCodeStrings.CREDENTIALS_REQUIRED))); } // Closest to API goes first, closest to wire goes last. final List policies = new ArrayList<>(); - policies.add(new UserAgentPolicy(httpLogOptions.getApplicationId(), AzureKeyVaultConfiguration.SDK_NAME, AzureKeyVaultConfiguration.SDK_VERSION, buildConfiguration)); + policies.add(new UserAgentPolicy(httpLogOptions.getApplicationId(), properties.get(SDK_NAME), + properties.get(SDK_VERSION), buildConfiguration)); HttpPolicyProviders.addBeforeRetryPolicies(policies); policies.add(retryPolicy); policies.add(new KeyVaultCredentialPolicy(credential)); diff --git a/sdk/keyvault/azure-security-keyvault-certificates/src/main/resources/azure-key-vault-certificates.properties b/sdk/keyvault/azure-security-keyvault-certificates/src/main/resources/azure-key-vault-certificates.properties new file mode 100644 index 000000000000..ca812989b4f2 --- /dev/null +++ b/sdk/keyvault/azure-security-keyvault-certificates/src/main/resources/azure-key-vault-certificates.properties @@ -0,0 +1,2 @@ +name=${project.artifactId} +version=${project.version} diff --git a/sdk/keyvault/azure-security-keyvault-certificates/src/main/resources/kvErrorStrings.properties b/sdk/keyvault/azure-security-keyvault-certificates/src/main/resources/kvErrorStrings.properties index ffced4746fc3..df9cd43cfcc1 100644 --- a/sdk/keyvault/azure-security-keyvault-certificates/src/main/resources/kvErrorStrings.properties +++ b/sdk/keyvault/azure-security-keyvault-certificates/src/main/resources/kvErrorStrings.properties @@ -1,2 +1,3 @@ credentials_required=Azure Key Vault credentials are required. vault_endpoint_required=Azure Key Vault endpoint url is required. + diff --git a/sdk/keyvault/azure-security-keyvault-certificates/src/test/java/com/azure/security/keyvault/certificates/CertificateClientTestBase.java b/sdk/keyvault/azure-security-keyvault-certificates/src/test/java/com/azure/security/keyvault/certificates/CertificateClientTestBase.java index f7d2d5be365e..f7003dbf352e 100644 --- a/sdk/keyvault/azure-security-keyvault-certificates/src/test/java/com/azure/security/keyvault/certificates/CertificateClientTestBase.java +++ b/sdk/keyvault/azure-security-keyvault-certificates/src/test/java/com/azure/security/keyvault/certificates/CertificateClientTestBase.java @@ -57,6 +57,8 @@ import static org.junit.jupiter.api.Assertions.fail; public abstract class CertificateClientTestBase extends TestBase { + private static final String SDK_NAME = "client_name"; + private static final String SDK_VERSION = "client_version"; @Override protected String getTestName() { @@ -80,7 +82,7 @@ T clientSetup(Function clientBuilder) { HttpClient httpClient; // Closest to API goes first, closest to wire goes last. final List policies = new ArrayList<>(); - policies.add(new UserAgentPolicy(AzureKeyVaultConfiguration.SDK_NAME, AzureKeyVaultConfiguration.SDK_VERSION, + policies.add(new UserAgentPolicy(SDK_NAME, SDK_VERSION, Configuration.getGlobalConfiguration().clone(), CertificateServiceVersion.getLatest())); HttpPolicyProviders.addBeforeRetryPolicies(policies); policies.add(new RetryPolicy()); diff --git a/sdk/keyvault/azure-security-keyvault-keys/CHANGELOG.md b/sdk/keyvault/azure-security-keyvault-keys/CHANGELOG.md index 8d62d5dcedb4..1307e65fc5c9 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/CHANGELOG.md +++ b/sdk/keyvault/azure-security-keyvault-keys/CHANGELOG.md @@ -1,5 +1,10 @@ # Release History -## 4.0.0 (2019-10-31) +## 4.0.1 (2019-12-06) + +### Major changes +- `KeyEncryptionKeyClientBuilder.buildKeyEncryptionKey` and `KeyEncryptionKeyClientBuilder.buildAsyncKeyEncryptionKey`supports consumption of a secret id representing the symmetric key stored in the Key Vault as a secret. +- Dropped third party dependency on apache commons codec library. + ### Breaking changes - Key has been renamed to KeyVaultKey to avoid ambiguity with other libraries and to yield better search results. diff --git a/sdk/keyvault/azure-security-keyvault-keys/README.md b/sdk/keyvault/azure-security-keyvault-keys/README.md index 23b0d59c9952..c9e8151ffab5 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/README.md +++ b/sdk/keyvault/azure-security-keyvault-keys/README.md @@ -16,7 +16,7 @@ Maven dependency for Azure Key Client library. Add it to your project's pom file com.azure azure-security-keyvault-keys - 4.0.0 + 4.0.1 ``` [//]: # ({x-version-update-end}) @@ -35,7 +35,7 @@ Netty and include OkHTTP client in your pom.xml. com.azure azure-security-keyvault-keys - 4.0.0 + 4.0.1 com.azure diff --git a/sdk/keyvault/azure-security-keyvault-keys/pom.xml b/sdk/keyvault/azure-security-keyvault-keys/pom.xml index 4147223c8eb6..07c875219e47 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/pom.xml +++ b/sdk/keyvault/azure-security-keyvault-keys/pom.xml @@ -46,12 +46,6 @@ 1.1.0 - - commons-codec - commons-codec - 1.13 - - org.junit.jupiter diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/KeyClientBuilder.java b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/KeyClientBuilder.java index 986fe3c7d0c3..1d07ee2b1b7a 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/KeyClientBuilder.java +++ b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/KeyClientBuilder.java @@ -18,13 +18,13 @@ import com.azure.core.http.policy.UserAgentPolicy; import com.azure.core.annotation.ServiceClientBuilder; import com.azure.core.util.logging.ClientLogger; -import com.azure.security.keyvault.keys.implementation.AzureKeyVaultConfiguration; import com.azure.security.keyvault.keys.implementation.KeyVaultCredentialPolicy; import java.net.MalformedURLException; import java.net.URL; import java.util.ArrayList; import java.util.List; +import java.util.Map; import java.util.Objects; /** @@ -60,8 +60,12 @@ @ServiceClientBuilder(serviceClients = KeyClient.class) public final class KeyClientBuilder { private final ClientLogger logger = new ClientLogger(KeyClientBuilder.class); - + // This is properties file's name. + private static final String AZURE_KEY_VAULT_KEYS = "azure-key-vault-keys.properties"; + private static final String SDK_NAME = "name"; + private static final String SDK_VERSION = "version"; private final List policies; + private final Map properties; private TokenCredential credential; private HttpPipeline pipeline; private URL vaultUrl; @@ -78,6 +82,7 @@ public KeyClientBuilder() { retryPolicy = new RetryPolicy(); httpLogOptions = new HttpLogOptions(); policies = new ArrayList<>(); + properties = CoreUtils.getProperties(AZURE_KEY_VAULT_KEYS); } /** @@ -136,8 +141,8 @@ public KeyAsyncClient buildAsyncClient() { // Closest to API goes first, closest to wire goes last. final List policies = new ArrayList<>(); - policies.add(new UserAgentPolicy(httpLogOptions.getApplicationId(), AzureKeyVaultConfiguration.SDK_NAME, AzureKeyVaultConfiguration.SDK_VERSION, - buildConfiguration)); + policies.add(new UserAgentPolicy(httpLogOptions.getApplicationId(), properties.get(SDK_NAME), + properties.get(SDK_VERSION), buildConfiguration)); HttpPolicyProviders.addBeforeRetryPolicies(policies); policies.add(retryPolicy); policies.add(new KeyVaultCredentialPolicy(credential)); diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/CryptographyAsyncClient.java b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/CryptographyAsyncClient.java index 3ae35f0480ee..8143a33328c3 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/CryptographyAsyncClient.java +++ b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/CryptographyAsyncClient.java @@ -55,11 +55,13 @@ @ServiceClient(builder = CryptographyClientBuilder.class, isAsync = true, serviceInterfaces = CryptographyService.class) public class CryptographyAsyncClient { static final String KEY_VAULT_SCOPE = "https://vault.azure.net/.default"; + static final String SECRETS_COLLECTION = "secrets"; JsonWebKey key; private final CryptographyService service; - private final CryptographyServiceClient cryptographyServiceClient; + private CryptographyServiceClient cryptographyServiceClient; private LocalKeyCryptographyClient localKeyCryptographyClient; private final ClientLogger logger = new ClientLogger(CryptographyAsyncClient.class); + private String keyCollection; /** * Creates a CryptographyAsyncClient that uses {@code pipeline} to service requests @@ -168,6 +170,14 @@ Mono> getKeyWithResponse(Context context) { return cryptographyServiceClient.getKey(context); } + Mono getSecretKey() { + try { + return withContext(context -> cryptographyServiceClient.getSecretKey(context)).flatMap(FluxUtil::toMono); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } + } + /** * Encrypts an arbitrary sequence of bytes using the configured key. Note that the encrypt operation only supports a * single block of data, the size of which is dependent on the target key and the encryption algorithm to be used. @@ -591,6 +601,7 @@ private void unpackAndValidateId(String keyId) { String endpoint = url.getProtocol() + "://" + url.getHost(); String keyName = (tokens.length >= 3 ? tokens[2] : null); String version = (tokens.length >= 4 ? tokens[3] : null); + this.keyCollection = (tokens.length >= 2 ? tokens[1] : null); if (Strings.isNullOrEmpty(endpoint)) { throw logger.logExceptionAsError(new IllegalArgumentException("Key endpoint in key id is invalid")); } else if (Strings.isNullOrEmpty(keyName)) { @@ -609,10 +620,14 @@ private boolean checkKeyPermissions(List operations, KeyOperation private boolean ensureValidKeyAvailable() { boolean keyAvailableLocally = true; - if (this.key == null) { + if (this.key == null && keyCollection != null) { try { - KeyVaultKey keyVaultKey = getKey().block(); - this.key = keyVaultKey.getKey(); + if (keyCollection.equals(SECRETS_COLLECTION)) { + this.key = getSecretKey().block(); + } else { + KeyVaultKey keyVaultKey = getKey().block(); + this.key = keyVaultKey.getKey(); + } keyAvailableLocally = this.key.isValid(); initializeCryptoClients(); } catch (HttpResponseException | NullPointerException e) { @@ -627,4 +642,8 @@ private boolean ensureValidKeyAvailable() { CryptographyServiceClient getCryptographyServiceClient() { return cryptographyServiceClient; } + + void setCryptographyServiceClient(CryptographyServiceClient serviceClient) { + this.cryptographyServiceClient = serviceClient; + } } diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/CryptographyClientBuilder.java b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/CryptographyClientBuilder.java index 5a76313f4fc8..f153b2b82c9d 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/CryptographyClientBuilder.java +++ b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/CryptographyClientBuilder.java @@ -16,13 +16,14 @@ import com.azure.core.annotation.ServiceClientBuilder; import com.azure.core.http.policy.HttpPolicyProviders; import com.azure.core.util.Configuration; +import com.azure.core.util.CoreUtils; import com.azure.core.util.logging.ClientLogger; import com.azure.security.keyvault.keys.implementation.KeyVaultCredentialPolicy; -import com.azure.security.keyvault.keys.implementation.AzureKeyVaultConfiguration; import com.azure.security.keyvault.keys.models.JsonWebKey; import java.util.ArrayList; import java.util.List; +import java.util.Map; import java.util.Objects; /** @@ -63,7 +64,12 @@ @ServiceClientBuilder(serviceClients = CryptographyClient.class) public final class CryptographyClientBuilder { final List policies; + final Map properties; private final ClientLogger logger = new ClientLogger(CryptographyClientBuilder.class); + // This is properties file's name. + private static final String AZURE_KEY_VAULT_KEYS = "azure-key-vault-keys.properties"; + private static final String SDK_NAME = "name"; + private static final String SDK_VERSION = "version"; private TokenCredential credential; private HttpPipeline pipeline; private JsonWebKey jsonWebKey; @@ -81,6 +87,7 @@ public CryptographyClientBuilder() { retryPolicy = new RetryPolicy(); httpLogOptions = new HttpLogOptions(); policies = new ArrayList<>(); + properties = CoreUtils.getProperties(AZURE_KEY_VAULT_KEYS); } /** @@ -153,8 +160,8 @@ HttpPipeline setupPipeline() { // Closest to API goes first, closest to wire goes last. final List policies = new ArrayList<>(); - policies.add(new UserAgentPolicy(httpLogOptions.getApplicationId(), AzureKeyVaultConfiguration.SDK_NAME, AzureKeyVaultConfiguration.SDK_VERSION, - buildConfiguration)); + policies.add(new UserAgentPolicy(httpLogOptions.getApplicationId(), properties.get(SDK_NAME), + properties.get(SDK_VERSION), buildConfiguration)); HttpPolicyProviders.addBeforeRetryPolicies(policies); policies.add(retryPolicy); policies.add(new KeyVaultCredentialPolicy(credential)); diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/CryptographyService.java b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/CryptographyService.java index c8943ae83226..1ae31cec4359 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/CryptographyService.java +++ b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/CryptographyService.java @@ -3,6 +3,7 @@ package com.azure.security.keyvault.keys.cryptography; +import com.azure.core.annotation.Put; import com.azure.core.exception.HttpResponseException; import com.azure.core.exception.ResourceModifiedException; import com.azure.core.exception.ResourceNotFoundException; @@ -130,4 +131,29 @@ Mono> getKey(@HostParam("url") String url, @HeaderParam("accept-language") String acceptLanguage, @HeaderParam("Content-Type") String type, Context context); + + @Get("secrets/{secret-name}/{secret-version}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(code = {404}, value = ResourceNotFoundException.class) + @UnexpectedResponseExceptionType(code = {403}, value = ResourceModifiedException.class) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> getSecret(@HostParam("url") String url, + @PathParam("secret-name") String keyName, + @PathParam("secret-version") String keyVersion, + @QueryParam("api-version") String apiVersion, + @HeaderParam("accept-language") String acceptLanguage, + @HeaderParam("Content-Type") String type, + Context context); + + @Put("secrets/{secret-name}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(code = {400}, value = ResourceModifiedException.class) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> setSecret(@HostParam("url") String url, + @PathParam("secret-name") String secretName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("accept-language") String acceptLanguage, + @BodyParam("body") SecretRequestParameters parameters, + @HeaderParam("Content-Type") String type, + Context context); } diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/CryptographyServiceClient.java b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/CryptographyServiceClient.java index 5c6f6eea0494..5b5ce913eb42 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/CryptographyServiceClient.java +++ b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/CryptographyServiceClient.java @@ -4,6 +4,7 @@ package com.azure.security.keyvault.keys.cryptography; import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; import com.azure.security.keyvault.keys.cryptography.models.DecryptResult; @@ -15,13 +16,22 @@ import com.azure.security.keyvault.keys.cryptography.models.SignResult; import com.azure.security.keyvault.keys.cryptography.models.VerifyResult; import com.azure.security.keyvault.keys.cryptography.models.WrapResult; +import com.azure.security.keyvault.keys.models.JsonWebKey; +import com.azure.security.keyvault.keys.models.KeyOperation; +import com.azure.security.keyvault.keys.models.KeyType; import com.azure.security.keyvault.keys.models.KeyVaultKey; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.node.ArrayNode; +import com.fasterxml.jackson.databind.node.ObjectNode; import reactor.core.publisher.Mono; import java.net.MalformedURLException; import java.net.URL; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; +import java.util.Base64; import java.util.Objects; class CryptographyServiceClient { @@ -57,6 +67,56 @@ private Mono> getKey(String name, String version, Context .doOnError(error -> logger.warning("Failed to get key - {}", name, error)); } + Mono> getSecretKey(Context context) { + return service.getSecret(vaultUrl, keyName, version, API_VERSION, ACCEPT_LANGUAGE, CONTENT_TYPE_HEADER_VALUE, context) + .doOnRequest(ignored -> logger.info("Retrieving key - {}", keyName)) + .doOnSuccess(response -> logger.info("Retrieved key - {}", response.getValue().getName())) + .doOnError(error -> logger.warning("Failed to get key - {}", keyName, error)) + .flatMap((stringResponse -> { + KeyVaultKey key = null; + try { + return Mono.just(new SimpleResponse<>(stringResponse.getRequest(), + stringResponse.getStatusCode(), + stringResponse.getHeaders(), transformSecretKey(stringResponse.getValue()))); + } catch (JsonProcessingException e) { + return Mono.error(e); + } + })); + } + + Mono> setSecretKey(SecretKey secret, Context context) { + Objects.requireNonNull(secret, "The Secret input parameter cannot be null."); + SecretRequestParameters parameters = new SecretRequestParameters() + .setValue(secret.getValue()) + .setTags(secret.getProperties().getTags()) + .setContentType(secret.getProperties().getContentType()) + .setSecretAttributes(new SecretRequestAttributes(secret.getProperties())); + + return service.setSecret(vaultUrl, secret.getName(), API_VERSION, ACCEPT_LANGUAGE, parameters, + CONTENT_TYPE_HEADER_VALUE, context) + .doOnRequest(ignored -> logger.info("Setting secret - {}", secret.getName())) + .doOnSuccess(response -> logger.info("Set secret - {}", response.getValue().getName())) + .doOnError(error -> logger.warning("Failed to set secret - {}", secret.getName(), error)); + } + + JsonWebKey transformSecretKey(SecretKey secretKey) throws JsonProcessingException { + ObjectMapper mapper = new ObjectMapper(); + JsonNode rootNode = mapper.createObjectNode(); + ArrayNode a = mapper.createArrayNode(); + a.add(KeyOperation.WRAP_KEY.toString()); + a.add(KeyOperation.UNWRAP_KEY.toString()); + a.add(KeyOperation.ENCRYPT.toString()); + a.add(KeyOperation.DECRYPT.toString()); + + ((ObjectNode) rootNode).put("k", Base64.getUrlDecoder().decode(secretKey.getValue())); + ((ObjectNode) rootNode).put("kid", this.keyId); + ((ObjectNode) rootNode).put("kty", KeyType.OCT.toString()); + ((ObjectNode) rootNode).put("key_ops", a); + + String jsonString = mapper.writerWithDefaultPrettyPrinter().writeValueAsString(rootNode); + return mapper.readValue(jsonString, JsonWebKey.class); + } + Mono encrypt(EncryptionAlgorithm algorithm, byte[] plaintext, Context context) { KeyOperationParameters parameters = new KeyOperationParameters().setAlgorithm(algorithm).setValue(plaintext); @@ -176,6 +236,4 @@ private void unpackId(String keyId) { } } } - - } diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/KeyEncryptionKeyClient.java b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/KeyEncryptionKeyClient.java index 40d11864167b..494bfad93373 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/KeyEncryptionKeyClient.java +++ b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/KeyEncryptionKeyClient.java @@ -43,4 +43,8 @@ public byte[] wrapKey(String algorithm, byte[] key) { public byte[] unwrapKey(String algorithm, byte[] encryptedKey) { return client.unwrapKey(algorithm, encryptedKey).block(); } + + KeyEncryptionKeyAsyncClient getKeyEncryptionKeyAsyncClient() { + return client; + } } diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/SecretKey.java b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/SecretKey.java new file mode 100644 index 000000000000..1164c92f91c8 --- /dev/null +++ b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/SecretKey.java @@ -0,0 +1,128 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.security.keyvault.keys.cryptography; + +import com.fasterxml.jackson.annotation.JsonProperty; + +import java.util.Map; +import java.util.Objects; + + +class SecretKey { + + /* + * The value of the secret. + */ + @JsonProperty(value = "value") + private String value; + + /* + * The secret properties. + */ + private SecretProperties properties; + + /* + * Creates an empty instance of the Secret. + */ + SecretKey() { + properties = new SecretProperties(); + } + + /* + * Creates a Secret with {@code name} and {@code value}. + * + * @param name The name of the secret. + * @param value the value of the secret. + */ + SecretKey(String name, String value) { + properties = new SecretProperties(name); + this.value = value; + } + + /* + * Get the value of the secret. + * + * @return the secret value + */ + String getValue() { + return this.value; + } + + /* + * Get the secret identifier. + * + * @return the secret identifier. + */ + String getId() { + return properties.getId(); + } + + /* + * Get the secret name. + * + * @return the secret name. + */ + String getName() { + return properties.getName(); + } + + /* + * Get the secret properties + * @return the Secret properties + */ + SecretProperties getProperties() { + return this.properties; + } + + /* + * Set the secret properties + * @param properties The Secret properties + * @throws NullPointerException if {@code properties} is null. + * @return the updated secret key object + */ + SecretKey setProperties(SecretProperties properties) { + Objects.requireNonNull(properties); + properties.name = this.properties.name; + this.properties = properties; + return this; + } + + @JsonProperty(value = "id") + private void unpackId(String id) { + properties.unpackId(id); + } + + /* + * Unpacks the attributes json response and updates the variables in the Secret Attributes object. + * Uses Lazy Update to set values for variables id, tags, contentType, managed and keyId as these variables are + * part of main json body and not attributes json body when the secret response comes from list Secrets operations. + * @param attributes The key value mapping of the Secret attributes + */ + @JsonProperty("attributes") + @SuppressWarnings("unchecked") + private void unpackAttributes(Map attributes) { + properties.unpackAttributes(attributes); + } + + @JsonProperty("managed") + private void unpackManaged(Boolean managed) { + properties.managed = managed; + } + + @JsonProperty("kid") + private void unpackKid(String kid) { + properties.keyId = kid; + } + + @JsonProperty("contentType") + private void unpackContentType(String contentType) { + properties.contentType = contentType; + } + + @JsonProperty("tags") + private void unpackTags(Map tags) { + properties.tags = tags; + } +} + diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/SecretProperties.java b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/SecretProperties.java new file mode 100644 index 000000000000..47f272b40f15 --- /dev/null +++ b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/SecretProperties.java @@ -0,0 +1,335 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.security.keyvault.keys.cryptography; + +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +import java.net.MalformedURLException; +import java.net.URL; +import java.time.Instant; +import java.time.OffsetDateTime; +import java.time.ZoneOffset; +import java.util.Map; +import java.util.Objects; + + +class SecretProperties { + private final ClientLogger logger = new ClientLogger(SecretProperties.class); + + /* + * The secret id. + */ + String id; + + /* + * The secret version. + */ + String version; + + /* + * Determines whether the object is enabled. + */ + Boolean enabled; + + /* + * Not before date in UTC. + */ + OffsetDateTime notBefore; + + /* + * Expiry date in UTC. + */ + OffsetDateTime expiresOn; + + /* + * Creation time in UTC. + */ + OffsetDateTime createdOn; + + /* + * Last updated time in UTC. + */ + OffsetDateTime updatedOn; + + /* + * The secret name. + */ + String name; + + /* + * Reflects the deletion recovery level currently in effect for secrets in + * the current vault. If it contains 'Purgeable', the secret can be + * permanently deleted by a privileged user; otherwise, only the system can + * purge the secret, at the end of the retention interval. Possible values + * include: 'Purgeable', 'Recoverable+Purgeable', 'Recoverable', + * 'Recoverable+ProtectedSubscription'. + */ + String recoveryLevel; + + /* + * The content type of the secret. + */ + @JsonProperty(value = "contentType") + String contentType; + + /* + * Application specific metadata in the form of key-value pairs. + */ + @JsonProperty(value = "tags") + Map tags; + + /* + * If this is a secret backing a KV certificate, then this field specifies + * the corresponding key backing the KV certificate. + */ + @JsonProperty(value = "kid", access = JsonProperty.Access.WRITE_ONLY) + String keyId; + + /* + * True if the secret's lifetime is managed by key vault. If this is a + * secret backing a certificate, then managed will be true. + */ + @JsonProperty(value = "managed", access = JsonProperty.Access.WRITE_ONLY) + Boolean managed; + + SecretProperties(String secretName) { + this.name = secretName; + } + + /* + * Creates empty instance of SecretProperties. + */ + SecretProperties() { } + + /* + * Get the secret name. + * + * @return the name of the secret. + */ + String getName() { + return this.name; + } + + /* + * Get the recovery level of the secret. + + * @return the recoveryLevel of the secret. + */ + String getRecoveryLevel() { + return recoveryLevel; + } + + /* + * Get the enabled value. + * + * @return the enabled value + */ + Boolean isEnabled() { + return this.enabled; + } + + /* + * Set the enabled value. + * + * @param enabled The enabled value to set + * @throws NullPointerException if {@code enabled} is null. + * @return the SecretProperties object itself. + */ + SecretProperties setEnabled(Boolean enabled) { + Objects.requireNonNull(enabled); + this.enabled = enabled; + return this; + } + + /* + * Get the notBefore UTC time. + * + * @return the notBefore UTC time. + */ + OffsetDateTime getNotBefore() { + return notBefore; + } + + /* + * Set the {@link OffsetDateTime notBefore} UTC time. + * + * @param notBefore The notBefore UTC time to set + * @return the SecretProperties object itself. + */ + SecretProperties setNotBefore(OffsetDateTime notBefore) { + this.notBefore = notBefore; + return this; + } + + /* + * Get the Secret Expiry time in UTC. + * + * @return the expires UTC time. + */ + OffsetDateTime getExpiresOn() { + if (this.expiresOn == null) { + return null; + } + return this.expiresOn; + } + + /* + * Set the {@link OffsetDateTime expires} UTC time. + * + * @param expiresOn The expiry time to set for the secret. + * @return the SecretProperties object itself. + */ + SecretProperties setExpiresOn(OffsetDateTime expiresOn) { + this.expiresOn = expiresOn; + return this; + } + + /* + * Get the the UTC time at which secret was created. + * + * @return the created UTC time. + */ + OffsetDateTime getCreatedOn() { + return createdOn; + } + + /* + * Get the UTC time at which secret was last updated. + * + * @return the last updated UTC time. + */ + OffsetDateTime getUpdatedOn() { + return updatedOn; + } + + /* + * Get the secret identifier. + * + * @return the secret identifier. + */ + String getId() { + return this.id; + } + + /* + * Get the content type. + * + * @return the content type. + */ + String getContentType() { + return this.contentType; + } + + /* + * Set the contentType. + * + * @param contentType The contentType to set + * @return the updated SecretProperties object itself. + */ + SecretProperties setContentType(String contentType) { + this.contentType = contentType; + return this; + } + + /* + * Get the tags associated with the secret. + * + * @return the value of the tags. + */ + Map getTags() { + return this.tags; + } + + /* + * Set the tags to be associated with the secret. + * + * @param tags The tags to set + * @return the updated SecretProperties object itself. + */ + SecretProperties setTags(Map tags) { + this.tags = tags; + return this; + } + + /* + * Get the keyId identifier. + * + * @return the keyId identifier. + */ + String getKeyId() { + return this.keyId; + } + + /* + * Get the managed value. + * + * @return the managed value + */ + Boolean isManaged() { + return this.managed; + } + + /* + * Get the version of the secret. + * + * @return the version of the secret. + */ + String getVersion() { + return this.version; + } + + /* + * Unpacks the attributes json response and updates the variables in the Secret Attributes object. + * Uses Lazy Update to set values for variables id, tags, contentType, managed and keyId as these variables are + * part of main json body and not attributes json body when the secret response comes from list Secrets operations. + * @param attributes The key value mapping of the Secret attributes + */ + @JsonProperty("attributes") + @SuppressWarnings("unchecked") + void unpackAttributes(Map attributes) { + this.enabled = (Boolean) attributes.get("enabled"); + this.notBefore = epochToOffsetDateTime(attributes.get("nbf")); + this.expiresOn = epochToOffsetDateTime(attributes.get("exp")); + this.createdOn = epochToOffsetDateTime(attributes.get("created")); + this.updatedOn = epochToOffsetDateTime(attributes.get("updated")); + this.recoveryLevel = (String) attributes.get("recoveryLevel"); + this.contentType = (String) lazyValueSelection(attributes.get("contentType"), this.contentType); + this.keyId = (String) lazyValueSelection(attributes.get("keyId"), this.keyId); + this.tags = (Map) lazyValueSelection(attributes.get("tags"), this.tags); + this.managed = (Boolean) lazyValueSelection(attributes.get("managed"), this.managed); + unpackId((String) attributes.get("id")); + } + + @JsonProperty(value = "id") + void unpackId(String id) { + if (id != null && id.length() > 0) { + this.id = id; + try { + URL url = new URL(id); + String[] tokens = url.getPath().split("/"); + this.name = (tokens.length >= 3 ? tokens[2] : null); + this.version = (tokens.length >= 4 ? tokens[3] : null); + } catch (MalformedURLException e) { + // Should never come here. + logger.error("Received Malformed Secret Id URL from KV Service"); + } + } + } + + private OffsetDateTime epochToOffsetDateTime(Object epochValue) { + if (epochValue != null) { + Instant instant = Instant.ofEpochMilli(((Number) epochValue).longValue() * 1000L); + return OffsetDateTime.ofInstant(instant, ZoneOffset.UTC); + } + return null; + } + + private Object lazyValueSelection(Object input1, Object input2) { + if (input1 == null) { + return input2; + } + return input1; + } +} diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/SecretRequestAttributes.java b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/SecretRequestAttributes.java new file mode 100644 index 000000000000..f35dfd2c111b --- /dev/null +++ b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/SecretRequestAttributes.java @@ -0,0 +1,171 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.security.keyvault.keys.cryptography; + +import com.fasterxml.jackson.annotation.JsonProperty; + +import java.time.Instant; +import java.time.OffsetDateTime; +import java.time.ZoneOffset; + +/* + * The object attributes managed by the Cryptography service. + */ +class SecretRequestAttributes { + + /* + * Creates an instance of SecretRequestAttributes. Reads secretProperties.notBefore, secretProperties.expires and + * secretProperties.enabled fields from {@code secretProperties} + * @param secretProperties the {@link SecretProperties} object with populated attributes + */ + SecretRequestAttributes(SecretProperties secretProperties) { + if (secretProperties.getNotBefore() != null) { + this.notBefore = secretProperties.getNotBefore().toEpochSecond(); + } + if (secretProperties.getExpiresOn() != null) { + this.expires = secretProperties.getExpiresOn().toEpochSecond(); + } + this.enabled = secretProperties.isEnabled(); + } + + /* + * The secret value. + */ + @JsonProperty(value = "value") + private String value; + + /* + * The secret id. + */ + @JsonProperty(value = "id") + private String id; + + /* + * Determines whether the object is enabled. + */ + @JsonProperty(value = "enabled") + private Boolean enabled; + + /* + * Not before date in UTC. + */ + @JsonProperty(value = "nbf") + private Long notBefore; + + /* + * Expiry date in UTC. + */ + @JsonProperty(value = "exp") + private Long expires; + + /* + * Creation time in UTC. + */ + @JsonProperty(value = "created", access = JsonProperty.Access.WRITE_ONLY) + private Long created; + + /* + * Last updated time in UTC. + */ + @JsonProperty(value = "updated", access = JsonProperty.Access.WRITE_ONLY) + private Long updated; + + /* + * Get the enabled value. + * + * @return the enabled value + */ + public Boolean isEnabled() { + return this.enabled; + } + + /* + * Set the enabled value. + * + * @param enabled the enabled value to set + * @return the Attributes object itself. + */ + public SecretRequestAttributes getEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /* + * Get the notBefore value. + * + * @return the notBefore value + */ + public OffsetDateTime getNotBefore() { + if (this.notBefore == null) { + return null; + } + return OffsetDateTime.ofInstant(Instant.ofEpochMilli(this.notBefore * 1000L), ZoneOffset.UTC); + } + + /* + * Set the notBefore value. + * + * @param notBefore the notBefore value to set + * @return the Attributes object itself. + */ + public SecretRequestAttributes setNotBefore(OffsetDateTime notBefore) { + if (notBefore == null) { + this.notBefore = null; + } else { + this.notBefore = OffsetDateTime.ofInstant(notBefore.toInstant(), ZoneOffset.UTC).toEpochSecond(); + } + return this; + } + + /* + * Get the expires value. + * + * @return the expires value + */ + public OffsetDateTime getExpires() { + if (this.expires == null) { + return null; + } + return OffsetDateTime.ofInstant(Instant.ofEpochMilli(this.expires * 1000L), ZoneOffset.UTC); + } + + /* + * Set the expires value. + * + * @param expires the expires value to set + * @return the Attributes object itself. + */ + public SecretRequestAttributes setExpires(OffsetDateTime expires) { + if (expires == null) { + this.expires = null; + } else { + this.expires = OffsetDateTime.ofInstant(expires.toInstant(), ZoneOffset.UTC).toEpochSecond(); + } + return this; + } + + /* + * Get the created value. + * + * @return the created value + */ + public OffsetDateTime getCreated() { + if (this.created == null) { + return null; + } + return OffsetDateTime.ofInstant(Instant.ofEpochMilli(this.created * 1000L), ZoneOffset.UTC); + } + + /* + * Get the updated value. + * + * @return the updated value + */ + public OffsetDateTime getUpdated() { + if (this.updated == null) { + return null; + } + return OffsetDateTime.ofInstant(Instant.ofEpochMilli(this.updated * 1000L), ZoneOffset.UTC); + } +} diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/SecretRequestParameters.java b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/SecretRequestParameters.java new file mode 100644 index 000000000000..3ec66a786e7f --- /dev/null +++ b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/SecretRequestParameters.java @@ -0,0 +1,119 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.security.keyvault.keys.cryptography; + +import com.fasterxml.jackson.annotation.JsonProperty; + +import java.util.Map; + + +/* + * Represents a set of request options used in REST requests intitiated by Cryptography service. + */ +class SecretRequestParameters { + /* + * The value of the secret. + */ + @JsonProperty(value = "value", required = true) + private String value; + + /* + * Application specific metadata in the form of key-value pairs. + */ + @JsonProperty(value = "tags") + private Map tags; + + /* + * Type of the secret value such as a password. + */ + @JsonProperty(value = "contentType") + private String contentType; + + /* + * The secret management attributes. + */ + @JsonProperty(value = "attributes") + private SecretRequestAttributes secretRequestAttributes; + + /* + * Get the value value. + * + * @return the value value + */ + public String getValue() { + return this.value; + } + + /* + * Set the value value. + * + * @param value the value value to set + * @return the SecretRequestParameters object itself. + */ + public SecretRequestParameters setValue(String value) { + this.value = value; + return this; + } + + /* + * Get the tags value. + * + * @return the tags value + */ + public Map getTags() { + return this.tags; + } + + /* + * Set the tags value. + * + * @param tags the tags value to set + * @return the SecretRequestParameters object itself. + */ + public SecretRequestParameters setTags(Map tags) { + this.tags = tags; + return this; + } + + /* + * Get the contentType value. + * + * @return the contentType value + */ + public String getContentType() { + return this.contentType; + } + + /* + * Set the contentType value. + * + * @param contentType the contentType value to set + * @return the SecretRequestParameters object itself. + */ + public SecretRequestParameters setContentType(String contentType) { + this.contentType = contentType; + return this; + } + + /* + * Get the secretRequestAttributes value. + * + * @return the SecretRequestAttributes value + */ + public SecretRequestAttributes getSecretAttributes() { + return this.secretRequestAttributes; + } + + /* + * Set the secretRequestAttributes value. + * + * @param secretRequestAttributes the secretRequestAttributes to set + * @return the SecretRequestParameters object itself. + */ + public SecretRequestParameters setSecretAttributes(SecretRequestAttributes secretRequestAttributes) { + this.secretRequestAttributes = secretRequestAttributes; + return this; + } + +} diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/SignatureEncoding.java b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/SignatureEncoding.java index 7492da6330ff..aa241b4f9518 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/SignatureEncoding.java +++ b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/SignatureEncoding.java @@ -3,8 +3,6 @@ package com.azure.security.keyvault.keys.cryptography; -import org.apache.commons.codec.binary.Hex; - import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.math.BigInteger; @@ -15,6 +13,9 @@ final class SignatureEncoding { // SignatureEncoding is intended to be a static class private SignatureEncoding() { } + private static final char[] HEX_LOWER = new char[]{'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'}; + + /* * Converts an ASN.1 DER encoded ECDSA signature to a raw signature in the form R|S * @param asn1DerSignature An ASN.1 DER encoded signature @@ -49,7 +50,7 @@ static byte[] fromAsn1Der(byte[] asn1DerSignature, Ecdsa algorithm) { return Asn1DerSignatureEncoding.decode(asn1DerSignature, algorithm); } catch (IllegalArgumentException ex) { throw (IllegalArgumentException) new IllegalArgumentException( - ex.getMessage() + " " + Hex.encodeHexString(asn1DerSignature)).initCause(ex); + ex.getMessage() + " " + Arrays.toString(encodeHex(asn1DerSignature, HEX_LOWER))).initCause(ex); } } @@ -86,8 +87,21 @@ static byte[] toAsn1Der(byte[] signature, Ecdsa algorithm) { return Asn1DerSignatureEncoding.encode(signature, algorithm); } catch (IllegalArgumentException ex) { throw (IllegalArgumentException) new IllegalArgumentException( - ex.getMessage() + " " + Hex.encodeHexString(signature)).initCause(ex); + ex.getMessage() + " " + Arrays.toString(encodeHex(signature, HEX_LOWER))).initCause(ex); + } + } + + private static char[] encodeHex(byte[] data, char[] toDigits) { + int l = data.length; + char[] out = new char[l << 1]; + int i = 0; + + for (int j = 0; i < l; ++i) { + out[j++] = toDigits[(240 & data[i]) >>> 4]; + out[j++] = toDigits[15 & data[i]]; } + + return out; } } diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/implementation/AzureKeyVaultConfiguration.java b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/implementation/AzureKeyVaultConfiguration.java deleted file mode 100644 index 46296bf3478b..000000000000 --- a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/implementation/AzureKeyVaultConfiguration.java +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.security.keyvault.keys.implementation; - -public final class AzureKeyVaultConfiguration { - //TODO: Eventually remove these hardcoded strings with https://github.com/Azure/azure-sdk-for-java/issues/3141 - public static final String SDK_NAME = "Azure-Keyvault"; - // {x-version-update-start;com.azure:azure-security-keyvault-keys;current} - public static final String SDK_VERSION = "4.1.0-beta.1"; - // {x-version-update-end} -} diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/models/Base64UrlJsonDeserializer.java b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/models/Base64UrlJsonDeserializer.java index c60696153dfe..0405f4a43b78 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/models/Base64UrlJsonDeserializer.java +++ b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/models/Base64UrlJsonDeserializer.java @@ -7,22 +7,20 @@ import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.DeserializationContext; import com.fasterxml.jackson.databind.JsonDeserializer; -import org.apache.commons.codec.binary.Base64; import java.io.IOException; +import java.util.Base64; /** * The base64 URL JSON deserializer. */ class Base64UrlJsonDeserializer extends JsonDeserializer { - static final Base64 BASE64 = new Base64(-1, null, true); - @Override public byte[] deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException { String text = jp.getText(); if (text != null) { - return BASE64.decode(text); + return Base64.getDecoder().decode(text); } return null; } diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/models/Base64UrlJsonSerializer.java b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/models/Base64UrlJsonSerializer.java index 153c81a5767e..8318a238176b 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/models/Base64UrlJsonSerializer.java +++ b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/models/Base64UrlJsonSerializer.java @@ -7,17 +7,14 @@ import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.JsonSerializer; import com.fasterxml.jackson.databind.SerializerProvider; -import org.apache.commons.codec.binary.Base64; import java.io.IOException; +import java.util.Base64; /** * The base64 URL JSON serializer. */ class Base64UrlJsonSerializer extends JsonSerializer { - - static final Base64 BASE64 = new Base64(-1, null, true); - @Override public void serialize(byte[] value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { @@ -27,9 +24,8 @@ public void serialize(byte[] value, JsonGenerator jgen, SerializerProvider provi } else if (value.length == 0) { text = ""; } else { - text = BASE64.encodeAsString(value); + text = Base64.getEncoder().encodeToString(value); } jgen.writeString(text); } - } diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/models/KeyProperties.java b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/models/KeyProperties.java index 2cbc4d7a0dd7..23a32a61b21a 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/models/KeyProperties.java +++ b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/models/KeyProperties.java @@ -7,7 +7,6 @@ import com.azure.security.keyvault.keys.KeyAsyncClient; import com.azure.security.keyvault.keys.KeyClient; import com.fasterxml.jackson.annotation.JsonProperty; -import org.apache.commons.codec.binary.Base64; import java.net.MalformedURLException; import java.net.URL; @@ -15,6 +14,7 @@ import java.time.OffsetDateTime; import java.time.ZoneOffset; import java.util.ArrayList; +import java.util.Base64; import java.util.List; import java.util.Map; @@ -297,25 +297,31 @@ List getKeyOperations(List jsonWebKeyOps) { @SuppressWarnings("unchecked") JsonWebKey createKeyMaterialFromJson(Map key) { - final Base64 base64 = new Base64(-1, null, true); JsonWebKey outputKey = new JsonWebKey() - .setY(base64.decode((String) key.get("y"))) - .setX(base64.decode((String) key.get("x"))) + .setY(decode((String) key.get("y"))) + .setX(decode((String) key.get("x"))) .setCurveName(KeyCurveName.fromString((String) key.get("crv"))) .setKeyOps(getKeyOperations((List) key.get("key_ops"))) - .setT(base64.decode((String) key.get("key_hsm"))) - .setK(base64.decode((String) key.get("k"))) - .setQ(base64.decode((String) key.get("q"))) - .setP(base64.decode((String) key.get("p"))) - .setQi(base64.decode((String) key.get("qi"))) - .setDq(base64.decode((String) key.get("dq"))) - .setDp(base64.decode((String) key.get("dp"))) - .setD(base64.decode((String) key.get("d"))) - .setE(base64.decode((String) key.get("e"))) - .setN(base64.decode((String) key.get("n"))) + .setT(decode((String) key.get("key_hsm"))) + .setK(decode((String) key.get("k"))) + .setQ(decode((String) key.get("q"))) + .setP(decode((String) key.get("p"))) + .setQi(decode((String) key.get("qi"))) + .setDq(decode((String) key.get("dq"))) + .setDp(decode((String) key.get("dp"))) + .setD(decode((String) key.get("d"))) + .setE(decode((String) key.get("e"))) + .setN(decode((String) key.get("n"))) .setKeyType(KeyType.fromString((String) key.get("kty"))) .setId((String) key.get("kid")); unpackId((String) key.get("kid")); return outputKey; } + + private byte[] decode(String in) { + if (in != null) { + return Base64.getUrlDecoder().decode(in); + } + return null; + } } diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/module-info.java b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/module-info.java index e0f59d6ce7f3..48f7a994357e 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/module-info.java +++ b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/module-info.java @@ -3,7 +3,6 @@ module com.azure.security.keyvault.keys { requires transitive com.azure.core; - requires org.apache.commons.codec; requires java.xml.crypto; exports com.azure.security.keyvault.keys.cryptography; diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/main/resources/azure-key-vault-keys.properties b/sdk/keyvault/azure-security-keyvault-keys/src/main/resources/azure-key-vault-keys.properties new file mode 100644 index 000000000000..ca812989b4f2 --- /dev/null +++ b/sdk/keyvault/azure-security-keyvault-keys/src/main/resources/azure-key-vault-keys.properties @@ -0,0 +1,2 @@ +name=${project.artifactId} +version=${project.version} diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/test/java/com/azure/security/keyvault/keys/KeyClientTestBase.java b/sdk/keyvault/azure-security-keyvault-keys/src/test/java/com/azure/security/keyvault/keys/KeyClientTestBase.java index 89d86b36d0d3..16bcf9b89b7c 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/src/test/java/com/azure/security/keyvault/keys/KeyClientTestBase.java +++ b/sdk/keyvault/azure-security-keyvault-keys/src/test/java/com/azure/security/keyvault/keys/KeyClientTestBase.java @@ -21,7 +21,6 @@ import com.azure.core.test.TestBase; import com.azure.core.util.Configuration; import com.azure.identity.DefaultAzureCredentialBuilder; -import com.azure.security.keyvault.keys.implementation.AzureKeyVaultConfiguration; import com.azure.security.keyvault.keys.models.CreateKeyOptions; import com.azure.security.keyvault.keys.models.KeyType; import com.azure.security.keyvault.keys.models.KeyVaultKey; @@ -47,6 +46,8 @@ public abstract class KeyClientTestBase extends TestBase { private static final String KEY_NAME = "javaKeyTemp"; private static final KeyType RSA_KEY_TYPE = KeyType.RSA; private static final KeyType EC_KEY_TYPE = KeyType.EC; + private static final String SDK_NAME = "client_name"; + private static final String SDK_VERSION = "client_version"; @Override protected String getTestName() { @@ -70,7 +71,7 @@ T clientSetup(Function clientBuilder) { HttpClient httpClient; // Closest to API goes first, closest to wire goes last. final List policies = new ArrayList<>(); - policies.add(new UserAgentPolicy(AzureKeyVaultConfiguration.SDK_NAME, AzureKeyVaultConfiguration.SDK_VERSION, Configuration.getGlobalConfiguration().clone(), KeyServiceVersion.getLatest())); + policies.add(new UserAgentPolicy(SDK_NAME, SDK_VERSION, Configuration.getGlobalConfiguration().clone(), KeyServiceVersion.getLatest())); HttpPolicyProviders.addBeforeRetryPolicies(policies); policies.add(new RetryPolicy()); if (credential != null) { diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/test/java/com/azure/security/keyvault/keys/KeyVaultKeysUserAgentPropertiesTest.java b/sdk/keyvault/azure-security-keyvault-keys/src/test/java/com/azure/security/keyvault/keys/KeyVaultKeysUserAgentPropertiesTest.java new file mode 100644 index 000000000000..6ae8d698e11e --- /dev/null +++ b/sdk/keyvault/azure-security-keyvault-keys/src/test/java/com/azure/security/keyvault/keys/KeyVaultKeysUserAgentPropertiesTest.java @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.security.keyvault.keys; + +import com.azure.core.util.CoreUtils; +import java.util.Map; +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.assertTrue; + +public class KeyVaultKeysUserAgentPropertiesTest { + + @Test + public void testAzureConfiguration() { + Map properties = CoreUtils.getProperties("azure-key-vault-keys.properties"); + assertTrue(properties.get("name").matches("azure-key-vault-keys")); + assertTrue(properties.get("version").matches("(\\d)+.(\\d)+.(\\d)+([-a-zA-Z0-9.])*")); + } +} diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/test/java/com/azure/security/keyvault/keys/cryptography/CryptographyClientTestBase.java b/sdk/keyvault/azure-security-keyvault-keys/src/test/java/com/azure/security/keyvault/keys/cryptography/CryptographyClientTestBase.java index 5709682a81ab..31df034c7ffc 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/src/test/java/com/azure/security/keyvault/keys/cryptography/CryptographyClientTestBase.java +++ b/sdk/keyvault/azure-security-keyvault-keys/src/test/java/com/azure/security/keyvault/keys/cryptography/CryptographyClientTestBase.java @@ -20,7 +20,6 @@ import com.azure.core.test.TestBase; import com.azure.core.util.Configuration; import com.azure.identity.DefaultAzureCredentialBuilder; -import com.azure.security.keyvault.keys.implementation.AzureKeyVaultConfiguration; import org.junit.jupiter.api.Test; import java.math.BigInteger; @@ -45,6 +44,8 @@ public abstract class CryptographyClientTestBase extends TestBase { + private static final String SDK_NAME = "client_name"; + private static final String SDK_VERSION = "client_version"; @Override protected String getTestName() { @@ -77,7 +78,7 @@ T clientSetup(Function clientBuilder) { // Closest to API goes first, closest to wire goes last. final List policies = new ArrayList<>(); - policies.add(new UserAgentPolicy(AzureKeyVaultConfiguration.SDK_NAME, AzureKeyVaultConfiguration.SDK_VERSION, Configuration.getGlobalConfiguration().clone(), CryptographyServiceVersion.getLatest())); + policies.add(new UserAgentPolicy(SDK_NAME, SDK_VERSION, Configuration.getGlobalConfiguration().clone(), CryptographyServiceVersion.getLatest())); HttpPolicyProviders.addBeforeRetryPolicies(policies); policies.add(new RetryPolicy()); if (credential != null) { @@ -144,8 +145,7 @@ private static KeyPair getWellKnownKey() throws Exception { public String getEndpoint() { final String endpoint = interceptorManager.isPlaybackMode() ? "http://localhost:8080" - : "https://cameravault.vault.azure.net"; - // : System.getenv("AZURE_KEYVAULT_ENDPOINT"); + : System.getenv("AZURE_KEYVAULT_ENDPOINT"); Objects.requireNonNull(endpoint); return endpoint; } diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/test/java/com/azure/security/keyvault/keys/cryptography/KeyEncryptionKeyClientTest.java b/sdk/keyvault/azure-security-keyvault-keys/src/test/java/com/azure/security/keyvault/keys/cryptography/KeyEncryptionKeyClientTest.java new file mode 100644 index 000000000000..854815677cc8 --- /dev/null +++ b/sdk/keyvault/azure-security-keyvault-keys/src/test/java/com/azure/security/keyvault/keys/cryptography/KeyEncryptionKeyClientTest.java @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.security.keyvault.keys.cryptography; + +import com.azure.core.cryptography.KeyEncryptionKey; +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.util.Context; +import org.junit.jupiter.api.Test; + +import java.util.Base64; + +import static org.junit.jupiter.api.Assertions.assertArrayEquals; + +public class KeyEncryptionKeyClientTest extends KeyEncryptionKeyClientTestBase { + + private KeyEncryptionKey client; + private HttpPipeline pipeline; + private SecretKey secretKey; + + @Override + protected void beforeTest() { + beforeTestSetup(); + pipeline = getHttpPipeline(); + } + + private void setupSecretKeyAndClient(byte[] kek) { + if (secretKey == null) { + CryptographyServiceClient serviceClient = new CryptographyServiceClient(getEndpoint(), RestProxy.create(CryptographyService.class, pipeline)); + secretKey = serviceClient.setSecretKey(new SecretKey("secretKey", Base64.getEncoder().encodeToString(kek)), Context.NONE).block().getValue(); + client = new KeyEncryptionKeyClientBuilder() + .pipeline(pipeline) + .buildKeyEncryptionKey(secretKey.getId()); + } + } + + @Test + public void wrapUnwrapSymmetricAK128() { + byte[] kek = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F }; + setupSecretKeyAndClient(kek); + byte[] cek = { 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, (byte) 0x88, (byte) 0x99, (byte) 0xAA, (byte) 0xBB, (byte) 0xCC, (byte) 0xDD, (byte) 0xEE, (byte) 0xFF }; + byte[] encrypted = client.wrapKey("A128KW", cek); + byte[] ek = { 0x1F, (byte) 0xA6, (byte) 0x8B, 0x0A, (byte) 0x81, 0x12, (byte) 0xB4, 0x47, (byte) 0xAE, (byte) 0xF3, 0x4B, (byte) 0xD8, (byte) 0xFB, 0x5A, 0x7B, (byte) 0x82, (byte) 0x9D, 0x3E, (byte) 0x86, 0x23, 0x71, (byte) 0xD2, (byte) 0xCF, (byte) 0xE5 }; + assertArrayEquals(ek, encrypted); + byte[] dek = client.unwrapKey("A128KW", ek); + assertArrayEquals(dek, cek); + } + + @Test + public void wrapUnwrapSymmetricAK192() { + byte[] kek = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17 }; + setupSecretKeyAndClient(kek); + byte[] cek = { 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, (byte) 0x88, (byte) 0x99, (byte) 0xAA, (byte) 0xBB, (byte) 0xCC, (byte) 0xDD, (byte) 0xEE, (byte) 0xFF }; + byte[] encrypted = client.wrapKey("A192KW", cek); + byte[] ek = { (byte) 0x96, 0x77, (byte) 0x8B, 0x25, (byte) 0xAE, 0x6C, (byte) 0xA4, 0x35, (byte) 0xF9, 0x2B, 0x5B, (byte) 0x97, (byte) 0xC0, 0x50, (byte) 0xAE, (byte) 0xD2, 0x46, (byte) 0x8A, (byte) 0xB8, (byte) 0xA1, 0x7A, (byte) 0xD8, 0x4E, 0x5D }; + assertArrayEquals(ek, encrypted); + byte[] dek = client.unwrapKey("A192KW", ek); + assertArrayEquals(dek, cek); + } +} diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/test/java/com/azure/security/keyvault/keys/cryptography/KeyEncryptionKeyClientTestBase.java b/sdk/keyvault/azure-security-keyvault-keys/src/test/java/com/azure/security/keyvault/keys/cryptography/KeyEncryptionKeyClientTestBase.java new file mode 100644 index 000000000000..136504fcc6d5 --- /dev/null +++ b/sdk/keyvault/azure-security-keyvault-keys/src/test/java/com/azure/security/keyvault/keys/cryptography/KeyEncryptionKeyClientTestBase.java @@ -0,0 +1,181 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.security.keyvault.keys.cryptography; + +import com.azure.core.credential.TokenCredential; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.http.HttpClient; +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.netty.NettyAsyncHttpClientBuilder; +import com.azure.core.http.policy.BearerTokenAuthenticationPolicy; +import com.azure.core.http.policy.HttpLogDetailLevel; +import com.azure.core.http.policy.HttpLogOptions; +import com.azure.core.http.policy.HttpLoggingPolicy; +import com.azure.core.http.policy.HttpPipelinePolicy; +import com.azure.core.http.policy.HttpPolicyProviders; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.test.TestBase; +import com.azure.core.util.Configuration; +import com.azure.identity.ClientSecretCredentialBuilder; +import org.junit.jupiter.api.Test; + +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.function.Function; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.fail; + + +public abstract class KeyEncryptionKeyClientTestBase extends TestBase { + private static final String SDK_NAME = "client_name"; + private static final String SDK_VERSION = "client_version"; + + @Override + protected String getTestName() { + return ""; + } + + void beforeTestSetup() { + } + + T clientSetup(Function clientBuilder) { + HttpPipeline pipeline = getHttpPipeline(); + + T client; + client = clientBuilder.apply(pipeline); + + return Objects.requireNonNull(client); + } + + HttpPipeline getHttpPipeline() { + final String endpoint = interceptorManager.isPlaybackMode() + ? "http://localhost:8080" + : System.getenv("AZURE_KEYVAULT_ENDPOINT"); + + TokenCredential credential = null; + HttpClient httpClient; + + String tenantId = System.getenv("AZURE_TENANT_ID"); + String clientId = System.getenv("AZURE_CLIENT_ID"); + String clientSecret = System.getenv("AZURE_CLIENT_SECRET"); + if (!interceptorManager.isPlaybackMode()) { + assertNotNull(tenantId); + assertNotNull(clientId); + assertNotNull(clientSecret); + } + + if (!interceptorManager.isPlaybackMode()) { + credential = new ClientSecretCredentialBuilder() + .clientSecret(clientSecret) + .tenantId(tenantId) + .clientId(clientId) + .build(); + } + + // Closest to API goes first, closest to wire goes last. + final List policies = new ArrayList<>(); + policies.add(new UserAgentPolicy(SDK_NAME, SDK_VERSION, Configuration.getGlobalConfiguration().clone(), CryptographyServiceVersion.getLatest())); + HttpPolicyProviders.addBeforeRetryPolicies(policies); + policies.add(new RetryPolicy()); + if (credential != null) { + policies.add(new BearerTokenAuthenticationPolicy(credential, CryptographyAsyncClient.KEY_VAULT_SCOPE)); + } + HttpPolicyProviders.addAfterRetryPolicies(policies); + policies.add(new HttpLoggingPolicy(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BODY_AND_HEADERS))); + + if (interceptorManager.isPlaybackMode()) { + httpClient = interceptorManager.getPlaybackClient(); + policies.add(interceptorManager.getRecordPolicy()); + } else { + httpClient = new NettyAsyncHttpClientBuilder().wiretap(true).build(); + policies.add(interceptorManager.getRecordPolicy()); + } + + return new HttpPipelineBuilder() + .policies(policies.toArray(new HttpPipelinePolicy[0])) + .httpClient(httpClient) + .build(); + } + + @Test + public abstract void wrapUnwrapSymmetricAK128(); + + @Test + public abstract void wrapUnwrapSymmetricAK192(); + + + public String getEndpoint() { + final String endpoint = interceptorManager.isPlaybackMode() + ? "http://localhost:8080" + : System.getenv("AZURE_KEYVAULT_ENDPOINT"); + Objects.requireNonNull(endpoint); + return endpoint; + } + + static void assertRestException(Runnable exceptionThrower, int expectedStatusCode) { + assertRestException(exceptionThrower, HttpResponseException.class, expectedStatusCode); + } + + static void assertRestException(Runnable exceptionThrower, Class expectedExceptionType, int expectedStatusCode) { + try { + exceptionThrower.run(); + fail(); + } catch (Throwable ex) { + assertRestException(ex, expectedExceptionType, expectedStatusCode); + } + } + + /** + * Helper method to verify the error was a HttpRequestException and it has a specific HTTP response code. + * + * @param exception Expected error thrown during the test + * @param expectedStatusCode Expected HTTP status code contained in the error response + */ + static void assertRestException(Throwable exception, int expectedStatusCode) { + assertRestException(exception, HttpResponseException.class, expectedStatusCode); + } + + static void assertRestException(Throwable exception, Class expectedExceptionType, int expectedStatusCode) { + assertEquals(expectedExceptionType, exception.getClass()); + assertEquals(expectedStatusCode, ((HttpResponseException) exception).getResponse().getStatusCode()); + } + + /** + * Helper method to verify that a command throws an IllegalArgumentException. + * + * @param exceptionThrower Command that should throw the exception + */ + static void assertRunnableThrowsException(Runnable exceptionThrower, Class exception) { + try { + exceptionThrower.run(); + fail(); + } catch (Exception ex) { + assertEquals(exception, ex.getClass()); + } + } + + public void sleepInRecordMode(long millis) { + if (interceptorManager.isPlaybackMode()) { + return; + } + try { + Thread.sleep(millis); + } catch (InterruptedException e) { + e.printStackTrace(); + } + } + + public void sleep(long millis) { + try { + Thread.sleep(millis); + } catch (InterruptedException e) { + e.printStackTrace(); + } + } +} diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/test/resources/session-records/wrapUnwrapSymmetricAK128.json b/sdk/keyvault/azure-security-keyvault-keys/src/test/resources/session-records/wrapUnwrapSymmetricAK128.json new file mode 100644 index 000000000000..06aeb60aa4fe --- /dev/null +++ b/sdk/keyvault/azure-security-keyvault-keys/src/test/resources/session-records/wrapUnwrapSymmetricAK128.json @@ -0,0 +1,60 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://cameravault.vault.azure.net/secrets/secretKey?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.1.0-beta.1 (11.0.5; Mac OS X 10.14.3)", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 05 Dec 2019 13:55:31 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=182.68.109.216;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "242", + "x-ms-request-id" : "1e9e27cb-9ee5-4f21-b1e0-3b0034114ba6", + "x-ms-keyvault-service-version" : "1.1.0.883", + "Body" : "{\"value\":\"AAECAwQFBgcICQoLDA0ODw==\",\"id\":\"https://cameravault.vault.azure.net/secrets/secretKey/3cceded86c644f5e808c070c5c6dd194\",\"attributes\":{\"enabled\":true,\"created\":1575554131,\"updated\":1575554131,\"recoveryLevel\":\"Recoverable+Purgeable\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/secrets/secretKey/3cceded86c644f5e808c070c5c6dd194?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.1.0-beta.1 (11.0.5; Mac OS X 10.14.3)", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 05 Dec 2019 13:55:31 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=182.68.109.216;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "242", + "x-ms-request-id" : "e14c6cf3-302e-49f2-90e5-5af9d0af0d0d", + "x-ms-keyvault-service-version" : "1.1.0.883", + "Body" : "{\"value\":\"AAECAwQFBgcICQoLDA0ODw==\",\"id\":\"https://cameravault.vault.azure.net/secrets/secretKey/3cceded86c644f5e808c070c5c6dd194\",\"attributes\":{\"enabled\":true,\"created\":1575554131,\"updated\":1575554131,\"recoveryLevel\":\"Recoverable+Purgeable\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + } ], + "variables" : [ ] +} \ No newline at end of file diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/test/resources/session-records/wrapUnwrapSymmetricAK192.json b/sdk/keyvault/azure-security-keyvault-keys/src/test/resources/session-records/wrapUnwrapSymmetricAK192.json new file mode 100644 index 000000000000..32bc31963319 --- /dev/null +++ b/sdk/keyvault/azure-security-keyvault-keys/src/test/resources/session-records/wrapUnwrapSymmetricAK192.json @@ -0,0 +1,60 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://cameravault.vault.azure.net/secrets/secretKey?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.1.0-beta.1 (11.0.5; Mac OS X 10.14.3)", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 05 Dec 2019 13:55:32 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=182.68.109.216;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "250", + "x-ms-request-id" : "fa1c861a-cac8-4e11-92a0-598befd359d8", + "x-ms-keyvault-service-version" : "1.1.0.883", + "Body" : "{\"value\":\"AAECAwQFBgcICQoLDA0ODxAREhMUFRYX\",\"id\":\"https://cameravault.vault.azure.net/secrets/secretKey/6dd095137e474864a6518c005bb74ae7\",\"attributes\":{\"enabled\":true,\"created\":1575554132,\"updated\":1575554132,\"recoveryLevel\":\"Recoverable+Purgeable\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://cameravault.vault.azure.net/secrets/secretKey/6dd095137e474864a6518c005bb74ae7?api-version=7.0", + "Headers" : { + "User-Agent" : "azsdk-java-Azure-Keyvault/4.1.0-beta.1 (11.0.5; Mac OS X 10.14.3)", + "Content-Type" : "application/json" + }, + "Response" : { + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "Pragma" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Thu, 05 Dec 2019 13:55:32 GMT", + "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", + "Cache-Control" : "no-cache", + "X-AspNet-Version" : "4.0.30319", + "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-network-info" : "addr=182.68.109.216;act_addr_fam=InterNetwork;", + "Expires" : "-1", + "Content-Length" : "250", + "x-ms-request-id" : "ffbccf2d-6dc2-4910-a4e8-c2d60ddc7ad1", + "x-ms-keyvault-service-version" : "1.1.0.883", + "Body" : "{\"value\":\"AAECAwQFBgcICQoLDA0ODxAREhMUFRYX\",\"id\":\"https://cameravault.vault.azure.net/secrets/secretKey/6dd095137e474864a6518c005bb74ae7\",\"attributes\":{\"enabled\":true,\"created\":1575554132,\"updated\":1575554132,\"recoveryLevel\":\"Recoverable+Purgeable\"}}", + "X-Powered-By" : "ASP.NET", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + } ], + "variables" : [ ] +} \ No newline at end of file diff --git a/sdk/keyvault/azure-security-keyvault-secrets/pom.xml b/sdk/keyvault/azure-security-keyvault-secrets/pom.xml index 30db1f48b137..17ae014949ab 100644 --- a/sdk/keyvault/azure-security-keyvault-secrets/pom.xml +++ b/sdk/keyvault/azure-security-keyvault-secrets/pom.xml @@ -11,7 +11,7 @@ com.azure azure-security-keyvault-secrets - 4.0.1 + 4.1.0-beta.1 Microsoft Azure client library for KeyVault Secrets This module contains client library for Microsoft Azure KeyVault Secrets. diff --git a/sdk/keyvault/azure-security-keyvault-secrets/src/main/java/com/azure/security/keyvault/secrets/AzureKeyVaultConfiguration.java b/sdk/keyvault/azure-security-keyvault-secrets/src/main/java/com/azure/security/keyvault/secrets/AzureKeyVaultConfiguration.java deleted file mode 100644 index 6fb1ecc77507..000000000000 --- a/sdk/keyvault/azure-security-keyvault-secrets/src/main/java/com/azure/security/keyvault/secrets/AzureKeyVaultConfiguration.java +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.security.keyvault.secrets; - -class AzureKeyVaultConfiguration { - //TODO: Eventually remove these hardcoded strings with https://github.com/Azure/azure-sdk-for-java/issues/3141 - static final String SDK_NAME = "Azure-Keyvault"; - // {x-version-update-start;com.azure:azure-security-keyvault-secrets;current} - static final String SDK_VERSION = "4.0.1"; - // {x-version-update-end} -} diff --git a/sdk/keyvault/azure-security-keyvault-secrets/src/main/java/com/azure/security/keyvault/secrets/SecretClientBuilder.java b/sdk/keyvault/azure-security-keyvault-secrets/src/main/java/com/azure/security/keyvault/secrets/SecretClientBuilder.java index 2cc1c59a4a52..fefeec281e95 100644 --- a/sdk/keyvault/azure-security-keyvault-secrets/src/main/java/com/azure/security/keyvault/secrets/SecretClientBuilder.java +++ b/sdk/keyvault/azure-security-keyvault-secrets/src/main/java/com/azure/security/keyvault/secrets/SecretClientBuilder.java @@ -24,6 +24,7 @@ import java.net.URL; import java.util.ArrayList; import java.util.List; +import java.util.Map; import java.util.Objects; /** @@ -58,8 +59,13 @@ @ServiceClientBuilder(serviceClients = SecretClient.class) public final class SecretClientBuilder { private final ClientLogger logger = new ClientLogger(SecretClientBuilder.class); + // This is properties file's name. + private static final String AZURE_KEY_VAULT_SECRETS = "azure-key-vault-secrets.properties"; + private static final String SDK_NAME = "name"; + private static final String SDK_VERSION = "version"; private final List policies; + final Map properties; private TokenCredential credential; private HttpPipeline pipeline; private URL vaultUrl; @@ -76,6 +82,7 @@ public SecretClientBuilder() { retryPolicy = new RetryPolicy(); httpLogOptions = new HttpLogOptions(); policies = new ArrayList<>(); + properties = CoreUtils.getProperties(AZURE_KEY_VAULT_SECRETS); } /** @@ -137,8 +144,8 @@ public SecretAsyncClient buildAsyncClient() { // Closest to API goes first, closest to wire goes last. final List policies = new ArrayList<>(); - policies.add(new UserAgentPolicy(httpLogOptions.getApplicationId(), AzureKeyVaultConfiguration.SDK_NAME, AzureKeyVaultConfiguration.SDK_VERSION, - buildConfiguration)); + policies.add(new UserAgentPolicy(httpLogOptions.getApplicationId(), properties.get(SDK_NAME), + properties.get(SDK_VERSION), buildConfiguration)); HttpPolicyProviders.addBeforeRetryPolicies(policies); policies.add(retryPolicy); policies.add(new KeyVaultCredentialPolicy(credential)); diff --git a/sdk/keyvault/azure-security-keyvault-secrets/src/main/resources/azure-key-vault-secrets.properties b/sdk/keyvault/azure-security-keyvault-secrets/src/main/resources/azure-key-vault-secrets.properties new file mode 100644 index 000000000000..ca812989b4f2 --- /dev/null +++ b/sdk/keyvault/azure-security-keyvault-secrets/src/main/resources/azure-key-vault-secrets.properties @@ -0,0 +1,2 @@ +name=${project.artifactId} +version=${project.version} diff --git a/sdk/keyvault/azure-security-keyvault-secrets/src/test/java/com/azure/security/keyvault/secrets/KeyVaultSecretsUserAgentPropertiesTest.java b/sdk/keyvault/azure-security-keyvault-secrets/src/test/java/com/azure/security/keyvault/secrets/KeyVaultSecretsUserAgentPropertiesTest.java new file mode 100644 index 000000000000..9d38ed5dc5a2 --- /dev/null +++ b/sdk/keyvault/azure-security-keyvault-secrets/src/test/java/com/azure/security/keyvault/secrets/KeyVaultSecretsUserAgentPropertiesTest.java @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.security.keyvault.secrets; + +import com.azure.core.util.CoreUtils; +import java.util.Map; +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.assertTrue; + +public class KeyVaultSecretsUserAgentPropertiesTest { + + @Test + public void testAzureConfiguration() { + Map properties = CoreUtils.getProperties("azure-key-vault-secrets.properties"); + assertTrue(properties.get("name").matches("azure-key-vault-secrets")); + assertTrue(properties.get("version").matches("(\\d)+.(\\d)+.(\\d)+([-a-zA-Z0-9.])*")); + } +} diff --git a/sdk/keyvault/azure-security-keyvault-secrets/src/test/java/com/azure/security/keyvault/secrets/SecretClientTestBase.java b/sdk/keyvault/azure-security-keyvault-secrets/src/test/java/com/azure/security/keyvault/secrets/SecretClientTestBase.java index 7bc64e3579f2..1af14cd26fe1 100644 --- a/sdk/keyvault/azure-security-keyvault-secrets/src/test/java/com/azure/security/keyvault/secrets/SecretClientTestBase.java +++ b/sdk/keyvault/azure-security-keyvault-secrets/src/test/java/com/azure/security/keyvault/secrets/SecretClientTestBase.java @@ -45,6 +45,9 @@ public abstract class SecretClientTestBase extends TestBase { private static final String SECRET_NAME = "javaSecretTemp"; private static final String SECRET_VALUE = "Chocolate is hidden in the toothpaste cabinet"; + private static final String SDK_NAME = "client_name"; + private static final String SDK_VERSION = "client_version"; + @Override protected String getTestName() { return ""; @@ -63,7 +66,7 @@ T clientSetup(Function clientBuilder) { HttpClient httpClient; // Closest to API goes first, closest to wire goes last. final List policies = new ArrayList<>(); - policies.add(new UserAgentPolicy(AzureKeyVaultConfiguration.SDK_NAME, AzureKeyVaultConfiguration.SDK_VERSION, Configuration.getGlobalConfiguration().clone(), SecretServiceVersion.getLatest())); + policies.add(new UserAgentPolicy(SDK_NAME, SDK_VERSION, Configuration.getGlobalConfiguration().clone(), SecretServiceVersion.getLatest())); HttpPolicyProviders.addBeforeRetryPolicies(policies); policies.add(new RetryPolicy()); if (credential != null) { diff --git a/sdk/storage/azure-storage-blob-batch/pom.xml b/sdk/storage/azure-storage-blob-batch/pom.xml index cadb2caa5bce..72052da8c724 100644 --- a/sdk/storage/azure-storage-blob-batch/pom.xml +++ b/sdk/storage/azure-storage-blob-batch/pom.xml @@ -13,7 +13,7 @@ com.azure azure-storage-blob-batch - 12.1.0 + 12.2.0-beta.1 Microsoft Azure client library for Blob Storage batching This module contains client library for Microsoft Azure Blob Storage batching. @@ -65,7 +65,7 @@ com.azure azure-storage-blob - 12.1.0 + 12.2.0-beta.1 org.slf4j diff --git a/sdk/storage/azure-storage-blob-cryptography/pom.xml b/sdk/storage/azure-storage-blob-cryptography/pom.xml index c3fbcea924ef..72336561046c 100644 --- a/sdk/storage/azure-storage-blob-cryptography/pom.xml +++ b/sdk/storage/azure-storage-blob-cryptography/pom.xml @@ -13,7 +13,7 @@ com.azure azure-storage-blob-cryptography - 12.1.0 + 12.2.0-beta.1 Microsoft Azure client library for Blob Storage cryptography This module contains client library for Microsoft Azure Blob Storage cryptography. @@ -36,7 +36,7 @@ com.azure azure-storage-blob - 12.1.0 + 12.2.0-beta.1 com.azure diff --git a/sdk/storage/azure-storage-blob-cryptography/src/main/java/com/azure/storage/blob/specialized/cryptography/BlobCryptographyConfiguration.java b/sdk/storage/azure-storage-blob-cryptography/src/main/java/com/azure/storage/blob/specialized/cryptography/BlobCryptographyConfiguration.java deleted file mode 100644 index 49a15917659e..000000000000 --- a/sdk/storage/azure-storage-blob-cryptography/src/main/java/com/azure/storage/blob/specialized/cryptography/BlobCryptographyConfiguration.java +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -package com.azure.storage.blob.specialized.cryptography; - -class BlobCryptographyConfiguration { - static final String NAME = "azure-storage-blob-cryptography"; - // {x-version-update-start;com.azure:azure-storage-blob-cryptography;current} - static final String VERSION = "12.1.0"; - // {x-version-update-end} -} diff --git a/sdk/storage/azure-storage-blob-cryptography/src/main/java/com/azure/storage/blob/specialized/cryptography/CryptographyConstants.java b/sdk/storage/azure-storage-blob-cryptography/src/main/java/com/azure/storage/blob/specialized/cryptography/CryptographyConstants.java index b6dd0dce1187..2dc5e960a5cd 100644 --- a/sdk/storage/azure-storage-blob-cryptography/src/main/java/com/azure/storage/blob/specialized/cryptography/CryptographyConstants.java +++ b/sdk/storage/azure-storage-blob-cryptography/src/main/java/com/azure/storage/blob/specialized/cryptography/CryptographyConstants.java @@ -3,6 +3,8 @@ package com.azure.storage.blob.specialized.cryptography; +import com.azure.core.util.CoreUtils; +import java.util.Map; final class CryptographyConstants { static final String ENCRYPTION_PROTOCOL_V1 = "1.0"; @@ -15,7 +17,12 @@ final class CryptographyConstants { static final String AES = "AES"; - static final String AGENT_METADATA_VALUE = "JavaTrack2" + BlobCryptographyConfiguration.VERSION; + // This is properties file's name. + private static final String AZURE_STORAGE_PROPERTIES = "azure-storage-blob.properties"; + + static final Map USER_AGENT_PROPERTIES = CoreUtils.getProperties(AZURE_STORAGE_PROPERTIES); + + static final String AGENT_METADATA_VALUE = "JavaTrack2" + USER_AGENT_PROPERTIES.get("version"); static final String ENCRYPTION_DATA_KEY = "encryptiondata"; @@ -34,6 +41,8 @@ final class CryptographyConstants { static final String DECRYPT_UNENCRYPTED_BLOB = "Encryption client is being used but the blob metadata indicates " + "that it is not encrypted."; + private CryptographyConstants() { } + } diff --git a/sdk/storage/azure-storage-blob-cryptography/src/main/java/com/azure/storage/blob/specialized/cryptography/EncryptedBlobClientBuilder.java b/sdk/storage/azure-storage-blob-cryptography/src/main/java/com/azure/storage/blob/specialized/cryptography/EncryptedBlobClientBuilder.java index c2a6cb419d90..8ebe53951102 100644 --- a/sdk/storage/azure-storage-blob-cryptography/src/main/java/com/azure/storage/blob/specialized/cryptography/EncryptedBlobClientBuilder.java +++ b/sdk/storage/azure-storage-blob-cryptography/src/main/java/com/azure/storage/blob/specialized/cryptography/EncryptedBlobClientBuilder.java @@ -45,6 +45,8 @@ import java.util.List; import java.util.Objects; +import static com.azure.storage.blob.specialized.cryptography.CryptographyConstants.USER_AGENT_PROPERTIES; + /** * This class provides a fluent builder API to help aid the configuration and instantiation of Storage Blob clients. * @@ -73,6 +75,8 @@ @ServiceClientBuilder(serviceClients = {EncryptedBlobAsyncClient.class, EncryptedBlobClient.class}) public final class EncryptedBlobClientBuilder { private final ClientLogger logger = new ClientLogger(EncryptedBlobClientBuilder.class); + private static final String SDK_NAME = "name"; + private static final String SDK_VERSION = "version"; private String endpoint; private String accountName; @@ -151,16 +155,14 @@ private HttpPipeline getHttpPipeline() { return httpPipeline; } - String userAgentName = BlobCryptographyConfiguration.NAME; - String userAgentVersion = BlobCryptographyConfiguration.VERSION; Configuration userAgentConfiguration = (configuration == null) ? Configuration.NONE : configuration; // Closest to API goes first, closest to wire goes last. List policies = new ArrayList<>(); policies.add(new BlobDecryptionPolicy(keyWrapper, keyResolver)); - policies.add(new UserAgentPolicy(logOptions.getApplicationId(), userAgentName, userAgentVersion, - userAgentConfiguration)); + policies.add(new UserAgentPolicy(logOptions.getApplicationId(), USER_AGENT_PROPERTIES.get(SDK_NAME), + USER_AGENT_PROPERTIES.get(SDK_VERSION), userAgentConfiguration)); policies.add(new RequestIdPolicy()); policies.add(new AddDatePolicy()); @@ -344,7 +346,7 @@ public EncryptedBlobClientBuilder endpoint(String endpoint) { this.blobName = Utility.urlEncode(parts.getBlobName()); this.snapshot = parts.getSnapshot(); - String sasToken = parts.getSasQueryParameters().encode(); + String sasToken = parts.getCommonSasQueryParameters().encode(); if (!CoreUtils.isNullOrEmpty(sasToken)) { this.sasToken(sasToken); } diff --git a/sdk/storage/azure-storage-blob-cryptography/src/main/resources/azure-storage-blob-cryptography.properties b/sdk/storage/azure-storage-blob-cryptography/src/main/resources/azure-storage-blob-cryptography.properties new file mode 100644 index 000000000000..ca812989b4f2 --- /dev/null +++ b/sdk/storage/azure-storage-blob-cryptography/src/main/resources/azure-storage-blob-cryptography.properties @@ -0,0 +1,2 @@ +name=${project.artifactId} +version=${project.version} diff --git a/sdk/storage/azure-storage-blob-cryptography/src/test/java/com/azure/storage/blob/specialized/cryptography/BlobCryptographyUserAgentPropertiesTest.groovy b/sdk/storage/azure-storage-blob-cryptography/src/test/java/com/azure/storage/blob/specialized/cryptography/BlobCryptographyUserAgentPropertiesTest.groovy new file mode 100644 index 000000000000..683616f9d57a --- /dev/null +++ b/sdk/storage/azure-storage-blob-cryptography/src/test/java/com/azure/storage/blob/specialized/cryptography/BlobCryptographyUserAgentPropertiesTest.groovy @@ -0,0 +1,18 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.storage.blob.specialized.cryptography + +import com.azure.core.util.CoreUtils +import spock.lang.Specification + +class BlobCryptographyUserAgentPropertiesTest extends Specification { + + def "User agent properties not null"() { + given: + Map properties = CoreUtils.getProperties("azure-storage-blob-cyptography.properties") + expect: + properties.get("name") == "azure-storage-blob-cyptography" + properties.get("version").matches("(\\d)+.(\\d)+.(\\d)+([-a-zA-Z0-9.])*") + } +} diff --git a/sdk/storage/azure-storage-blob/CHANGELOG.md b/sdk/storage/azure-storage-blob/CHANGELOG.md index 21c8615c8ced..699d9690e885 100644 --- a/sdk/storage/azure-storage-blob/CHANGELOG.md +++ b/sdk/storage/azure-storage-blob/CHANGELOG.md @@ -1,8 +1,11 @@ # Change Log azure-storage-blob +## Version XX.X.X (XXXX-XX-XX) +- Added SAS generation methods on clients to improve discoverability and convenience of sas. Deprecated setContainerName, setBlobName, setSnapshotId, generateSasQueryParameters methods on BlobServiceSasSignatureValues to direct users to using the methods added on clients. +- Fixed a bug where Account SAS would not work when set on clients. + ## Version 12.1.0 (2019-12-04) This package's -This package's [documentation](https://github.com/Azure/azure-sdk-for-java/blob/azure-storage-blob_12.1.0/sdk/storage/azure-storage-blob/README.md) and [samples](https://github.com/Azure/azure-sdk-for-java/blob/azure-storage-blob_12.1.0/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob) @@ -21,7 +24,7 @@ and - Removed BlobClientBuilder, BlobContainerClientBuilder, BlobServiceClientBuilder, and SpecializedBlobClientBuilder inheritance of BaseBlobClientBuilder - Renamed ListBlobContainerOptions getMaxResults and setMaxResults to getMaxResultsPerPage and setMaxResultsPerPage - Renamed ListBlobsOptions getMaxResults and setMaxResults to getMaxResultsPerPage and setMaxResultsPerPage -- Reanmed BlobProperties to BlobItemProperties and BlobContainerProperties to BlobContainerItemProperties +- Renamed BlobProperties to BlobItemProperties and BlobContainerProperties to BlobContainerItemProperties - Removes StorageError and StorageErrorException from public API - Renamed StorageErrorCode to BlobErrorCode, SignedIdentifier to BlobSignedIdentifier, StorageServiceProperties to BlobServiceProperties, StorageServiceStats to BlobServiceStatistics, CorRules to BlobCorRules, AccessPolicy to BlobAccessPolicy, Logging to BlobAnalyticsLogging, Metrics to BlobMetrics, and RetentionPolicy to BlobRetentionPolicy - Renamed BlobHTTPHeaders to BlobHttpHeaders and removed Blob from getter names diff --git a/sdk/storage/azure-storage-blob/pom.xml b/sdk/storage/azure-storage-blob/pom.xml index 500419b5027d..6b7affc7ac3d 100644 --- a/sdk/storage/azure-storage-blob/pom.xml +++ b/sdk/storage/azure-storage-blob/pom.xml @@ -13,7 +13,7 @@ com.azure azure-storage-blob - 12.1.0 + 12.2.0-beta.1 Microsoft Azure client library for Blob Storage This module contains client library for Microsoft Azure Blob Storage. @@ -60,7 +60,7 @@ com.azure azure-storage-common - 12.1.0 + 12.2.0-beta.1 org.slf4j @@ -274,8 +274,10 @@ --add-exports com.azure.core/com.azure.core.implementation.serializer.jackson=ALL-UNNAMED --add-exports com.azure.core/com.azure.core.implementation.util=ALL-UNNAMED --add-opens com.azure.storage.common/com.azure.storage.common.implementation=ALL-UNNAMED + --add-opens com.azure.storage.common/com.azure.storage.common.sas=ALL-UNNAMED --add-opens com.azure.storage.blob/com.azure.storage.blob=ALL-UNNAMED --add-opens com.azure.storage.blob/com.azure.storage.blob.implementation=ALL-UNNAMED + --add-opens com.azure.storage.blob/com.azure.storage.blob.implementation.util=ALL-UNNAMED --add-opens com.azure.storage.blob/com.azure.storage.blob.specialized=ALL-UNNAMED --add-reads com.azure.core=ALL-UNNAMED --add-reads com.azure.core.test=ALL-UNNAMED diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobClientBuilder.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobClientBuilder.java index e936aad52fe4..77097cc9fbff 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobClientBuilder.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobClientBuilder.java @@ -258,7 +258,7 @@ public BlobClientBuilder endpoint(String endpoint) { this.blobName = Utility.urlEncode(parts.getBlobName()); this.snapshot = parts.getSnapshot(); - String sasToken = parts.getSasQueryParameters().encode(); + String sasToken = parts.getCommonSasQueryParameters().encode(); if (!CoreUtils.isNullOrEmpty(sasToken)) { this.sasToken(sasToken); } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerAsyncClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerAsyncClient.java index 907d5a4e3d73..d0456b868a42 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerAsyncClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerAsyncClient.java @@ -20,6 +20,7 @@ import com.azure.storage.blob.implementation.models.ContainerGetPropertiesHeaders; import com.azure.storage.blob.implementation.models.ContainersListBlobFlatSegmentResponse; import com.azure.storage.blob.implementation.models.ContainersListBlobHierarchySegmentResponse; +import com.azure.storage.blob.implementation.util.BlobSasImplUtil; import com.azure.storage.blob.models.BlobContainerAccessPolicies; import com.azure.storage.blob.models.BlobContainerProperties; import com.azure.storage.blob.models.BlobItem; @@ -30,11 +31,16 @@ import com.azure.storage.blob.models.ListBlobsOptions; import com.azure.storage.blob.models.PublicAccessType; import com.azure.storage.blob.models.StorageAccountInfo; +import com.azure.storage.blob.models.UserDelegationKey; +import com.azure.storage.blob.sas.BlobServiceSasSignatureValues; +import com.azure.storage.common.StorageSharedKeyCredential; import com.azure.storage.common.Utility; +import com.azure.storage.common.implementation.SasImplUtils; import com.azure.storage.common.implementation.StorageImplUtils; import reactor.core.publisher.Mono; import java.time.Duration; +import java.time.OffsetDateTime; import java.time.temporal.ChronoUnit; import java.util.ArrayList; import java.util.List; @@ -900,6 +906,44 @@ Mono> getAccountInfoWithResponse(Context context) { }); } + /** + * Generates a user delegation SAS for the container using the specified {@link BlobServiceSasSignatureValues}. + *

See {@link BlobServiceSasSignatureValues} for more information on how to construct a user delegation SAS.

+ * + *

Code Samples

+ * + * {@codesnippet com.azure.storage.blob.BlobContainerAsyncClient.generateUserDelegationSas#BlobServiceSasSignatureValues-UserDelegationKey} + * + * @param blobServiceSasSignatureValues {@link BlobServiceSasSignatureValues} + * @param userDelegationKey A {@link UserDelegationKey} object used to sign the SAS values. + * @see BlobServiceAsyncClient#getUserDelegationKey(OffsetDateTime, OffsetDateTime) for more information on how to + * get a user delegation key. + * + * @return A {@code String} representing all SAS query parameters. + */ + public String generateUserDelegationSas(BlobServiceSasSignatureValues blobServiceSasSignatureValues, + UserDelegationKey userDelegationKey) { + return new BlobSasImplUtil(blobServiceSasSignatureValues, getBlobContainerName()) + .generateUserDelegationSas(userDelegationKey, getAccountName()); + } + + /** + * Generates a service SAS for the container using the specified {@link BlobServiceSasSignatureValues} + * Note : The client must be authenticated via {@link StorageSharedKeyCredential} + *

See {@link BlobServiceSasSignatureValues} for more information on how to construct a service SAS.

+ * + *

Code Samples

+ * + * {@codesnippet com.azure.storage.blob.BlobContainerAsyncClient.generateSas#BlobServiceSasSignatureValues} + * + * @param blobServiceSasSignatureValues {@link BlobServiceSasSignatureValues} + * + * @return A {@code String} representing all SAS query parameters. + */ + public String generateSas(BlobServiceSasSignatureValues blobServiceSasSignatureValues) { + return new BlobSasImplUtil(blobServiceSasSignatureValues, getBlobContainerName()) + .generateSas(SasImplUtils.extractSharedKeyCredential(getHttpPipeline())); + } private boolean validateNoETag(BlobRequestConditions modifiedRequestConditions) { if (modifiedRequestConditions == null) { diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClient.java index 6750a52b9605..f5b48e7637a9 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClient.java @@ -17,9 +17,13 @@ import com.azure.storage.blob.models.ListBlobsOptions; import com.azure.storage.blob.models.PublicAccessType; import com.azure.storage.blob.models.StorageAccountInfo; +import com.azure.storage.blob.models.UserDelegationKey; +import com.azure.storage.blob.sas.BlobServiceSasSignatureValues; +import com.azure.storage.common.StorageSharedKeyCredential; import reactor.core.publisher.Mono; import java.time.Duration; +import java.time.OffsetDateTime; import java.util.List; import java.util.Map; @@ -552,4 +556,41 @@ public Response getAccountInfoWithResponse(Duration timeout, return blockWithOptionalTimeout(response, timeout); } + + /** + * Generates a user delegation SAS for the container using the specified {@link BlobServiceSasSignatureValues}. + *

See {@link BlobServiceSasSignatureValues} for more information on how to construct a user delegation SAS.

+ * + *

Code Samples

+ * + * {@codesnippet com.azure.storage.blob.BlobContainerClient.generateUserDelegationSas#BlobServiceSasSignatureValues-UserDelegationKey} + * + * @param blobServiceSasSignatureValues {@link BlobServiceSasSignatureValues} + * @param userDelegationKey A {@link UserDelegationKey} object used to sign the SAS values. + * @see BlobServiceClient#getUserDelegationKey(OffsetDateTime, OffsetDateTime) for more information on how to get a + * user delegation key. + * + * @return A {@code String} representing all SAS query parameters. + */ + public String generateUserDelegationSas(BlobServiceSasSignatureValues blobServiceSasSignatureValues, + UserDelegationKey userDelegationKey) { + return this.client.generateUserDelegationSas(blobServiceSasSignatureValues, userDelegationKey); + } + + /** + * Generates a service SAS for the container using the specified {@link BlobServiceSasSignatureValues} + * Note : The client must be authenticated via {@link StorageSharedKeyCredential} + *

See {@link BlobServiceSasSignatureValues} for more information on how to construct a service SAS.

+ * + *

Code Samples

+ * + * {@codesnippet com.azure.storage.blob.BlobContainerClient.generateSas#BlobServiceSasSignatureValues} + * + * @param blobServiceSasSignatureValues {@link BlobServiceSasSignatureValues} + * + * @return A {@code String} representing all SAS query parameters. + */ + public String generateSas(BlobServiceSasSignatureValues blobServiceSasSignatureValues) { + return this.client.generateSas(blobServiceSasSignatureValues); + } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClientBuilder.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClientBuilder.java index dda5da3822a6..4fd38beb1336 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClientBuilder.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClientBuilder.java @@ -133,7 +133,7 @@ public BlobContainerClientBuilder endpoint(String endpoint) { this.containerName = parts.getBlobContainerName(); this.endpoint = BuilderHelper.getEndpoint(parts); - String sasToken = parts.getSasQueryParameters().encode(); + String sasToken = parts.getCommonSasQueryParameters().encode(); if (!CoreUtils.isNullOrEmpty(sasToken)) { this.sasToken(sasToken); } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceAsyncClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceAsyncClient.java index d010d3cd24d5..312ca68beafa 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceAsyncClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceAsyncClient.java @@ -28,8 +28,12 @@ import com.azure.storage.blob.models.PublicAccessType; import com.azure.storage.blob.models.StorageAccountInfo; import com.azure.storage.blob.models.UserDelegationKey; +import com.azure.storage.common.StorageSharedKeyCredential; +import com.azure.storage.common.implementation.AccountSasImplUtil; import com.azure.storage.common.implementation.Constants; +import com.azure.storage.common.implementation.SasImplUtils; import com.azure.storage.common.implementation.StorageImplUtils; +import com.azure.storage.common.sas.AccountSasSignatureValues; import reactor.core.publisher.Mono; import java.time.Duration; @@ -551,4 +555,22 @@ Mono> getAccountInfoWithResponse(Context context) { public String getAccountName() { return this.accountName; } + + /** + * Generates an account SAS for the Azure Storage account using the specified {@link AccountSasSignatureValues}. + * Note : The client must be authenticated via {@link StorageSharedKeyCredential} + *

See {@link AccountSasSignatureValues} for more information on how to construct an account SAS.

+ * + *

The snippet below generates a SAS that lasts for two days and gives the user read and list access to blob + * containers and file shares.

+ * {@codesnippet com.azure.storage.blob.BlobServiceAsyncClient.generateAccountSas#AccountSasSignatureValues} + * + * @param accountSasSignatureValues {@link AccountSasSignatureValues} + * + * @return A {@code String} representing all SAS query parameters. + */ + public String generateAccountSas(AccountSasSignatureValues accountSasSignatureValues) { + return new AccountSasImplUtil(accountSasSignatureValues) + .generateSas(SasImplUtils.extractSharedKeyCredential(getHttpPipeline())); + } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceClient.java index a418caae2769..7ab7cc05ee3d 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceClient.java @@ -17,7 +17,9 @@ import com.azure.storage.blob.models.PublicAccessType; import com.azure.storage.blob.models.StorageAccountInfo; import com.azure.storage.blob.models.UserDelegationKey; +import com.azure.storage.common.StorageSharedKeyCredential; import com.azure.storage.common.implementation.StorageImplUtils; +import com.azure.storage.common.sas.AccountSasSignatureValues; import reactor.core.publisher.Mono; import java.time.Duration; @@ -372,4 +374,22 @@ public Response getAccountInfoWithResponse(Duration timeout, public String getAccountName() { return this.blobServiceAsyncClient.getAccountName(); } + + /** + * Generates an account SAS for the Azure Storage account using the specified {@link AccountSasSignatureValues}. + * Note : The client must be authenticated via {@link StorageSharedKeyCredential} + *

See {@link AccountSasSignatureValues} for more information on how to construct an account SAS.

+ * + *

Generating an account SAS

+ *

The snippet below generates an AccountSasSignatureValues object that lasts for two days and gives the user + * read and list access to blob and file shares.

+ * {@codesnippet com.azure.storage.blob.BlobServiceClient.generateAccountSas#AccountSasSignatureValues} + * + * @param accountSasSignatureValues {@link AccountSasSignatureValues} + * + * @return A {@code String} representing all SAS query parameters. + */ + public String generateAccountSas(AccountSasSignatureValues accountSasSignatureValues) { + return this.blobServiceAsyncClient.generateAccountSas(accountSasSignatureValues); + } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceClientBuilder.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceClientBuilder.java index 1f9ab6c13d76..b3b1f5d153eb 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceClientBuilder.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceClientBuilder.java @@ -114,7 +114,7 @@ public BlobServiceClientBuilder endpoint(String endpoint) { this.accountName = parts.getAccountName(); this.endpoint = BuilderHelper.getEndpoint(parts); - String sasToken = parts.getSasQueryParameters().encode(); + String sasToken = parts.getCommonSasQueryParameters().encode(); if (!CoreUtils.isNullOrEmpty(sasToken)) { this.sasToken(sasToken); } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobUrlParts.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobUrlParts.java index ba856f8520f8..7ff1cb2fd1ba 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobUrlParts.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobUrlParts.java @@ -9,6 +9,7 @@ import com.azure.storage.blob.implementation.util.ModelHelper; import com.azure.storage.blob.sas.BlobServiceSasQueryParameters; import com.azure.storage.common.Utility; +import com.azure.storage.common.sas.CommonSasQueryParameters; import com.azure.storage.common.implementation.Constants; import java.net.MalformedURLException; @@ -34,7 +35,7 @@ public final class BlobUrlParts { private String snapshot; private String accountName; private boolean isIpUrl; - private BlobServiceSasQueryParameters blobServiceSasQueryParameters; + private CommonSasQueryParameters commonSasQueryParameters; private Map unparsedParameters; /** @@ -166,24 +167,62 @@ public BlobUrlParts setSnapshot(String snapshot) { } /** - * Gets the {@link BlobServiceSasQueryParameters} representing the SAS query parameters that will be used to - * generate the SAS token for this URL. + * Gets the {@link BlobServiceSasQueryParameters} representing the SAS query parameters * * @return the {@link BlobServiceSasQueryParameters} of the URL + * @deprecated Please use {@link #getCommonSasQueryParameters()} */ + @Deprecated public BlobServiceSasQueryParameters getSasQueryParameters() { - return blobServiceSasQueryParameters; + String encodedSas = commonSasQueryParameters.encode(); + return new BlobServiceSasQueryParameters(parseQueryString(encodedSas), true); } /** - * Sets the {@link BlobServiceSasQueryParameters} representing the SAS query parameters that will be used to - * generate the SAS token for this URL. + * Sets the {@link BlobServiceSasQueryParameters} representing the SAS query parameters. * * @param blobServiceSasQueryParameters The SAS query parameters. * @return the updated BlobUrlParts object. + * @deprecated Please use {@link #setCommonSasQueryParameters(CommonSasQueryParameters)} */ + @Deprecated public BlobUrlParts setSasQueryParameters(BlobServiceSasQueryParameters blobServiceSasQueryParameters) { - this.blobServiceSasQueryParameters = blobServiceSasQueryParameters; + String encodedBlobSas = blobServiceSasQueryParameters.encode(); + this.commonSasQueryParameters = new CommonSasQueryParameters(parseQueryString(encodedBlobSas), true); + return this; + } + + /** + * Gets the {@link CommonSasQueryParameters} representing the SAS query parameters that will be used to + * generate the SAS token for this URL. + * + * @return the {@link CommonSasQueryParameters} of the URL + */ + public CommonSasQueryParameters getCommonSasQueryParameters() { + return commonSasQueryParameters; + } + + /** + * Sets the {@link CommonSasQueryParameters} representing the SAS query parameters that will be used to + * generate the SAS token for this URL. + * + * @param commonSasQueryParameters The SAS query parameters. + * @return the updated BlobUrlParts object. + */ + public BlobUrlParts setCommonSasQueryParameters(CommonSasQueryParameters commonSasQueryParameters) { + this.commonSasQueryParameters = commonSasQueryParameters; + return this; + } + + /** + * Sets the {@link CommonSasQueryParameters} representing the SAS query parameters that will be used to + * generate the SAS token for this URL. + * + * @param queryParams The SAS query parameter string. + * @return the updated BlobUrlParts object. + */ + public BlobUrlParts parseSasQueryParameters(String queryParams) { + this.commonSasQueryParameters = new CommonSasQueryParameters(parseQueryString(queryParams), true); return this; } @@ -239,8 +278,8 @@ public URL toUrl() { if (this.snapshot != null) { url.setQueryParameter(Constants.UrlConstants.SNAPSHOT_QUERY_PARAMETER, this.snapshot); } - if (this.blobServiceSasQueryParameters != null) { - String encodedSAS = this.blobServiceSasQueryParameters.encode(); + if (this.commonSasQueryParameters != null) { + String encodedSAS = this.commonSasQueryParameters.encode(); if (encodedSAS.length() != 0) { url.setQuery(encodedSAS); } @@ -312,10 +351,9 @@ public static BlobUrlParts parse(URL url) { parts.setSnapshot(snapshotArray[0]); } - BlobServiceSasQueryParameters blobServiceSasQueryParameters = - new BlobServiceSasQueryParameters(queryParamsMap, true); + CommonSasQueryParameters commonSasQueryParameters = new CommonSasQueryParameters(queryParamsMap, true); - return parts.setSasQueryParameters(blobServiceSasQueryParameters) + return parts.setCommonSasQueryParameters(commonSasQueryParameters) .setUnparsedParameters(queryParamsMap); } @@ -386,7 +424,7 @@ private static void parseNonIpUrl(URL url, BlobUrlParts parts) { } /** - * Parses a query string into a one to many hashmap. + * Parses a query string into a one to many TreeMap. * * @param queryParams The string of query params to parse. * @return A {@code HashMap} of the key values. diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/BlobSasImplUtil.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/BlobSasImplUtil.java new file mode 100644 index 000000000000..e0805b945c2d --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/BlobSasImplUtil.java @@ -0,0 +1,310 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.storage.blob.implementation.util; + +import com.azure.core.util.CoreUtils; +import com.azure.core.util.logging.ClientLogger; +import com.azure.storage.blob.BlobServiceVersion; +import com.azure.storage.blob.models.UserDelegationKey; +import com.azure.storage.blob.sas.BlobContainerSasPermission; +import com.azure.storage.blob.sas.BlobSasPermission; +import com.azure.storage.blob.sas.BlobServiceSasSignatureValues; +import com.azure.storage.common.StorageSharedKeyCredential; +import com.azure.storage.common.implementation.Constants; +import com.azure.storage.common.implementation.StorageImplUtils; +import com.azure.storage.common.sas.SasIpRange; +import com.azure.storage.common.sas.SasProtocol; + +import java.time.OffsetDateTime; +import java.util.Objects; + +import static com.azure.storage.common.implementation.SasImplUtils.formatQueryParameterDate; +import static com.azure.storage.common.implementation.SasImplUtils.tryAppendQueryParameter; + +/** + * This class provides helper methods for common blob service sas patterns. + * + * RESERVED FOR INTERNAL USE. + */ +public class BlobSasImplUtil { + /** + * The SAS blob constant. + */ + private static final String SAS_BLOB_CONSTANT = "b"; + + /** + * The SAS blob snapshot constant. + */ + private static final String SAS_BLOB_SNAPSHOT_CONSTANT = "bs"; + + /** + * The SAS blob container constant. + */ + private static final String SAS_CONTAINER_CONSTANT = "c"; + + private final ClientLogger logger = new ClientLogger(BlobSasImplUtil.class); + + private String version; + + private SasProtocol protocol; + + private OffsetDateTime startTime; + + private OffsetDateTime expiryTime; + + private String permissions; + + private SasIpRange sasIpRange; + + private String containerName; + + private String blobName; + + private String resource; + + private String snapshotId; + + private String identifier; + + private String cacheControl; + + private String contentDisposition; + + private String contentEncoding; + + private String contentLanguage; + + private String contentType; + + /** + * Creates a new {@link BlobSasImplUtil} with the specified parameters + * + * @param sasValues {@link BlobServiceSasSignatureValues} + * @param containerName The container name + */ + public BlobSasImplUtil(BlobServiceSasSignatureValues sasValues, String containerName) { + this(sasValues, containerName, null, null); + } + + /** + * Creates a new {@link BlobSasImplUtil} with the specified parameters + * + * @param sasValues {@link BlobServiceSasSignatureValues} + * @param containerName The container name + * @param blobName The blob name + * @param snapshotId The snapshot id + */ + public BlobSasImplUtil(BlobServiceSasSignatureValues sasValues, String containerName, String blobName, + String snapshotId) { + Objects.requireNonNull(sasValues); + this.version = sasValues.getVersion(); + this.protocol = sasValues.getProtocol(); + this.startTime = sasValues.getStartTime(); + this.expiryTime = sasValues.getExpiryTime(); + this.permissions = sasValues.getPermissions(); + this.sasIpRange = sasValues.getSasIpRange(); + this.containerName = containerName; + this.blobName = blobName; + this.snapshotId = snapshotId; + this.identifier = sasValues.getIdentifier(); + this.cacheControl = sasValues.getCacheControl(); + this.contentDisposition = sasValues.getContentDisposition(); + this.contentEncoding = sasValues.getContentEncoding(); + this.contentLanguage = sasValues.getContentLanguage(); + this.contentType = sasValues.getContentType(); + } + + /** + * Generates a Sas signed with a {@link StorageSharedKeyCredential} + * + * @param storageSharedKeyCredentials {@link StorageSharedKeyCredential} + * @return A String representing the Sas + */ + public String generateSas(StorageSharedKeyCredential storageSharedKeyCredentials) { + StorageImplUtils.assertNotNull("storageSharedKeyCredentials", storageSharedKeyCredentials); + + ensureState(); + + // Signature is generated on the un-url-encoded values. + final String canonicalName = getCanonicalName(storageSharedKeyCredentials.getAccountName()); + final String signature = storageSharedKeyCredentials.computeHmac256(stringToSign(canonicalName)); + + return encode(null /* userDelegationKey */, signature); + } + + /** + * Generates a Sas signed with a {@link UserDelegationKey} + * + * @param delegationKey {@link UserDelegationKey} + * @param accountName The account name + * @return A String representing the Sas + */ + public String generateUserDelegationSas(UserDelegationKey delegationKey, String accountName) { + StorageImplUtils.assertNotNull("delegationKey", delegationKey); + StorageImplUtils.assertNotNull("accountName", accountName); + + ensureState(); + + // Signature is generated on the un-url-encoded values. + final String canonicalName = getCanonicalName(accountName); + String signature = StorageImplUtils.computeHMac256( + delegationKey.getValue(), stringToSign(delegationKey, canonicalName)); + + return encode(delegationKey, signature); + } + + /** + * Encodes a Sas from the values in this type. + * @param userDelegationKey {@link UserDelegationKey} + * @param signature The signature of the Sas. + * @return A String representing the Sas. + */ + private String encode(UserDelegationKey userDelegationKey, String signature) { + /* + We should be url-encoding each key and each value, but because we know all the keys and values will encode to + themselves, we cheat except for the signature value. + */ + StringBuilder sb = new StringBuilder(); + + tryAppendQueryParameter(sb, Constants.UrlConstants.SAS_SERVICE_VERSION, this.version); + tryAppendQueryParameter(sb, Constants.UrlConstants.SAS_PROTOCOL, this.protocol); + tryAppendQueryParameter(sb, Constants.UrlConstants.SAS_START_TIME, formatQueryParameterDate(this.startTime)); + tryAppendQueryParameter(sb, Constants.UrlConstants.SAS_EXPIRY_TIME, formatQueryParameterDate(this.expiryTime)); + tryAppendQueryParameter(sb, Constants.UrlConstants.SAS_IP_RANGE, this.sasIpRange); + tryAppendQueryParameter(sb, Constants.UrlConstants.SAS_SIGNED_IDENTIFIER, this.identifier); + if (userDelegationKey != null) { + tryAppendQueryParameter(sb, Constants.UrlConstants.SAS_SIGNED_OBJECT_ID, + userDelegationKey.getSignedObjectId()); + tryAppendQueryParameter(sb, Constants.UrlConstants.SAS_SIGNED_TENANT_ID, + userDelegationKey.getSignedTenantId()); + tryAppendQueryParameter(sb, Constants.UrlConstants.SAS_SIGNED_KEY_START, + formatQueryParameterDate(userDelegationKey.getSignedStart())); + tryAppendQueryParameter(sb, Constants.UrlConstants.SAS_SIGNED_KEY_EXPIRY, + formatQueryParameterDate(userDelegationKey.getSignedExpiry())); + tryAppendQueryParameter(sb, Constants.UrlConstants.SAS_SIGNED_KEY_SERVICE, + userDelegationKey.getSignedService()); + tryAppendQueryParameter(sb, Constants.UrlConstants.SAS_SIGNED_KEY_VERSION, + userDelegationKey.getSignedVersion()); + } + tryAppendQueryParameter(sb, Constants.UrlConstants.SAS_SIGNED_RESOURCE, this.resource); + tryAppendQueryParameter(sb, Constants.UrlConstants.SAS_SIGNED_PERMISSIONS, this.permissions); + tryAppendQueryParameter(sb, Constants.UrlConstants.SAS_SIGNATURE, signature); + tryAppendQueryParameter(sb, Constants.UrlConstants.SAS_CACHE_CONTROL, this.cacheControl); + tryAppendQueryParameter(sb, Constants.UrlConstants.SAS_CONTENT_DISPOSITION, this.contentDisposition); + tryAppendQueryParameter(sb, Constants.UrlConstants.SAS_CONTENT_ENCODING, this.contentEncoding); + tryAppendQueryParameter(sb, Constants.UrlConstants.SAS_CONTENT_LANGUAGE, this.contentLanguage); + tryAppendQueryParameter(sb, Constants.UrlConstants.SAS_CONTENT_TYPE, this.contentType); + + return sb.toString(); + + } + + /** + * Ensures that the builder's properties are in a consistent state. + + * 1. If there is no version, use latest. + * 2. If there is no identifier set, ensure expiryTime and permissions are set. + * 3. Resource name is chosen by: + * a. If "BlobName" is _not_ set, it is a container resource. + * b. Otherwise, if "SnapshotId" is set, it is a blob snapshot resource. + * c. Otherwise, it is a blob resource. + * 4. Reparse permissions depending on what the resource is. If it is an unrecognised resource, do nothing. + * + * Taken from: + * https://github.com/Azure/azure-storage-blob-go/blob/master/azblob/sas_service.go#L33 + * https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/storage/Azure.Storage.Blobs/src/Sas/BlobSasBuilder.cs + */ + private void ensureState() { + if (version == null) { + version = BlobServiceVersion.getLatest().getVersion(); + } + + if (identifier == null) { + if (expiryTime == null || permissions == null) { + throw logger.logExceptionAsError(new IllegalStateException("If identifier is not set, expiry time " + + "and permissions must be set")); + } + } + + if (CoreUtils.isNullOrEmpty(blobName)) { + resource = SAS_CONTAINER_CONSTANT; + } else if (snapshotId != null) { + resource = SAS_BLOB_SNAPSHOT_CONSTANT; + } else { + resource = SAS_BLOB_CONSTANT; + } + + if (permissions != null) { + switch (resource) { + case SAS_BLOB_CONSTANT: + case SAS_BLOB_SNAPSHOT_CONSTANT: + permissions = BlobSasPermission.parse(permissions).toString(); + break; + case SAS_CONTAINER_CONSTANT: + permissions = BlobContainerSasPermission.parse(permissions).toString(); + break; + default: + // We won't reparse the permissions if we don't know the type. + logger.info("Not re-parsing permissions. Resource type '{}' is unknown.", resource); + break; + } + } + } + + /** + * Computes the canonical name for a container or blob resource for SAS signing. + */ + private String getCanonicalName(String account) { + // Container: "/blob/account/containername" + // Blob: "/blob/account/containername/blobname" + return CoreUtils.isNullOrEmpty(blobName) + ? String.format("/blob/%s/%s", account, containerName) + : String.format("/blob/%s/%s/%s", account, containerName, blobName.replace("\\", "/")); + } + + private String stringToSign(String canonicalName) { + return String.join("\n", + this.permissions == null ? "" : permissions, + this.startTime == null ? "" : Constants.ISO_8601_UTC_DATE_FORMATTER.format(this.startTime), + this.expiryTime == null ? "" : Constants.ISO_8601_UTC_DATE_FORMATTER.format(this.expiryTime), + canonicalName, + this.identifier == null ? "" : this.identifier, + this.sasIpRange == null ? "" : this.sasIpRange.toString(), + this.protocol == null ? "" : this.protocol.toString(), + version, + resource, + this.snapshotId == null ? "" : this.snapshotId, + this.cacheControl == null ? "" : this.cacheControl, + this.contentDisposition == null ? "" : this.contentDisposition, + this.contentEncoding == null ? "" : this.contentEncoding, + this.contentLanguage == null ? "" : this.contentLanguage, + this.contentType == null ? "" : this.contentType + ); + } + + private String stringToSign(final UserDelegationKey key, String canonicalName) { + return String.join("\n", + this.permissions == null ? "" : this.permissions, + this.startTime == null ? "" : Constants.ISO_8601_UTC_DATE_FORMATTER.format(this.startTime), + this.expiryTime == null ? "" : Constants.ISO_8601_UTC_DATE_FORMATTER.format(this.expiryTime), + canonicalName, + key.getSignedObjectId() == null ? "" : key.getSignedObjectId(), + key.getSignedTenantId() == null ? "" : key.getSignedTenantId(), + key.getSignedStart() == null ? "" : Constants.ISO_8601_UTC_DATE_FORMATTER.format(key.getSignedStart()), + key.getSignedExpiry() == null ? "" : Constants.ISO_8601_UTC_DATE_FORMATTER.format(key.getSignedExpiry()), + key.getSignedService() == null ? "" : key.getSignedService(), + key.getSignedVersion() == null ? "" : key.getSignedVersion(), + this.sasIpRange == null ? "" : this.sasIpRange.toString(), + this.protocol == null ? "" : this.protocol.toString(), + version, + resource, + this.snapshotId == null ? "" : this.snapshotId, + this.cacheControl == null ? "" : this.cacheControl, + this.contentDisposition == null ? "" : this.contentDisposition, + this.contentEncoding == null ? "" : this.contentEncoding, + this.contentLanguage == null ? "" : this.contentLanguage, + this.contentType == null ? "" : this.contentType + ); + } +} diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/BuilderHelper.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/BuilderHelper.java index 9598ccf5f203..4357acc49729 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/BuilderHelper.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/BuilderHelper.java @@ -16,6 +16,7 @@ import com.azure.core.http.policy.RequestIdPolicy; import com.azure.core.http.policy.UserAgentPolicy; import com.azure.core.util.Configuration; +import com.azure.core.util.CoreUtils; import com.azure.core.util.logging.ClientLogger; import com.azure.storage.blob.BlobUrlParts; import com.azure.storage.common.StorageSharedKeyCredential; @@ -30,6 +31,7 @@ import java.util.ArrayList; import java.util.List; +import java.util.Map; /** * This class provides helper methods for common builder patterns. @@ -37,10 +39,10 @@ * RESERVED FOR INTERNAL USE. */ public final class BuilderHelper { - private static final String DEFAULT_USER_AGENT_NAME = "azure-storage-blob"; - // {x-version-update-start;com.azure:azure-storage-blob;current} - private static final String DEFAULT_USER_AGENT_VERSION = "12.1.0"; - // {x-version-update-end} + private static final Map PROPERTIES = + CoreUtils.getProperties("azure-storage-blob.properties"); + private static final String SDK_NAME = "name"; + private static final String SDK_VERSION = "version"; /** * Constructs a {@link HttpPipeline} from values passed from a builder. @@ -153,8 +155,8 @@ public static void httpsValidation(Object objectToCheck, String objectName, Stri private static UserAgentPolicy getUserAgentPolicy(Configuration configuration) { configuration = (configuration == null) ? Configuration.NONE : configuration; - return new UserAgentPolicy(getDefaultHttpLogOptions().getApplicationId(), DEFAULT_USER_AGENT_NAME, - DEFAULT_USER_AGENT_VERSION, configuration); + return new UserAgentPolicy(getDefaultHttpLogOptions().getApplicationId(), + PROPERTIES.get(SDK_NAME), PROPERTIES.get(SDK_VERSION), configuration); } /* diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/sas/BlobServiceSasQueryParameters.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/sas/BlobServiceSasQueryParameters.java index 69f5e2515213..b87f119c34c7 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/sas/BlobServiceSasQueryParameters.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/sas/BlobServiceSasQueryParameters.java @@ -21,7 +21,10 @@ * appended to a URL directly (though caution should be taken here in case there are existing query parameters, which * might affect the appropriate means of appending these query parameters). NOTE: Instances of this class are immutable * to ensure thread safety. + * @deprecated Please use the generateSas method on the desired blob/container client after initializing + * {@link BlobServiceSasSignatureValues}. */ +@Deprecated public final class BlobServiceSasQueryParameters extends BaseSasQueryParameters { private final String identifier; @@ -56,7 +59,9 @@ public final class BlobServiceSasQueryParameters extends BaseSasQueryParameters * @param queryParamsMap All query parameters for the request as key-value pairs * @param removeSasParametersFromMap When {@code true}, the SAS query parameters will be removed from * queryParamsMap + * @deprecated Please use {@link BlobServiceSasSignatureValues} */ + @Deprecated public BlobServiceSasQueryParameters(Map queryParamsMap, boolean removeSasParametersFromMap) { super(queryParamsMap, removeSasParametersFromMap); this.identifier = getQueryParameter(queryParamsMap, Constants.UrlConstants.SAS_SIGNED_IDENTIFIER, @@ -101,7 +106,9 @@ public BlobServiceSasQueryParameters(Map queryParamsMap, boole * @param resource A {@code String} representing the storage container or blob (only for Service SAS). * @param permissions A {@code String} representing the storage permissions or {@code null}. * @param signature A {@code String} representing the signature for the SAS token. + * @deprecated Please use {@link BlobServiceSasSignatureValues} */ + @Deprecated BlobServiceSasQueryParameters(String version, SasProtocol protocol, OffsetDateTime startTime, OffsetDateTime expiryTime, SasIpRange sasIpRange, String identifier, String resource, String permissions, String signature, String cacheControl, String contentDisposition, String contentEncoding, @@ -137,95 +144,122 @@ public BlobServiceSasQueryParameters(Map queryParamsMap, boole * @return The signed identifier (only for {@link BlobServiceSasSignatureValues}) or {@code null}. Please see * here * for more information. + * @deprecated Please use {@link BlobServiceSasSignatureValues} */ + @Deprecated public String getIdentifier() { return identifier; } /** * @return The storage container or blob (only for {@link BlobServiceSasSignatureValues}). + * @deprecated Please use {@link BlobServiceSasSignatureValues} */ + @Deprecated public String getResource() { return resource; } /** * @return The Cache-Control header value when a client accesses the resource with this sas token. + * @deprecated Please use {@link BlobServiceSasSignatureValues} */ + @Deprecated public String getCacheControl() { return cacheControl; } /** * @return The Content-Disposition header value when a client accesses the resource with this sas token. + * @deprecated Please use {@link BlobServiceSasSignatureValues} */ + @Deprecated public String getContentDisposition() { return contentDisposition; } /** * @return The Content-Encoding header value when a client accesses the resource with this sas token. + * @deprecated Please use {@link BlobServiceSasSignatureValues} */ + @Deprecated public String getContentEncoding() { return contentEncoding; } /** * @return The Content-Language header value when a client accesses the resource with this sas token. + * @deprecated Please use {@link BlobServiceSasSignatureValues} */ + @Deprecated public String getContentLanguage() { return contentLanguage; } /** * @return The Content-Type header value when a client accesses the resource with this sas token. + * @deprecated Please use {@link BlobServiceSasSignatureValues} */ + @Deprecated public String getContentType() { return contentType; } /** * @return the object ID of the key. + * @deprecated Please use {@link BlobServiceSasSignatureValues} */ + @Deprecated public String getKeyObjectId() { return keyObjectId; } /** * @return the tenant ID of the key. + * @deprecated Please use {@link BlobServiceSasSignatureValues} */ + @Deprecated public String getKeyTenantId() { return keyTenantId; } /** * @return the datetime when the key becomes active. + * @deprecated Please use {@link BlobServiceSasSignatureValues} */ + @Deprecated public OffsetDateTime getKeyStart() { return keyStart; } /** * @return the datetime when the key expires. + * @deprecated Please use {@link BlobServiceSasSignatureValues} */ + @Deprecated public OffsetDateTime getKeyExpiry() { return keyExpiry; } /** * @return the services that are permitted by the key. + * @deprecated Please use {@link BlobServiceSasSignatureValues} */ + @Deprecated public String getKeyService() { return keyService; } /** * @return the service version that created the key. + * @deprecated Please use {@link BlobServiceSasSignatureValues} */ + @Deprecated public String getKeyVersion() { return keyVersion; } + @Deprecated UserDelegationKey userDelegationKey() { return new UserDelegationKey() .setSignedExpiry(this.keyExpiry) @@ -240,7 +274,10 @@ UserDelegationKey userDelegationKey() { * Encodes all SAS query parameters into a string that can be appended to a URL. * * @return A {@code String} representing all SAS query parameters. + * @deprecated Please use the generateSas method on the desired blob/container client after initializing + * {@link BlobServiceSasSignatureValues}. */ + @Deprecated public String encode() { /* We should be url-encoding each key and each value, but because we know all the keys and values will encode to diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/sas/BlobServiceSasSignatureValues.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/sas/BlobServiceSasSignatureValues.java index 5f878a5468fa..8daced5eef70 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/sas/BlobServiceSasSignatureValues.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/sas/BlobServiceSasSignatureValues.java @@ -15,27 +15,18 @@ import com.azure.storage.common.sas.SasProtocol; import java.time.OffsetDateTime; + /** - * Used to generate a Shared Access Signature (SAS) for an Azure Blob Storage service. Once all the values here are set, - * call {@link - * #generateSasQueryParameters(StorageSharedKeyCredential) generateSasQueryParameters(StorageSharedKeyCredential)} or - * {@link #generateSasQueryParameters(UserDelegationKey, String) generateSasQueryParameters(UserDelegationKey, String)} - * to obtain a representation of the SAS which can be applied to blob urls. - * - *

Generating SAS query parameters with {@link StorageSharedKeyCredential}

- * The following code generates SAS query parameters for an Azure storage blob. - *

- * {@codesnippet com.azure.storage.blob.specialized.BlobServiceSasSignatureValues.generateSasQueryParameters#StorageSharedKeyCredential} - * - *

Generating SAS query parameters with {@link UserDelegationKey}

- * The following sample generates SAS query parameters for an Azure storage container. - *

- * {@codesnippet com.azure.storage.blob.specialized.BlobServiceSasSignatureValues.generateSasQueryParameters#UserDelegationKey-String} + * Used to initialize parameters for a Shared Access Signature (SAS) for an Azure Blob Storage service. Once all the + * values here are set, use the appropriate SAS generation method on the desired container/blob client to obtain a + * representation of the SAS which can then be applied to a new client using the .sasToken(String) method on the + * desired client builder. * - * @see BlobServiceSasQueryParameters * @see Storage SAS overview * @see Constructing a Service * SAS + * @see Constructing a + * User Delegation SAS */ public final class BlobServiceSasSignatureValues { /** @@ -89,27 +80,48 @@ public final class BlobServiceSasSignatureValues { /** * Creates an object with empty values for all fields. + * @deprecated Please use {@link #BlobServiceSasSignatureValues(String)}, + * {@link #BlobServiceSasSignatureValues(OffsetDateTime, BlobSasPermission)}, or + * {@link #BlobServiceSasSignatureValues(OffsetDateTime, BlobContainerSasPermission)} */ + @Deprecated public BlobServiceSasSignatureValues() { } /** * Creates an object with the specified expiry time and permissions * - * @param expiryTime Time the SAS becomes valid - * @param permissions Permissions granted by the SAS + * @param expiryTime The time after which the SAS will no longer work. + * @param permissions {@link BlobContainerSasPermission} allowed by the SAS. */ - BlobServiceSasSignatureValues(OffsetDateTime expiryTime, String permissions) { + public BlobServiceSasSignatureValues(OffsetDateTime expiryTime, BlobContainerSasPermission permissions) { + StorageImplUtils.assertNotNull("expiryTime", expiryTime); + StorageImplUtils.assertNotNull("permissions", permissions); this.expiryTime = expiryTime; - this.permissions = permissions; + this.permissions = permissions.toString(); } /** - * Creates an object with the specified identifier + * Creates an object with the specified expiry time and permissions * - * @param identifier Identifier for the SAS + * @param expiryTime When the SAS will no longer work + * @param permissions {@link BlobSasPermission} allowed by the SAS + */ + public BlobServiceSasSignatureValues(OffsetDateTime expiryTime, BlobSasPermission permissions) { + StorageImplUtils.assertNotNull("expiryTime", expiryTime); + StorageImplUtils.assertNotNull("permissions", permissions); + this.expiryTime = expiryTime; + this.permissions = permissions.toString(); + } + + /** + * Creates an object with the specified identifier. + * NOTE: Identifier can not be used for a {@link UserDelegationKey} SAS. + * + * @param identifier Name of the access policy */ - BlobServiceSasSignatureValues(String identifier) { + public BlobServiceSasSignatureValues(String identifier) { + StorageImplUtils.assertNotNull("identifier", identifier); this.identifier = identifier; } @@ -129,7 +141,12 @@ public BlobServiceSasSignatureValues() { * @param contentEncoding The content-encoding header for the SAS. * @param contentLanguage The content-language header for the SAS. * @param contentType The content-type header for the SAS. + * @deprecated Please use {@link #BlobServiceSasSignatureValues(String)}, + * {@link #BlobServiceSasSignatureValues(OffsetDateTime, BlobSasPermission)}, or + * {@link #BlobServiceSasSignatureValues(OffsetDateTime, BlobContainerSasPermission)} + * followed by calls to the desired setters. */ + @Deprecated public BlobServiceSasSignatureValues(String version, SasProtocol sasProtocol, OffsetDateTime startTime, OffsetDateTime expiryTime, String permission, SasIpRange sasIpRange, String identifier, String cacheControl, String contentDisposition, String contentEncoding, String contentLanguage, String contentType) { @@ -279,7 +296,10 @@ public BlobServiceSasSignatureValues setSasIpRange(SasIpRange sasIpRange) { * Gets the name of the container the SAS user may access. * * @return The name of the container the SAS user may access. + * @deprecated Container name is now auto-populated by the SAS generation methods provided on the desired + * container/blob client. */ + @Deprecated public String getContainerName() { return containerName; } @@ -289,7 +309,10 @@ public String getContainerName() { * * @param containerName The name of the container. * @return The updated BlobServiceSASSignatureValues object. + * @deprecated Please use the SAS generation methods provided on the desired container/blob client that will + * auto-populate the container name. */ + @Deprecated public BlobServiceSasSignatureValues setContainerName(String containerName) { this.containerName = containerName; return this; @@ -301,7 +324,9 @@ public BlobServiceSasSignatureValues setContainerName(String containerName) { * * @return The decoded name of the blob the SAS user may access. {@code null} or an empty string is returned when a * creating a container SAS. + * @deprecated Blob name is now auto-populated by the SAS generation methods provided on the desired blob client. */ + @Deprecated public String getBlobName() { return blobName; } @@ -311,7 +336,10 @@ public String getBlobName() { * * @param blobName The name of the blob. Use {@code null} or an empty string to create a container SAS. * @return The updated BlobServiceSASSignatureValues object. + * @deprecated Please use the SAS generation methods provided on the desired blob client that will auto-populate the + * blob name. */ + @Deprecated public BlobServiceSasSignatureValues setBlobName(String blobName) { this.blobName = (blobName == null) ? null : Utility.urlDecode(blobName); return this; @@ -319,7 +347,10 @@ public BlobServiceSasSignatureValues setBlobName(String blobName) { /** * @return the specific snapshot the SAS user may access. + * @deprecated Snapshot id is now auto-populated by the SAS generation methods provided on the desired (snapshot) + * blob client. */ + @Deprecated public String getSnapshotId() { return this.snapshotId; } @@ -332,7 +363,10 @@ public String getSnapshotId() { * * @param snapshotId Identifier of the snapshot * @return the updated BlobServiceSASSignatureValues object + * @deprecated Please use the SAS generation methods provided on the desired (snapshot) blob client that will + * auto-populate the snapshot id. */ + @Deprecated public BlobServiceSasSignatureValues setSnapshotId(String snapshotId) { this.snapshotId = snapshotId; if (snapshotId != null && SAS_BLOB_CONSTANT.equals(resource)) { @@ -485,7 +519,10 @@ public BlobServiceSasSignatureValues setContentType(String contentType) { * encoded string, or the UTF-8 charset isn't supported. * @throws IllegalArgumentException if {@link #getPermissions()} contains an invalid character for the SAS resource. * @throws NullPointerException if {@code storageSharedKeyCredentials} is null. + * @deprecated Please use the generateSas(BlobServiceSasSignatureValues) method on the desired container/blob client + * after initializing {@link BlobServiceSasSignatureValues}. */ + @Deprecated public BlobServiceSasQueryParameters generateSasQueryParameters( StorageSharedKeyCredential storageSharedKeyCredentials) { StorageImplUtils.assertNotNull("storageSharedKeyCredentials", storageSharedKeyCredentials); @@ -535,9 +572,12 @@ public BlobServiceSasQueryParameters generateSasQueryParameters( * @throws NullPointerException if {@code delegationKey} or {@code account} is null. * @see * Create a user delegation SAS + * @deprecated Please use the generateUserDelegationSas(BlobServiceSasSignatureValues, UserDelegationKey) method on + * the desired container/blob client after initializing {@link BlobServiceSasSignatureValues}. */ + @Deprecated public BlobServiceSasQueryParameters generateSasQueryParameters(UserDelegationKey delegationKey, - String accountName) { + String accountName) { StorageImplUtils.assertNotNull("delegationKey", delegationKey); StorageImplUtils.assertNotNull("accountName", accountName); diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobAsyncClientBase.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobAsyncClientBase.java index e55fb46907f7..6d0ea56a2702 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobAsyncClientBase.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobAsyncClientBase.java @@ -15,6 +15,7 @@ import com.azure.core.util.polling.LongRunningOperationStatus; import com.azure.core.util.polling.PollResponse; import com.azure.core.util.polling.PollerFlux; +import com.azure.storage.blob.BlobServiceAsyncClient; import com.azure.storage.blob.BlobServiceVersion; import com.azure.storage.blob.HttpGetterInfo; import com.azure.storage.blob.ProgressReporter; @@ -23,6 +24,7 @@ import com.azure.storage.blob.implementation.models.BlobGetAccountInfoHeaders; import com.azure.storage.blob.implementation.models.BlobGetPropertiesHeaders; import com.azure.storage.blob.implementation.models.BlobStartCopyFromURLHeaders; +import com.azure.storage.blob.implementation.util.BlobSasImplUtil; import com.azure.storage.blob.implementation.util.ModelHelper; import com.azure.storage.blob.models.AccessTier; import com.azure.storage.blob.models.ArchiveStatus; @@ -41,8 +43,12 @@ import com.azure.storage.blob.models.ParallelTransferOptions; import com.azure.storage.blob.models.RehydratePriority; import com.azure.storage.blob.models.StorageAccountInfo; +import com.azure.storage.blob.models.UserDelegationKey; +import com.azure.storage.blob.sas.BlobServiceSasSignatureValues; +import com.azure.storage.common.StorageSharedKeyCredential; import com.azure.storage.common.Utility; import com.azure.storage.common.implementation.Constants; +import com.azure.storage.common.implementation.SasImplUtils; import com.azure.storage.common.implementation.StorageImplUtils; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -62,6 +68,7 @@ import java.nio.file.Paths; import java.nio.file.StandardOpenOption; import java.time.Duration; +import java.time.OffsetDateTime; import java.util.Map; import java.util.concurrent.atomic.AtomicLong; import java.util.concurrent.locks.Lock; @@ -1384,4 +1391,43 @@ Mono> getAccountInfoWithResponse(Context context) { return new SimpleResponse<>(rb, new StorageAccountInfo(hd.getSkuName(), hd.getAccountKind())); }); } + + /** + * Generates a user delegation SAS for the blob using the specified {@link BlobServiceSasSignatureValues}. + *

See {@link BlobServiceSasSignatureValues} for more information on how to construct a user delegation SAS.

+ * + *

Code Samples

+ * + * {@codesnippet com.azure.storage.blob.specialized.BlobAsyncClientBase.generateUserDelegationSas#BlobServiceSasSignatureValues-UserDelegationKey} + * + * @param blobServiceSasSignatureValues {@link BlobServiceSasSignatureValues} + * @param userDelegationKey A {@link UserDelegationKey} object used to sign the SAS values. + * @see BlobServiceAsyncClient#getUserDelegationKey(OffsetDateTime, OffsetDateTime) for more information on how to + * get a user delegation key. + * + * @return A {@code String} representing all SAS query parameters. + */ + public String generateUserDelegationSas(BlobServiceSasSignatureValues blobServiceSasSignatureValues, + UserDelegationKey userDelegationKey) { + return new BlobSasImplUtil(blobServiceSasSignatureValues, getContainerName(), getBlobName(), getSnapshotId()) + .generateUserDelegationSas(userDelegationKey, getAccountName()); + } + + /** + * Generates a service SAS for the blob using the specified {@link BlobServiceSasSignatureValues} + * Note : The client must be authenticated via {@link StorageSharedKeyCredential} + *

See {@link BlobServiceSasSignatureValues} for more information on how to construct a service SAS.

+ * + *

Code Samples

+ * + * {@codesnippet com.azure.storage.blob.specialized.BlobAsyncClientBase.generateSas#BlobServiceSasSignatureValues} + * + * @param blobServiceSasSignatureValues {@link BlobServiceSasSignatureValues} + * + * @return A {@code String} representing all SAS query parameters. + */ + public String generateSas(BlobServiceSasSignatureValues blobServiceSasSignatureValues) { + return new BlobSasImplUtil(blobServiceSasSignatureValues, getContainerName(), getBlobName(), getSnapshotId()) + .generateSas(SasImplUtils.extractSharedKeyCredential(getHttpPipeline())); + } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobClientBase.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobClientBase.java index f4490492b9ce..bc0df9fcc0c1 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobClientBase.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobClientBase.java @@ -12,6 +12,7 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.SyncPoller; import com.azure.storage.blob.BlobClient; +import com.azure.storage.blob.BlobServiceClient; import com.azure.storage.blob.models.BlobProperties; import com.azure.storage.blob.BlobServiceVersion; import com.azure.storage.blob.models.AccessTier; @@ -27,6 +28,9 @@ import com.azure.storage.blob.models.ParallelTransferOptions; import com.azure.storage.blob.models.RehydratePriority; import com.azure.storage.blob.models.StorageAccountInfo; +import com.azure.storage.blob.models.UserDelegationKey; +import com.azure.storage.blob.sas.BlobServiceSasSignatureValues; +import com.azure.storage.common.StorageSharedKeyCredential; import com.azure.storage.common.implementation.StorageImplUtils; import reactor.core.Exceptions; import reactor.core.publisher.Mono; @@ -37,6 +41,7 @@ import java.net.URL; import java.nio.file.FileAlreadyExistsException; import java.time.Duration; +import java.time.OffsetDateTime; import java.util.Map; import static com.azure.storage.common.implementation.StorageImplUtils.blockWithOptionalTimeout; @@ -799,4 +804,40 @@ public Response getAccountInfoWithResponse(Duration timeout, return blockWithOptionalTimeout(response, timeout); } + + /** + * Generates a user delegation SAS for the blob using the specified {@link BlobServiceSasSignatureValues}. + *

See {@link BlobServiceSasSignatureValues} for more information on how to construct a user delegation SAS.

+ * + *

Code Samples

+ * + * {@codesnippet com.azure.storage.blob.specialized.BlobClientBase.generateUserDelegationSas#BlobServiceSasSignatureValues-UserDelegationKey} + * + * @param blobServiceSasSignatureValues {@link BlobServiceSasSignatureValues} + * @param userDelegationKey A {@link UserDelegationKey} object used to sign the SAS values. + * @see BlobServiceClient#getUserDelegationKey(OffsetDateTime, OffsetDateTime) for more information on how to get a + * user delegation key. + * @return A {@code String} representing all SAS query parameters. + */ + public String generateUserDelegationSas(BlobServiceSasSignatureValues blobServiceSasSignatureValues, + UserDelegationKey userDelegationKey) { + return this.client.generateUserDelegationSas(blobServiceSasSignatureValues, userDelegationKey); + } + + /** + * Generates a service SAS for the blob using the specified {@link BlobServiceSasSignatureValues} + * Note : The client must be authenticated via {@link StorageSharedKeyCredential} + *

See {@link BlobServiceSasSignatureValues} for more information on how to construct a service SAS.

+ * + *

Code Samples

+ * + * {@codesnippet com.azure.storage.blob.specialized.BlobClientBase.generateSas#BlobServiceSasSignatureValues} + * + * @param blobServiceSasSignatureValues {@link BlobServiceSasSignatureValues} + * + * @return A {@code String} representing all SAS query parameters. + */ + public String generateSas(BlobServiceSasSignatureValues blobServiceSasSignatureValues) { + return this.client.generateSas(blobServiceSasSignatureValues); + } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/SpecializedBlobClientBuilder.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/SpecializedBlobClientBuilder.java index ba50a877d1bb..8cde06eb2b62 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/SpecializedBlobClientBuilder.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/SpecializedBlobClientBuilder.java @@ -283,7 +283,7 @@ public SpecializedBlobClientBuilder endpoint(String endpoint) { this.blobName = Utility.urlEncode(parts.getBlobName()); this.snapshot = parts.getSnapshot(); - String sasToken = parts.getSasQueryParameters().encode(); + String sasToken = parts.getCommonSasQueryParameters().encode(); if (!CoreUtils.isNullOrEmpty(sasToken)) { this.sasToken(sasToken); } diff --git a/sdk/storage/azure-storage-blob/src/main/resources/azure-storage-blob.properties b/sdk/storage/azure-storage-blob/src/main/resources/azure-storage-blob.properties new file mode 100644 index 000000000000..ca812989b4f2 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/main/resources/azure-storage-blob.properties @@ -0,0 +1,2 @@ +name=${project.artifactId} +version=${project.version} diff --git a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobAsyncClientJavaDocCodeSnippets.java b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobAsyncClientJavaDocCodeSnippets.java index 26a0fa3c1399..eb3080f8d894 100644 --- a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobAsyncClientJavaDocCodeSnippets.java +++ b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobAsyncClientJavaDocCodeSnippets.java @@ -12,6 +12,7 @@ import com.azure.storage.blob.models.DownloadRetryOptions; import com.azure.storage.blob.models.ParallelTransferOptions; import com.azure.storage.blob.models.RehydratePriority; +import com.azure.storage.blob.models.UserDelegationKey; import com.azure.storage.blob.specialized.BlobAsyncClientBase; import reactor.core.publisher.Flux; @@ -40,6 +41,7 @@ public class BlobAsyncClientJavaDocCodeSnippets { private int blockSize = 50; private int numBuffers = 2; private String filePath = "filePath"; + private UserDelegationKey userDelegationKey = JavaDocCodeSnippetsHelpers.getUserDelegationKey(); /** * Code snippet for {@link BlobAsyncClient#exists()} @@ -505,5 +507,4 @@ public void uploadFromFile2() { .subscribe(completion -> System.out.println("Upload from file succeeded")); // END: com.azure.storage.blob.BlobAsyncClient.uploadFromFile#String-ParallelTransferOptions-BlobHttpHeaders-Map-AccessTier-BlobRequestConditions } - } diff --git a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobClientJavaDocCodeSnippets.java b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobClientJavaDocCodeSnippets.java index 41a89745bf91..8050fdd08d73 100644 --- a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobClientJavaDocCodeSnippets.java +++ b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobClientJavaDocCodeSnippets.java @@ -15,6 +15,7 @@ import com.azure.storage.blob.models.ParallelTransferOptions; import com.azure.storage.blob.models.RehydratePriority; import com.azure.storage.blob.models.StorageAccountInfo; +import com.azure.storage.blob.models.UserDelegationKey; import com.azure.storage.blob.specialized.BlobClientBase; import com.azure.storage.common.implementation.Constants; @@ -44,6 +45,7 @@ public class BlobClientJavaDocCodeSnippets { private String value1 = "val1"; private String value2 = "val2"; private String filePath = "filePath"; + private UserDelegationKey userDelegationKey = JavaDocCodeSnippetsHelpers.getUserDelegationKey(); /** * Code snippets for {@link BlobClient#exists()} diff --git a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobContainerAsyncClientJavaDocCodeSnippets.java b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobContainerAsyncClientJavaDocCodeSnippets.java index adecfd3cf357..5c01f5bb5060 100644 --- a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobContainerAsyncClientJavaDocCodeSnippets.java +++ b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobContainerAsyncClientJavaDocCodeSnippets.java @@ -10,6 +10,9 @@ import com.azure.storage.blob.models.BlobSignedIdentifier; import com.azure.storage.blob.models.ListBlobsOptions; import com.azure.storage.blob.models.PublicAccessType; +import com.azure.storage.blob.models.UserDelegationKey; +import com.azure.storage.blob.sas.BlobContainerSasPermission; +import com.azure.storage.blob.sas.BlobServiceSasSignatureValues; import java.time.Duration; import java.time.OffsetDateTime; @@ -29,6 +32,7 @@ public class BlobContainerAsyncClientJavaDocCodeSnippets { private String leaseId = "leaseId"; private String proposedId = "proposedId"; private int leaseDuration = (int) Duration.ofSeconds(30).getSeconds(); + private UserDelegationKey userDelegationKey = JavaDocCodeSnippetsHelpers.getUserDelegationKey(); /** * Code snippet for {@link BlobContainerAsyncClient#getBlobAsyncClient(String)} @@ -343,4 +347,30 @@ public void getContainerName() { System.out.println("The name of the blob is " + containerName); // END: com.azure.storage.blob.BlobContainerAsyncClient.getBlobContainerName } + + /** + * Code snippet for {@link BlobContainerAsyncClient#generateUserDelegationSas(BlobServiceSasSignatureValues, UserDelegationKey)} + * and {@link BlobContainerAsyncClient#generateSas(BlobServiceSasSignatureValues)} + */ + public void generateSas() { + // BEGIN: com.azure.storage.blob.BlobContainerAsyncClient.generateSas#BlobServiceSasSignatureValues + OffsetDateTime expiryTime = OffsetDateTime.now().plusDays(1); + BlobContainerSasPermission permission = new BlobContainerSasPermission().setReadPermission(true); + + BlobServiceSasSignatureValues values = new BlobServiceSasSignatureValues(expiryTime, permission) + .setStartTime(OffsetDateTime.now()); + + client.generateSas(values); // Client must be authenticated via StorageSharedKeyCredential + // END: com.azure.storage.blob.BlobContainerAsyncClient.generateSas#BlobServiceSasSignatureValues + + // BEGIN: com.azure.storage.blob.BlobContainerAsyncClient.generateUserDelegationSas#BlobServiceSasSignatureValues-UserDelegationKey + OffsetDateTime myExpiryTime = OffsetDateTime.now().plusDays(1); + BlobContainerSasPermission myPermission = new BlobContainerSasPermission().setReadPermission(true); + + BlobServiceSasSignatureValues myValues = new BlobServiceSasSignatureValues(expiryTime, permission) + .setStartTime(OffsetDateTime.now()); + + client.generateUserDelegationSas(values, userDelegationKey); + // END: com.azure.storage.blob.BlobContainerAsyncClient.generateUserDelegationSas#BlobServiceSasSignatureValues-UserDelegationKey + } } diff --git a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobContainerClientJavaDocCodeSnippets.java b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobContainerClientJavaDocCodeSnippets.java index 30dedd456747..0629bc63bf5c 100644 --- a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobContainerClientJavaDocCodeSnippets.java +++ b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobContainerClientJavaDocCodeSnippets.java @@ -15,6 +15,9 @@ import com.azure.storage.blob.models.ListBlobsOptions; import com.azure.storage.blob.models.PublicAccessType; import com.azure.storage.blob.models.StorageAccountInfo; +import com.azure.storage.blob.models.UserDelegationKey; +import com.azure.storage.blob.sas.BlobContainerSasPermission; +import com.azure.storage.blob.sas.BlobServiceSasSignatureValues; import java.time.Duration; import java.time.OffsetDateTime; @@ -32,6 +35,7 @@ public class BlobContainerClientJavaDocCodeSnippets { private String proposedId = "proposedId"; private int leaseDuration = (int) Duration.ofSeconds(30).getSeconds(); private Duration timeout = Duration.ofSeconds(30); + private UserDelegationKey userDelegationKey = JavaDocCodeSnippetsHelpers.getUserDelegationKey(); /** * Code snippet for {@link BlobContainerClient#getBlobClient(String)} @@ -360,4 +364,30 @@ public void getContainerName() { System.out.println("The name of the blob is " + containerName); // END: com.azure.storage.blob.BlobContainerClient.getBlobContainerName } + + /** + * Code snippet for {@link BlobContainerClient#generateUserDelegationSas(BlobServiceSasSignatureValues, UserDelegationKey)} + * and {@link BlobContainerClient#generateSas(BlobServiceSasSignatureValues)} + */ + public void generateSas() { + // BEGIN: com.azure.storage.blob.BlobContainerClient.generateSas#BlobServiceSasSignatureValues + OffsetDateTime expiryTime = OffsetDateTime.now().plusDays(1); + BlobContainerSasPermission permission = new BlobContainerSasPermission().setReadPermission(true); + + BlobServiceSasSignatureValues values = new BlobServiceSasSignatureValues(expiryTime, permission) + .setStartTime(OffsetDateTime.now()); + + client.generateSas(values); // Client must be authenticated via StorageSharedKeyCredential + // END: com.azure.storage.blob.BlobContainerClient.generateSas#BlobServiceSasSignatureValues + + // BEGIN: com.azure.storage.blob.BlobContainerClient.generateUserDelegationSas#BlobServiceSasSignatureValues-UserDelegationKey + OffsetDateTime myExpiryTime = OffsetDateTime.now().plusDays(1); + BlobContainerSasPermission myPermission = new BlobContainerSasPermission().setReadPermission(true); + + BlobServiceSasSignatureValues myValues = new BlobServiceSasSignatureValues(expiryTime, permission) + .setStartTime(OffsetDateTime.now()); + + client.generateUserDelegationSas(values, userDelegationKey); + // END: com.azure.storage.blob.BlobContainerClient.generateUserDelegationSas#BlobServiceSasSignatureValues-UserDelegationKey + } } diff --git a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobServiceAsyncClientJavaDocCodeSnippets.java b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobServiceAsyncClientJavaDocCodeSnippets.java index c2c2b7167f3a..5ae2897a2e88 100644 --- a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobServiceAsyncClientJavaDocCodeSnippets.java +++ b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobServiceAsyncClientJavaDocCodeSnippets.java @@ -11,7 +11,12 @@ import com.azure.storage.blob.models.BlobServiceProperties; import com.azure.storage.blob.models.ListBlobContainersOptions; import com.azure.storage.blob.models.PublicAccessType; +import com.azure.storage.common.sas.AccountSasPermission; +import com.azure.storage.common.sas.AccountSasResourceType; +import com.azure.storage.common.sas.AccountSasService; +import com.azure.storage.common.sas.AccountSasSignatureValues; +import java.time.Duration; import java.time.OffsetDateTime; import java.util.Collections; import java.util.Map; @@ -234,4 +239,24 @@ public void getAccountInfoWithResponse() { response.getValue().getSkuName())); // END: com.azure.storage.blob.BlobServiceAsyncClient.getAccountInfoWithResponse } + + /** + * Code snippet for {@link BlobServiceAsyncClient#generateAccountSas(AccountSasSignatureValues)} + */ + public void generateAccountSas() { + // BEGIN: com.azure.storage.blob.BlobServiceAsyncClient.generateAccountSas#AccountSasSignatureValues + AccountSasPermission permissions = new AccountSasPermission() + .setListPermission(true) + .setReadPermission(true); + AccountSasResourceType resourceTypes = new AccountSasResourceType().setContainer(true); + AccountSasService services = new AccountSasService().setBlobAccess(true).setFileAccess(true); + OffsetDateTime expiryTime = OffsetDateTime.now().plus(Duration.ofDays(2)); + + AccountSasSignatureValues sasValues = + new AccountSasSignatureValues(expiryTime, permissions, services, resourceTypes); + + // Client must be authenticated via StorageSharedKeyCredential + String sas = client.generateAccountSas(sasValues); + // END: com.azure.storage.blob.BlobServiceAsyncClient.generateAccountSas#AccountSasSignatureValues + } } diff --git a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobServiceClientJavaDocCodeSnippets.java b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobServiceClientJavaDocCodeSnippets.java index 5f2b7f135608..bfc83ae426f9 100644 --- a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobServiceClientJavaDocCodeSnippets.java +++ b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobServiceClientJavaDocCodeSnippets.java @@ -12,6 +12,10 @@ import com.azure.storage.blob.models.ListBlobContainersOptions; import com.azure.storage.blob.models.PublicAccessType; import com.azure.storage.blob.models.StorageAccountInfo; +import com.azure.storage.common.sas.AccountSasPermission; +import com.azure.storage.common.sas.AccountSasResourceType; +import com.azure.storage.common.sas.AccountSasService; +import com.azure.storage.common.sas.AccountSasSignatureValues; import java.time.Duration; import java.time.OffsetDateTime; @@ -241,4 +245,24 @@ public void getAccountInfoWithResponse() { StorageAccountInfo accountInfo = client.getAccountInfoWithResponse(timeout, context).getValue(); // END: com.azure.storage.blob.BlobServiceClient.getAccountInfoWithResponse#Duration-Context } + + /** + * Code snippet for {@link BlobServiceClient#generateAccountSas(AccountSasSignatureValues)} + */ + public void generateAccountSas() { + // BEGIN: com.azure.storage.blob.BlobServiceClient.generateAccountSas#AccountSasSignatureValues + AccountSasPermission permissions = new AccountSasPermission() + .setListPermission(true) + .setReadPermission(true); + AccountSasResourceType resourceTypes = new AccountSasResourceType().setContainer(true); + AccountSasService services = new AccountSasService().setBlobAccess(true).setFileAccess(true); + OffsetDateTime expiryTime = OffsetDateTime.now().plus(Duration.ofDays(2)); + + AccountSasSignatureValues sasValues = + new AccountSasSignatureValues(expiryTime, permissions, services, resourceTypes); + + // Client must be authenticated via StorageSharedKeyCredential + String sas = client.generateAccountSas(sasValues); + // END: com.azure.storage.blob.BlobServiceClient.generateAccountSas#AccountSasSignatureValues + } } diff --git a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/JavaDocCodeSnippetsHelpers.java b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/JavaDocCodeSnippetsHelpers.java index 2523d7b4bcef..04be7ae407b1 100644 --- a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/JavaDocCodeSnippetsHelpers.java +++ b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/JavaDocCodeSnippetsHelpers.java @@ -3,6 +3,8 @@ package com.azure.storage.blob; +import com.azure.storage.blob.models.UserDelegationKey; + final class JavaDocCodeSnippetsHelpers { static BlobContainerAsyncClient getContainerAsyncClient() { return new BlobContainerClientBuilder().buildAsyncClient(); @@ -27,4 +29,8 @@ static BlobServiceAsyncClient getBlobServiceAsyncClient() { static BlobServiceClient getBlobServiceClient() { return new BlobServiceClientBuilder().buildClient(); } + + static UserDelegationKey getUserDelegationKey() { + return getBlobServiceClient().getUserDelegationKey(null, null); + } } diff --git a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlobAsyncClientBaseJavaDocCodeSnippets.java b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlobAsyncClientBaseJavaDocCodeSnippets.java index 88686e5c7278..9058b8e3cb8a 100644 --- a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlobAsyncClientBaseJavaDocCodeSnippets.java +++ b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlobAsyncClientBaseJavaDocCodeSnippets.java @@ -5,6 +5,7 @@ import com.azure.core.http.RequestConditions; import com.azure.core.util.polling.PollerFlux; +import com.azure.storage.blob.BlobServiceClientBuilder; import com.azure.storage.blob.BlobServiceVersion; import com.azure.storage.blob.models.AccessTier; import com.azure.storage.blob.models.BlobCopyInfo; @@ -15,6 +16,9 @@ import com.azure.storage.blob.models.DownloadRetryOptions; import com.azure.storage.blob.models.ParallelTransferOptions; import com.azure.storage.blob.models.RehydratePriority; +import com.azure.storage.blob.models.UserDelegationKey; +import com.azure.storage.blob.sas.BlobSasPermission; +import com.azure.storage.blob.sas.BlobServiceSasSignatureValues; import reactor.core.publisher.Mono; import java.io.ByteArrayOutputStream; @@ -36,6 +40,7 @@ public class BlobAsyncClientBaseJavaDocCodeSnippets { private String copyId = "copyId"; private String url = "https://sample.com"; private String file = "file"; + private UserDelegationKey userDelegationKey = new BlobServiceClientBuilder().buildClient().getUserDelegationKey(null, null); /** * Code snippet for {@link BlobAsyncClientBase#exists()} @@ -420,4 +425,30 @@ public void getAccountInfoWithResponseCodeSnippets() { response.getValue().getAccountKind(), response.getValue().getSkuName())); // END: com.azure.storage.blob.specialized.BlobAsyncClientBase.getAccountInfoWithResponse } + + /** + * Code snippet for {@link BlobAsyncClientBase#generateUserDelegationSas(BlobServiceSasSignatureValues, UserDelegationKey)} + * and {@link BlobAsyncClientBase#generateSas(BlobServiceSasSignatureValues)} + */ + public void generateSas() { + // BEGIN: com.azure.storage.blob.specialized.BlobAsyncClientBase.generateSas#BlobServiceSasSignatureValues + OffsetDateTime expiryTime = OffsetDateTime.now().plusDays(1); + BlobSasPermission permission = new BlobSasPermission().setReadPermission(true); + + BlobServiceSasSignatureValues values = new BlobServiceSasSignatureValues(expiryTime, permission) + .setStartTime(OffsetDateTime.now()); + + client.generateSas(values); // Client must be authenticated via StorageSharedKeyCredential + // END: com.azure.storage.blob.specialized.BlobAsyncClientBase.generateSas#BlobServiceSasSignatureValues + + // BEGIN: com.azure.storage.blob.specialized.BlobAsyncClientBase.generateUserDelegationSas#BlobServiceSasSignatureValues-UserDelegationKey + OffsetDateTime myExpiryTime = OffsetDateTime.now().plusDays(1); + BlobSasPermission myPermission = new BlobSasPermission().setReadPermission(true); + + BlobServiceSasSignatureValues myValues = new BlobServiceSasSignatureValues(expiryTime, permission) + .setStartTime(OffsetDateTime.now()); + + client.generateUserDelegationSas(values, userDelegationKey); + // END: com.azure.storage.blob.specialized.BlobAsyncClientBase.generateUserDelegationSas#BlobServiceSasSignatureValues-UserDelegationKey + } } diff --git a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlobClientBaseJavaDocCodeSnippets.java b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlobClientBaseJavaDocCodeSnippets.java index 7dfa2e03e0c4..2cd4e3c850d8 100644 --- a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlobClientBaseJavaDocCodeSnippets.java +++ b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlobClientBaseJavaDocCodeSnippets.java @@ -8,6 +8,7 @@ import com.azure.core.util.polling.LongRunningOperationStatus; import com.azure.core.util.polling.PollResponse; import com.azure.core.util.polling.SyncPoller; +import com.azure.storage.blob.BlobServiceClientBuilder; import com.azure.storage.blob.models.BlobProperties; import com.azure.storage.blob.models.AccessTier; import com.azure.storage.blob.models.BlobCopyInfo; @@ -19,6 +20,9 @@ import com.azure.storage.blob.models.ParallelTransferOptions; import com.azure.storage.blob.models.RehydratePriority; import com.azure.storage.blob.models.StorageAccountInfo; +import com.azure.storage.blob.models.UserDelegationKey; +import com.azure.storage.blob.sas.BlobSasPermission; +import com.azure.storage.blob.sas.BlobServiceSasSignatureValues; import com.azure.storage.common.implementation.Constants; import java.io.ByteArrayOutputStream; @@ -44,6 +48,7 @@ public class BlobClientBaseJavaDocCodeSnippets { private String key2 = "key2"; private String value1 = "val1"; private String value2 = "val2"; + private UserDelegationKey userDelegationKey = new BlobServiceClientBuilder().buildClient().getUserDelegationKey(null, null); /** * Code snippets for {@link BlobClientBase#exists()} @@ -375,4 +380,30 @@ public void getAccountInfoWithResponseCodeSnippets() { System.out.printf("Account Kind: %s, SKU: %s%n", accountInfo.getAccountKind(), accountInfo.getSkuName()); // END: com.azure.storage.blob.specialized.BlobClientBase.getAccountInfoWithResponse#Duration-Context } + + /** + * Code snippet for {@link BlobClientBase#generateUserDelegationSas(BlobServiceSasSignatureValues, UserDelegationKey)} + * and {@link BlobClientBase#generateSas(BlobServiceSasSignatureValues)} + */ + public void generateSas() { + // BEGIN: com.azure.storage.blob.specialized.BlobClientBase.generateSas#BlobServiceSasSignatureValues + OffsetDateTime expiryTime = OffsetDateTime.now().plusDays(1); + BlobSasPermission permission = new BlobSasPermission().setReadPermission(true); + + BlobServiceSasSignatureValues values = new BlobServiceSasSignatureValues(expiryTime, permission) + .setStartTime(OffsetDateTime.now()); + + client.generateSas(values); // Client must be authenticated via StorageSharedKeyCredential + // END: com.azure.storage.blob.specialized.BlobClientBase.generateSas#BlobServiceSasSignatureValues + + // BEGIN: com.azure.storage.blob.specialized.BlobClientBase.generateUserDelegationSas#BlobServiceSasSignatureValues-UserDelegationKey + OffsetDateTime myExpiryTime = OffsetDateTime.now().plusDays(1); + BlobSasPermission myPermission = new BlobSasPermission().setReadPermission(true); + + BlobServiceSasSignatureValues myValues = new BlobServiceSasSignatureValues(expiryTime, permission) + .setStartTime(OffsetDateTime.now()); + + client.generateUserDelegationSas(values, userDelegationKey); + // END: com.azure.storage.blob.specialized.BlobClientBase.generateUserDelegationSas#BlobServiceSasSignatureValues-UserDelegationKey + } } diff --git a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlobServiceSasSignatureValuesJavaDocCodeSnippets.java b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlobServiceSasSignatureValuesJavaDocCodeSnippets.java deleted file mode 100644 index 28545a360ab2..000000000000 --- a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/specialized/BlobServiceSasSignatureValuesJavaDocCodeSnippets.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.storage.blob.specialized; - -import com.azure.storage.blob.sas.BlobSasPermission; -import com.azure.storage.blob.models.UserDelegationKey; -import com.azure.storage.blob.sas.BlobServiceSasQueryParameters; -import com.azure.storage.blob.sas.BlobServiceSasSignatureValues; -import com.azure.storage.common.StorageSharedKeyCredential; -import com.azure.storage.common.sas.SasProtocol; - -import java.time.OffsetDateTime; - -/** - * Code snippets for {@link BlobServiceSasSignatureValues}. - */ -public class BlobServiceSasSignatureValuesJavaDocCodeSnippets { - /** - * Generates a blob SAS with {@link StorageSharedKeyCredential} - */ - public void blobSas() { - // BEGIN: com.azure.storage.blob.specialized.BlobServiceSasSignatureValues.generateSasQueryParameters#StorageSharedKeyCredential - BlobSasPermission blobPermission = new BlobSasPermission().setReadPermission(true); - - // We are creating a SAS to a blob because we set both the container name and blob name. - BlobServiceSasSignatureValues builder = new BlobServiceSasSignatureValues() - .setProtocol(SasProtocol.HTTPS_ONLY) // Users MUST use HTTPS (not HTTP). - .setExpiryTime(OffsetDateTime.now().plusDays(2)) - .setContainerName("my-container") - .setBlobName("HelloWorld.txt") - .setPermissions(blobPermission); - - StorageSharedKeyCredential credential = new StorageSharedKeyCredential("account-name", "key"); - BlobServiceSasQueryParameters sasQueryParameters = builder.generateSasQueryParameters(credential); - // END: com.azure.storage.blob.specialized.BlobServiceSasSignatureValues.generateSasQueryParameters#StorageSharedKeyCredential - } - - /** - * Generates a container SAS using {@link UserDelegationKey}. - */ - public void userDelegationKey() { - // BEGIN: com.azure.storage.blob.specialized.BlobServiceSasSignatureValues.generateSasQueryParameters#UserDelegationKey-String - BlobSasPermission blobPermission = new BlobSasPermission() - .setReadPermission(true) - .setWritePermission(true); - - // We are creating a SAS to a container because only container name is set. - BlobServiceSasSignatureValues builder = new BlobServiceSasSignatureValues() - .setProtocol(SasProtocol.HTTPS_ONLY) // Users MUST use HTTPS (not HTTP). - .setExpiryTime(OffsetDateTime.now().plusDays(2)) - .setContainerName("my-container") - .setPermissions(blobPermission); - - // Get a user delegation key after signing in with Azure AD - UserDelegationKey credential = new UserDelegationKey(); - String account = "my-blob-storage-account"; - BlobServiceSasQueryParameters sasQueryParameters = builder.generateSasQueryParameters(credential, account); - // END: com.azure.storage.blob.specialized.BlobServiceSasSignatureValues.generateSasQueryParameters#UserDelegationKey-String - } -} diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/APISpec.groovy b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/APISpec.groovy index ff192a023c86..c2a6568d27cb 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/APISpec.groovy +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/APISpec.groovy @@ -302,6 +302,10 @@ class APISpec extends Specification { } BlobContainerClient getContainerClient(String sasToken, String endpoint) { + getContainerClientBuilder(endpoint).sasToken(sasToken).buildClient() + } + + BlobContainerClientBuilder getContainerClientBuilder(String endpoint) { BlobContainerClientBuilder builder = new BlobContainerClientBuilder() .endpoint(endpoint) .httpClient(getHttpClient()) @@ -311,7 +315,7 @@ class APISpec extends Specification { builder.addPolicy(interceptorManager.getRecordPolicy()) } - builder.sasToken(sasToken).buildClient() + return builder } BlobAsyncClient getBlobAsyncClient(StorageSharedKeyCredential credential, String endpoint, String blobName) { diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobUserAgentPropertiesTest.groovy b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobUserAgentPropertiesTest.groovy new file mode 100644 index 000000000000..104ffe20273a --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobUserAgentPropertiesTest.groovy @@ -0,0 +1,18 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.storage.blob + +import com.azure.core.util.CoreUtils +import spock.lang.Specification + +class BlobUserAgentPropertiesTest extends Specification { + + def "User agent properties not null"() { + given: + Map properties = CoreUtils.getProperties("azure-storage-blob.properties") + expect: + properties.get("name") == "azure-storage-blob" + properties.get("version").matches("(\\d)+.(\\d)+.(\\d)+([-a-zA-Z0-9.])*") + } +} diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/SASTest.groovy b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/SASTest.groovy index d63e74b4ffdd..76ff4005f371 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/SASTest.groovy +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/SASTest.groovy @@ -23,6 +23,7 @@ import com.azure.storage.common.StorageSharedKeyCredential import com.azure.storage.common.implementation.Constants import com.azure.storage.common.sas.SasIpRange +import spock.lang.Ignore import spock.lang.Unroll import java.time.LocalDateTime @@ -31,6 +32,8 @@ import java.time.ZoneOffset class SASTest extends APISpec { + // TODO (gapra) : Cleanup SAS Tests + @Unroll def "Blob range"() { expect: @@ -646,6 +649,45 @@ class SASTest extends APISpec { notThrown(BlobStorageException) } + def "accountSAS network account sas token on endpoint"() { + setup: + def service = new AccountSasService() + .setBlobAccess(true) + def resourceType = new AccountSasResourceType() + .setContainer(true) + .setService(true) + .setObject(true) + def permissions = new AccountSasPermission() + .setReadPermission(true) + .setCreatePermission(true) + def expiryTime = getUTCNow().plusDays(1) + + def sas = new AccountSasSignatureValues() + .setServices(service.toString()) + .setResourceTypes(resourceType.toString()) + .setPermissions(permissions) + .setExpiryTime(expiryTime) + .generateSasQueryParameters(primaryCredential) + .encode() + def containerName = generateContainerName() + def blobName = generateBlobName() + + when: + def sc = getServiceClientBuilder(null, primaryBlobServiceClient.getAccountUrl() + "?" + sas, null).buildClient() + sc.createBlobContainer(containerName) + + def cc = getContainerClientBuilder(primaryBlobServiceClient.getAccountUrl() + "/" + containerName + "?" + sas).buildClient() + cc.getProperties() + + def bc = getBlobClient(primaryCredential, primaryBlobServiceClient.getAccountUrl() + "/" + containerName + "/" + blobName + "?" + sas) + + def file = getRandomFile(256) + bc.uploadFromFile(file.toPath().toString()) + + then: + notThrown(BlobStorageException) + } + /* This test will ensure that each field gets placed into the proper location within the string to sign and that null values are handled correctly. We will validate the whole SAS with service calls as well as correct serialization of @@ -1155,6 +1197,8 @@ class SASTest extends APISpec { thrown(IllegalArgumentException) } + // TODO : Figure out how to properly port this test over since I changed it to a common sas params + @Ignore def "BlobURLParts"() { setup: def parts = new BlobUrlParts() diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/SasClientTests.groovy b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/SasClientTests.groovy new file mode 100644 index 000000000000..24ed0b81538f --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/SasClientTests.groovy @@ -0,0 +1,544 @@ +package com.azure.storage.blob + +import com.azure.storage.blob.implementation.util.BlobSasImplUtil +import com.azure.storage.blob.models.BlobAccessPolicy +import com.azure.storage.blob.models.BlobProperties +import com.azure.storage.blob.models.BlobSignedIdentifier +import com.azure.storage.blob.models.BlobStorageException +import com.azure.storage.blob.models.UserDelegationKey +import com.azure.storage.blob.sas.BlobContainerSasPermission +import com.azure.storage.blob.sas.BlobSasPermission +import com.azure.storage.blob.sas.BlobServiceSasSignatureValues +import com.azure.storage.blob.specialized.BlockBlobClient +import com.azure.storage.blob.specialized.SpecializedBlobClientBuilder +import com.azure.storage.common.implementation.Constants +import com.azure.storage.common.implementation.StorageImplUtils +import com.azure.storage.common.sas.AccountSasPermission +import com.azure.storage.common.sas.AccountSasResourceType +import com.azure.storage.common.sas.AccountSasService +import com.azure.storage.common.sas.AccountSasSignatureValues +import com.azure.storage.common.sas.SasIpRange +import com.azure.storage.common.sas.SasProtocol +import spock.lang.Unroll + +import java.time.LocalDateTime +import java.time.OffsetDateTime +import java.time.ZoneOffset + +class SasClientTests extends APISpec { + + BlockBlobClient sasClient + String blobName + + def setup() { + blobName = generateBlobName() + sasClient = getBlobClient(primaryCredential, cc.getBlobContainerUrl(), blobName).getBlockBlobClient() + sasClient.upload(new ByteArrayInputStream(defaultData.array()), defaultDataSize) + } + + def "network test blob sas"() { + setup: + def permissions = new BlobSasPermission() + .setReadPermission(true) + .setWritePermission(true) + .setCreatePermission(true) + .setDeletePermission(true) + .setAddPermission(true) + + def sasValues = generateValues(permissions) + + when: + def sas = sasClient.generateSas(sasValues) + + def client = getBlobClient(sas, cc.getBlobContainerUrl(), blobName).getBlockBlobClient() + + def os = new ByteArrayOutputStream() + client.download(os) + def properties = client.getProperties() + + then: + os.toString() == new String(defaultData.array()) + validateSasProperties(properties) + notThrown(BlobStorageException) + } + + def "network test blob snapshot"() { + setup: + + def data = "test".getBytes() + def blobName = generateBlobName() + def bu = getBlobClient(primaryCredential, cc.getBlobContainerUrl(), blobName).getBlockBlobClient() + bu.upload(new ByteArrayInputStream(data), data.length) + def snapshotId = bu.createSnapshot().getSnapshotId() + def snapshotBlob = cc.getBlobClient(blobName, snapshotId).getBlockBlobClient() + + def permissions = new BlobSasPermission() + .setReadPermission(true) + .setWritePermission(true) + .setCreatePermission(true) + .setDeletePermission(true) + .setAddPermission(true) + + def sasValues = generateValues(permissions) + + when: + def sas = snapshotBlob.generateSas(sasValues) + + def client = getBlobClient(sas, cc.getBlobContainerUrl(), blobName, snapshotId).getBlockBlobClient() + + def os = new ByteArrayOutputStream() + client.download(os) + def properties = client.getProperties() + + then: + os.toString() == new String(data) + validateSasProperties(properties) + } + + def "serviceSASSignatureValues network test container"() { + setup: + def identifier = new BlobSignedIdentifier() + .setId("0000") + .setAccessPolicy(new BlobAccessPolicy().setPermissions("racwdl") + .setExpiresOn(getUTCNow().plusDays(1))) + cc.setAccessPolicy(null, Arrays.asList(identifier)) + + // Check containerSASPermissions + def permissions = new BlobContainerSasPermission() + .setReadPermission(true) + .setWritePermission(true) + .setListPermission(true) + .setCreatePermission(true) + .setDeletePermission(true) + .setAddPermission(true) + .setListPermission(true) + def expiryTime = getUTCNow().plusDays(1) + + when: + def sasValues = new BlobServiceSasSignatureValues(identifier.getId()) + def sasWithId = cc.generateSas(sasValues) + def client1 = getContainerClient(sasWithId, cc.getBlobContainerUrl()) + client1.listBlobs().iterator().hasNext() + + and: + sasValues = new BlobServiceSasSignatureValues(expiryTime, permissions) + def sasWithPermissions = cc.generateSas(sasValues) + def client2 = getContainerClient(sasWithPermissions, cc.getBlobContainerUrl()) + client2.listBlobs().iterator().hasNext() + + then: + notThrown(BlobStorageException) + } + + def "network test blob user delegation"() { + setup: + def permissions = new BlobSasPermission() + .setReadPermission(true) + .setWritePermission(true) + .setCreatePermission(true) + .setDeletePermission(true) + .setAddPermission(true) + + def sasValues = generateValues(permissions) + + when: + def sas = sasClient.generateUserDelegationSas(sasValues, getUserDelegationInfo()) + + def client = getBlobClient(sas, cc.getBlobContainerUrl(), blobName).getBlockBlobClient() + + def os = new ByteArrayOutputStream() + client.download(os) + def properties = client.getProperties() + + then: + os.toString() == new String(defaultData.array()) + validateSasProperties(properties) + notThrown(BlobStorageException) + } + + def "BlobServiceSAS network test blob snapshot"() { + setup: + def snapshotBlob = new SpecializedBlobClientBuilder().blobClient(sasClient.createSnapshot()).buildBlockBlobClient() + def snapshotId = snapshotBlob.getSnapshotId() + def permissions = new BlobSasPermission() + .setReadPermission(true) + .setWritePermission(true) + .setCreatePermission(true) + .setDeletePermission(true) + .setAddPermission(true) + def sasValues = generateValues(permissions) + def sas = snapshotBlob.generateSas(sasValues) + + when: + // base blob with snapshot SAS + def client = getBlobClient(sas, cc.getBlobContainerUrl(), blobName).getAppendBlobClient() + client.download(new ByteArrayOutputStream()) + + then: + // snapshot-level SAS shouldn't be able to access base blob + thrown(BlobStorageException) + + when: + // blob snapshot with snapshot SAS + def snapClient = getBlobClient(sas, cc.getBlobContainerUrl(), blobName, snapshotId).getAppendBlobClient() + + def os = new ByteArrayOutputStream() + snapClient.download(os) + + def properties = snapClient.getProperties() + + then: + notThrown(BlobStorageException) + os.toByteArray() == defaultData.array() + + then: + validateSasProperties(properties) + } + + def "network test blob snapshot user delegation"() { + setup: + def snapshotBlob = new SpecializedBlobClientBuilder().blobClient(sasClient.createSnapshot()).buildBlockBlobClient() + def snapshotId = snapshotBlob.getSnapshotId() + + def permissions = new BlobSasPermission() + .setReadPermission(true) + .setWritePermission(true) + .setCreatePermission(true) + .setDeletePermission(true) + .setAddPermission(true) + def sasValues = generateValues(permissions) + def sas = snapshotBlob.generateUserDelegationSas(sasValues, getUserDelegationInfo()) + + when: + // base blob with snapshot SAS + def client1 = getBlobClient(sas, cc.getBlobContainerUrl(), blobName).getBlockBlobClient() + client1.download(new ByteArrayOutputStream()) + + then: + // snapshot-level SAS shouldn't be able to access base blob + thrown(BlobStorageException) + + when: + // blob snapshot with snapshot SAS + def client2 = getBlobClient(sas, cc.getBlobContainerUrl(), blobName, snapshotId).getBlockBlobClient() + def os = new ByteArrayOutputStream() + client2.download(os) + + def properties = client2.getProperties() + + then: + notThrown(BlobStorageException) + os.toString() == new String(defaultData.array()) + validateSasProperties(properties) + } + + def "network test container user delegation"() { + setup: + def permissions = new BlobContainerSasPermission() + .setReadPermission(true) + .setWritePermission(true) + .setCreatePermission(true) + .setDeletePermission(true) + .setAddPermission(true) + .setListPermission(true) + def expiryTime = getUTCNow().plusDays(1) + + when: + def sasValues = new BlobServiceSasSignatureValues(expiryTime, permissions) + def sasWithPermissions = cc.generateUserDelegationSas(sasValues, getUserDelegationInfo()) + + def client = getContainerClient(sasWithPermissions, cc.getBlobContainerUrl()) + client.listBlobs().iterator().hasNext() + + then: + notThrown(BlobStorageException) + } + + def "accountSAS network test blob read"() { + setup: + def service = new AccountSasService() + .setBlobAccess(true) + def resourceType = new AccountSasResourceType() + .setContainer(true) + .setService(true) + .setObject(true) + def permissions = new AccountSasPermission() + .setReadPermission(true) + def expiryTime = getUTCNow().plusDays(1) + + when: + def sasValues = new AccountSasSignatureValues(expiryTime, permissions, service, resourceType) + def sas = primaryBlobServiceClient.generateAccountSas(sasValues) + def client = getBlobClient(sas, cc.getBlobContainerUrl(), blobName).getBlockBlobClient() + def os = new ByteArrayOutputStream() + client.download(os) + + then: + os.toString() == new String(defaultData.array()) + } + + def "accountSAS network test blob delete fails new API"() { + setup: + def service = new AccountSasService() + .setBlobAccess(true) + def resourceType = new AccountSasResourceType() + .setContainer(true) + .setService(true) + .setObject(true) + def permissions = new AccountSasPermission() + .setReadPermission(true) + def expiryTime = getUTCNow().plusDays(1) + + when: + def sasValues = new AccountSasSignatureValues(expiryTime, permissions, service, resourceType) + def sas = primaryBlobServiceClient.generateAccountSas(sasValues) + def client = getBlobClient(sas, cc.getBlobContainerUrl(), blobName).getBlockBlobClient() + client.delete() + + then: + thrown(BlobStorageException) + } + + def "accountSAS network create container fails"() { + setup: + def service = new AccountSasService() + .setBlobAccess(true) + def resourceType = new AccountSasResourceType() + .setContainer(true) + .setService(true) + .setObject(true) + def permissions = new AccountSasPermission() + .setReadPermission(true) + .setCreatePermission(false) + def expiryTime = getUTCNow().plusDays(1) + + when: + def sasValues = new AccountSasSignatureValues(expiryTime, permissions, service, resourceType) + def sas = primaryBlobServiceClient.generateAccountSas(sasValues) + def sc = getServiceClient(sas, primaryBlobServiceClient.getAccountUrl()) + sc.createBlobContainer(generateContainerName()) + + then: + thrown(BlobStorageException) + } + + def "accountSAS network create container succeeds"() { + setup: + def service = new AccountSasService() + .setBlobAccess(true) + def resourceType = new AccountSasResourceType() + .setContainer(true) + .setService(true) + .setObject(true) + def permissions = new AccountSasPermission() + .setReadPermission(true) + .setCreatePermission(true) + def expiryTime = getUTCNow().plusDays(1) + + when: + def sasValues = new AccountSasSignatureValues(expiryTime, permissions, service, resourceType) + def sas = primaryBlobServiceClient.generateAccountSas(sasValues) + def sc = getServiceClient(sas, primaryBlobServiceClient.getAccountUrl()) + sc.createBlobContainer(generateContainerName()) + + then: + notThrown(BlobStorageException) + } + + BlobServiceSasSignatureValues generateValues(BlobSasPermission permission) { + return new BlobServiceSasSignatureValues(getUTCNow().plusDays(1), permission) + .setStartTime(getUTCNow().minusDays(1)) + .setProtocol(SasProtocol.HTTPS_HTTP) + .setSasIpRange(new SasIpRange() + .setIpMin("0.0.0.0") + .setIpMax("255.255.255.255")) + .setCacheControl("cache") + .setContentDisposition("disposition") + .setContentEncoding("encoding") + .setContentLanguage("language") + .setContentType("type") + } + + def validateSasProperties(BlobProperties properties) { + boolean ret = true + ret &= properties.getCacheControl() == "cache" + ret &= properties.getContentDisposition() == "disposition" + ret &= properties.getContentEncoding() == "encoding" + ret &= properties.getContentLanguage() == "language" + return ret + } + + UserDelegationKey getUserDelegationInfo() { + def key = getOAuthServiceClient().getUserDelegationKey(getUTCNow().minusDays(1), getUTCNow().plusDays(1)) + def keyOid = getConfigValue(key.getSignedObjectId()) + key.setSignedObjectId(keyOid) + def keyTid = getConfigValue(key.getSignedTenantId()) + key.setSignedTenantId(keyTid) + return key + } + + /* Blob SAS Impl Util Tests */ + def "ensure state version"() { + when: + BlobSasImplUtil implUtil = new BlobSasImplUtil(new BlobServiceSasSignatureValues("id"), "container") + implUtil.version = null + implUtil.ensureState() + + then: + implUtil.version // Version is set + implUtil.resource == "c" // Default resource is container + !implUtil.permissions // Identifier was used so permissions is null + } + + def "ensure state illegal argument"() { + when: + BlobSasImplUtil implUtil = new BlobSasImplUtil(new BlobServiceSasSignatureValues(), null) + + implUtil.ensureState() + + then: + thrown(IllegalStateException) + } + + @Unroll + def "ensure state resource and permission"() { + setup: + def expiryTime = OffsetDateTime.now().plusDays(1) + + expect: + BlobSasImplUtil implUtil = new BlobSasImplUtil(new BlobServiceSasSignatureValues(expiryTime, permission), container, blob, snapshot) + implUtil.ensureState() + implUtil.resource == resource + implUtil.permissions == permissionString + + where: + container | blob | snapshot | permission || resource | permissionString + "container" | null | null | new BlobContainerSasPermission().setReadPermission(true).setListPermission(true) || "c" | "rl" + "container" | "blob" | null | new BlobSasPermission().setReadPermission(true) || "b" | "r" + "container" | "blob" | "snapshot" | new BlobSasPermission().setReadPermission(true) || "bs" | "r" + } + + /* + This test will ensure that each field gets placed into the proper location within the string to sign and that null + values are handled correctly. We will validate the whole SAS with service calls as well as correct serialization of + individual parts later. + */ + + @Unroll + def "blob sas impl util string to sign"() { + when: + def e = OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC) + def p = new BlobSasPermission() + p.setReadPermission(true) + def v = new BlobServiceSasSignatureValues(e, p) + + def expected = String.format(expectedStringToSign, primaryCredential.getAccountName()) + + v.setStartTime(startTime) + + if (ipRange != null) { + def ipR = new SasIpRange() + ipR.setIpMin("ip") + v.setSasIpRange(ipR) + } + v.setIdentifier(identifier) + .setProtocol(protocol) + .setCacheControl(cacheControl) + .setContentDisposition(disposition) + .setContentEncoding(encoding) + .setContentLanguage(language) + .setContentType(type) + + def implUtil = new BlobSasImplUtil(v, "containerName", "blobName", snapId) + + def sasToken = implUtil.generateSas(primaryCredential) + + def token = BlobUrlParts.parse(cc.getBlobContainerUrl() + "?" + sasToken).getSasQueryParameters() + + then: + token.getSignature() == primaryCredential.computeHmac256(expected) + + /* + We don't test the blob or containerName properties because canonicalized resource is always added as at least + /blob/accountName. We test canonicalization of resources later. Again, this is not to test a fully functional + sas but the construction of the string to sign. + Signed resource is tested elsewhere, as we work some minor magic in choosing which value to use. + */ + where: + startTime | identifier | ipRange | protocol | snapId | cacheControl | disposition | encoding | language | type || expectedStringToSign + OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC) | null | null | null | null | null | null | null | null | null || "r\n" + Constants.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n" + Constants.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\n\n\n\n\n" + null | "id" | null | null | null | null | null | null | null | null || "r\n\n" + Constants.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\nid\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\n\n\n\n\n" + null | null | new SasIpRange() | null | null | null | null | null | null | null || "r\n\n" + Constants.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\nip\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\n\n\n\n\n" + null | null | null | SasProtocol.HTTPS_ONLY | null | null | null | null | null | null || "r\n\n" + Constants.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n" + SasProtocol.HTTPS_ONLY + "\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\n\n\n\n\n" + null | null | null | null | "snapId" | null | null | null | null | null || "r\n\n" + Constants.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nbs\nsnapId\n\n\n\n\n" + null | null | null | null | null | "control" | null | null | null | null || "r\n\n" + Constants.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\ncontrol\n\n\n\n" + null | null | null | null | null | null | "disposition" | null | null | null || "r\n\n" + Constants.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\n\ndisposition\n\n\n" + null | null | null | null | null | null | null | "encoding" | null | null || "r\n\n" + Constants.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\n\n\nencoding\n\n" + null | null | null | null | null | null | null | null | "language" | null || "r\n\n" + Constants.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\n\n\n\nlanguage\n" + null | null | null | null | null | null | null | null | null | "type" || "r\n\n" + Constants.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\n\n\n\n\ntype" + } + + @Unroll + def "blob sas impl util string to sign user delegation key"() { + when: + def e = OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC) + def p = new BlobSasPermission() + p.setReadPermission(true) + def v = new BlobServiceSasSignatureValues(e, p) + + def expected = String.format(expectedStringToSign, primaryCredential.getAccountName()) + + v.setStartTime(startTime) + + if (ipRange != null) { + def ipR = new SasIpRange() + ipR.setIpMin("ip") + v.setSasIpRange(ipR) + } + v.setProtocol(protocol) + .setCacheControl(cacheControl) + .setContentDisposition(disposition) + .setContentEncoding(encoding) + .setContentLanguage(language) + .setContentType(type) + def key = new UserDelegationKey() + .setSignedObjectId(keyOid) + .setSignedTenantId(keyTid) + .setSignedStart(keyStart) + .setSignedExpiry(keyExpiry) + .setSignedService(keyService) + .setSignedVersion(keyVersion) + .setValue(keyValue) + + def implUtil = new BlobSasImplUtil(v, "containerName", "blobName", snapId) + + def sasToken = implUtil.generateUserDelegationSas(key, primaryCredential.getAccountName()) + + def token = BlobUrlParts.parse(cc.getBlobContainerUrl() + "?" + sasToken).getSasQueryParameters() + + then: + token.getSignature() == StorageImplUtils.computeHMac256(key.getValue(), expected) + + /* + We test string to sign functionality directly related to user delegation sas specific parameters + */ + where: + startTime | keyOid | keyTid | keyStart | keyExpiry | keyService | keyVersion | keyValue | ipRange | protocol | snapId | cacheControl | disposition | encoding | language | type || expectedStringToSign + OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC) | null | null | null | null | null | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | null | null | null | null | null | null | null || "r\n" + Constants.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n" + Constants.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n\n\n\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\n\n\n\n\n" + null | "11111111-1111-1111-1111-111111111111" | null | null | null | null | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | null | null | null | null | null | null | null || "r\n\n" + Constants.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n11111111-1111-1111-1111-111111111111\n\n\n\n\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\n\n\n\n\n" + null | null | "22222222-2222-2222-2222-222222222222" | null | null | null | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | null | null | null | null | null | null | null || "r\n\n" + Constants.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n22222222-2222-2222-2222-222222222222\n\n\n\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\n\n\n\n\n" + null | null | null | OffsetDateTime.of(LocalDateTime.of(2018, 1, 1, 0, 0), ZoneOffset.UTC) | null | null | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | null | null | null | null | null | null | null || "r\n\n" + Constants.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n2018-01-01T00:00:00Z\n\n\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\n\n\n\n\n" + null | null | null | null | OffsetDateTime.of(LocalDateTime.of(2018, 1, 1, 0, 0), ZoneOffset.UTC) | null | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | null | null | null | null | null | null | null || "r\n\n" + Constants.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n\n2018-01-01T00:00:00Z\n\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\n\n\n\n\n" + null | null | null | null | null | "b" | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | null | null | null | null | null | null | null || "r\n\n" + Constants.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n\n\nb\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\n\n\n\n\n" + null | null | null | null | null | null | "2018-06-17" | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | null | null | null | null | null | null | null || "r\n\n" + Constants.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n\n\n\n2018-06-17\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\n\n\n\n\n" + null | null | null | null | null | null | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | new SasIpRange() | null | null | null | null | null | null | null || "r\n\n" + Constants.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n\n\n\n\nip\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\n\n\n\n\n" + null | null | null | null | null | null | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | SasProtocol.HTTPS_ONLY | null | null | null | null | null | null || "r\n\n" + Constants.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n\n\n\n\n\n" + SasProtocol.HTTPS_ONLY + "\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\n\n\n\n\n" + null | null | null | null | null | null | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | null | "snapId" | null | null | null | null | null || "r\n\n" + Constants.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n\n\n\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nbs\nsnapId\n\n\n\n\n" + null | null | null | null | null | null | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | null | null | "control" | null | null | null | null || "r\n\n" + Constants.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n\n\n\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\ncontrol\n\n\n\n" + null | null | null | null | null | null | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | null | null | null | "disposition" | null | null | null || "r\n\n" + Constants.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n\n\n\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\n\ndisposition\n\n\n" + null | null | null | null | null | null | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | null | null | null | null | "encoding" | null | null || "r\n\n" + Constants.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n\n\n\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\n\n\nencoding\n\n" + null | null | null | null | null | null | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | null | null | null | null | null | "language" | null || "r\n\n" + Constants.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n\n\n\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\n\n\n\nlanguage\n" + null | null | null | null | null | null | null | "3hd4LRwrARVGbeMRQRfTLIsGMkCPuZJnvxZDU7Gak8c=" | null | null | null | null | null | null | null | "type" || "r\n\n" + Constants.ISO_8601_UTC_DATE_FORMATTER.format(OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)) + "\n/blob/%s/containerName/blobName\n\n\n\n\n\n\n\n\n" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "\nb\n\n\n\n\n\ntype" + } + +} diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/HelperTest.groovy b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/HelperTest.groovy index a4d5f4fb83c4..b76e788b1249 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/HelperTest.groovy +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/HelperTest.groovy @@ -614,35 +614,6 @@ class HelperTest extends APISpec { thrown(IllegalArgumentException) } - def "BlobURLParts"() { - setup: - BlobUrlParts parts = new BlobUrlParts() - .setScheme("http") - .setHost("host") - .setContainerName("container") - .setBlobName("blob") - .setSnapshot("snapshot") - - BlobServiceSasSignatureValues sasValues = new BlobServiceSasSignatureValues() - .setExpiryTime(OffsetDateTime.now(ZoneOffset.UTC).plusDays(1)) - .setPermissions(new BlobSasPermission().setReadPermission(true)) - .setBlobName("blob") - .setContainerName("container") - - parts.setSasQueryParameters(sasValues.generateSasQueryParameters(primaryCredential)) - - when: - String[] splitParts = parts.toUrl().toString().split("\\?") - - then: - splitParts.size() == 2 // Ensure that there is only one question mark even when sas and snapshot are present - splitParts[0] == "http://host/container/blob" - splitParts[1].contains("snapshot=snapshot") - splitParts[1].contains("sp=r") - splitParts[1].contains("sig=") - splitParts[1].split("&").size() == 6 // snapshot & sv & sr & sp & sig & se - } - def "BlobURLParts implicit root"() { when: def bup = new BlobUrlParts() @@ -653,28 +624,4 @@ class HelperTest extends APISpec { then: new BlobUrlParts().parse(bup.toUrl()).getBlobContainerName() == BlobContainerAsyncClient.ROOT_CONTAINER_NAME } - - def "URLParser"() { - when: - BlobUrlParts parts = BlobUrlParts.parse(new URL("http://host/container/" + originalBlobName + "?snapshot=snapshot&sv=" + Constants.HeaderConstants.TARGET_STORAGE_VERSION + "&sr=c&sp=r&sig=Ee%2BSodSXamKSzivSdRTqYGh7AeMVEk3wEoRZ1yzkpSc%3D")) - - then: - parts.getScheme() == "http" - parts.getHost() == "host" - parts.getBlobContainerName() == "container" - parts.getBlobName() == finalBlobName - parts.getSnapshot() == "snapshot" - parts.getSasQueryParameters().getPermissions() == "r" - parts.getSasQueryParameters().getVersion() == Constants.HeaderConstants.TARGET_STORAGE_VERSION - parts.getSasQueryParameters().getResource() == "c" - parts.getSasQueryParameters().getSignature() == Utility.urlDecode("Ee%2BSodSXamKSzivSdRTqYGh7AeMVEk3wEoRZ1yzkpSc%3D") - - where: - originalBlobName | finalBlobName - "blob" | "blob" - "path/to]a blob" | "path/to]a blob" - "path%2Fto%5Da%20blob" | "path/to]a blob" - "斑點" | "斑點" - "%E6%96%91%E9%BB%9E" | "斑點" - } } diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsasnetworkaccountsastokenonendpoint.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsasnetworkaccountsastokenonendpoint.json new file mode 100644 index 000000000000..8b56a1e30b99 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SASTestaccountsasnetworkaccountsastokenonendpoint.json @@ -0,0 +1,157 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "http://gapradev.blob.core.windows.net/jtcaccountsasnetworkaccountsastokenonendpoint050228f98ad1?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "925672fa-f516-4c17-906b-a6835276df64" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D773836B4E450E", + "Last-Modified" : "Wed, 27 Nov 2019 21:47:37 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "0776e54f-901e-0014-666c-a5da54000000", + "Date" : "Wed, 27 Nov 2019 21:47:36 GMT", + "x-ms-client-request-id" : "925672fa-f516-4c17-906b-a6835276df64" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://gapradev.blob.core.windows.net/jtcaccountsasnetworkaccountsastokenonendpoint1543876bb344?restype=container&sv=2019-02-02&se=2019-11-28T21%3A47%3A37Z&sp=rc&sig=REDACTED&ss=b&srt=sco", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "35417c17-ad75-4110-9555-03252c4b0b6d" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D773836B6AAD48", + "Last-Modified" : "Wed, 27 Nov 2019 21:47:37 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "0776e552-901e-0014-676c-a5da54000000", + "Date" : "Wed, 27 Nov 2019 21:47:36 GMT", + "x-ms-client-request-id" : "35417c17-ad75-4110-9555-03252c4b0b6d" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://gapradev.blob.core.windows.net/jtcaccountsasnetworkaccountsastokenonendpoint1543876bb344?restype=container&sv=2019-02-02&se=2019-11-28T21%3A47%3A37Z&sp=rc&sig=REDACTED&ss=b&srt=sco", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "4e97d86d-be22-4bfb-ae2a-13fef784350c" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "x-ms-lease-status" : "unlocked", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-lease-state" : "available", + "x-ms-deny-encryption-scope-override" : "false", + "Last-Modified" : "Wed, 27 Nov 2019 21:47:37 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Wed, 27 Nov 2019 21:47:36 GMT", + "x-ms-has-legal-hold" : "false", + "x-ms-default-encryption-scope" : "$account-encryption-key", + "ETag" : "0x8D773836B6AAD48", + "x-ms-has-immutability-policy" : "false", + "Content-Length" : "0", + "x-ms-request-id" : "0776e555-901e-0014-696c-a5da54000000", + "x-ms-client-request-id" : "4e97d86d-be22-4bfb-ae2a-13fef784350c" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://gapradev.blob.core.windows.net/jtcaccountsasnetworkaccountsastokenonendpoint1543876bb344/javablobaccountsasnetworkaccountsastokenonendpoint229626e91", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "5f5279c7-652f-4a2d-8439-3fe87fd07f29", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "rbcXQ38oC1E=", + "Last-Modified" : "Wed, 27 Nov 2019 21:47:37 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Wed, 27 Nov 2019 21:47:37 GMT", + "Content-MD5" : "y1n7ncfEwoX0QRYmWDZmzg==", + "ETag" : "0x8D773836B945C66", + "Content-Length" : "0", + "x-ms-request-id" : "0776e556-901e-0014-6a6c-a5da54000000", + "x-ms-client-request-id" : "5f5279c7-652f-4a2d-8439-3fe87fd07f29" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://gapradev.blob.core.windows.net?prefix=jtcaccountsasnetworkaccountsastokenonendpoint&comp=list", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "5972c394-80b6-4ddd-954d-b61ccd74957a" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "0776e558-901e-0014-6c6c-a5da54000000", + "Body" : "jtcaccountsasnetworkaccountsastokenonendpointjtcaccountsasnetworkaccountsastokenonendpoint050228f98ad1Wed, 27 Nov 2019 21:47:37 GMT\"0x8D773836B4E450E\"unlockedavailable$account-encryption-keyfalsefalsefalsejtcaccountsasnetworkaccountsastokenonendpoint1543876bb344Wed, 27 Nov 2019 21:47:37 GMT\"0x8D773836B6AAD48\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Wed, 27 Nov 2019 21:47:37 GMT", + "x-ms-client-request-id" : "5972c394-80b6-4ddd-954d-b61ccd74957a", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "http://gapradev.blob.core.windows.net/jtcaccountsasnetworkaccountsastokenonendpoint050228f98ad1?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "b55b2e4b-e952-44c2-af44-2831f03bdb65" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "0776e55c-901e-0014-6f6c-a5da54000000", + "Date" : "Wed, 27 Nov 2019 21:47:37 GMT", + "x-ms-client-request-id" : "b55b2e4b-e952-44c2-af44-2831f03bdb65" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "http://gapradev.blob.core.windows.net/jtcaccountsasnetworkaccountsastokenonendpoint1543876bb344?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "d896db14-3c6a-490a-85a0-1d4cf5ba38d8" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "0776e55d-901e-0014-706c-a5da54000000", + "Date" : "Wed, 27 Nov 2019 21:47:37 GMT", + "x-ms-client-request-id" : "d896db14-3c6a-490a-85a0-1d4cf5ba38d8" + }, + "Exception" : null + } ], + "variables" : [ "jtcaccountsasnetworkaccountsastokenonendpoint050228f98ad1", "2019-11-27T21:47:37.507880300Z", "jtcaccountsasnetworkaccountsastokenonendpoint1543876bb344", "javablobaccountsasnetworkaccountsastokenonendpoint229626e91", "7ed715c3-c2ea-49d9-9f59-32d821b579a0" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsaccountsasnetworkcreatecontainerfails.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsaccountsasnetworkcreatecontainerfails.json new file mode 100644 index 000000000000..a35e56dfb3ed --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsaccountsasnetworkcreatecontainerfails.json @@ -0,0 +1,112 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://gapradev.blob.core.windows.net/jtcaccountsasnetworkcreatecontainerfails076243fee1aaef?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "dd3aee52-1d32-43b0-9137-0f79d7297a17" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D771CA3EA2B5A4", + "Last-Modified" : "Mon, 25 Nov 2019 17:09:34 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "d921ddbf-401e-0028-45b3-a3f393000000", + "Date" : "Mon, 25 Nov 2019 17:09:34 GMT", + "x-ms-client-request-id" : "dd3aee52-1d32-43b0-9137-0f79d7297a17" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gapradev.blob.core.windows.net/jtcaccountsasnetworkcreatecontainerfails076243fee1aaef/javablobaccountsasnetworkcreatecontainerfails1002608965aa", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "cc7772d1-e7d2-49ef-9254-0371879be922", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "Last-Modified" : "Mon, 25 Nov 2019 17:09:34 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Mon, 25 Nov 2019 17:09:34 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D771CA3EB0D38D", + "Content-Length" : "0", + "x-ms-request-id" : "329a251a-a01e-0020-07b3-a3e99c000000", + "x-ms-client-request-id" : "cc7772d1-e7d2-49ef-9254-0371879be922" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gapradev.blob.core.windows.net/jtcaccountsasnetworkcreatecontainerfails235600aea25610?restype=container&sv=2019-02-02&ss=b&srt=sco&se=2019-11-26T17%3A09%3A34Z&sp=r&sig=REDACTED", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "3f204df6-d2f2-491b-9a41-24a66eab3fe8" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "AuthorizationPermissionMismatch", + "retry-after" : "0", + "Content-Length" : "279", + "StatusCode" : "403", + "x-ms-request-id" : "d921ddc4-401e-0028-48b3-a3f393000000", + "Body" : "AuthorizationPermissionMismatchThis request is not authorized to perform this operation using this permission.\nRequestId:d921ddc4-401e-0028-48b3-a3f393000000\nTime:2019-11-25T17:09:34.6217728Z", + "Date" : "Mon, 25 Nov 2019 17:09:34 GMT", + "x-ms-client-request-id" : "3f204df6-d2f2-491b-9a41-24a66eab3fe8", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://gapradev.blob.core.windows.net?prefix=jtcaccountsasnetworkcreatecontainerfails&comp=list", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "808c8d94-4616-4c63-9898-5795bf3ddbba" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "329a251d-a01e-0020-0ab3-a3e99c000000", + "Body" : "jtcaccountsasnetworkcreatecontainerfailsjtcaccountsasnetworkcreatecontainerfails076243fee1aaefMon, 25 Nov 2019 17:09:34 GMT\"0x8D771CA3EA2B5A4\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 25 Nov 2019 17:09:34 GMT", + "x-ms-client-request-id" : "808c8d94-4616-4c63-9898-5795bf3ddbba", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://gapradev.blob.core.windows.net/jtcaccountsasnetworkcreatecontainerfails076243fee1aaef?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "c4e4157d-59c4-4369-aa1a-ffb637d2767d" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "d921ddc7-401e-0028-4bb3-a3f393000000", + "Date" : "Mon, 25 Nov 2019 17:09:34 GMT", + "x-ms-client-request-id" : "c4e4157d-59c4-4369-aa1a-ffb637d2767d" + }, + "Exception" : null + } ], + "variables" : [ "jtcaccountsasnetworkcreatecontainerfails076243fee1aaef", "javablobaccountsasnetworkcreatecontainerfails1002608965aa", "2019-11-25T17:09:34.510036300Z", "jtcaccountsasnetworkcreatecontainerfails235600aea25610" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsaccountsasnetworkcreatecontainersucceeds.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsaccountsasnetworkcreatecontainersucceeds.json new file mode 100644 index 000000000000..003ce4409b93 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsaccountsasnetworkcreatecontainersucceeds.json @@ -0,0 +1,130 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://gapradev.blob.core.windows.net/jtcaccountsasnetworkcreatecontainersucceeds08444578c06ff?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "77246998-6b0e-4986-85f3-f0684dbd069b" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D771CA3EE6122B", + "Last-Modified" : "Mon, 25 Nov 2019 17:09:34 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "329a2522-a01e-0020-0fb3-a3e99c000000", + "Date" : "Mon, 25 Nov 2019 17:09:34 GMT", + "x-ms-client-request-id" : "77246998-6b0e-4986-85f3-f0684dbd069b" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gapradev.blob.core.windows.net/jtcaccountsasnetworkcreatecontainersucceeds08444578c06ff/javablobaccountsasnetworkcreatecontainersucceeds16289375e8", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "f8618e85-6c37-4b53-9a30-3ee8280a26fc", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "Last-Modified" : "Mon, 25 Nov 2019 17:09:34 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Mon, 25 Nov 2019 17:09:34 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D771CA3EF44547", + "Content-Length" : "0", + "x-ms-request-id" : "d921ddcb-401e-0028-4eb3-a3f393000000", + "x-ms-client-request-id" : "f8618e85-6c37-4b53-9a30-3ee8280a26fc" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gapradev.blob.core.windows.net/jtcaccountsasnetworkcreatecontainersucceeds2242025117420?restype=container&sv=2019-02-02&ss=b&srt=sco&se=2019-11-26T17%3A09%3A34Z&sp=rc&sig=REDACTED", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "76b73494-3c02-4ca4-bc2f-52cf4b4f9dbf" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D771CA3F025210", + "Last-Modified" : "Mon, 25 Nov 2019 17:09:35 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "329a2528-a01e-0020-14b3-a3e99c000000", + "Date" : "Mon, 25 Nov 2019 17:09:34 GMT", + "x-ms-client-request-id" : "76b73494-3c02-4ca4-bc2f-52cf4b4f9dbf" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://gapradev.blob.core.windows.net?prefix=jtcaccountsasnetworkcreatecontainersucceeds&comp=list", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "7e3e052d-8f57-49ac-8f63-6a2d01247d3b" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "d921ddd1-401e-0028-54b3-a3f393000000", + "Body" : "jtcaccountsasnetworkcreatecontainersucceedsjtcaccountsasnetworkcreatecontainersucceeds08444578c06ffMon, 25 Nov 2019 17:09:34 GMT\"0x8D771CA3EE6122B\"unlockedavailable$account-encryption-keyfalsefalsefalsejtcaccountsasnetworkcreatecontainersucceeds2242025117420Mon, 25 Nov 2019 17:09:35 GMT\"0x8D771CA3F025210\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 25 Nov 2019 17:09:35 GMT", + "x-ms-client-request-id" : "7e3e052d-8f57-49ac-8f63-6a2d01247d3b", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://gapradev.blob.core.windows.net/jtcaccountsasnetworkcreatecontainersucceeds08444578c06ff?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "6a3d1e04-2692-41f3-85d6-04421cde12a8" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "329a252a-a01e-0020-15b3-a3e99c000000", + "Date" : "Mon, 25 Nov 2019 17:09:35 GMT", + "x-ms-client-request-id" : "6a3d1e04-2692-41f3-85d6-04421cde12a8" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://gapradev.blob.core.windows.net/jtcaccountsasnetworkcreatecontainersucceeds2242025117420?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "05e17388-cedb-4081-a9b9-d687fe0183de" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "d921ddd7-401e-0028-5ab3-a3f393000000", + "Date" : "Mon, 25 Nov 2019 17:09:35 GMT", + "x-ms-client-request-id" : "05e17388-cedb-4081-a9b9-d687fe0183de" + }, + "Exception" : null + } ], + "variables" : [ "jtcaccountsasnetworkcreatecontainersucceeds08444578c06ff", "javablobaccountsasnetworkcreatecontainersucceeds16289375e8", "2019-11-25T17:09:34.952438Z", "jtcaccountsasnetworkcreatecontainersucceeds2242025117420" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsaccountsasnetworktestblobdeletefailsnewapi.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsaccountsasnetworktestblobdeletefailsnewapi.json new file mode 100644 index 000000000000..4c4def91eaa5 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsaccountsasnetworktestblobdeletefailsnewapi.json @@ -0,0 +1,112 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://gapradev.blob.core.windows.net/jtcaccountsasnetworktestblobdeletefailsnewapi07881604ae85?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "d247e5f8-80a0-4346-959d-0bf55f510aeb" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D771CA3E56F596", + "Last-Modified" : "Mon, 25 Nov 2019 17:09:33 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "329a2506-a01e-0020-7cb3-a3e99c000000", + "Date" : "Mon, 25 Nov 2019 17:09:33 GMT", + "x-ms-client-request-id" : "d247e5f8-80a0-4346-959d-0bf55f510aeb" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gapradev.blob.core.windows.net/jtcaccountsasnetworktestblobdeletefailsnewapi07881604ae85/javablobaccountsasnetworktestblobdeletefailsnewapi191830c11", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "84d33a34-3955-43d8-bbfb-d95eed75c78f", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "Last-Modified" : "Mon, 25 Nov 2019 17:09:34 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Mon, 25 Nov 2019 17:09:33 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D771CA3E64885F", + "Content-Length" : "0", + "x-ms-request-id" : "d921ddad-401e-0028-36b3-a3f393000000", + "x-ms-client-request-id" : "84d33a34-3955-43d8-bbfb-d95eed75c78f" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://gapradev.blob.core.windows.net/jtcaccountsasnetworktestblobdeletefailsnewapi07881604ae85/javablobaccountsasnetworktestblobdeletefailsnewapi191830c11?sv=2019-02-02&ss=b&srt=sco&se=2019-11-26T17%3A09%3A34Z&sp=r&sig=REDACTED", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "60e78f3e-ae7f-4dbf-a828-dc7ada190c5c" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "AuthorizationPermissionMismatch", + "retry-after" : "0", + "Content-Length" : "279", + "StatusCode" : "403", + "x-ms-request-id" : "329a250c-a01e-0020-80b3-a3e99c000000", + "Body" : "AuthorizationPermissionMismatchThis request is not authorized to perform this operation using this permission.\nRequestId:329a250c-a01e-0020-80b3-a3e99c000000\nTime:2019-11-25T17:09:34.1956005Z", + "Date" : "Mon, 25 Nov 2019 17:09:34 GMT", + "x-ms-client-request-id" : "60e78f3e-ae7f-4dbf-a828-dc7ada190c5c", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://gapradev.blob.core.windows.net?prefix=jtcaccountsasnetworktestblobdeletefailsnewapi&comp=list", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "e3649be3-d6be-4fb4-abe3-fdb6431e3515" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "d921ddb6-401e-0028-3db3-a3f393000000", + "Body" : "jtcaccountsasnetworktestblobdeletefailsnewapijtcaccountsasnetworktestblobdeletefailsnewapi07881604ae85Mon, 25 Nov 2019 17:09:33 GMT\"0x8D771CA3E56F596\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 25 Nov 2019 17:09:34 GMT", + "x-ms-client-request-id" : "e3649be3-d6be-4fb4-abe3-fdb6431e3515", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://gapradev.blob.core.windows.net/jtcaccountsasnetworktestblobdeletefailsnewapi07881604ae85?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "f0c3d472-dd66-4feb-ac43-930418ed5eed" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "329a2513-a01e-0020-04b3-a3e99c000000", + "Date" : "Mon, 25 Nov 2019 17:09:34 GMT", + "x-ms-client-request-id" : "f0c3d472-dd66-4feb-ac43-930418ed5eed" + }, + "Exception" : null + } ], + "variables" : [ "jtcaccountsasnetworktestblobdeletefailsnewapi07881604ae85", "javablobaccountsasnetworktestblobdeletefailsnewapi191830c11", "2019-11-25T17:09:34.007531800Z" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsaccountsasnetworktestblobread.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsaccountsasnetworktestblobread.json new file mode 100644 index 000000000000..c209702e4218 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsaccountsasnetworktestblobread.json @@ -0,0 +1,120 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://gapradev.blob.core.windows.net/jtcaccountsasnetworktestblobread063965c8d0e1aec29b?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "8cfbc713-53dc-45e8-8db8-4878c76a593c" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D771CA3E14CD79", + "Last-Modified" : "Mon, 25 Nov 2019 17:09:33 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "d921dd90-401e-0028-1eb3-a3f393000000", + "Date" : "Mon, 25 Nov 2019 17:09:33 GMT", + "x-ms-client-request-id" : "8cfbc713-53dc-45e8-8db8-4878c76a593c" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gapradev.blob.core.windows.net/jtcaccountsasnetworktestblobread063965c8d0e1aec29b/javablobaccountsasnetworktestblobread1912206cb7fd2946", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "798df3d4-4416-4efb-b8c0-3ab5aa60467e", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "Last-Modified" : "Mon, 25 Nov 2019 17:09:33 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Mon, 25 Nov 2019 17:09:33 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D771CA3E22EB68", + "Content-Length" : "0", + "x-ms-request-id" : "329a2502-a01e-0020-79b3-a3e99c000000", + "x-ms-client-request-id" : "798df3d4-4416-4efb-b8c0-3ab5aa60467e" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://gapradev.blob.core.windows.net/jtcaccountsasnetworktestblobread063965c8d0e1aec29b/javablobaccountsasnetworktestblobread1912206cb7fd2946?sv=2019-02-02&ss=b&srt=sco&se=2019-11-26T17%3A09%3A33Z&sp=r&sig=REDACTED", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "20f4b810-052f-48f1-80e8-4531b3eb7375" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "x-ms-lease-status" : "unlocked", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-lease-state" : "available", + "Last-Modified" : "Mon, 25 Nov 2019 17:09:33 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Mon, 25 Nov 2019 17:09:33 GMT", + "x-ms-blob-type" : "BlockBlob", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "Accept-Ranges" : "bytes", + "x-ms-server-encrypted" : "true", + "ETag" : "0x8D771CA3E22EB68", + "x-ms-creation-time" : "Mon, 25 Nov 2019 17:09:33 GMT", + "Content-Length" : "7", + "x-ms-request-id" : "d921dd9e-401e-0028-29b3-a3f393000000", + "Body" : "[100, 101, 102, 97, 117, 108, 116]", + "x-ms-client-request-id" : "20f4b810-052f-48f1-80e8-4531b3eb7375", + "Content-Type" : "application/octet-stream" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://gapradev.blob.core.windows.net?prefix=jtcaccountsasnetworktestblobread&comp=list", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "d3c129ae-3d86-4b57-b750-96981916402e" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "329a2504-a01e-0020-7bb3-a3e99c000000", + "Body" : "jtcaccountsasnetworktestblobreadjtcaccountsasnetworktestblobread063965c8d0e1aec29bMon, 25 Nov 2019 17:09:33 GMT\"0x8D771CA3E14CD79\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 25 Nov 2019 17:09:33 GMT", + "x-ms-client-request-id" : "d3c129ae-3d86-4b57-b750-96981916402e", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://gapradev.blob.core.windows.net/jtcaccountsasnetworktestblobread063965c8d0e1aec29b?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "d1f2bbeb-e588-4ee8-8fd0-cc9885d72512" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "d921dda6-401e-0028-2fb3-a3f393000000", + "Date" : "Mon, 25 Nov 2019 17:09:33 GMT", + "x-ms-client-request-id" : "d1f2bbeb-e588-4ee8-8fd0-cc9885d72512" + }, + "Exception" : null + } ], + "variables" : [ "jtcaccountsasnetworktestblobread063965c8d0e1aec29b", "javablobaccountsasnetworktestblobread1912206cb7fd2946", "2019-11-25T17:09:33.582213300Z" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosign[0].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosign[0].json new file mode 100644 index 000000000000..9a2eaa5dba28 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosign[0].json @@ -0,0 +1,90 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://gapradev.blob.core.windows.net/jtcblobsasimplutilstringtosign0463058d41c166e0034?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "61dfa141-f23b-4437-ac70-5172049e4ccb" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D771CA40468D53", + "Last-Modified" : "Mon, 25 Nov 2019 17:09:37 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "329a255d-a01e-0020-3bb3-a3e99c000000", + "Date" : "Mon, 25 Nov 2019 17:09:36 GMT", + "x-ms-client-request-id" : "61dfa141-f23b-4437-ac70-5172049e4ccb" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gapradev.blob.core.windows.net/jtcblobsasimplutilstringtosign0463058d41c166e0034/javablobblobsasimplutilstringtosign186708b2d0527e4f0", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "901cdf90-3451-4259-9830-0ac54ca1e0d5", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "Last-Modified" : "Mon, 25 Nov 2019 17:09:37 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Mon, 25 Nov 2019 17:09:37 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D771CA4053D554", + "Content-Length" : "0", + "x-ms-request-id" : "d921de09-401e-0028-09b3-a3f393000000", + "x-ms-client-request-id" : "901cdf90-3451-4259-9830-0ac54ca1e0d5" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://gapradev.blob.core.windows.net?prefix=jtcblobsasimplutilstringtosign&comp=list", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "90312fee-d521-457f-ae7d-357b439f04ea" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "329a2569-a01e-0020-46b3-a3e99c000000", + "Body" : "jtcblobsasimplutilstringtosignjtcblobsasimplutilstringtosign0463058d41c166e0034Mon, 25 Nov 2019 17:09:37 GMT\"0x8D771CA40468D53\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 25 Nov 2019 17:09:37 GMT", + "x-ms-client-request-id" : "90312fee-d521-457f-ae7d-357b439f04ea", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://gapradev.blob.core.windows.net/jtcblobsasimplutilstringtosign0463058d41c166e0034?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "006d331b-7103-4afd-842c-28ac24d46cda" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "d921de13-401e-0028-13b3-a3f393000000", + "Date" : "Mon, 25 Nov 2019 17:09:37 GMT", + "x-ms-client-request-id" : "006d331b-7103-4afd-842c-28ac24d46cda" + }, + "Exception" : null + } ], + "variables" : [ "jtcblobsasimplutilstringtosign0463058d41c166e0034", "javablobblobsasimplutilstringtosign186708b2d0527e4f0" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosign[1].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosign[1].json new file mode 100644 index 000000000000..2725ca07b74a --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosign[1].json @@ -0,0 +1,90 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://gapradev.blob.core.windows.net/jtcblobsasimplutilstringtosign087850670b2ec7202b4?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "d4dcca0c-a0bb-4090-bf24-a72c9f65272b" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D771CA4080965B", + "Last-Modified" : "Mon, 25 Nov 2019 17:09:37 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "329a2570-a01e-0020-4cb3-a3e99c000000", + "Date" : "Mon, 25 Nov 2019 17:09:37 GMT", + "x-ms-client-request-id" : "d4dcca0c-a0bb-4090-bf24-a72c9f65272b" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gapradev.blob.core.windows.net/jtcblobsasimplutilstringtosign087850670b2ec7202b4/javablobblobsasimplutilstringtosign18797451d18f06bd1", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "ab3a11d6-a62d-4e51-91c2-e669874c4bd5", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "Last-Modified" : "Mon, 25 Nov 2019 17:09:37 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Mon, 25 Nov 2019 17:09:37 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D771CA408DD165", + "Content-Length" : "0", + "x-ms-request-id" : "d921de17-401e-0028-17b3-a3f393000000", + "x-ms-client-request-id" : "ab3a11d6-a62d-4e51-91c2-e669874c4bd5" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://gapradev.blob.core.windows.net?prefix=jtcblobsasimplutilstringtosign&comp=list", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "53fda710-7497-41f6-aad9-755c537bf9a2" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "329a2575-a01e-0020-4fb3-a3e99c000000", + "Body" : "jtcblobsasimplutilstringtosignjtcblobsasimplutilstringtosign087850670b2ec7202b4Mon, 25 Nov 2019 17:09:37 GMT\"0x8D771CA4080965B\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 25 Nov 2019 17:09:37 GMT", + "x-ms-client-request-id" : "53fda710-7497-41f6-aad9-755c537bf9a2", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://gapradev.blob.core.windows.net/jtcblobsasimplutilstringtosign087850670b2ec7202b4?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "b1de0e8d-10ce-4a99-af9e-6432a68ea6dc" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "d921de18-401e-0028-18b3-a3f393000000", + "Date" : "Mon, 25 Nov 2019 17:09:37 GMT", + "x-ms-client-request-id" : "b1de0e8d-10ce-4a99-af9e-6432a68ea6dc" + }, + "Exception" : null + } ], + "variables" : [ "jtcblobsasimplutilstringtosign087850670b2ec7202b4", "javablobblobsasimplutilstringtosign18797451d18f06bd1" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosign[2].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosign[2].json new file mode 100644 index 000000000000..a63171b0f9b8 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosign[2].json @@ -0,0 +1,90 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://gapradev.blob.core.windows.net/jtcblobsasimplutilstringtosign090609bcb7101a2f174?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "e1939d0b-5d22-40a4-a599-7216fdd53d9d" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D771CA40B59543", + "Last-Modified" : "Mon, 25 Nov 2019 17:09:37 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "329a257c-a01e-0020-56b3-a3e99c000000", + "Date" : "Mon, 25 Nov 2019 17:09:37 GMT", + "x-ms-client-request-id" : "e1939d0b-5d22-40a4-a599-7216fdd53d9d" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gapradev.blob.core.windows.net/jtcblobsasimplutilstringtosign090609bcb7101a2f174/javablobblobsasimplutilstringtosign186054183160ba113", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "fd98bf01-0f60-4d46-abff-417b8fddbdb8", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "Last-Modified" : "Mon, 25 Nov 2019 17:09:38 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Mon, 25 Nov 2019 17:09:37 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D771CA40C25186", + "Content-Length" : "0", + "x-ms-request-id" : "d921de19-401e-0028-19b3-a3f393000000", + "x-ms-client-request-id" : "fd98bf01-0f60-4d46-abff-417b8fddbdb8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://gapradev.blob.core.windows.net?prefix=jtcblobsasimplutilstringtosign&comp=list", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "19dec871-5786-4743-aad8-d186afb2930b" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "329a257f-a01e-0020-58b3-a3e99c000000", + "Body" : "jtcblobsasimplutilstringtosignjtcblobsasimplutilstringtosign090609bcb7101a2f174Mon, 25 Nov 2019 17:09:37 GMT\"0x8D771CA40B59543\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 25 Nov 2019 17:09:37 GMT", + "x-ms-client-request-id" : "19dec871-5786-4743-aad8-d186afb2930b", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://gapradev.blob.core.windows.net/jtcblobsasimplutilstringtosign090609bcb7101a2f174?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "469bab9d-867d-4b78-9216-55f0409725e2" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "d921de1a-401e-0028-1ab3-a3f393000000", + "Date" : "Mon, 25 Nov 2019 17:09:37 GMT", + "x-ms-client-request-id" : "469bab9d-867d-4b78-9216-55f0409725e2" + }, + "Exception" : null + } ], + "variables" : [ "jtcblobsasimplutilstringtosign090609bcb7101a2f174", "javablobblobsasimplutilstringtosign186054183160ba113" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosign[3].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosign[3].json new file mode 100644 index 000000000000..4eee63f43ba5 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosign[3].json @@ -0,0 +1,90 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://gapradev.blob.core.windows.net/jtcblobsasimplutilstringtosign0267443cd2712355c94?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "345fef6c-077f-4924-bcdc-f55ca7654777" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D771CA40EA1F07", + "Last-Modified" : "Mon, 25 Nov 2019 17:09:38 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "329a2588-a01e-0020-61b3-a3e99c000000", + "Date" : "Mon, 25 Nov 2019 17:09:37 GMT", + "x-ms-client-request-id" : "345fef6c-077f-4924-bcdc-f55ca7654777" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gapradev.blob.core.windows.net/jtcblobsasimplutilstringtosign0267443cd2712355c94/javablobblobsasimplutilstringtosign111531dfa94dbd346", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "7bcb687e-ef12-4367-badc-791e4b59ea3b", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "Last-Modified" : "Mon, 25 Nov 2019 17:09:38 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Mon, 25 Nov 2019 17:09:38 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D771CA40F6F2E2", + "Content-Length" : "0", + "x-ms-request-id" : "d921de26-401e-0028-22b3-a3f393000000", + "x-ms-client-request-id" : "7bcb687e-ef12-4367-badc-791e4b59ea3b" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://gapradev.blob.core.windows.net?prefix=jtcblobsasimplutilstringtosign&comp=list", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "e8441d22-bf5d-4bba-a736-f38a56f0fab2" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "329a25ac-a01e-0020-03b3-a3e99c000000", + "Body" : "jtcblobsasimplutilstringtosignjtcblobsasimplutilstringtosign0267443cd2712355c94Mon, 25 Nov 2019 17:09:38 GMT\"0x8D771CA40EA1F07\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 25 Nov 2019 17:09:38 GMT", + "x-ms-client-request-id" : "e8441d22-bf5d-4bba-a736-f38a56f0fab2", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://gapradev.blob.core.windows.net/jtcblobsasimplutilstringtosign0267443cd2712355c94?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "522bde73-b604-4edc-911b-7ee53612c2c4" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "d921de2a-401e-0028-26b3-a3f393000000", + "Date" : "Mon, 25 Nov 2019 17:09:38 GMT", + "x-ms-client-request-id" : "522bde73-b604-4edc-911b-7ee53612c2c4" + }, + "Exception" : null + } ], + "variables" : [ "jtcblobsasimplutilstringtosign0267443cd2712355c94", "javablobblobsasimplutilstringtosign111531dfa94dbd346" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosign[4].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosign[4].json new file mode 100644 index 000000000000..3c9c696f45b9 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosign[4].json @@ -0,0 +1,90 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://gapradev.blob.core.windows.net/jtcblobsasimplutilstringtosign0515273d0eef27af664?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "3379ddb5-bb2f-4a21-a7a2-ced8d9a8fff5" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D771CA411EA8AB", + "Last-Modified" : "Mon, 25 Nov 2019 17:09:38 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "329a25b3-a01e-0020-08b3-a3e99c000000", + "Date" : "Mon, 25 Nov 2019 17:09:38 GMT", + "x-ms-client-request-id" : "3379ddb5-bb2f-4a21-a7a2-ced8d9a8fff5" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gapradev.blob.core.windows.net/jtcblobsasimplutilstringtosign0515273d0eef27af664/javablobblobsasimplutilstringtosign1762500bbee9f7129", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "dbe1ea3e-ea54-48c7-90e4-4cf8f569dbf5", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "Last-Modified" : "Mon, 25 Nov 2019 17:09:38 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Mon, 25 Nov 2019 17:09:38 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D771CA412B4A33", + "Content-Length" : "0", + "x-ms-request-id" : "d921de30-401e-0028-2cb3-a3f393000000", + "x-ms-client-request-id" : "dbe1ea3e-ea54-48c7-90e4-4cf8f569dbf5" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://gapradev.blob.core.windows.net?prefix=jtcblobsasimplutilstringtosign&comp=list", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "09a59b74-9043-47d9-9dd9-155b45ff11ef" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "329a25b5-a01e-0020-09b3-a3e99c000000", + "Body" : "jtcblobsasimplutilstringtosignjtcblobsasimplutilstringtosign0515273d0eef27af664Mon, 25 Nov 2019 17:09:38 GMT\"0x8D771CA411EA8AB\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 25 Nov 2019 17:09:38 GMT", + "x-ms-client-request-id" : "09a59b74-9043-47d9-9dd9-155b45ff11ef", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://gapradev.blob.core.windows.net/jtcblobsasimplutilstringtosign0515273d0eef27af664?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "c39ffdf7-d6eb-47ed-b75f-f595a39e9bc2" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "d921de34-401e-0028-30b3-a3f393000000", + "Date" : "Mon, 25 Nov 2019 17:09:38 GMT", + "x-ms-client-request-id" : "c39ffdf7-d6eb-47ed-b75f-f595a39e9bc2" + }, + "Exception" : null + } ], + "variables" : [ "jtcblobsasimplutilstringtosign0515273d0eef27af664", "javablobblobsasimplutilstringtosign1762500bbee9f7129" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosign[5].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosign[5].json new file mode 100644 index 000000000000..bb973749770d --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosign[5].json @@ -0,0 +1,90 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://gapradev.blob.core.windows.net/jtcblobsasimplutilstringtosign027365656db45c9ed74?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "8554f3f2-052f-4270-b0e7-01673bbf6bab" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D771CA41530C84", + "Last-Modified" : "Mon, 25 Nov 2019 17:09:38 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "329a25b7-a01e-0020-0ab3-a3e99c000000", + "Date" : "Mon, 25 Nov 2019 17:09:38 GMT", + "x-ms-client-request-id" : "8554f3f2-052f-4270-b0e7-01673bbf6bab" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gapradev.blob.core.windows.net/jtcblobsasimplutilstringtosign027365656db45c9ed74/javablobblobsasimplutilstringtosign17271941f335d5f26", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "4c8b68be-9f0b-42f9-b400-d9ff8a6b516d", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "Last-Modified" : "Mon, 25 Nov 2019 17:09:39 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Mon, 25 Nov 2019 17:09:38 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D771CA415FC6DA", + "Content-Length" : "0", + "x-ms-request-id" : "d921de3c-401e-0028-37b3-a3f393000000", + "x-ms-client-request-id" : "4c8b68be-9f0b-42f9-b400-d9ff8a6b516d" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://gapradev.blob.core.windows.net?prefix=jtcblobsasimplutilstringtosign&comp=list", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "78033a9c-4e0d-448b-ace3-c8d355647164" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "329a25ba-a01e-0020-0cb3-a3e99c000000", + "Body" : "jtcblobsasimplutilstringtosignjtcblobsasimplutilstringtosign027365656db45c9ed74Mon, 25 Nov 2019 17:09:38 GMT\"0x8D771CA41530C84\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 25 Nov 2019 17:09:38 GMT", + "x-ms-client-request-id" : "78033a9c-4e0d-448b-ace3-c8d355647164", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://gapradev.blob.core.windows.net/jtcblobsasimplutilstringtosign027365656db45c9ed74?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "4105900b-8bed-4e3f-a580-13c53bdbd73a" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "d921de43-401e-0028-3eb3-a3f393000000", + "Date" : "Mon, 25 Nov 2019 17:09:38 GMT", + "x-ms-client-request-id" : "4105900b-8bed-4e3f-a580-13c53bdbd73a" + }, + "Exception" : null + } ], + "variables" : [ "jtcblobsasimplutilstringtosign027365656db45c9ed74", "javablobblobsasimplutilstringtosign17271941f335d5f26" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosign[6].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosign[6].json new file mode 100644 index 000000000000..edc3197162a6 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosign[6].json @@ -0,0 +1,90 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://gapradev.blob.core.windows.net/jtcblobsasimplutilstringtosign091866176b5675be3b4?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "810e7fbb-cf52-4f2e-b210-193bf76e5d43" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D771CA41865C1E", + "Last-Modified" : "Mon, 25 Nov 2019 17:09:39 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "329a25c1-a01e-0020-13b3-a3e99c000000", + "Date" : "Mon, 25 Nov 2019 17:09:39 GMT", + "x-ms-client-request-id" : "810e7fbb-cf52-4f2e-b210-193bf76e5d43" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gapradev.blob.core.windows.net/jtcblobsasimplutilstringtosign091866176b5675be3b4/javablobblobsasimplutilstringtosign137927f07f39a8200", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "812838a6-3bbd-4a98-857f-7f69848b9d97", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "Last-Modified" : "Mon, 25 Nov 2019 17:09:39 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Mon, 25 Nov 2019 17:09:39 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D771CA41930C1F", + "Content-Length" : "0", + "x-ms-request-id" : "d921de53-401e-0028-49b3-a3f393000000", + "x-ms-client-request-id" : "812838a6-3bbd-4a98-857f-7f69848b9d97" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://gapradev.blob.core.windows.net?prefix=jtcblobsasimplutilstringtosign&comp=list", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "b2b5cce7-a364-4cee-a4cc-fea4c7a0f430" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "329a25c4-a01e-0020-15b3-a3e99c000000", + "Body" : "jtcblobsasimplutilstringtosignjtcblobsasimplutilstringtosign091866176b5675be3b4Mon, 25 Nov 2019 17:09:39 GMT\"0x8D771CA41865C1E\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 25 Nov 2019 17:09:39 GMT", + "x-ms-client-request-id" : "b2b5cce7-a364-4cee-a4cc-fea4c7a0f430", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://gapradev.blob.core.windows.net/jtcblobsasimplutilstringtosign091866176b5675be3b4?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "9864f68d-f933-4294-bcb8-17457230ab60" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "d921de5a-401e-0028-50b3-a3f393000000", + "Date" : "Mon, 25 Nov 2019 17:09:39 GMT", + "x-ms-client-request-id" : "9864f68d-f933-4294-bcb8-17457230ab60" + }, + "Exception" : null + } ], + "variables" : [ "jtcblobsasimplutilstringtosign091866176b5675be3b4", "javablobblobsasimplutilstringtosign137927f07f39a8200" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosign[7].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosign[7].json new file mode 100644 index 000000000000..748592a5b145 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosign[7].json @@ -0,0 +1,90 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://gapradev.blob.core.windows.net/jtcblobsasimplutilstringtosign0552562cc1b1eee54b4?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "3568f391-2caa-4174-9e79-9ea2afb63f27" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D771CA41B95EC2", + "Last-Modified" : "Mon, 25 Nov 2019 17:09:39 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "329a25c6-a01e-0020-17b3-a3e99c000000", + "Date" : "Mon, 25 Nov 2019 17:09:39 GMT", + "x-ms-client-request-id" : "3568f391-2caa-4174-9e79-9ea2afb63f27" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gapradev.blob.core.windows.net/jtcblobsasimplutilstringtosign0552562cc1b1eee54b4/javablobblobsasimplutilstringtosign162570189752dce69", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "1e4c8d4b-7cbb-4002-b192-0fdecb47bfc9", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "Last-Modified" : "Mon, 25 Nov 2019 17:09:39 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Mon, 25 Nov 2019 17:09:39 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D771CA41C62A20", + "Content-Length" : "0", + "x-ms-request-id" : "d921de5b-401e-0028-51b3-a3f393000000", + "x-ms-client-request-id" : "1e4c8d4b-7cbb-4002-b192-0fdecb47bfc9" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://gapradev.blob.core.windows.net?prefix=jtcblobsasimplutilstringtosign&comp=list", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "1a146747-bd35-4c5c-926c-2eb3c601cf94" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "329a25ca-a01e-0020-1ab3-a3e99c000000", + "Body" : "jtcblobsasimplutilstringtosignjtcblobsasimplutilstringtosign0552562cc1b1eee54b4Mon, 25 Nov 2019 17:09:39 GMT\"0x8D771CA41B95EC2\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 25 Nov 2019 17:09:39 GMT", + "x-ms-client-request-id" : "1a146747-bd35-4c5c-926c-2eb3c601cf94", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://gapradev.blob.core.windows.net/jtcblobsasimplutilstringtosign0552562cc1b1eee54b4?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "872ffd63-00a4-419e-ac6b-d329c09e0355" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "d921de63-401e-0028-59b3-a3f393000000", + "Date" : "Mon, 25 Nov 2019 17:09:39 GMT", + "x-ms-client-request-id" : "872ffd63-00a4-419e-ac6b-d329c09e0355" + }, + "Exception" : null + } ], + "variables" : [ "jtcblobsasimplutilstringtosign0552562cc1b1eee54b4", "javablobblobsasimplutilstringtosign162570189752dce69" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosign[8].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosign[8].json new file mode 100644 index 000000000000..37681c6a00cb --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosign[8].json @@ -0,0 +1,90 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://gapradev.blob.core.windows.net/jtcblobsasimplutilstringtosign05318598eb9e81af1c4?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "82ba6078-98f7-45f5-a46b-8c3707962fc9" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D771CA41ED733D", + "Last-Modified" : "Mon, 25 Nov 2019 17:09:39 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "329a25cc-a01e-0020-1cb3-a3e99c000000", + "Date" : "Mon, 25 Nov 2019 17:09:39 GMT", + "x-ms-client-request-id" : "82ba6078-98f7-45f5-a46b-8c3707962fc9" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gapradev.blob.core.windows.net/jtcblobsasimplutilstringtosign05318598eb9e81af1c4/javablobblobsasimplutilstringtosign1314354c0b61e35df", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "5ec46370-79a6-48b3-9b38-622b11ed921d", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "Last-Modified" : "Mon, 25 Nov 2019 17:09:40 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Mon, 25 Nov 2019 17:09:39 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D771CA41FA59C1", + "Content-Length" : "0", + "x-ms-request-id" : "d921de65-401e-0028-5bb3-a3f393000000", + "x-ms-client-request-id" : "5ec46370-79a6-48b3-9b38-622b11ed921d" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://gapradev.blob.core.windows.net?prefix=jtcblobsasimplutilstringtosign&comp=list", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "9e7644f6-30c9-4ccd-96d2-697d64414d9e" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "329a25cf-a01e-0020-1eb3-a3e99c000000", + "Body" : "jtcblobsasimplutilstringtosignjtcblobsasimplutilstringtosign05318598eb9e81af1c4Mon, 25 Nov 2019 17:09:39 GMT\"0x8D771CA41ED733D\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 25 Nov 2019 17:09:39 GMT", + "x-ms-client-request-id" : "9e7644f6-30c9-4ccd-96d2-697d64414d9e", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://gapradev.blob.core.windows.net/jtcblobsasimplutilstringtosign05318598eb9e81af1c4?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "ba06f286-0ef0-4d13-975c-fe5a1cba82fa" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "d921de67-401e-0028-5db3-a3f393000000", + "Date" : "Mon, 25 Nov 2019 17:09:39 GMT", + "x-ms-client-request-id" : "ba06f286-0ef0-4d13-975c-fe5a1cba82fa" + }, + "Exception" : null + } ], + "variables" : [ "jtcblobsasimplutilstringtosign05318598eb9e81af1c4", "javablobblobsasimplutilstringtosign1314354c0b61e35df" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosign[9].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosign[9].json new file mode 100644 index 000000000000..a3f2bd19d9b6 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosign[9].json @@ -0,0 +1,90 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://gapradev.blob.core.windows.net/jtcblobsasimplutilstringtosign022823f54d248018564?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "2c9704ac-1b25-4866-83a5-c75ac6d9b2bc" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D771CA4221FCB7", + "Last-Modified" : "Mon, 25 Nov 2019 17:09:40 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "329a25d3-a01e-0020-22b3-a3e99c000000", + "Date" : "Mon, 25 Nov 2019 17:09:40 GMT", + "x-ms-client-request-id" : "2c9704ac-1b25-4866-83a5-c75ac6d9b2bc" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gapradev.blob.core.windows.net/jtcblobsasimplutilstringtosign022823f54d248018564/javablobblobsasimplutilstringtosign139652c1e391d21f0", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "a20c7bd7-b3b5-42ea-812c-0f77e5167d5e", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "Last-Modified" : "Mon, 25 Nov 2019 17:09:40 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Mon, 25 Nov 2019 17:09:40 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D771CA422F2536", + "Content-Length" : "0", + "x-ms-request-id" : "d921de6a-401e-0028-5fb3-a3f393000000", + "x-ms-client-request-id" : "a20c7bd7-b3b5-42ea-812c-0f77e5167d5e" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://gapradev.blob.core.windows.net?prefix=jtcblobsasimplutilstringtosign&comp=list", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "773a9382-7948-4610-a910-31f3b0ed0b96" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "329a25d6-a01e-0020-24b3-a3e99c000000", + "Body" : "jtcblobsasimplutilstringtosignjtcblobsasimplutilstringtosign022823f54d248018564Mon, 25 Nov 2019 17:09:40 GMT\"0x8D771CA4221FCB7\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 25 Nov 2019 17:09:40 GMT", + "x-ms-client-request-id" : "773a9382-7948-4610-a910-31f3b0ed0b96", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://gapradev.blob.core.windows.net/jtcblobsasimplutilstringtosign022823f54d248018564?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "4ed1b3db-0752-4cb4-a766-5dbec552e9d6" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "d921de74-401e-0028-68b3-a3f393000000", + "Date" : "Mon, 25 Nov 2019 17:09:40 GMT", + "x-ms-client-request-id" : "4ed1b3db-0752-4cb4-a766-5dbec552e9d6" + }, + "Exception" : null + } ], + "variables" : [ "jtcblobsasimplutilstringtosign022823f54d248018564", "javablobblobsasimplutilstringtosign139652c1e391d21f0" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosignuserdelegationkey[0].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosignuserdelegationkey[0].json new file mode 100644 index 000000000000..cdc67a31822f --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosignuserdelegationkey[0].json @@ -0,0 +1,90 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://gapradev.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey03929314ec0?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "17bf3bd0-45f0-438a-8728-ead5bc8548cb" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D771CA425770FD", + "Last-Modified" : "Mon, 25 Nov 2019 17:09:40 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "329a25d9-a01e-0020-27b3-a3e99c000000", + "Date" : "Mon, 25 Nov 2019 17:09:40 GMT", + "x-ms-client-request-id" : "17bf3bd0-45f0-438a-8728-ead5bc8548cb" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gapradev.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey03929314ec0/javablobblobsasimplutilstringtosignuserdelegationkey18484377", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "c1441cd8-bf6f-4300-b81a-313506e4808a", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "Last-Modified" : "Mon, 25 Nov 2019 17:09:40 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Mon, 25 Nov 2019 17:09:40 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D771CA42641802", + "Content-Length" : "0", + "x-ms-request-id" : "d921de7b-401e-0028-6fb3-a3f393000000", + "x-ms-client-request-id" : "c1441cd8-bf6f-4300-b81a-313506e4808a" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://gapradev.blob.core.windows.net?prefix=jtcblobsasimplutilstringtosignuserdelegationkey&comp=list", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "2b050d2b-1012-40fd-b3b7-5ca58024b26d" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "329a25de-a01e-0020-2bb3-a3e99c000000", + "Body" : "jtcblobsasimplutilstringtosignuserdelegationkeyjtcblobsasimplutilstringtosignuserdelegationkey03929314ec0Mon, 25 Nov 2019 17:09:40 GMT\"0x8D771CA425770FD\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 25 Nov 2019 17:09:40 GMT", + "x-ms-client-request-id" : "2b050d2b-1012-40fd-b3b7-5ca58024b26d", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://gapradev.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey03929314ec0?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "c2f7048a-0f8b-4f1a-bfa9-c2e03bef9400" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "d921de84-401e-0028-78b3-a3f393000000", + "Date" : "Mon, 25 Nov 2019 17:09:40 GMT", + "x-ms-client-request-id" : "c2f7048a-0f8b-4f1a-bfa9-c2e03bef9400" + }, + "Exception" : null + } ], + "variables" : [ "jtcblobsasimplutilstringtosignuserdelegationkey03929314ec0", "javablobblobsasimplutilstringtosignuserdelegationkey18484377" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosignuserdelegationkey[10].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosignuserdelegationkey[10].json new file mode 100644 index 000000000000..4d11d89351ee --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosignuserdelegationkey[10].json @@ -0,0 +1,90 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://gapradev.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey0911422df83?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "e2c7c4f3-f72d-4adf-b139-9ae403b05719" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D771CA44743E15", + "Last-Modified" : "Mon, 25 Nov 2019 17:09:44 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "329a2634-a01e-0020-71b3-a3e99c000000", + "Date" : "Mon, 25 Nov 2019 17:09:43 GMT", + "x-ms-client-request-id" : "e2c7c4f3-f72d-4adf-b139-9ae403b05719" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gapradev.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey0911422df83/javablobblobsasimplutilstringtosignuserdelegationkey17029077", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "07ff9eb9-c7f9-4de4-a409-e820600f60f7", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "Last-Modified" : "Mon, 25 Nov 2019 17:09:44 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Mon, 25 Nov 2019 17:09:43 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D771CA44812BD3", + "Content-Length" : "0", + "x-ms-request-id" : "d921deee-401e-0028-5cb3-a3f393000000", + "x-ms-client-request-id" : "07ff9eb9-c7f9-4de4-a409-e820600f60f7" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://gapradev.blob.core.windows.net?prefix=jtcblobsasimplutilstringtosignuserdelegationkey&comp=list", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "9c2ceb83-aab0-4db9-90de-04e2c0e46a24" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "329a2636-a01e-0020-72b3-a3e99c000000", + "Body" : "jtcblobsasimplutilstringtosignuserdelegationkeyjtcblobsasimplutilstringtosignuserdelegationkey0911422df83Mon, 25 Nov 2019 17:09:44 GMT\"0x8D771CA44743E15\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 25 Nov 2019 17:09:43 GMT", + "x-ms-client-request-id" : "9c2ceb83-aab0-4db9-90de-04e2c0e46a24", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://gapradev.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey0911422df83?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "bc286259-1529-4755-80ee-06c9676d99cc" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "d921def7-401e-0028-65b3-a3f393000000", + "Date" : "Mon, 25 Nov 2019 17:09:44 GMT", + "x-ms-client-request-id" : "bc286259-1529-4755-80ee-06c9676d99cc" + }, + "Exception" : null + } ], + "variables" : [ "jtcblobsasimplutilstringtosignuserdelegationkey0911422df83", "javablobblobsasimplutilstringtosignuserdelegationkey17029077" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosignuserdelegationkey[11].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosignuserdelegationkey[11].json new file mode 100644 index 000000000000..018c7281272e --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosignuserdelegationkey[11].json @@ -0,0 +1,90 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://gapradev.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey073672052c1?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "c8220a33-4d9c-495c-ad95-345a44f3e149" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D771CA44A9D96E", + "Last-Modified" : "Mon, 25 Nov 2019 17:09:44 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "329a2638-a01e-0020-74b3-a3e99c000000", + "Date" : "Mon, 25 Nov 2019 17:09:44 GMT", + "x-ms-client-request-id" : "c8220a33-4d9c-495c-ad95-345a44f3e149" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gapradev.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey073672052c1/javablobblobsasimplutilstringtosignuserdelegationkey14339622", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "88d7bde6-b5cc-4e41-a4f5-3e61df2ef113", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "Last-Modified" : "Mon, 25 Nov 2019 17:09:44 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Mon, 25 Nov 2019 17:09:44 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D771CA44B66E35", + "Content-Length" : "0", + "x-ms-request-id" : "d921defc-401e-0028-6ab3-a3f393000000", + "x-ms-client-request-id" : "88d7bde6-b5cc-4e41-a4f5-3e61df2ef113" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://gapradev.blob.core.windows.net?prefix=jtcblobsasimplutilstringtosignuserdelegationkey&comp=list", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "b4d1fcb3-c8f6-4699-96f8-ff61d4b0462e" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "329a263d-a01e-0020-78b3-a3e99c000000", + "Body" : "jtcblobsasimplutilstringtosignuserdelegationkeyjtcblobsasimplutilstringtosignuserdelegationkey073672052c1Mon, 25 Nov 2019 17:09:44 GMT\"0x8D771CA44A9D96E\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 25 Nov 2019 17:09:44 GMT", + "x-ms-client-request-id" : "b4d1fcb3-c8f6-4699-96f8-ff61d4b0462e", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://gapradev.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey073672052c1?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "e204e9f3-d4dd-4414-8442-4d6b23c168df" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "d921deff-401e-0028-6db3-a3f393000000", + "Date" : "Mon, 25 Nov 2019 17:09:44 GMT", + "x-ms-client-request-id" : "e204e9f3-d4dd-4414-8442-4d6b23c168df" + }, + "Exception" : null + } ], + "variables" : [ "jtcblobsasimplutilstringtosignuserdelegationkey073672052c1", "javablobblobsasimplutilstringtosignuserdelegationkey14339622" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosignuserdelegationkey[12].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosignuserdelegationkey[12].json new file mode 100644 index 000000000000..8eef25ffad03 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosignuserdelegationkey[12].json @@ -0,0 +1,90 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://gapradev.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey087868008c3?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "4b031ff5-ca8a-4b83-ad05-0f3eef129bd3" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D771CA44DD034A", + "Last-Modified" : "Mon, 25 Nov 2019 17:09:44 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "329a265a-a01e-0020-13b3-a3e99c000000", + "Date" : "Mon, 25 Nov 2019 17:09:44 GMT", + "x-ms-client-request-id" : "4b031ff5-ca8a-4b83-ad05-0f3eef129bd3" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gapradev.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey087868008c3/javablobblobsasimplutilstringtosignuserdelegationkey176754ba", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "f22e68f2-58c9-449c-8987-5ca6f0c11bb4", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "Last-Modified" : "Mon, 25 Nov 2019 17:09:44 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Mon, 25 Nov 2019 17:09:44 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D771CA44EA2814", + "Content-Length" : "0", + "x-ms-request-id" : "d921df02-401e-0028-70b3-a3f393000000", + "x-ms-client-request-id" : "f22e68f2-58c9-449c-8987-5ca6f0c11bb4" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://gapradev.blob.core.windows.net?prefix=jtcblobsasimplutilstringtosignuserdelegationkey&comp=list", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "870478da-c203-4391-9e16-4077783088fe" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "329a265c-a01e-0020-14b3-a3e99c000000", + "Body" : "jtcblobsasimplutilstringtosignuserdelegationkeyjtcblobsasimplutilstringtosignuserdelegationkey087868008c3Mon, 25 Nov 2019 17:09:44 GMT\"0x8D771CA44DD034A\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 25 Nov 2019 17:09:44 GMT", + "x-ms-client-request-id" : "870478da-c203-4391-9e16-4077783088fe", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://gapradev.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey087868008c3?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "9c6ed92e-7e62-4d93-b6d9-aa786ce575bb" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "d921df08-401e-0028-73b3-a3f393000000", + "Date" : "Mon, 25 Nov 2019 17:09:44 GMT", + "x-ms-client-request-id" : "9c6ed92e-7e62-4d93-b6d9-aa786ce575bb" + }, + "Exception" : null + } ], + "variables" : [ "jtcblobsasimplutilstringtosignuserdelegationkey087868008c3", "javablobblobsasimplutilstringtosignuserdelegationkey176754ba" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosignuserdelegationkey[13].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosignuserdelegationkey[13].json new file mode 100644 index 000000000000..ee041df063d9 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosignuserdelegationkey[13].json @@ -0,0 +1,90 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://gapradev.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey071397cb8b8?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "47442d80-8cb1-41cb-99dc-6718339993d8" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D771CA4512525D", + "Last-Modified" : "Mon, 25 Nov 2019 17:09:45 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "329a2662-a01e-0020-1ab3-a3e99c000000", + "Date" : "Mon, 25 Nov 2019 17:09:44 GMT", + "x-ms-client-request-id" : "47442d80-8cb1-41cb-99dc-6718339993d8" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gapradev.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey071397cb8b8/javablobblobsasimplutilstringtosignuserdelegationkey1974360c", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "3f1c5377-62ae-442e-8072-74a24c9c94cb", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "Last-Modified" : "Mon, 25 Nov 2019 17:09:45 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Mon, 25 Nov 2019 17:09:44 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D771CA451F41EE", + "Content-Length" : "0", + "x-ms-request-id" : "d921df0c-401e-0028-77b3-a3f393000000", + "x-ms-client-request-id" : "3f1c5377-62ae-442e-8072-74a24c9c94cb" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://gapradev.blob.core.windows.net?prefix=jtcblobsasimplutilstringtosignuserdelegationkey&comp=list", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "9b635e35-c3c8-4186-adf1-4edc7d92488e" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "329a2666-a01e-0020-1db3-a3e99c000000", + "Body" : "jtcblobsasimplutilstringtosignuserdelegationkeyjtcblobsasimplutilstringtosignuserdelegationkey071397cb8b8Mon, 25 Nov 2019 17:09:45 GMT\"0x8D771CA4512525D\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 25 Nov 2019 17:09:44 GMT", + "x-ms-client-request-id" : "9b635e35-c3c8-4186-adf1-4edc7d92488e", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://gapradev.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey071397cb8b8?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "1825ee2b-0841-429a-9c29-7e1b20dbb3b4" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "d921df13-401e-0028-7eb3-a3f393000000", + "Date" : "Mon, 25 Nov 2019 17:09:45 GMT", + "x-ms-client-request-id" : "1825ee2b-0841-429a-9c29-7e1b20dbb3b4" + }, + "Exception" : null + } ], + "variables" : [ "jtcblobsasimplutilstringtosignuserdelegationkey071397cb8b8", "javablobblobsasimplutilstringtosignuserdelegationkey1974360c" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosignuserdelegationkey[14].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosignuserdelegationkey[14].json new file mode 100644 index 000000000000..b60c90395158 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosignuserdelegationkey[14].json @@ -0,0 +1,90 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://gapradev.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey08761697965?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "46a71f5f-4b60-4f5d-8e93-f9e941f4975a" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D771CA45522760", + "Last-Modified" : "Mon, 25 Nov 2019 17:09:45 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "329a266e-a01e-0020-22b3-a3e99c000000", + "Date" : "Mon, 25 Nov 2019 17:09:45 GMT", + "x-ms-client-request-id" : "46a71f5f-4b60-4f5d-8e93-f9e941f4975a" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gapradev.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey08761697965/javablobblobsasimplutilstringtosignuserdelegationkey18532120", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "812aa35b-d09d-4dfe-ae57-3b37360691e8", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "Last-Modified" : "Mon, 25 Nov 2019 17:09:45 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Mon, 25 Nov 2019 17:09:45 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D771CA455EE171", + "Content-Length" : "0", + "x-ms-request-id" : "d921df17-401e-0028-02b3-a3f393000000", + "x-ms-client-request-id" : "812aa35b-d09d-4dfe-ae57-3b37360691e8" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://gapradev.blob.core.windows.net?prefix=jtcblobsasimplutilstringtosignuserdelegationkey&comp=list", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "d20231f8-d8d3-4247-a81f-9e42ff4d45fb" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "329a2678-a01e-0020-28b3-a3e99c000000", + "Body" : "jtcblobsasimplutilstringtosignuserdelegationkeyjtcblobsasimplutilstringtosignuserdelegationkey08761697965Mon, 25 Nov 2019 17:09:45 GMT\"0x8D771CA45522760\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 25 Nov 2019 17:09:45 GMT", + "x-ms-client-request-id" : "d20231f8-d8d3-4247-a81f-9e42ff4d45fb", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://gapradev.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey08761697965?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "04fe76a1-e261-4a62-aabb-6713f571b879" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "d921df1d-401e-0028-08b3-a3f393000000", + "Date" : "Mon, 25 Nov 2019 17:09:45 GMT", + "x-ms-client-request-id" : "04fe76a1-e261-4a62-aabb-6713f571b879" + }, + "Exception" : null + } ], + "variables" : [ "jtcblobsasimplutilstringtosignuserdelegationkey08761697965", "javablobblobsasimplutilstringtosignuserdelegationkey18532120" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosignuserdelegationkey[1].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosignuserdelegationkey[1].json new file mode 100644 index 000000000000..96d5021204a4 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosignuserdelegationkey[1].json @@ -0,0 +1,90 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://gapradev.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey076590ba3a2?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "e2e8c27c-3861-4978-9aeb-5621a9f15bb9" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D771CA428CE51F", + "Last-Modified" : "Mon, 25 Nov 2019 17:09:41 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "329a25e2-a01e-0020-2eb3-a3e99c000000", + "Date" : "Mon, 25 Nov 2019 17:09:40 GMT", + "x-ms-client-request-id" : "e2e8c27c-3861-4978-9aeb-5621a9f15bb9" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gapradev.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey076590ba3a2/javablobblobsasimplutilstringtosignuserdelegationkey14828914", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "4da07904-c3da-4c0e-a30d-e07db571ea0f", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "Last-Modified" : "Mon, 25 Nov 2019 17:09:41 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Mon, 25 Nov 2019 17:09:40 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D771CA4299F510", + "Content-Length" : "0", + "x-ms-request-id" : "d921de87-401e-0028-7bb3-a3f393000000", + "x-ms-client-request-id" : "4da07904-c3da-4c0e-a30d-e07db571ea0f" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://gapradev.blob.core.windows.net?prefix=jtcblobsasimplutilstringtosignuserdelegationkey&comp=list", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "cfda1de5-59f6-4938-815b-c60e35dca2e8" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "329a25e6-a01e-0020-31b3-a3e99c000000", + "Body" : "jtcblobsasimplutilstringtosignuserdelegationkeyjtcblobsasimplutilstringtosignuserdelegationkey076590ba3a2Mon, 25 Nov 2019 17:09:41 GMT\"0x8D771CA428CE51F\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 25 Nov 2019 17:09:40 GMT", + "x-ms-client-request-id" : "cfda1de5-59f6-4938-815b-c60e35dca2e8", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://gapradev.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey076590ba3a2?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "bd56ebd5-40ab-444a-a2ae-b76993391517" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "d921de8a-401e-0028-7eb3-a3f393000000", + "Date" : "Mon, 25 Nov 2019 17:09:40 GMT", + "x-ms-client-request-id" : "bd56ebd5-40ab-444a-a2ae-b76993391517" + }, + "Exception" : null + } ], + "variables" : [ "jtcblobsasimplutilstringtosignuserdelegationkey076590ba3a2", "javablobblobsasimplutilstringtosignuserdelegationkey14828914" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosignuserdelegationkey[2].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosignuserdelegationkey[2].json new file mode 100644 index 000000000000..c298fa0f3b80 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosignuserdelegationkey[2].json @@ -0,0 +1,90 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://gapradev.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey025795e26ed?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "7103f67b-3a77-47a0-ab28-18ab0fef0e92" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D771CA42C0AB52", + "Last-Modified" : "Mon, 25 Nov 2019 17:09:41 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "329a25e7-a01e-0020-32b3-a3e99c000000", + "Date" : "Mon, 25 Nov 2019 17:09:41 GMT", + "x-ms-client-request-id" : "7103f67b-3a77-47a0-ab28-18ab0fef0e92" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gapradev.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey025795e26ed/javablobblobsasimplutilstringtosignuserdelegationkey13714371", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "e71c0ff3-8ab5-4147-b8c0-9f3fbc123e14", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "Last-Modified" : "Mon, 25 Nov 2019 17:09:41 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Mon, 25 Nov 2019 17:09:41 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D771CA42CD87F5", + "Content-Length" : "0", + "x-ms-request-id" : "d921de91-401e-0028-05b3-a3f393000000", + "x-ms-client-request-id" : "e71c0ff3-8ab5-4147-b8c0-9f3fbc123e14" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://gapradev.blob.core.windows.net?prefix=jtcblobsasimplutilstringtosignuserdelegationkey&comp=list", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "cd9d80cf-5f7d-47ac-8fc6-13a75ec2eac1" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "329a25eb-a01e-0020-35b3-a3e99c000000", + "Body" : "jtcblobsasimplutilstringtosignuserdelegationkeyjtcblobsasimplutilstringtosignuserdelegationkey025795e26edMon, 25 Nov 2019 17:09:41 GMT\"0x8D771CA42C0AB52\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 25 Nov 2019 17:09:41 GMT", + "x-ms-client-request-id" : "cd9d80cf-5f7d-47ac-8fc6-13a75ec2eac1", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://gapradev.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey025795e26ed?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "beff9c5a-99a9-4e9b-a278-216d4e98a20a" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "d921de92-401e-0028-06b3-a3f393000000", + "Date" : "Mon, 25 Nov 2019 17:09:41 GMT", + "x-ms-client-request-id" : "beff9c5a-99a9-4e9b-a278-216d4e98a20a" + }, + "Exception" : null + } ], + "variables" : [ "jtcblobsasimplutilstringtosignuserdelegationkey025795e26ed", "javablobblobsasimplutilstringtosignuserdelegationkey13714371" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosignuserdelegationkey[3].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosignuserdelegationkey[3].json new file mode 100644 index 000000000000..077c257e7a6a --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosignuserdelegationkey[3].json @@ -0,0 +1,90 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://gapradev.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey02017629dee?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "c7eafce6-9e33-419a-b024-7e3d664ef873" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D771CA42FCD7C1", + "Last-Modified" : "Mon, 25 Nov 2019 17:09:41 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "329a25ef-a01e-0020-39b3-a3e99c000000", + "Date" : "Mon, 25 Nov 2019 17:09:41 GMT", + "x-ms-client-request-id" : "c7eafce6-9e33-419a-b024-7e3d664ef873" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gapradev.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey02017629dee/javablobblobsasimplutilstringtosignuserdelegationkey1487395a", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "fcf0088c-bc82-4b4f-b863-7abd2ff52a22", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "Last-Modified" : "Mon, 25 Nov 2019 17:09:41 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Mon, 25 Nov 2019 17:09:41 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D771CA430A1DB3", + "Content-Length" : "0", + "x-ms-request-id" : "d921de99-401e-0028-0cb3-a3f393000000", + "x-ms-client-request-id" : "fcf0088c-bc82-4b4f-b863-7abd2ff52a22" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://gapradev.blob.core.windows.net?prefix=jtcblobsasimplutilstringtosignuserdelegationkey&comp=list", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "444e0192-6069-4832-862d-81f4f040601a" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "329a25f5-a01e-0020-3eb3-a3e99c000000", + "Body" : "jtcblobsasimplutilstringtosignuserdelegationkeyjtcblobsasimplutilstringtosignuserdelegationkey02017629deeMon, 25 Nov 2019 17:09:41 GMT\"0x8D771CA42FCD7C1\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 25 Nov 2019 17:09:41 GMT", + "x-ms-client-request-id" : "444e0192-6069-4832-862d-81f4f040601a", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://gapradev.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey02017629dee?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "62c90758-67a0-45c4-89c4-5614d6853ec6" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "d921dea2-401e-0028-14b3-a3f393000000", + "Date" : "Mon, 25 Nov 2019 17:09:41 GMT", + "x-ms-client-request-id" : "62c90758-67a0-45c4-89c4-5614d6853ec6" + }, + "Exception" : null + } ], + "variables" : [ "jtcblobsasimplutilstringtosignuserdelegationkey02017629dee", "javablobblobsasimplutilstringtosignuserdelegationkey1487395a" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosignuserdelegationkey[4].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosignuserdelegationkey[4].json new file mode 100644 index 000000000000..83bffc113e07 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosignuserdelegationkey[4].json @@ -0,0 +1,90 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://gapradev.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey02473993d39?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "2f7cb5d5-08f6-4a0f-a233-56b88bad837e" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D771CA4332E9E3", + "Last-Modified" : "Mon, 25 Nov 2019 17:09:42 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "329a25f8-a01e-0020-41b3-a3e99c000000", + "Date" : "Mon, 25 Nov 2019 17:09:41 GMT", + "x-ms-client-request-id" : "2f7cb5d5-08f6-4a0f-a233-56b88bad837e" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gapradev.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey02473993d39/javablobblobsasimplutilstringtosignuserdelegationkey12957369", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "bdda2274-cc6e-4928-a0bf-8c965996888e", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "Last-Modified" : "Mon, 25 Nov 2019 17:09:42 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Mon, 25 Nov 2019 17:09:41 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D771CA434724D2", + "Content-Length" : "0", + "x-ms-request-id" : "d921deaa-401e-0028-1bb3-a3f393000000", + "x-ms-client-request-id" : "bdda2274-cc6e-4928-a0bf-8c965996888e" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://gapradev.blob.core.windows.net?prefix=jtcblobsasimplutilstringtosignuserdelegationkey&comp=list", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "55a8a088-e0d0-4abf-9394-a22c5335a534" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "329a25fc-a01e-0020-44b3-a3e99c000000", + "Body" : "jtcblobsasimplutilstringtosignuserdelegationkeyjtcblobsasimplutilstringtosignuserdelegationkey02473993d39Mon, 25 Nov 2019 17:09:42 GMT\"0x8D771CA4332E9E3\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 25 Nov 2019 17:09:41 GMT", + "x-ms-client-request-id" : "55a8a088-e0d0-4abf-9394-a22c5335a534", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://gapradev.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey02473993d39?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "34cdc826-6bf8-41d6-a701-6e87c0448899" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "d921deb1-401e-0028-22b3-a3f393000000", + "Date" : "Mon, 25 Nov 2019 17:09:42 GMT", + "x-ms-client-request-id" : "34cdc826-6bf8-41d6-a701-6e87c0448899" + }, + "Exception" : null + } ], + "variables" : [ "jtcblobsasimplutilstringtosignuserdelegationkey02473993d39", "javablobblobsasimplutilstringtosignuserdelegationkey12957369" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosignuserdelegationkey[5].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosignuserdelegationkey[5].json new file mode 100644 index 000000000000..c608e28d7826 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosignuserdelegationkey[5].json @@ -0,0 +1,90 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://gapradev.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey063410f139f?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "588641a6-3e27-46ba-91b5-f9b352b76400" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D771CA436E9FA5", + "Last-Modified" : "Mon, 25 Nov 2019 17:09:42 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "329a25ff-a01e-0020-47b3-a3e99c000000", + "Date" : "Mon, 25 Nov 2019 17:09:42 GMT", + "x-ms-client-request-id" : "588641a6-3e27-46ba-91b5-f9b352b76400" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gapradev.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey063410f139f/javablobblobsasimplutilstringtosignuserdelegationkey15231708", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "5e000009-d9b0-4e67-84a4-8d742f037b38", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "Last-Modified" : "Mon, 25 Nov 2019 17:09:42 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Mon, 25 Nov 2019 17:09:42 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D771CA437B7B4A", + "Content-Length" : "0", + "x-ms-request-id" : "d921deba-401e-0028-2bb3-a3f393000000", + "x-ms-client-request-id" : "5e000009-d9b0-4e67-84a4-8d742f037b38" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://gapradev.blob.core.windows.net?prefix=jtcblobsasimplutilstringtosignuserdelegationkey&comp=list", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "7679cfa3-3008-4b68-ae82-50b611604580" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "329a2605-a01e-0020-4ab3-a3e99c000000", + "Body" : "jtcblobsasimplutilstringtosignuserdelegationkeyjtcblobsasimplutilstringtosignuserdelegationkey063410f139fMon, 25 Nov 2019 17:09:42 GMT\"0x8D771CA436E9FA5\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 25 Nov 2019 17:09:42 GMT", + "x-ms-client-request-id" : "7679cfa3-3008-4b68-ae82-50b611604580", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://gapradev.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey063410f139f?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "be4c4b26-f15b-4237-86b1-420aadd1cb2b" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "d921dec1-401e-0028-31b3-a3f393000000", + "Date" : "Mon, 25 Nov 2019 17:09:42 GMT", + "x-ms-client-request-id" : "be4c4b26-f15b-4237-86b1-420aadd1cb2b" + }, + "Exception" : null + } ], + "variables" : [ "jtcblobsasimplutilstringtosignuserdelegationkey063410f139f", "javablobblobsasimplutilstringtosignuserdelegationkey15231708" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosignuserdelegationkey[6].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosignuserdelegationkey[6].json new file mode 100644 index 000000000000..11e44901c188 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosignuserdelegationkey[6].json @@ -0,0 +1,90 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://gapradev.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey029045b1b81?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "51dcda44-364e-400f-a969-120bcf6d6d7f" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D771CA43A39E85", + "Last-Modified" : "Mon, 25 Nov 2019 17:09:42 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "329a2607-a01e-0020-4cb3-a3e99c000000", + "Date" : "Mon, 25 Nov 2019 17:09:42 GMT", + "x-ms-client-request-id" : "51dcda44-364e-400f-a969-120bcf6d6d7f" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gapradev.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey029045b1b81/javablobblobsasimplutilstringtosignuserdelegationkey19564401", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "fedae4f4-3ada-4bd6-8043-0080f6587597", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "Last-Modified" : "Mon, 25 Nov 2019 17:09:42 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Mon, 25 Nov 2019 17:09:42 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D771CA43B13130", + "Content-Length" : "0", + "x-ms-request-id" : "d921dec9-401e-0028-38b3-a3f393000000", + "x-ms-client-request-id" : "fedae4f4-3ada-4bd6-8043-0080f6587597" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://gapradev.blob.core.windows.net?prefix=jtcblobsasimplutilstringtosignuserdelegationkey&comp=list", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "413f7f34-ffb9-4f4d-9c13-9d6ebea3dc44" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "329a260c-a01e-0020-50b3-a3e99c000000", + "Body" : "jtcblobsasimplutilstringtosignuserdelegationkeyjtcblobsasimplutilstringtosignuserdelegationkey029045b1b81Mon, 25 Nov 2019 17:09:42 GMT\"0x8D771CA43A39E85\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 25 Nov 2019 17:09:42 GMT", + "x-ms-client-request-id" : "413f7f34-ffb9-4f4d-9c13-9d6ebea3dc44", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://gapradev.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey029045b1b81?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "f27c654c-e491-44f2-9eb1-79dd86dfaf7d" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "d921dece-401e-0028-3db3-a3f393000000", + "Date" : "Mon, 25 Nov 2019 17:09:42 GMT", + "x-ms-client-request-id" : "f27c654c-e491-44f2-9eb1-79dd86dfaf7d" + }, + "Exception" : null + } ], + "variables" : [ "jtcblobsasimplutilstringtosignuserdelegationkey029045b1b81", "javablobblobsasimplutilstringtosignuserdelegationkey19564401" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosignuserdelegationkey[7].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosignuserdelegationkey[7].json new file mode 100644 index 000000000000..4cbeb8bf3e1b --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosignuserdelegationkey[7].json @@ -0,0 +1,90 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://gapradev.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey05135850d25?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "e9346af3-28e3-463d-a749-4f1f69bcf7df" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D771CA43D8C749", + "Last-Modified" : "Mon, 25 Nov 2019 17:09:43 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "329a2610-a01e-0020-54b3-a3e99c000000", + "Date" : "Mon, 25 Nov 2019 17:09:42 GMT", + "x-ms-client-request-id" : "e9346af3-28e3-463d-a749-4f1f69bcf7df" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gapradev.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey05135850d25/javablobblobsasimplutilstringtosignuserdelegationkey1064067d", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "4cc00dcd-2048-4bb5-89f1-cc25455ebac0", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "Last-Modified" : "Mon, 25 Nov 2019 17:09:43 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Mon, 25 Nov 2019 17:09:42 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D771CA43E5FCDD", + "Content-Length" : "0", + "x-ms-request-id" : "d921ded2-401e-0028-41b3-a3f393000000", + "x-ms-client-request-id" : "4cc00dcd-2048-4bb5-89f1-cc25455ebac0" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://gapradev.blob.core.windows.net?prefix=jtcblobsasimplutilstringtosignuserdelegationkey&comp=list", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "a70d7206-8a61-44ab-be99-94e595a86415" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "329a2615-a01e-0020-58b3-a3e99c000000", + "Body" : "jtcblobsasimplutilstringtosignuserdelegationkeyjtcblobsasimplutilstringtosignuserdelegationkey05135850d25Mon, 25 Nov 2019 17:09:43 GMT\"0x8D771CA43D8C749\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 25 Nov 2019 17:09:42 GMT", + "x-ms-client-request-id" : "a70d7206-8a61-44ab-be99-94e595a86415", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://gapradev.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey05135850d25?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "1960b173-a6a6-4b08-8369-f74dea612dd1" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "d921ded9-401e-0028-48b3-a3f393000000", + "Date" : "Mon, 25 Nov 2019 17:09:43 GMT", + "x-ms-client-request-id" : "1960b173-a6a6-4b08-8369-f74dea612dd1" + }, + "Exception" : null + } ], + "variables" : [ "jtcblobsasimplutilstringtosignuserdelegationkey05135850d25", "javablobblobsasimplutilstringtosignuserdelegationkey1064067d" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosignuserdelegationkey[8].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosignuserdelegationkey[8].json new file mode 100644 index 000000000000..8b9b91e65748 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosignuserdelegationkey[8].json @@ -0,0 +1,90 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://gapradev.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey062690f6788?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "1b7b4e56-245a-4cef-83fd-5dafa0db0a5c" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D771CA440D2856", + "Last-Modified" : "Mon, 25 Nov 2019 17:09:43 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "329a2619-a01e-0020-5bb3-a3e99c000000", + "Date" : "Mon, 25 Nov 2019 17:09:43 GMT", + "x-ms-client-request-id" : "1b7b4e56-245a-4cef-83fd-5dafa0db0a5c" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gapradev.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey062690f6788/javablobblobsasimplutilstringtosignuserdelegationkey1301424f", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "35067472-55ca-46f3-a672-7b65065a6465", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "Last-Modified" : "Mon, 25 Nov 2019 17:09:43 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Mon, 25 Nov 2019 17:09:43 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D771CA4419DE5A", + "Content-Length" : "0", + "x-ms-request-id" : "d921dee0-401e-0028-4fb3-a3f393000000", + "x-ms-client-request-id" : "35067472-55ca-46f3-a672-7b65065a6465" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://gapradev.blob.core.windows.net?prefix=jtcblobsasimplutilstringtosignuserdelegationkey&comp=list", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "37a8d9b4-ae37-4e62-8c68-eadec0481be6" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "329a2621-a01e-0020-62b3-a3e99c000000", + "Body" : "jtcblobsasimplutilstringtosignuserdelegationkeyjtcblobsasimplutilstringtosignuserdelegationkey062690f6788Mon, 25 Nov 2019 17:09:43 GMT\"0x8D771CA440D2856\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 25 Nov 2019 17:09:43 GMT", + "x-ms-client-request-id" : "37a8d9b4-ae37-4e62-8c68-eadec0481be6", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://gapradev.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey062690f6788?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "d52840a9-fb7e-4fe0-8d82-dcab473ff939" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "d921dee3-401e-0028-52b3-a3f393000000", + "Date" : "Mon, 25 Nov 2019 17:09:43 GMT", + "x-ms-client-request-id" : "d52840a9-fb7e-4fe0-8d82-dcab473ff939" + }, + "Exception" : null + } ], + "variables" : [ "jtcblobsasimplutilstringtosignuserdelegationkey062690f6788", "javablobblobsasimplutilstringtosignuserdelegationkey1301424f" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosignuserdelegationkey[9].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosignuserdelegationkey[9].json new file mode 100644 index 000000000000..85080524a4f8 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobsasimplutilstringtosignuserdelegationkey[9].json @@ -0,0 +1,90 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://gapradev.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey08747327bcc?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "b6150a2b-88ba-482e-8933-2989533a206c" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D771CA4440C76C", + "Last-Modified" : "Mon, 25 Nov 2019 17:09:43 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "329a2627-a01e-0020-68b3-a3e99c000000", + "Date" : "Mon, 25 Nov 2019 17:09:43 GMT", + "x-ms-client-request-id" : "b6150a2b-88ba-482e-8933-2989533a206c" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gapradev.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey08747327bcc/javablobblobsasimplutilstringtosignuserdelegationkey1203842b", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "4f747b0f-dd88-4121-8790-c525adb922f9", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "Last-Modified" : "Mon, 25 Nov 2019 17:09:43 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Mon, 25 Nov 2019 17:09:43 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D771CA444D71D3", + "Content-Length" : "0", + "x-ms-request-id" : "d921dee4-401e-0028-53b3-a3f393000000", + "x-ms-client-request-id" : "4f747b0f-dd88-4121-8790-c525adb922f9" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://gapradev.blob.core.windows.net?prefix=jtcblobsasimplutilstringtosignuserdelegationkey&comp=list", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "10d5415a-9a2d-47cd-a017-05d21bc44861" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "329a2630-a01e-0020-6fb3-a3e99c000000", + "Body" : "jtcblobsasimplutilstringtosignuserdelegationkeyjtcblobsasimplutilstringtosignuserdelegationkey08747327bccMon, 25 Nov 2019 17:09:43 GMT\"0x8D771CA4440C76C\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 25 Nov 2019 17:09:43 GMT", + "x-ms-client-request-id" : "10d5415a-9a2d-47cd-a017-05d21bc44861", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://gapradev.blob.core.windows.net/jtcblobsasimplutilstringtosignuserdelegationkey08747327bcc?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "9eb6bb8d-5bae-457d-9368-5c6739e02ae3" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "d921dee8-401e-0028-57b3-a3f393000000", + "Date" : "Mon, 25 Nov 2019 17:09:43 GMT", + "x-ms-client-request-id" : "9eb6bb8d-5bae-457d-9368-5c6739e02ae3" + }, + "Exception" : null + } ], + "variables" : [ "jtcblobsasimplutilstringtosignuserdelegationkey08747327bcc", "javablobblobsasimplutilstringtosignuserdelegationkey1203842b" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobservicesasnetworktestblobsnapshot.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobservicesasnetworktestblobsnapshot.json new file mode 100644 index 000000000000..9ad3b844f492 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsblobservicesasnetworktestblobsnapshot.json @@ -0,0 +1,197 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://gapradev.blob.core.windows.net/jtcblobservicesasnetworktestblobsnapshot057825a9fde690?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "1f44cfe0-ab8a-4c8d-b597-1056ab533f7c" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D771CA3C8E00AF", + "Last-Modified" : "Mon, 25 Nov 2019 17:09:30 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "329a24b1-a01e-0020-3db3-a3e99c000000", + "Date" : "Mon, 25 Nov 2019 17:09:30 GMT", + "x-ms-client-request-id" : "1f44cfe0-ab8a-4c8d-b597-1056ab533f7c" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gapradev.blob.core.windows.net/jtcblobservicesasnetworktestblobsnapshot057825a9fde690/javablobblobservicesasnetworktestblobsnapshot136413f6bd2f", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "4f682785-9445-4a1b-a2e8-ab520f9737d5", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "Last-Modified" : "Mon, 25 Nov 2019 17:09:31 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Mon, 25 Nov 2019 17:09:30 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D771CA3C9AEB92", + "Content-Length" : "0", + "x-ms-request-id" : "d921dd27-401e-0028-44b3-a3f393000000", + "x-ms-client-request-id" : "4f682785-9445-4a1b-a2e8-ab520f9737d5" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gapradev.blob.core.windows.net/jtcblobservicesasnetworktestblobsnapshot057825a9fde690/javablobblobservicesasnetworktestblobsnapshot136413f6bd2f?comp=snapshot", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "c8870872-28d4-45f8-8ae0-6009013eebfb" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "x-ms-snapshot" : "2019-11-25T17:09:31.1292895Z", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D771CA3C9AEB92", + "Last-Modified" : "Mon, 25 Nov 2019 17:09:31 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "329a24bc-a01e-0020-44b3-a3e99c000000", + "x-ms-request-server-encrypted" : "false", + "Date" : "Mon, 25 Nov 2019 17:09:30 GMT", + "x-ms-client-request-id" : "c8870872-28d4-45f8-8ae0-6009013eebfb" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://gapradev.blob.core.windows.net/jtcblobservicesasnetworktestblobsnapshot057825a9fde690/javablobblobservicesasnetworktestblobsnapshot136413f6bd2f?sv=2019-02-02&spr=https%2Chttp&st=2019-11-24T17%3A09%3A31Z&se=2019-11-26T17%3A09%3A31Z&sip=0.0.0.0-255.255.255.255&sr=bs&sp=racwd&sig=REDACTED&rscc=cache&rscd=disposition&rsce=encoding&rscl=language&rsct=type", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "171103a0-02b8-4b2b-8188-de23e67beab2" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "AuthenticationFailed", + "retry-after" : "0", + "Content-Length" : "447", + "StatusCode" : "403", + "x-ms-request-id" : "d921dd2f-401e-0028-4bb3-a3f393000000", + "Body" : "AuthenticationFailedServer failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature.\nRequestId:d921dd2f-401e-0028-4bb3-a3f393000000\nTime:2019-11-25T17:09:31.2147725ZThe specified signed resource is not allowed for the this resource level", + "Date" : "Mon, 25 Nov 2019 17:09:30 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://gapradev.blob.core.windows.net/jtcblobservicesasnetworktestblobsnapshot057825a9fde690/javablobblobservicesasnetworktestblobsnapshot136413f6bd2f?snapshot=2019-11-25T17%3a09%3a31.1292895Z&sv=2019-02-02&spr=https%2Chttp&st=2019-11-24T17%3A09%3A31Z&se=2019-11-26T17%3A09%3A31Z&sip=0.0.0.0-255.255.255.255&sr=bs&sp=racwd&sig=REDACTED&rscc=cache&rscd=disposition&rsce=encoding&rscl=language&rsct=type", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "acdff660-793e-45f4-b116-9deb5acab1d3" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "Last-Modified" : "Mon, 25 Nov 2019 17:09:31 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Mon, 25 Nov 2019 17:09:30 GMT", + "x-ms-blob-type" : "BlockBlob", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "Accept-Ranges" : "bytes", + "x-ms-server-encrypted" : "true", + "Cache-Control" : "cache", + "ETag" : "0x8D771CA3C9AEB92", + "Content-Disposition" : "disposition", + "x-ms-creation-time" : "Mon, 25 Nov 2019 17:09:31 GMT", + "Content-Length" : "7", + "x-ms-request-id" : "329a24c3-a01e-0020-47b3-a3e99c000000", + "Body" : "default", + "x-ms-client-request-id" : "acdff660-793e-45f4-b116-9deb5acab1d3", + "Content-Language" : "language", + "Content-Type" : "type" + }, + "Exception" : null + }, { + "Method" : "HEAD", + "Uri" : "https://gapradev.blob.core.windows.net/jtcblobservicesasnetworktestblobsnapshot057825a9fde690/javablobblobservicesasnetworktestblobsnapshot136413f6bd2f?snapshot=2019-11-25T17%3a09%3a31.1292895Z&sv=2019-02-02&spr=https%2Chttp&st=2019-11-24T17%3A09%3A31Z&se=2019-11-26T17%3A09%3A31Z&sip=0.0.0.0-255.255.255.255&sr=bs&sp=racwd&sig=REDACTED&rscc=cache&rscd=disposition&rsce=encoding&rscl=language&rsct=type", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "08758b9e-a78e-42d6-9962-b47a8b017b7c" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "Last-Modified" : "Mon, 25 Nov 2019 17:09:31 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Mon, 25 Nov 2019 17:09:30 GMT", + "x-ms-blob-type" : "BlockBlob", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "Accept-Ranges" : "bytes", + "x-ms-server-encrypted" : "true", + "x-ms-access-tier-inferred" : "true", + "x-ms-access-tier" : "Hot", + "Cache-Control" : "cache", + "ETag" : "0x8D771CA3C9AEB92", + "Content-Disposition" : "disposition", + "Content-Encoding" : "encoding", + "x-ms-creation-time" : "Mon, 25 Nov 2019 17:09:31 GMT", + "Content-Length" : "7", + "x-ms-request-id" : "d921dd37-401e-0028-53b3-a3f393000000", + "x-ms-client-request-id" : "08758b9e-a78e-42d6-9962-b47a8b017b7c", + "Content-Language" : "language", + "Content-Type" : "type" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://gapradev.blob.core.windows.net?prefix=jtcblobservicesasnetworktestblobsnapshot&comp=list", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "9470105e-7885-4f46-812f-51b073db267a" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "329a24c4-a01e-0020-48b3-a3e99c000000", + "Body" : "jtcblobservicesasnetworktestblobsnapshotjtcblobservicesasnetworktestblobsnapshot057825a9fde690Mon, 25 Nov 2019 17:09:30 GMT\"0x8D771CA3C8E00AF\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 25 Nov 2019 17:09:30 GMT", + "x-ms-client-request-id" : "9470105e-7885-4f46-812f-51b073db267a", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://gapradev.blob.core.windows.net/jtcblobservicesasnetworktestblobsnapshot057825a9fde690?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "75a8ba08-34bd-4e3d-9cac-1c64ea4c3a3c" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "d921dd44-401e-0028-5db3-a3f393000000", + "Date" : "Mon, 25 Nov 2019 17:09:30 GMT", + "x-ms-client-request-id" : "75a8ba08-34bd-4e3d-9cac-1c64ea4c3a3c" + }, + "Exception" : null + } ], + "variables" : [ "jtcblobservicesasnetworktestblobsnapshot057825a9fde690", "javablobblobservicesasnetworktestblobsnapshot136413f6bd2f", "2019-11-25T17:09:31.104721500Z", "2019-11-25T17:09:31.104721500Z" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsensurestateillegalargument.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsensurestateillegalargument.json new file mode 100644 index 000000000000..597a5de858bc --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsensurestateillegalargument.json @@ -0,0 +1,90 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://gapradev.blob.core.windows.net/jtcensurestateillegalargument079451bb4ed7a903b84a?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "1c829f9c-6441-4ffe-abb5-089597b1b5f1" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D771CA3F6F36E1", + "Last-Modified" : "Mon, 25 Nov 2019 17:09:35 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "329a2538-a01e-0020-20b3-a3e99c000000", + "Date" : "Mon, 25 Nov 2019 17:09:35 GMT", + "x-ms-client-request-id" : "1c829f9c-6441-4ffe-abb5-089597b1b5f1" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gapradev.blob.core.windows.net/jtcensurestateillegalargument079451bb4ed7a903b84a/javablobensurestateillegalargument1735024ef73b455fa", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "5966c7ad-6979-488e-9423-f464a2492962", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "Last-Modified" : "Mon, 25 Nov 2019 17:09:35 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Mon, 25 Nov 2019 17:09:35 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D771CA3F7C3A0F", + "Content-Length" : "0", + "x-ms-request-id" : "d921dde0-401e-0028-63b3-a3f393000000", + "x-ms-client-request-id" : "5966c7ad-6979-488e-9423-f464a2492962" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://gapradev.blob.core.windows.net?prefix=jtcensurestateillegalargument&comp=list", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "a42eedd9-5026-415a-b105-bf33f01f3d5a" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "329a253a-a01e-0020-21b3-a3e99c000000", + "Body" : "jtcensurestateillegalargumentjtcensurestateillegalargument079451bb4ed7a903b84aMon, 25 Nov 2019 17:09:35 GMT\"0x8D771CA3F6F36E1\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 25 Nov 2019 17:09:35 GMT", + "x-ms-client-request-id" : "a42eedd9-5026-415a-b105-bf33f01f3d5a", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://gapradev.blob.core.windows.net/jtcensurestateillegalargument079451bb4ed7a903b84a?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "a2958187-6472-4e14-9053-9992d83790dd" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "d921dde3-401e-0028-66b3-a3f393000000", + "Date" : "Mon, 25 Nov 2019 17:09:35 GMT", + "x-ms-client-request-id" : "a2958187-6472-4e14-9053-9992d83790dd" + }, + "Exception" : null + } ], + "variables" : [ "jtcensurestateillegalargument079451bb4ed7a903b84a", "javablobensurestateillegalargument1735024ef73b455fa" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsensurestateresourceandpermission[0].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsensurestateresourceandpermission[0].json new file mode 100644 index 000000000000..4be15ef72253 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsensurestateresourceandpermission[0].json @@ -0,0 +1,90 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://gapradev.blob.core.windows.net/jtcensurestateresourceandpermission044225f9396c21d36?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "841416d0-62a4-4995-bc4f-d0b429e8525b" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D771CA3FA56F75", + "Last-Modified" : "Mon, 25 Nov 2019 17:09:36 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "329a2546-a01e-0020-2ab3-a3e99c000000", + "Date" : "Mon, 25 Nov 2019 17:09:35 GMT", + "x-ms-client-request-id" : "841416d0-62a4-4995-bc4f-d0b429e8525b" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gapradev.blob.core.windows.net/jtcensurestateresourceandpermission044225f9396c21d36/javablobensurestateresourceandpermission19187238b020bb", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "1df17c3d-27b1-4e78-bf4b-9d688c900d95", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "Last-Modified" : "Mon, 25 Nov 2019 17:09:36 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Mon, 25 Nov 2019 17:09:36 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D771CA3FB23DF3", + "Content-Length" : "0", + "x-ms-request-id" : "d921dde9-401e-0028-6cb3-a3f393000000", + "x-ms-client-request-id" : "1df17c3d-27b1-4e78-bf4b-9d688c900d95" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://gapradev.blob.core.windows.net?prefix=jtcensurestateresourceandpermission&comp=list", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "e4b1464c-d4f6-4ab7-918b-2f3a28da8ced" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "329a2549-a01e-0020-2cb3-a3e99c000000", + "Body" : "jtcensurestateresourceandpermissionjtcensurestateresourceandpermission044225f9396c21d36Mon, 25 Nov 2019 17:09:36 GMT\"0x8D771CA3FA56F75\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 25 Nov 2019 17:09:36 GMT", + "x-ms-client-request-id" : "e4b1464c-d4f6-4ab7-918b-2f3a28da8ced", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://gapradev.blob.core.windows.net/jtcensurestateresourceandpermission044225f9396c21d36?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "2828ab16-2b9f-44ce-8dd9-a96b66ee39ff" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "d921ddeb-401e-0028-6eb3-a3f393000000", + "Date" : "Mon, 25 Nov 2019 17:09:36 GMT", + "x-ms-client-request-id" : "2828ab16-2b9f-44ce-8dd9-a96b66ee39ff" + }, + "Exception" : null + } ], + "variables" : [ "jtcensurestateresourceandpermission044225f9396c21d36", "javablobensurestateresourceandpermission19187238b020bb" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsensurestateresourceandpermission[1].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsensurestateresourceandpermission[1].json new file mode 100644 index 000000000000..dc1fa056ca50 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsensurestateresourceandpermission[1].json @@ -0,0 +1,90 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://gapradev.blob.core.windows.net/jtcensurestateresourceandpermission067424a73973c26da?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "1f73436c-0907-4d87-b210-c7a49431fe85" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D771CA3FD90C4B", + "Last-Modified" : "Mon, 25 Nov 2019 17:09:36 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "329a2550-a01e-0020-31b3-a3e99c000000", + "Date" : "Mon, 25 Nov 2019 17:09:36 GMT", + "x-ms-client-request-id" : "1f73436c-0907-4d87-b210-c7a49431fe85" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gapradev.blob.core.windows.net/jtcensurestateresourceandpermission067424a73973c26da/javablobensurestateresourceandpermission162311a8707d07", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "c3c3191d-b7e1-47db-95d8-5452fadf39f6", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "Last-Modified" : "Mon, 25 Nov 2019 17:09:36 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Mon, 25 Nov 2019 17:09:36 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D771CA3FE5F812", + "Content-Length" : "0", + "x-ms-request-id" : "d921ddef-401e-0028-72b3-a3f393000000", + "x-ms-client-request-id" : "c3c3191d-b7e1-47db-95d8-5452fadf39f6" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://gapradev.blob.core.windows.net?prefix=jtcensurestateresourceandpermission&comp=list", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "1126774b-1c92-4126-934e-1c03315d7c6c" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "329a2554-a01e-0020-34b3-a3e99c000000", + "Body" : "jtcensurestateresourceandpermissionjtcensurestateresourceandpermission067424a73973c26daMon, 25 Nov 2019 17:09:36 GMT\"0x8D771CA3FD90C4B\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 25 Nov 2019 17:09:36 GMT", + "x-ms-client-request-id" : "1126774b-1c92-4126-934e-1c03315d7c6c", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://gapradev.blob.core.windows.net/jtcensurestateresourceandpermission067424a73973c26da?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "ac57f5c2-423d-4eb2-97d8-4ec29758137d" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "d921ddf4-401e-0028-76b3-a3f393000000", + "Date" : "Mon, 25 Nov 2019 17:09:36 GMT", + "x-ms-client-request-id" : "ac57f5c2-423d-4eb2-97d8-4ec29758137d" + }, + "Exception" : null + } ], + "variables" : [ "jtcensurestateresourceandpermission067424a73973c26da", "javablobensurestateresourceandpermission162311a8707d07" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsensurestateresourceandpermission[2].json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsensurestateresourceandpermission[2].json new file mode 100644 index 000000000000..82952fb9ad4b --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsensurestateresourceandpermission[2].json @@ -0,0 +1,90 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://gapradev.blob.core.windows.net/jtcensurestateresourceandpermission007063c512bf3c775?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "5a3fb7d4-b1f0-49d8-901e-64ecef188895" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D771CA400D95C5", + "Last-Modified" : "Mon, 25 Nov 2019 17:09:36 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "329a2558-a01e-0020-37b3-a3e99c000000", + "Date" : "Mon, 25 Nov 2019 17:09:36 GMT", + "x-ms-client-request-id" : "5a3fb7d4-b1f0-49d8-901e-64ecef188895" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gapradev.blob.core.windows.net/jtcensurestateresourceandpermission007063c512bf3c775/javablobensurestateresourceandpermission186155a746a144", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "c8486568-bb4c-452a-b044-8619e01d0395", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "Last-Modified" : "Mon, 25 Nov 2019 17:09:36 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Mon, 25 Nov 2019 17:09:36 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D771CA401AEB2B", + "Content-Length" : "0", + "x-ms-request-id" : "d921ddfc-401e-0028-7db3-a3f393000000", + "x-ms-client-request-id" : "c8486568-bb4c-452a-b044-8619e01d0395" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://gapradev.blob.core.windows.net?prefix=jtcensurestateresourceandpermission&comp=list", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "161e87f7-ac8e-4bf1-9dfb-404a81fc2fb9" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "329a255c-a01e-0020-3ab3-a3e99c000000", + "Body" : "jtcensurestateresourceandpermissionjtcensurestateresourceandpermission007063c512bf3c775Mon, 25 Nov 2019 17:09:36 GMT\"0x8D771CA400D95C5\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 25 Nov 2019 17:09:36 GMT", + "x-ms-client-request-id" : "161e87f7-ac8e-4bf1-9dfb-404a81fc2fb9", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://gapradev.blob.core.windows.net/jtcensurestateresourceandpermission007063c512bf3c775?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "92c86545-8830-4904-8ec1-11b3cbd93f10" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "d921de03-401e-0028-04b3-a3f393000000", + "Date" : "Mon, 25 Nov 2019 17:09:36 GMT", + "x-ms-client-request-id" : "92c86545-8830-4904-8ec1-11b3cbd93f10" + }, + "Exception" : null + } ], + "variables" : [ "jtcensurestateresourceandpermission007063c512bf3c775", "javablobensurestateresourceandpermission186155a746a144" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsensurestateversion.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsensurestateversion.json new file mode 100644 index 000000000000..51405130d192 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsensurestateversion.json @@ -0,0 +1,90 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://gapradev.blob.core.windows.net/jtcensurestateversion0sasclienttestsensurestateversion7ef95525?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "32b2ae0f-3b31-4b50-b3ac-b1699511af61" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D771CA3F383C56", + "Last-Modified" : "Mon, 25 Nov 2019 17:09:35 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "329a252f-a01e-0020-1ab3-a3e99c000000", + "Date" : "Mon, 25 Nov 2019 17:09:35 GMT", + "x-ms-client-request-id" : "32b2ae0f-3b31-4b50-b3ac-b1699511af61" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gapradev.blob.core.windows.net/jtcensurestateversion0sasclienttestsensurestateversion7ef95525/javablobensurestateversion1174573473b33f9153412", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "141b6a76-1c5a-4b9b-93df-653a5295b9bc", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "Last-Modified" : "Mon, 25 Nov 2019 17:09:35 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Mon, 25 Nov 2019 17:09:35 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D771CA3F45E7E2", + "Content-Length" : "0", + "x-ms-request-id" : "d921ddd9-401e-0028-5cb3-a3f393000000", + "x-ms-client-request-id" : "141b6a76-1c5a-4b9b-93df-653a5295b9bc" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://gapradev.blob.core.windows.net?prefix=jtcensurestateversion&comp=list", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "3baba14d-bbff-4dc9-ba14-186800eb83aa" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "329a2536-a01e-0020-1eb3-a3e99c000000", + "Body" : "jtcensurestateversionjtcensurestateversion0sasclienttestsensurestateversion7ef95525Mon, 25 Nov 2019 17:09:35 GMT\"0x8D771CA3F383C56\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 25 Nov 2019 17:09:35 GMT", + "x-ms-client-request-id" : "3baba14d-bbff-4dc9-ba14-186800eb83aa", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://gapradev.blob.core.windows.net/jtcensurestateversion0sasclienttestsensurestateversion7ef95525?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "7a92f80f-bbbb-4883-b79f-a8d0dbba9c03" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "d921dddd-401e-0028-60b3-a3f393000000", + "Date" : "Mon, 25 Nov 2019 17:09:35 GMT", + "x-ms-client-request-id" : "7a92f80f-bbbb-4883-b79f-a8d0dbba9c03" + }, + "Exception" : null + } ], + "variables" : [ "jtcensurestateversion0sasclienttestsensurestateversion7ef95525", "javablobensurestateversion1174573473b33f9153412" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsnetworktestblobsas.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsnetworktestblobsas.json new file mode 100644 index 000000000000..a9cd35dee6a5 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsnetworktestblobsas.json @@ -0,0 +1,158 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://gapradev.blob.core.windows.net/jtcnetworktestblobsas0sasclienttestsnetworktestblobsas20158403?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "ca96f59b-6c9c-460b-a023-8c66928ca518" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D771CA39C4C7A9", + "Last-Modified" : "Mon, 25 Nov 2019 17:09:26 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "329a23d7-a01e-0020-74b3-a3e99c000000", + "Date" : "Mon, 25 Nov 2019 17:09:25 GMT", + "x-ms-client-request-id" : "ca96f59b-6c9c-460b-a023-8c66928ca518" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gapradev.blob.core.windows.net/jtcnetworktestblobsas0sasclienttestsnetworktestblobsas20158403/javablobnetworktestblobsas169768633e6e3cc62e49b", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "b6e58c52-3095-4e76-b9fe-36dff3809899", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "Last-Modified" : "Mon, 25 Nov 2019 17:09:26 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Mon, 25 Nov 2019 17:09:25 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D771CA39E5B692", + "Content-Length" : "0", + "x-ms-request-id" : "329a23dd-a01e-0020-77b3-a3e99c000000", + "x-ms-client-request-id" : "b6e58c52-3095-4e76-b9fe-36dff3809899" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://gapradev.blob.core.windows.net/jtcnetworktestblobsas0sasclienttestsnetworktestblobsas20158403/javablobnetworktestblobsas169768633e6e3cc62e49b?sv=2019-02-02&spr=https%2Chttp&st=2019-11-24T17%3A09%3A26Z&se=2019-11-26T17%3A09%3A26Z&sip=0.0.0.0-255.255.255.255&sr=b&sp=racwd&sig=REDACTED&rscc=cache&rscd=disposition&rsce=encoding&rscl=language&rsct=type", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "30576ea7-5b42-4468-80bb-7edcf0dd033d" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "x-ms-lease-status" : "unlocked", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-lease-state" : "available", + "Last-Modified" : "Mon, 25 Nov 2019 17:09:26 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Mon, 25 Nov 2019 17:09:25 GMT", + "x-ms-blob-type" : "BlockBlob", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "Accept-Ranges" : "bytes", + "x-ms-server-encrypted" : "true", + "Cache-Control" : "cache", + "ETag" : "0x8D771CA39E5B692", + "Content-Disposition" : "disposition", + "x-ms-creation-time" : "Mon, 25 Nov 2019 17:09:26 GMT", + "Content-Length" : "7", + "x-ms-request-id" : "329a23df-a01e-0020-79b3-a3e99c000000", + "Body" : "default", + "x-ms-client-request-id" : "30576ea7-5b42-4468-80bb-7edcf0dd033d", + "Content-Language" : "language", + "Content-Type" : "type" + }, + "Exception" : null + }, { + "Method" : "HEAD", + "Uri" : "https://gapradev.blob.core.windows.net/jtcnetworktestblobsas0sasclienttestsnetworktestblobsas20158403/javablobnetworktestblobsas169768633e6e3cc62e49b?sv=2019-02-02&spr=https%2Chttp&st=2019-11-24T17%3A09%3A26Z&se=2019-11-26T17%3A09%3A26Z&sip=0.0.0.0-255.255.255.255&sr=b&sp=racwd&sig=REDACTED&rscc=cache&rscd=disposition&rsce=encoding&rscl=language&rsct=type", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "d72f4cf4-04ef-4d3f-be30-a1984f0fc437" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "x-ms-lease-status" : "unlocked", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-lease-state" : "available", + "Last-Modified" : "Mon, 25 Nov 2019 17:09:26 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Mon, 25 Nov 2019 17:09:25 GMT", + "x-ms-blob-type" : "BlockBlob", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "Accept-Ranges" : "bytes", + "x-ms-server-encrypted" : "true", + "x-ms-access-tier-inferred" : "true", + "x-ms-access-tier" : "Hot", + "Cache-Control" : "cache", + "ETag" : "0x8D771CA39E5B692", + "Content-Disposition" : "disposition", + "Content-Encoding" : "encoding", + "x-ms-creation-time" : "Mon, 25 Nov 2019 17:09:26 GMT", + "Content-Length" : "7", + "x-ms-request-id" : "329a23e1-a01e-0020-7bb3-a3e99c000000", + "x-ms-client-request-id" : "d72f4cf4-04ef-4d3f-be30-a1984f0fc437", + "Content-Language" : "language", + "Content-Type" : "type" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://gapradev.blob.core.windows.net?prefix=jtcnetworktestblobsas&comp=list", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "2b506eaa-4fb3-4f28-ba44-c737a34271b2" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "329a23e3-a01e-0020-7db3-a3e99c000000", + "Body" : "jtcnetworktestblobsasjtcnetworktestblobsas0sasclienttestsnetworktestblobsas20158403Mon, 25 Nov 2019 17:09:26 GMT\"0x8D771CA39C4C7A9\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 25 Nov 2019 17:09:26 GMT", + "x-ms-client-request-id" : "2b506eaa-4fb3-4f28-ba44-c737a34271b2", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://gapradev.blob.core.windows.net/jtcnetworktestblobsas0sasclienttestsnetworktestblobsas20158403?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "6032dbfd-d5fa-4b2f-b2f6-3029aa80f231" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "329a23e4-a01e-0020-7eb3-a3e99c000000", + "Date" : "Mon, 25 Nov 2019 17:09:26 GMT", + "x-ms-client-request-id" : "6032dbfd-d5fa-4b2f-b2f6-3029aa80f231" + }, + "Exception" : null + } ], + "variables" : [ "jtcnetworktestblobsas0sasclienttestsnetworktestblobsas20158403", "javablobnetworktestblobsas169768633e6e3cc62e49b", "2019-11-25T17:09:26.498760400Z", "2019-11-25T17:09:26.501760400Z" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsnetworktestblobsnapshot.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsnetworktestblobsnapshot.json new file mode 100644 index 000000000000..6ac33e16ac1f --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsnetworktestblobsnapshot.json @@ -0,0 +1,202 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://gapradev.blob.core.windows.net/jtcnetworktestblobsnapshot02540570aba2cd3d9e46f?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "e09679a2-45d3-4bff-bdb6-f108d225fc1e" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D771CA3A49A677", + "Last-Modified" : "Mon, 25 Nov 2019 17:09:27 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "329a23e8-a01e-0020-02b3-a3e99c000000", + "Date" : "Mon, 25 Nov 2019 17:09:26 GMT", + "x-ms-client-request-id" : "e09679a2-45d3-4bff-bdb6-f108d225fc1e" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gapradev.blob.core.windows.net/jtcnetworktestblobsnapshot02540570aba2cd3d9e46f/javablobnetworktestblobsnapshot102035629499e132984", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "d11846ca-8d30-4a33-a0af-104f7c7230c6", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "Last-Modified" : "Mon, 25 Nov 2019 17:09:27 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Mon, 25 Nov 2019 17:09:26 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D771CA3A58C3C2", + "Content-Length" : "0", + "x-ms-request-id" : "329a23ec-a01e-0020-05b3-a3e99c000000", + "x-ms-client-request-id" : "d11846ca-8d30-4a33-a0af-104f7c7230c6" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gapradev.blob.core.windows.net/jtcnetworktestblobsnapshot02540570aba2cd3d9e46f/javablobnetworktestblobsnapshot2668120224a37c98254", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "e101a62d-b820-4910-9d33-55239c439a9b", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "Q7G6/s6+u/k=", + "Last-Modified" : "Mon, 25 Nov 2019 17:09:27 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Mon, 25 Nov 2019 17:09:26 GMT", + "Content-MD5" : "CY9rzUYh03PK3k6DJie09g==", + "ETag" : "0x8D771CA3A68A2A6", + "Content-Length" : "0", + "x-ms-request-id" : "329a23ed-a01e-0020-06b3-a3e99c000000", + "x-ms-client-request-id" : "e101a62d-b820-4910-9d33-55239c439a9b" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gapradev.blob.core.windows.net/jtcnetworktestblobsnapshot02540570aba2cd3d9e46f/javablobnetworktestblobsnapshot2668120224a37c98254?comp=snapshot", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "4e6e9613-eefb-49c4-a848-213edd0f8047" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "x-ms-snapshot" : "2019-11-25T17:09:27.4562807Z", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D771CA3A68A2A6", + "Last-Modified" : "Mon, 25 Nov 2019 17:09:27 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "329a23ef-a01e-0020-08b3-a3e99c000000", + "x-ms-request-server-encrypted" : "false", + "Date" : "Mon, 25 Nov 2019 17:09:26 GMT", + "x-ms-client-request-id" : "4e6e9613-eefb-49c4-a848-213edd0f8047" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://gapradev.blob.core.windows.net/jtcnetworktestblobsnapshot02540570aba2cd3d9e46f/javablobnetworktestblobsnapshot2668120224a37c98254?snapshot=2019-11-25T17%3a09%3a27.4562807Z&sv=2019-02-02&spr=https%2Chttp&st=2019-11-24T17%3A09%3A27Z&se=2019-11-26T17%3A09%3A27Z&sip=0.0.0.0-255.255.255.255&sr=bs&sp=racwd&sig=REDACTED&rscc=cache&rscd=disposition&rsce=encoding&rscl=language&rsct=type", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "de5631bd-d957-40ac-8348-a6a66856921e" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "Last-Modified" : "Mon, 25 Nov 2019 17:09:27 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Mon, 25 Nov 2019 17:09:26 GMT", + "x-ms-blob-type" : "BlockBlob", + "Content-MD5" : "CY9rzUYh03PK3k6DJie09g==", + "Accept-Ranges" : "bytes", + "x-ms-server-encrypted" : "true", + "Cache-Control" : "cache", + "ETag" : "0x8D771CA3A68A2A6", + "Content-Disposition" : "disposition", + "x-ms-creation-time" : "Mon, 25 Nov 2019 17:09:27 GMT", + "Content-Length" : "4", + "x-ms-request-id" : "329a23f0-a01e-0020-09b3-a3e99c000000", + "Body" : "test", + "x-ms-client-request-id" : "de5631bd-d957-40ac-8348-a6a66856921e", + "Content-Language" : "language", + "Content-Type" : "type" + }, + "Exception" : null + }, { + "Method" : "HEAD", + "Uri" : "https://gapradev.blob.core.windows.net/jtcnetworktestblobsnapshot02540570aba2cd3d9e46f/javablobnetworktestblobsnapshot2668120224a37c98254?snapshot=2019-11-25T17%3a09%3a27.4562807Z&sv=2019-02-02&spr=https%2Chttp&st=2019-11-24T17%3A09%3A27Z&se=2019-11-26T17%3A09%3A27Z&sip=0.0.0.0-255.255.255.255&sr=bs&sp=racwd&sig=REDACTED&rscc=cache&rscd=disposition&rsce=encoding&rscl=language&rsct=type", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "1d2832ad-763d-4623-ae69-9b6694ed8a66" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "Last-Modified" : "Mon, 25 Nov 2019 17:09:27 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Mon, 25 Nov 2019 17:09:26 GMT", + "x-ms-blob-type" : "BlockBlob", + "Content-MD5" : "CY9rzUYh03PK3k6DJie09g==", + "Accept-Ranges" : "bytes", + "x-ms-server-encrypted" : "true", + "x-ms-access-tier-inferred" : "true", + "x-ms-access-tier" : "Hot", + "Cache-Control" : "cache", + "ETag" : "0x8D771CA3A68A2A6", + "Content-Disposition" : "disposition", + "Content-Encoding" : "encoding", + "x-ms-creation-time" : "Mon, 25 Nov 2019 17:09:27 GMT", + "Content-Length" : "4", + "x-ms-request-id" : "329a23f2-a01e-0020-0bb3-a3e99c000000", + "x-ms-client-request-id" : "1d2832ad-763d-4623-ae69-9b6694ed8a66", + "Content-Language" : "language", + "Content-Type" : "type" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://gapradev.blob.core.windows.net?prefix=jtcnetworktestblobsnapshot&comp=list", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "7fc65b94-64bb-4dc8-be1f-086e9d3e273b" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "329a23f3-a01e-0020-0cb3-a3e99c000000", + "Body" : "jtcnetworktestblobsnapshotjtcnetworktestblobsnapshot02540570aba2cd3d9e46fMon, 25 Nov 2019 17:09:27 GMT\"0x8D771CA3A49A677\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 25 Nov 2019 17:09:26 GMT", + "x-ms-client-request-id" : "7fc65b94-64bb-4dc8-be1f-086e9d3e273b", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://gapradev.blob.core.windows.net/jtcnetworktestblobsnapshot02540570aba2cd3d9e46f?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "2af744ba-b0d1-4941-9511-295d592f009e" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "d921dce2-401e-0028-0ab3-a3f393000000", + "Date" : "Mon, 25 Nov 2019 17:09:27 GMT", + "x-ms-client-request-id" : "2af744ba-b0d1-4941-9511-295d592f009e" + }, + "Exception" : null + } ], + "variables" : [ "jtcnetworktestblobsnapshot02540570aba2cd3d9e46f", "javablobnetworktestblobsnapshot102035629499e132984", "javablobnetworktestblobsnapshot2668120224a37c98254", "2019-11-25T17:09:27.443868800Z", "2019-11-25T17:09:27.443868800Z" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsnetworktestblobsnapshotuserdelegation.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsnetworktestblobsnapshotuserdelegation.json new file mode 100644 index 000000000000..d78c4cd4f8fd --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsnetworktestblobsnapshotuserdelegation.json @@ -0,0 +1,219 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://gapradev.blob.core.windows.net/jtcnetworktestblobsnapshotuserdelegation03840477362e2e?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "b5d79c61-b4f7-4d5f-8c45-49b85715b9e4" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D771CA3CF78BD8", + "Last-Modified" : "Mon, 25 Nov 2019 17:09:31 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "329a24c9-a01e-0020-4db3-a3e99c000000", + "Date" : "Mon, 25 Nov 2019 17:09:30 GMT", + "x-ms-client-request-id" : "b5d79c61-b4f7-4d5f-8c45-49b85715b9e4" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gapradev.blob.core.windows.net/jtcnetworktestblobsnapshotuserdelegation03840477362e2e/javablobnetworktestblobsnapshotuserdelegation120014caa048", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "2f41707f-4757-4141-af74-0b2bd05112cb", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "Last-Modified" : "Mon, 25 Nov 2019 17:09:31 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Mon, 25 Nov 2019 17:09:30 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D771CA3D04AA2E", + "Content-Length" : "0", + "x-ms-request-id" : "d921dd4f-401e-0028-66b3-a3f393000000", + "x-ms-client-request-id" : "2f41707f-4757-4141-af74-0b2bd05112cb" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gapradev.blob.core.windows.net/jtcnetworktestblobsnapshotuserdelegation03840477362e2e/javablobnetworktestblobsnapshotuserdelegation120014caa048?comp=snapshot", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "1d5053ed-4914-4814-9a67-22873929f97f" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "x-ms-snapshot" : "2019-11-25T17:09:31.8122954Z", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D771CA3D04AA2E", + "Last-Modified" : "Mon, 25 Nov 2019 17:09:31 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "329a24e4-a01e-0020-65b3-a3e99c000000", + "x-ms-request-server-encrypted" : "false", + "Date" : "Mon, 25 Nov 2019 17:09:30 GMT", + "x-ms-client-request-id" : "1d5053ed-4914-4814-9a67-22873929f97f" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://gapradev.blob.core.windows.net?restype=service&comp=userdelegationkey", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "ecc43eea-ef70-43ee-b58a-bb7fde027d34", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "d921dd5f-401e-0028-73b3-a3f393000000", + "Body" : "7a56bc7f-2460-439c-8e22-cc8f44b161238ef2432d-93d8-4e9a-a756-f9a8ee5544d72019-11-24T17:09:31Z2019-11-26T17:09:31Zb2019-02-02UkVEQUNURUQ=", + "Date" : "Mon, 25 Nov 2019 17:09:32 GMT", + "x-ms-client-request-id" : "ecc43eea-ef70-43ee-b58a-bb7fde027d34", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://gapradev.blob.core.windows.net/jtcnetworktestblobsnapshotuserdelegation03840477362e2e/javablobnetworktestblobsnapshotuserdelegation120014caa048?sv=2019-02-02&spr=https%2Chttp&st=2019-11-24T17%3A09%3A31Z&se=2019-11-26T17%3A09%3A31Z&sip=0.0.0.0-255.255.255.255&skoid=c4f48289-bb84-4086-b250-6f94a8f64cee&sktid=72f988bf-86f1-41af-91ab-2d7cd011db47&skt=2019-11-24T17%3A09%3A31Z&ske=2019-11-26T17%3A09%3A31Z&sks=b&skv=2019-02-02&sr=bs&sp=racwd&sig=REDACTED&rscc=cache&rscd=disposition&rsce=encoding&rscl=language&rsct=type", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "f16ddfaa-ba18-4c50-b868-9cbacd3ee66f" + }, + "Response" : { + "Server" : "Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "AuthenticationFailed", + "retry-after" : "0", + "Content-Length" : "447", + "StatusCode" : "403", + "x-ms-request-id" : "329a24eb-a01e-0020-6ab3-a3e99c000000", + "Body" : "AuthenticationFailedServer failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature.\nRequestId:329a24eb-a01e-0020-6ab3-a3e99c000000\nTime:2019-11-25T17:09:32.2487938ZThe specified signed resource is not allowed for the this resource level", + "Date" : "Mon, 25 Nov 2019 17:09:32 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://gapradev.blob.core.windows.net/jtcnetworktestblobsnapshotuserdelegation03840477362e2e/javablobnetworktestblobsnapshotuserdelegation120014caa048?snapshot=2019-11-25T17%3a09%3a31.8122954Z&sv=2019-02-02&spr=https%2Chttp&st=2019-11-24T17%3A09%3A31Z&se=2019-11-26T17%3A09%3A31Z&sip=0.0.0.0-255.255.255.255&skoid=c4f48289-bb84-4086-b250-6f94a8f64cee&sktid=72f988bf-86f1-41af-91ab-2d7cd011db47&skt=2019-11-24T17%3A09%3A31Z&ske=2019-11-26T17%3A09%3A31Z&sks=b&skv=2019-02-02&sr=bs&sp=racwd&sig=REDACTED&rscc=cache&rscd=disposition&rsce=encoding&rscl=language&rsct=type", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "5671c3f6-b71e-413d-a4a4-09cb0d167615" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "Last-Modified" : "Mon, 25 Nov 2019 17:09:31 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Mon, 25 Nov 2019 17:09:32 GMT", + "x-ms-blob-type" : "BlockBlob", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "Accept-Ranges" : "bytes", + "x-ms-server-encrypted" : "true", + "Cache-Control" : "cache", + "ETag" : "0x8D771CA3D04AA2E", + "Content-Disposition" : "disposition", + "x-ms-creation-time" : "Mon, 25 Nov 2019 17:09:31 GMT", + "Content-Length" : "7", + "x-ms-request-id" : "d921dd64-401e-0028-78b3-a3f393000000", + "Body" : "default", + "x-ms-client-request-id" : "5671c3f6-b71e-413d-a4a4-09cb0d167615", + "Content-Language" : "language", + "Content-Type" : "type" + }, + "Exception" : null + }, { + "Method" : "HEAD", + "Uri" : "https://gapradev.blob.core.windows.net/jtcnetworktestblobsnapshotuserdelegation03840477362e2e/javablobnetworktestblobsnapshotuserdelegation120014caa048?snapshot=2019-11-25T17%3a09%3a31.8122954Z&sv=2019-02-02&spr=https%2Chttp&st=2019-11-24T17%3A09%3A31Z&se=2019-11-26T17%3A09%3A31Z&sip=0.0.0.0-255.255.255.255&skoid=c4f48289-bb84-4086-b250-6f94a8f64cee&sktid=72f988bf-86f1-41af-91ab-2d7cd011db47&skt=2019-11-24T17%3A09%3A31Z&ske=2019-11-26T17%3A09%3A31Z&sks=b&skv=2019-02-02&sr=bs&sp=racwd&sig=REDACTED&rscc=cache&rscd=disposition&rsce=encoding&rscl=language&rsct=type", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "9b7b789f-1d56-4420-82a7-e0bc5b77894c" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "Last-Modified" : "Mon, 25 Nov 2019 17:09:31 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Mon, 25 Nov 2019 17:09:32 GMT", + "x-ms-blob-type" : "BlockBlob", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "Accept-Ranges" : "bytes", + "x-ms-server-encrypted" : "true", + "x-ms-access-tier-inferred" : "true", + "x-ms-access-tier" : "Hot", + "Cache-Control" : "cache", + "ETag" : "0x8D771CA3D04AA2E", + "Content-Disposition" : "disposition", + "Content-Encoding" : "encoding", + "x-ms-creation-time" : "Mon, 25 Nov 2019 17:09:31 GMT", + "Content-Length" : "7", + "x-ms-request-id" : "329a24ef-a01e-0020-6db3-a3e99c000000", + "x-ms-client-request-id" : "9b7b789f-1d56-4420-82a7-e0bc5b77894c", + "Content-Language" : "language", + "Content-Type" : "type" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://gapradev.blob.core.windows.net?prefix=jtcnetworktestblobsnapshotuserdelegation&comp=list", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "6d37055a-8740-4595-ab9e-550797ac321c" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "d921dd69-401e-0028-7cb3-a3f393000000", + "Body" : "jtcnetworktestblobsnapshotuserdelegationjtcnetworktestblobsnapshotuserdelegation03840477362e2eMon, 25 Nov 2019 17:09:31 GMT\"0x8D771CA3CF78BD8\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 25 Nov 2019 17:09:32 GMT", + "x-ms-client-request-id" : "6d37055a-8740-4595-ab9e-550797ac321c", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://gapradev.blob.core.windows.net/jtcnetworktestblobsnapshotuserdelegation03840477362e2e?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "2ca2d15f-5d48-46bb-8a61-3aa7b451d190" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "329a24f5-a01e-0020-70b3-a3e99c000000", + "Date" : "Mon, 25 Nov 2019 17:09:32 GMT", + "x-ms-client-request-id" : "2ca2d15f-5d48-46bb-8a61-3aa7b451d190" + }, + "Exception" : null + } ], + "variables" : [ "jtcnetworktestblobsnapshotuserdelegation03840477362e2e", "javablobnetworktestblobsnapshotuserdelegation120014caa048", "2019-11-25T17:09:31.787683Z", "2019-11-25T17:09:31.788682900Z", "2019-11-25T17:09:31.789653800Z", "2019-11-25T17:09:31.789653800Z", "c4f48289-bb84-4086-b250-6f94a8f64cee", "72f988bf-86f1-41af-91ab-2d7cd011db47" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsnetworktestblobuserdelegation.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsnetworktestblobuserdelegation.json new file mode 100644 index 000000000000..15edff51784b --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsnetworktestblobuserdelegation.json @@ -0,0 +1,180 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://gapradev.blob.core.windows.net/jtcnetworktestblobuserdelegation0458840195b4321c51?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "ed069f9e-50c5-4566-9845-5fff88ef61ac" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D771CA3B4336A9", + "Last-Modified" : "Mon, 25 Nov 2019 17:09:28 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "d921dcfe-401e-0028-23b3-a3f393000000", + "Date" : "Mon, 25 Nov 2019 17:09:27 GMT", + "x-ms-client-request-id" : "ed069f9e-50c5-4566-9845-5fff88ef61ac" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gapradev.blob.core.windows.net/jtcnetworktestblobuserdelegation0458840195b4321c51/javablobnetworktestblobuserdelegation180269895b752a25", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "cc07b576-618a-45eb-9a32-54e5d2ba46ba", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "Last-Modified" : "Mon, 25 Nov 2019 17:09:28 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Mon, 25 Nov 2019 17:09:28 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D771CA3B509169", + "Content-Length" : "0", + "x-ms-request-id" : "329a2417-a01e-0020-28b3-a3e99c000000", + "x-ms-client-request-id" : "cc07b576-618a-45eb-9a32-54e5d2ba46ba" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://gapradev.blob.core.windows.net?restype=service&comp=userdelegationkey", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "d666dfef-2455-41b2-bb8a-102b544c9fc6", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "d921dd0c-401e-0028-2db3-a3f393000000", + "Body" : "f2aa5e42-6670-410b-9f46-f8b1188ec239315a5043-2e30-41b6-b0d7-aa22296ae15d2019-11-24T17:09:28Z2019-11-26T17:09:28Zb2019-02-02UkVEQUNURUQ=", + "Date" : "Mon, 25 Nov 2019 17:09:29 GMT", + "x-ms-client-request-id" : "d666dfef-2455-41b2-bb8a-102b544c9fc6", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://gapradev.blob.core.windows.net/jtcnetworktestblobuserdelegation0458840195b4321c51/javablobnetworktestblobuserdelegation180269895b752a25?sv=2019-02-02&spr=https%2Chttp&st=2019-11-24T17%3A09%3A28Z&se=2019-11-26T17%3A09%3A28Z&sip=0.0.0.0-255.255.255.255&skoid=c4f48289-bb84-4086-b250-6f94a8f64cee&sktid=72f988bf-86f1-41af-91ab-2d7cd011db47&skt=2019-11-24T17%3A09%3A28Z&ske=2019-11-26T17%3A09%3A28Z&sks=b&skv=2019-02-02&sr=b&sp=racwd&sig=REDACTED&rscc=cache&rscd=disposition&rsce=encoding&rscl=language&rsct=type", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "f8a58b97-5ac5-40c6-8324-138488a8ddb3" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "x-ms-lease-status" : "unlocked", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-lease-state" : "available", + "Last-Modified" : "Mon, 25 Nov 2019 17:09:28 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Mon, 25 Nov 2019 17:09:29 GMT", + "x-ms-blob-type" : "BlockBlob", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "Accept-Ranges" : "bytes", + "x-ms-server-encrypted" : "true", + "Cache-Control" : "cache", + "ETag" : "0x8D771CA3B509169", + "Content-Disposition" : "disposition", + "x-ms-creation-time" : "Mon, 25 Nov 2019 17:09:28 GMT", + "Content-Length" : "7", + "x-ms-request-id" : "329a243b-a01e-0020-48b3-a3e99c000000", + "Body" : "default", + "x-ms-client-request-id" : "f8a58b97-5ac5-40c6-8324-138488a8ddb3", + "Content-Language" : "language", + "Content-Type" : "type" + }, + "Exception" : null + }, { + "Method" : "HEAD", + "Uri" : "https://gapradev.blob.core.windows.net/jtcnetworktestblobuserdelegation0458840195b4321c51/javablobnetworktestblobuserdelegation180269895b752a25?sv=2019-02-02&spr=https%2Chttp&st=2019-11-24T17%3A09%3A28Z&se=2019-11-26T17%3A09%3A28Z&sip=0.0.0.0-255.255.255.255&skoid=c4f48289-bb84-4086-b250-6f94a8f64cee&sktid=72f988bf-86f1-41af-91ab-2d7cd011db47&skt=2019-11-24T17%3A09%3A28Z&ske=2019-11-26T17%3A09%3A28Z&sks=b&skv=2019-02-02&sr=b&sp=racwd&sig=REDACTED&rscc=cache&rscd=disposition&rsce=encoding&rscl=language&rsct=type", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "72266b1d-c83c-4826-ae6c-b05b38654242" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "x-ms-lease-status" : "unlocked", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-lease-state" : "available", + "Last-Modified" : "Mon, 25 Nov 2019 17:09:28 GMT", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Mon, 25 Nov 2019 17:09:29 GMT", + "x-ms-blob-type" : "BlockBlob", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "Accept-Ranges" : "bytes", + "x-ms-server-encrypted" : "true", + "x-ms-access-tier-inferred" : "true", + "x-ms-access-tier" : "Hot", + "Cache-Control" : "cache", + "ETag" : "0x8D771CA3B509169", + "Content-Disposition" : "disposition", + "Content-Encoding" : "encoding", + "x-ms-creation-time" : "Mon, 25 Nov 2019 17:09:28 GMT", + "Content-Length" : "7", + "x-ms-request-id" : "d921dd21-401e-0028-3fb3-a3f393000000", + "x-ms-client-request-id" : "72266b1d-c83c-4826-ae6c-b05b38654242", + "Content-Language" : "language", + "Content-Type" : "type" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://gapradev.blob.core.windows.net?prefix=jtcnetworktestblobuserdelegation&comp=list", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "cda29162-14f6-4a3b-bbce-e3c5b70987c7" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "329a24ae-a01e-0020-3ab3-a3e99c000000", + "Body" : "jtcnetworktestblobuserdelegationjtcnetworktestblobuserdelegation0458840195b4321c51Mon, 25 Nov 2019 17:09:28 GMT\"0x8D771CA3B4336A9\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 25 Nov 2019 17:09:29 GMT", + "x-ms-client-request-id" : "cda29162-14f6-4a3b-bbce-e3c5b70987c7", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://gapradev.blob.core.windows.net/jtcnetworktestblobuserdelegation0458840195b4321c51?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "882b754a-ef49-4235-a37d-d69f821976b5" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "d921dd23-401e-0028-40b3-a3f393000000", + "Date" : "Mon, 25 Nov 2019 17:09:29 GMT", + "x-ms-client-request-id" : "882b754a-ef49-4235-a37d-d69f821976b5" + }, + "Exception" : null + } ], + "variables" : [ "jtcnetworktestblobuserdelegation0458840195b4321c51", "javablobnetworktestblobuserdelegation180269895b752a25", "2019-11-25T17:09:28.843991800Z", "2019-11-25T17:09:28.843991800Z", "2019-11-25T17:09:28.883984400Z", "2019-11-25T17:09:28.883984400Z", "c4f48289-bb84-4086-b250-6f94a8f64cee", "72f988bf-86f1-41af-91ab-2d7cd011db47" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsnetworktestcontaineruserdelegation.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsnetworktestcontaineruserdelegation.json new file mode 100644 index 000000000000..51eee75a70c9 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsnetworktestcontaineruserdelegation.json @@ -0,0 +1,133 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://gapradev.blob.core.windows.net/jtcnetworktestcontaineruserdelegation0715539637c65f78?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "2faa7c3f-2353-404d-9872-fc7ff279003a" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D771CA3D969CD1", + "Last-Modified" : "Mon, 25 Nov 2019 17:09:32 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "d921dd71-401e-0028-04b3-a3f393000000", + "Date" : "Mon, 25 Nov 2019 17:09:32 GMT", + "x-ms-client-request-id" : "2faa7c3f-2353-404d-9872-fc7ff279003a" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gapradev.blob.core.windows.net/jtcnetworktestcontaineruserdelegation0715539637c65f78/javablobnetworktestcontaineruserdelegation1670526fc60bd", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "ce8a9607-60fb-44ea-ad46-c3424eb65e76", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "Last-Modified" : "Mon, 25 Nov 2019 17:09:32 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Mon, 25 Nov 2019 17:09:32 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D771CA3DA4BACC", + "Content-Length" : "0", + "x-ms-request-id" : "329a24f6-a01e-0020-71b3-a3e99c000000", + "x-ms-client-request-id" : "ce8a9607-60fb-44ea-ad46-c3424eb65e76" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://gapradev.blob.core.windows.net?restype=service&comp=userdelegationkey", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "756cdd31-d044-4410-95f5-03d770ce4703", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "d921dd82-401e-0028-11b3-a3f393000000", + "Body" : "c08759dd-0fce-4f53-969f-3ed0c1a66f2806bd9169-60ce-4847-a2a3-30749ad2b8382019-11-24T17:09:32Z2019-11-26T17:09:32Zb2019-02-02UkVEQUNURUQ=", + "Date" : "Mon, 25 Nov 2019 17:09:33 GMT", + "x-ms-client-request-id" : "756cdd31-d044-4410-95f5-03d770ce4703", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://gapradev.blob.core.windows.net/jtcnetworktestcontaineruserdelegation0715539637c65f78?include=&restype=container&comp=list&sv=2019-02-02&se=2019-11-26T17%3A09%3A32Z&skoid=c4f48289-bb84-4086-b250-6f94a8f64cee&sktid=72f988bf-86f1-41af-91ab-2d7cd011db47&skt=2019-11-24T17%3A09%3A32Z&ske=2019-11-26T17%3A09%3A32Z&sks=b&skv=2019-02-02&sr=c&sp=racwdl&sig=REDACTED", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "9d5e9ed0-76a8-4f49-9fa6-50e168a93d11" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "329a24fd-a01e-0020-76b3-a3e99c000000", + "Body" : "javablobnetworktestcontaineruserdelegation1670526fc60bdMon, 25 Nov 2019 17:09:32 GMTMon, 25 Nov 2019 17:09:32 GMT0x8D771CA3DA4BACC7application/octet-streamwh+Wm18D0z1D4E+PE252gg==BlockBlobHottrueunlockedavailabletrue", + "Date" : "Mon, 25 Nov 2019 17:09:33 GMT", + "x-ms-client-request-id" : "9d5e9ed0-76a8-4f49-9fa6-50e168a93d11", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://gapradev.blob.core.windows.net?prefix=jtcnetworktestcontaineruserdelegation&comp=list", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "cc6b24df-eae3-457d-a128-d044b2d0dcc0" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "d921dd8c-401e-0028-1ab3-a3f393000000", + "Body" : "jtcnetworktestcontaineruserdelegationjtcnetworktestcontaineruserdelegation0715539637c65f78Mon, 25 Nov 2019 17:09:32 GMT\"0x8D771CA3D969CD1\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 25 Nov 2019 17:09:33 GMT", + "x-ms-client-request-id" : "cc6b24df-eae3-457d-a128-d044b2d0dcc0", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://gapradev.blob.core.windows.net/jtcnetworktestcontaineruserdelegation0715539637c65f78?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "6f3c150e-1e30-4347-bb7c-de8cb5807760" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "329a24ff-a01e-0020-77b3-a3e99c000000", + "Date" : "Mon, 25 Nov 2019 17:09:33 GMT", + "x-ms-client-request-id" : "6f3c150e-1e30-4347-bb7c-de8cb5807760" + }, + "Exception" : null + } ], + "variables" : [ "jtcnetworktestcontaineruserdelegation0715539637c65f78", "javablobnetworktestcontaineruserdelegation1670526fc60bd", "2019-11-25T17:09:32.746616Z", "2019-11-25T17:09:32.747615500Z", "2019-11-25T17:09:32.747615500Z", "c4f48289-bb84-4086-b250-6f94a8f64cee", "72f988bf-86f1-41af-91ab-2d7cd011db47" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsservicesassignaturevaluesnetworktestcontainer.json b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsservicesassignaturevaluesnetworktestcontainer.json new file mode 100644 index 000000000000..7f79fea04c1f --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/resources/session-records/SasClientTestsservicesassignaturevaluesnetworktestcontainer.json @@ -0,0 +1,154 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://gapradev.blob.core.windows.net/jtcservicesassignaturevaluesnetworktestcontainer0249587958?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "f6512891-e5f8-47d1-9485-8fcf7c48fa5e" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D771CA3AE1C274", + "Last-Modified" : "Mon, 25 Nov 2019 17:09:28 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "329a23fd-a01e-0020-13b3-a3e99c000000", + "Date" : "Mon, 25 Nov 2019 17:09:27 GMT", + "x-ms-client-request-id" : "f6512891-e5f8-47d1-9485-8fcf7c48fa5e" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gapradev.blob.core.windows.net/jtcservicesassignaturevaluesnetworktestcontainer0249587958/javablobservicesassignaturevaluesnetworktestcontainer113162b5", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "611f938d-968f-4a91-864a-fc9bb862e9a7", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-content-crc64" : "6RYQPwaVsyQ=", + "Last-Modified" : "Mon, 25 Nov 2019 17:09:28 GMT", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-server-encrypted" : "true", + "Date" : "Mon, 25 Nov 2019 17:09:27 GMT", + "Content-MD5" : "wh+Wm18D0z1D4E+PE252gg==", + "ETag" : "0x8D771CA3AEF5E57", + "Content-Length" : "0", + "x-ms-request-id" : "d921dced-401e-0028-14b3-a3f393000000", + "x-ms-client-request-id" : "611f938d-968f-4a91-864a-fc9bb862e9a7" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gapradev.blob.core.windows.net/jtcservicesassignaturevaluesnetworktestcontainer0249587958?restype=container&comp=acl", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "22080f30-20b6-4858-9d77-545a366c2404", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D771CA3B001454", + "Last-Modified" : "Mon, 25 Nov 2019 17:09:28 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "329a2402-a01e-0020-17b3-a3e99c000000", + "Date" : "Mon, 25 Nov 2019 17:09:27 GMT", + "x-ms-client-request-id" : "22080f30-20b6-4858-9d77-545a366c2404" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://gapradev.blob.core.windows.net/jtcservicesassignaturevaluesnetworktestcontainer0249587958?include=&restype=container&comp=list&sv=2019-02-02&si=0000&sr=c&sig=REDACTED", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "3d64c283-d111-457b-8969-6214cae106f3" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "d921dcf0-401e-0028-17b3-a3f393000000", + "Body" : "javablobservicesassignaturevaluesnetworktestcontainer113162b5Mon, 25 Nov 2019 17:09:28 GMTMon, 25 Nov 2019 17:09:28 GMT0x8D771CA3AEF5E577application/octet-streamwh+Wm18D0z1D4E+PE252gg==BlockBlobHottrueunlockedavailabletrue", + "Date" : "Mon, 25 Nov 2019 17:09:27 GMT", + "x-ms-client-request-id" : "3d64c283-d111-457b-8969-6214cae106f3", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://gapradev.blob.core.windows.net/jtcservicesassignaturevaluesnetworktestcontainer0249587958?include=&restype=container&comp=list&sv=2019-02-02&se=2019-11-26T17%3A09%3A28Z&sr=c&sp=racwdl&sig=REDACTED", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "1275df9c-6fe2-4bf2-b5ce-5da41aaf40da" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "329a240b-a01e-0020-1eb3-a3e99c000000", + "Body" : "javablobservicesassignaturevaluesnetworktestcontainer113162b5Mon, 25 Nov 2019 17:09:28 GMTMon, 25 Nov 2019 17:09:28 GMT0x8D771CA3AEF5E577application/octet-streamwh+Wm18D0z1D4E+PE252gg==BlockBlobHottrueunlockedavailabletrue", + "Date" : "Mon, 25 Nov 2019 17:09:27 GMT", + "x-ms-client-request-id" : "1275df9c-6fe2-4bf2-b5ce-5da41aaf40da", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://gapradev.blob.core.windows.net?prefix=jtcservicesassignaturevaluesnetworktestcontainer&comp=list", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "8cd3bd90-4d5c-467b-8fca-74f903153378" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "d921dcf8-401e-0028-1db3-a3f393000000", + "Body" : "jtcservicesassignaturevaluesnetworktestcontainerjtcservicesassignaturevaluesnetworktestcontainer0249587958Mon, 25 Nov 2019 17:09:28 GMT\"0x8D771CA3B001454\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 25 Nov 2019 17:09:27 GMT", + "x-ms-client-request-id" : "8cd3bd90-4d5c-467b-8fca-74f903153378", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://gapradev.blob.core.windows.net/jtcservicesassignaturevaluesnetworktestcontainer0249587958?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 11.0.4; Windows 10 10.0", + "x-ms-client-request-id" : "71a3b729-6bef-4c5a-bf74-aefe7470d858" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "329a240f-a01e-0020-22b3-a3e99c000000", + "Date" : "Mon, 25 Nov 2019 17:09:27 GMT", + "x-ms-client-request-id" : "71a3b729-6bef-4c5a-bf74-aefe7470d858" + }, + "Exception" : null + } ], + "variables" : [ "jtcservicesassignaturevaluesnetworktestcontainer0249587958", "javablobservicesassignaturevaluesnetworktestcontainer113162b5", "2019-11-25T17:09:28.210051100Z", "2019-11-25T17:09:28.315019800Z" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-common/CHANGELOG.md b/sdk/storage/azure-storage-common/CHANGELOG.md index 48fd6dab82e5..8a167f5c9673 100644 --- a/sdk/storage/azure-storage-common/CHANGELOG.md +++ b/sdk/storage/azure-storage-common/CHANGELOG.md @@ -1,4 +1,8 @@ # Release History + +## Version XX.X.X (XXXX-XX-XX) +- Added generateSas methods on service clients to improve discoverability and convenience of sas. Deprecated setters of required parameters, generateSasQueryParameters methods on AccountSasSignatureValues to direct users to using the methods added on clients. + ## Version 12.1.0 (2019-12-04) - Upgraded to version 1.1.0 of Azure Core. diff --git a/sdk/storage/azure-storage-common/pom.xml b/sdk/storage/azure-storage-common/pom.xml index 4b3c31fed54c..183c36ff56b2 100644 --- a/sdk/storage/azure-storage-common/pom.xml +++ b/sdk/storage/azure-storage-common/pom.xml @@ -13,7 +13,7 @@ com.azure azure-storage-common - 12.1.0 + 12.2.0-beta.1 Microsoft Azure common module for Storage This module contains common code based for all Microsoft Azure Storage client libraries. diff --git a/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/implementation/AccountSasImplUtil.java b/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/implementation/AccountSasImplUtil.java new file mode 100644 index 000000000000..2f2060ba5fc0 --- /dev/null +++ b/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/implementation/AccountSasImplUtil.java @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.storage.common.implementation; + +import com.azure.core.util.CoreUtils; +import com.azure.storage.common.StorageSharedKeyCredential; +import com.azure.storage.common.sas.AccountSasPermission; +import com.azure.storage.common.sas.AccountSasSignatureValues; +import com.azure.storage.common.sas.SasIpRange; +import com.azure.storage.common.sas.SasProtocol; + +import java.time.OffsetDateTime; + +import static com.azure.storage.common.implementation.SasImplUtils.formatQueryParameterDate; +import static com.azure.storage.common.implementation.SasImplUtils.tryAppendQueryParameter; + +/** + * This class provides helper methods for common account sas patterns. + * + * RESERVED FOR INTERNAL USE. + */ +public class AccountSasImplUtil { + + private String version; + + private SasProtocol protocol; + + private OffsetDateTime startTime; + + private OffsetDateTime expiryTime; + + private String permissions; + + private SasIpRange sasIpRange; + + private String services; + + private String resourceTypes; + + /** + * Creates a new {@link AccountSasImplUtil} with the specified parameters + * + * @param sasValues {@link AccountSasSignatureValues} + */ + public AccountSasImplUtil(AccountSasSignatureValues sasValues) { + this.version = sasValues.getVersion(); + this.protocol = sasValues.getProtocol(); + this.startTime = sasValues.getStartTime(); + this.expiryTime = sasValues.getExpiryTime(); + this.permissions = sasValues.getPermissions(); + this.sasIpRange = sasValues.getSasIpRange(); + this.services = sasValues.getServices(); + this.resourceTypes = sasValues.getResourceTypes(); + } + + /** + * Generates a Sas signed with a {@link StorageSharedKeyCredential} + * + * @param storageSharedKeyCredentials {@link StorageSharedKeyCredential} + * @return A String representing the Sas + */ + public String generateSas(StorageSharedKeyCredential storageSharedKeyCredentials) { + StorageImplUtils.assertNotNull("storageSharedKeyCredentials", storageSharedKeyCredentials); + StorageImplUtils.assertNotNull("services", this.services); + StorageImplUtils.assertNotNull("resourceTypes", this.resourceTypes); + StorageImplUtils.assertNotNull("expiryTime", this.expiryTime); + StorageImplUtils.assertNotNull("permissions", this.permissions); + + if (CoreUtils.isNullOrEmpty(version)) { + version = Constants.HeaderConstants.TARGET_STORAGE_VERSION; + } + + // Signature is generated on the un-url-encoded values. + String signature = storageSharedKeyCredentials.computeHmac256(stringToSign(storageSharedKeyCredentials)); + + return encode(signature); + } + + private String stringToSign(final StorageSharedKeyCredential storageSharedKeyCredentials) { + return String.join("\n", + storageSharedKeyCredentials.getAccountName(), + AccountSasPermission.parse(this.permissions).toString(), // guarantees ordering + this.services, + resourceTypes, + this.startTime == null ? "" : Constants.ISO_8601_UTC_DATE_FORMATTER.format(this.startTime), + Constants.ISO_8601_UTC_DATE_FORMATTER.format(this.expiryTime), + this.sasIpRange == null ? "" : this.sasIpRange.toString(), + this.protocol == null ? "" : this.protocol.toString(), + this.version, + "" // Account SAS requires an additional newline character + ); + } + + private String encode(String signature) { + /* + We should be url-encoding each key and each value, but because we know all the keys and values will encode to + themselves, we cheat except for the signature value. + */ + StringBuilder sb = new StringBuilder(); + + tryAppendQueryParameter(sb, Constants.UrlConstants.SAS_SERVICE_VERSION, this.version); + tryAppendQueryParameter(sb, Constants.UrlConstants.SAS_SERVICES, this.services); + tryAppendQueryParameter(sb, Constants.UrlConstants.SAS_RESOURCES_TYPES, this.resourceTypes); + tryAppendQueryParameter(sb, Constants.UrlConstants.SAS_PROTOCOL, this.protocol); + tryAppendQueryParameter(sb, Constants.UrlConstants.SAS_START_TIME, formatQueryParameterDate(this.startTime)); + tryAppendQueryParameter(sb, Constants.UrlConstants.SAS_EXPIRY_TIME, formatQueryParameterDate(this.expiryTime)); + tryAppendQueryParameter(sb, Constants.UrlConstants.SAS_IP_RANGE, this.sasIpRange); + tryAppendQueryParameter(sb, Constants.UrlConstants.SAS_SIGNED_PERMISSIONS, this.permissions); + tryAppendQueryParameter(sb, Constants.UrlConstants.SAS_SIGNATURE, signature); + + return sb.toString(); + } +} diff --git a/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/implementation/SasImplUtils.java b/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/implementation/SasImplUtils.java new file mode 100644 index 000000000000..a6dc9e2af731 --- /dev/null +++ b/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/implementation/SasImplUtils.java @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.storage.common.implementation; + +import com.azure.core.http.HttpPipeline; +import com.azure.storage.common.StorageSharedKeyCredential; +import com.azure.storage.common.Utility; +import com.azure.storage.common.policy.StorageSharedKeyCredentialPolicy; + +import java.time.OffsetDateTime; + +/** + * This class provides helper methods for sas. + * + * RESERVED FOR INTERNAL USE. + */ +public class SasImplUtils { + /** + * Extracts the {@link StorageSharedKeyCredential} from a {@link HttpPipeline} + * @param pipeline {@link HttpPipeline} + * @return a {@link StorageSharedKeyCredential} + */ + public static StorageSharedKeyCredential extractSharedKeyCredential(HttpPipeline pipeline) { + for (int i = 0; i < pipeline.getPolicyCount(); i++) { + if (pipeline.getPolicy(i) instanceof StorageSharedKeyCredentialPolicy) { + StorageSharedKeyCredentialPolicy policy = (StorageSharedKeyCredentialPolicy) pipeline.getPolicy(i); + return policy.sharedKeyCredential(); + } + } + return null; + } + + /** + * Shared helper method to append a SAS query parameter. + * + * @param sb The {@code StringBuilder} to append to. + * @param param The {@code String} parameter to append. + * @param value The value of the parameter to append. + */ + public static void tryAppendQueryParameter(StringBuilder sb, String param, Object value) { + if (value != null) { + if (sb.length() != 0) { + sb.append('&'); + } + sb.append(Utility.urlEncode(param)).append('=').append(Utility.urlEncode(value.toString())); + } + } + + /** + * Formats date time SAS query parameters. + * + * @param dateTime The SAS date time. + * @return A String representing the SAS date time. + */ + public static String formatQueryParameterDate(OffsetDateTime dateTime) { + if (dateTime == null) { + return null; + } else { + return Constants.ISO_8601_UTC_DATE_FORMATTER.format(dateTime); + } + } +} diff --git a/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/implementation/StorageImplUtils.java b/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/implementation/StorageImplUtils.java index 14b9cb584589..605c74c5dc9b 100644 --- a/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/implementation/StorageImplUtils.java +++ b/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/implementation/StorageImplUtils.java @@ -18,6 +18,7 @@ import java.util.Map; import java.util.TreeMap; import java.util.function.Function; + import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; diff --git a/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/sas/AccountSasPermission.java b/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/sas/AccountSasPermission.java index 609db4b013ce..b7fcbb2104e6 100644 --- a/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/sas/AccountSasPermission.java +++ b/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/sas/AccountSasPermission.java @@ -11,7 +11,7 @@ * This is a helper class to construct a string representing the permissions granted by an Account SAS. Setting a value * to true means that any SAS which uses these permissions will grant permissions for that operation. Once all the * values are set, this should be serialized with toString and set as the permissions field on - * {@link AccountSasSignatureValues#setPermissions(AccountSasPermission) AccountSasSignatureValues}. + * {@link AccountSasSignatureValues AccountSasSignatureValues}. * *

* It is possible to construct the permissions string without this class, but the order of the permissions is particular diff --git a/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/sas/AccountSasQueryParameters.java b/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/sas/AccountSasQueryParameters.java index 37093937b409..05379804e6a1 100644 --- a/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/sas/AccountSasQueryParameters.java +++ b/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/sas/AccountSasQueryParameters.java @@ -14,7 +14,10 @@ * appended to a URL directly (though caution should be taken here in case there are existing query parameters, which * might affect the appropriate means of appending these query parameters). NOTE: Instances of this class are immutable * to ensure thread safety. + * @deprecated Please use the generateSas method on the desired service client after initializing + * {@link AccountSasSignatureValues}. */ +@Deprecated public final class AccountSasQueryParameters extends BaseSasQueryParameters { private final String services; @@ -27,7 +30,9 @@ public final class AccountSasQueryParameters extends BaseSasQueryParameters { * @param queryParamsMap All query parameters for the request as key-value pairs * @param removeSasParameters When {@code true}, the SAS query parameters will be removed from * queryParamsMap + * @deprecated Please use {@link AccountSasSignatureValues} */ + @Deprecated AccountSasQueryParameters(Map queryParamsMap, boolean removeSasParameters) { super(queryParamsMap, removeSasParameters); this.resourceTypes = getQueryParameter(queryParamsMap, Constants.UrlConstants.SAS_RESOURCES_TYPES, @@ -51,7 +56,9 @@ public final class AccountSasQueryParameters extends BaseSasQueryParameters { * {@code null}. * @param permissions A {@code String} representing the storage permissions or {@code null}. * @param signature A {@code String} representing the signature for the SAS token. + * @deprecated Please use {@link AccountSasSignatureValues} */ + @Deprecated AccountSasQueryParameters(String version, String services, String resourceTypes, SasProtocol protocol, OffsetDateTime startTime, OffsetDateTime expiryTime, SasIpRange sasIpRange, String permissions, String signature) { @@ -63,7 +70,9 @@ public final class AccountSasQueryParameters extends BaseSasQueryParameters { /** * @return The storage services being accessed (only for Account SAS). Please refer to {@link AccountSasService} for * more details. + * @deprecated Please use {@link AccountSasSignatureValues} */ + @Deprecated public String getServices() { return services; } @@ -71,7 +80,9 @@ public String getServices() { /** * @return The storage resource types being accessed (only for Account SAS). Please refer to {@link * AccountSasResourceType} for more details. + * @deprecated Please use {@link AccountSasSignatureValues} */ + @Deprecated public String getResourceTypes() { return resourceTypes; } @@ -80,7 +91,10 @@ public String getResourceTypes() { * Encodes all SAS query parameters into a string that can be appended to a URL. * * @return A {@code String} representing all SAS query parameters. + * @deprecated Please use the generateSas method on the desired service client after initializing + * {@link AccountSasSignatureValues}. */ + @Deprecated public String encode() { /* We should be url-encoding each key and each value, but because we know all the keys and values will encode to diff --git a/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/sas/AccountSasSignatureValues.java b/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/sas/AccountSasSignatureValues.java index 240d253e3632..9cfff06b1ed4 100644 --- a/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/sas/AccountSasSignatureValues.java +++ b/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/sas/AccountSasSignatureValues.java @@ -11,19 +11,12 @@ import java.time.OffsetDateTime; /** - * Used to generate a Shared Access Signature (SAS) for an Azure Storage account. Once all the values are set, call - * {@link - * #generateSasQueryParameters(StorageSharedKeyCredential) generateSASQueryParameters(StorageSharedKeyCredential)} to - * obtain a representation of the SAS which can actually be applied to container, file, queue, and tables. - * - *

Generating an account SAS

- *

The snippet below generates an account SAS that lasts for two days and gives the user read and list access to - * blob containers and file shares.

- * - * {@codesnippet com.azure.storage.common.sas.accountSasSignatureValues.generateSasQueryParameters#StorageSharedKeyCredential} + * Used to initialize parameters for a Shared Access Signature (SAS) for an Azure Storage account. Once all the + * values here are set, use the generateSas method on the desired service client to obtain a representation of the SAS + * which can then be applied to a new client using the .sasToken(String) method on the desired client builder. * + * @see Storage SAS overview * @see Create an account SAS - * @see Storage SAS overview */ public final class AccountSasSignatureValues { private String version; @@ -44,10 +37,33 @@ public final class AccountSasSignatureValues { /** * Initializes a new {@link AccountSasSignatureValues} object. + * @deprecated Please use {@link #AccountSasSignatureValues(OffsetDateTime, AccountSasPermission, AccountSasService, + * AccountSasResourceType)} */ + @Deprecated public AccountSasSignatureValues() { } + /** + * Initializes a new {@link AccountSasSignatureValues} object. + * @param expiryTime The time after which the SAS will no longer work. + * @param permissions {@link AccountSasPermission} allowed by the SAS. + * @param services {@link AccountSasService} targeted by the SAS. + * @param resourceTypes {@link AccountSasResourceType} targeted by the SAS. + */ + public AccountSasSignatureValues(OffsetDateTime expiryTime, AccountSasPermission permissions, + AccountSasService services, AccountSasResourceType resourceTypes) { + StorageImplUtils.assertNotNull("expiryTime", expiryTime); + StorageImplUtils.assertNotNull("services", services); + StorageImplUtils.assertNotNull("permissions", permissions); + StorageImplUtils.assertNotNull("resourceTypes", resourceTypes); + + this.expiryTime = expiryTime; + this.services = services.toString(); + this.resourceTypes = resourceTypes.toString(); + this.permissions = permissions.toString(); + } + /** * * @return the service version that is targeted, if {@code null} or empty the latest service version targeted by the @@ -117,7 +133,10 @@ public OffsetDateTime getExpiryTime() { * * @param expiryTime Expiry time to set * @return the updated AccountSasSignatureValues object. + * @deprecated Please use {@link #AccountSasSignatureValues(OffsetDateTime, AccountSasPermission, AccountSasService, + * AccountSasResourceType)} to specify the expiry time. */ + @Deprecated public AccountSasSignatureValues setExpiryTime(OffsetDateTime expiryTime) { this.expiryTime = expiryTime; return this; @@ -140,7 +159,10 @@ public String getPermissions() { * @param permissions Permissions to set. * @return the updated AccountSasSignatureValues object. * @throws NullPointerException if {@code permissions} is null. + * @deprecated Please use {@link #AccountSasSignatureValues(OffsetDateTime, AccountSasPermission, AccountSasService, + * AccountSasResourceType)} to specify the allowed permissions. */ + @Deprecated public AccountSasSignatureValues setPermissions(AccountSasPermission permissions) { StorageImplUtils.assertNotNull("permissions", permissions); this.permissions = permissions.toString(); @@ -178,7 +200,10 @@ public String getServices() { * * @param services Allowed services string to set * @return the updated AccountSasSignatureValues object. + * @deprecated Please use {@link #AccountSasSignatureValues(OffsetDateTime, AccountSasPermission, AccountSasService, + * AccountSasResourceType)} to specify the services being targeted. */ + @Deprecated public AccountSasSignatureValues setServices(String services) { this.services = services; return this; @@ -198,7 +223,10 @@ public String getResourceTypes() { * * @param resourceTypes Allowed resource types string to set * @return the updated AccountSasSignatureValues object. + * @deprecated Please use {@link #AccountSasSignatureValues(OffsetDateTime, AccountSasPermission, AccountSasService, + * AccountSasResourceType)} to specify the resource types being targeted. */ + @Deprecated public AccountSasSignatureValues setResourceTypes(String resourceTypes) { this.resourceTypes = resourceTypes; return this; @@ -232,7 +260,10 @@ public AccountSasSignatureValues setResourceTypes(String resourceTypes) { * @throws RuntimeException If the HMAC-SHA256 signature for {@code storageSharedKeyCredentials} fails to generate. * @throws NullPointerException If any of {@code storageSharedKeyCredentials}, {@code services}, * {@code resourceTypes}, {@code expiryTime}, or {@code permissions} is null. + * @deprecated Please use the generateAccountSas(AccountSasSignatureValues) method on the desired service client + * after initializing {@link AccountSasSignatureValues}. */ + @Deprecated public AccountSasQueryParameters generateSasQueryParameters( StorageSharedKeyCredential storageSharedKeyCredentials) { StorageImplUtils.assertNotNull("storageSharedKeyCredentials", storageSharedKeyCredentials); diff --git a/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/sas/BaseSasQueryParameters.java b/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/sas/BaseSasQueryParameters.java index 648faf156554..d921afe1a8c1 100644 --- a/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/sas/BaseSasQueryParameters.java +++ b/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/sas/BaseSasQueryParameters.java @@ -6,6 +6,8 @@ import com.azure.storage.common.Utility; import com.azure.storage.common.implementation.Constants; +import com.azure.storage.common.implementation.SasImplUtils; + import java.time.OffsetDateTime; import java.util.Map; import java.util.function.Function; @@ -16,7 +18,10 @@ * object to be constructed as part of a URL or it can be encoded into a {@code String} and appended to a URL directly * (though caution should be taken here in case there are existing query parameters, which might affect the appropriate * means of appending these query parameters). NOTE: Instances of this class are immutable to ensure thread safety. + * @deprecated Please use the generateSas method on the desired client after initializing the appropriate + * SasSignatureValues object. */ +@Deprecated public abstract class BaseSasQueryParameters { protected String version; @@ -39,7 +44,9 @@ public abstract class BaseSasQueryParameters { * @param queryParamsMap All query parameters for the request as key-value pairs * @param removeSASParametersFromMap When {@code true}, the SAS query parameters will be removed from * queryParamsMap + * @deprecated Please use SasSignatureValues */ + @Deprecated public BaseSasQueryParameters(Map queryParamsMap, boolean removeSASParametersFromMap) { this.version = getQueryParameter(queryParamsMap, Constants.UrlConstants.SAS_SERVICE_VERSION, removeSASParametersFromMap); @@ -64,7 +71,9 @@ public BaseSasQueryParameters(Map queryParamsMap, boolean remo * @param name The name of parameter to find. * @param remove Whether or not to remove the parameter from the map. * @return A String representing the query parameter + * @deprecated Please use SasSignatureValues */ + @Deprecated protected String getQueryParameter(Map parameters, String name, boolean remove) { return getQueryParameter(parameters, name, remove, value -> value); } @@ -78,7 +87,9 @@ protected String getQueryParameter(Map parameters, String name * @param remove Whether or not to remove the parameter from the map. * @param converter Function that transforms the value to a String. * @return The object + * @deprecated Please use SasSignatureValues */ + @Deprecated protected T getQueryParameter(Map parameters, String name, boolean remove, Function converter) { String[] parameterValue = parameters.get(name); @@ -105,7 +116,9 @@ protected T getQueryParameter(Map parameters, String name, * {@code null}. * @param permissions A {@code String} representing the storage permissions or {@code null}. * @param signature A {@code String} representing the signature for the SAS token. + * @deprecated Please use SasSignatureValues */ + @Deprecated public BaseSasQueryParameters(String version, SasProtocol protocol, OffsetDateTime startTime, OffsetDateTime expiryTime, SasIpRange sasIpRange, String permissions, String signature) { this.version = version; @@ -119,49 +132,63 @@ public BaseSasQueryParameters(String version, SasProtocol protocol, OffsetDateTi /** * @return The storage version + * @deprecated Please use SasSignatureValues */ + @Deprecated public String getVersion() { return version; } /** * @return The allowed HTTP protocol(s) or {@code null}. Please refer to {@link SasProtocol} for more details. + * @deprecated Please use SasSignatureValues */ + @Deprecated public SasProtocol getProtocol() { return protocol; } /** * @return The start time for this SAS token or {@code null}. + * @deprecated Please use SasSignatureValues */ + @Deprecated public OffsetDateTime getStartTime() { return startTime; } /** * @return The expiry time for this SAS token. + * @deprecated Please use SasSignatureValues */ + @Deprecated public OffsetDateTime getExpiryTime() { return expiryTime; } /** * @return {@link SasIpRange} + * @deprecated Please use SasSignatureValues */ + @Deprecated public SasIpRange getSasIpRange() { return sasIpRange; } /** * @return Please refer to *SASPermission classes for more details. + * @deprecated Please use SasSignatureValues */ + @Deprecated public String getPermissions() { return permissions; } /** * @return The signature for the SAS token. + * @deprecated Please use SasSignatureValues */ + @Deprecated public String getSignature() { return signature; } @@ -172,14 +199,11 @@ public String getSignature() { * @param sb The {@code StringBuilder} to append to. * @param param The {@code String} parameter to append. * @param value The value of the parameter to append. + * @deprecated Please use SasSignatureValues */ + @Deprecated protected void tryAppendQueryParameter(StringBuilder sb, String param, Object value) { - if (value != null) { - if (sb.length() != 0) { - sb.append('&'); - } - sb.append(Utility.urlEncode(param)).append('=').append(Utility.urlEncode(value.toString())); - } + SasImplUtils.tryAppendQueryParameter(sb, param, value); } /** @@ -187,19 +211,20 @@ protected void tryAppendQueryParameter(StringBuilder sb, String param, Object va * * @param dateTime The SAS date time. * @return A String representing the SAS date time. + * @deprecated Please use SasSignatureValues */ + @Deprecated protected String formatQueryParameterDate(OffsetDateTime dateTime) { - if (dateTime == null) { - return null; - } else { - return Constants.ISO_8601_UTC_DATE_FORMATTER.format(dateTime); - } + return SasImplUtils.formatQueryParameterDate(dateTime); } /** * Encodes all SAS query parameters into a string that can be appended to a URL. * * @return A {@code String} representing all SAS query parameters. + * @deprecated Please use the generateSas method on the desired client after initializing the appropriate + * SasSignatureValues object. */ + @Deprecated public abstract String encode(); } diff --git a/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/sas/CommonSasQueryParameters.java b/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/sas/CommonSasQueryParameters.java new file mode 100644 index 000000000000..d894d1f16cb7 --- /dev/null +++ b/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/sas/CommonSasQueryParameters.java @@ -0,0 +1,359 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.storage.common.sas; + +import com.azure.storage.common.Utility; +import com.azure.storage.common.implementation.Constants; +import com.azure.storage.common.implementation.SasImplUtils; + +import java.time.OffsetDateTime; +import java.util.Map; +import java.util.function.Function; + +/** + * Represents the components that make up an Azure Storage SAS' query parameters. This type is not constructed directly + * by the user; it is only generated by the URLParts type. NOTE: Instances of this class are immutable to ensure thread + * safety. + */ +public class CommonSasQueryParameters { + + private final String version; + + private final SasProtocol protocol; + + private final OffsetDateTime startTime; + + private final OffsetDateTime expiryTime; + + private final SasIpRange sasIpRange; + + private final String permissions; + + private final String signature; + + private final String services; + + private final String resourceTypes; + + private final String identifier; + + private final String keyObjectId; + + private final String keyTenantId; + + private final OffsetDateTime keyStart; + + private final OffsetDateTime keyExpiry; + + private final String keyService; + + private final String keyVersion; + + private final String resource; + + private final String cacheControl; + + private final String contentDisposition; + + private final String contentEncoding; + + private final String contentLanguage; + + private final String contentType; + + /** + * Creates a new {@link CommonSasQueryParameters} object. + * + * @param queryParamsMap All query parameters for the request as key-value pairs + * @param removeSasParametersFromMap When {@code true}, the SAS query parameters will be removed from + * queryParamsMap + */ + public CommonSasQueryParameters(Map queryParamsMap, boolean removeSasParametersFromMap) { + this.version = getQueryParameter(queryParamsMap, Constants.UrlConstants.SAS_SERVICE_VERSION, + removeSasParametersFromMap); + this.protocol = getQueryParameter(queryParamsMap, Constants.UrlConstants.SAS_PROTOCOL, + removeSasParametersFromMap, SasProtocol::parse); + this.startTime = getQueryParameter(queryParamsMap, Constants.UrlConstants.SAS_START_TIME, + removeSasParametersFromMap, Utility::parseDate); + this.expiryTime = getQueryParameter(queryParamsMap, Constants.UrlConstants.SAS_EXPIRY_TIME, + removeSasParametersFromMap, Utility::parseDate); + this.sasIpRange = getQueryParameter(queryParamsMap, Constants.UrlConstants.SAS_IP_RANGE, + removeSasParametersFromMap, SasIpRange::parse); + this.permissions = getQueryParameter(queryParamsMap, Constants.UrlConstants.SAS_SIGNED_PERMISSIONS, + removeSasParametersFromMap); + this.signature = getQueryParameter(queryParamsMap, Constants.UrlConstants.SAS_SIGNATURE, + removeSasParametersFromMap); + this.resourceTypes = getQueryParameter(queryParamsMap, Constants.UrlConstants.SAS_RESOURCES_TYPES, + removeSasParametersFromMap); + this.services = getQueryParameter(queryParamsMap, Constants.UrlConstants.SAS_SERVICES, + removeSasParametersFromMap); + this.identifier = getQueryParameter(queryParamsMap, Constants.UrlConstants.SAS_SIGNED_IDENTIFIER, + removeSasParametersFromMap); + this.keyObjectId = getQueryParameter(queryParamsMap, Constants.UrlConstants.SAS_SIGNED_OBJECT_ID, + removeSasParametersFromMap); + this.keyTenantId = getQueryParameter(queryParamsMap, Constants.UrlConstants.SAS_SIGNED_TENANT_ID, + removeSasParametersFromMap); + this.keyStart = getQueryParameter(queryParamsMap, Constants.UrlConstants.SAS_SIGNED_KEY_START, + removeSasParametersFromMap, Utility::parseDate); + this.keyExpiry = getQueryParameter(queryParamsMap, Constants.UrlConstants.SAS_SIGNED_KEY_EXPIRY, + removeSasParametersFromMap, Utility::parseDate); + this.keyService = getQueryParameter(queryParamsMap, Constants.UrlConstants.SAS_SIGNED_KEY_SERVICE, + removeSasParametersFromMap); + this.keyVersion = getQueryParameter(queryParamsMap, Constants.UrlConstants.SAS_SIGNED_KEY_VERSION, + removeSasParametersFromMap); + this.resource = getQueryParameter(queryParamsMap, Constants.UrlConstants.SAS_SIGNED_RESOURCE, + removeSasParametersFromMap); + this.cacheControl = getQueryParameter(queryParamsMap, Constants.UrlConstants.SAS_CACHE_CONTROL, + removeSasParametersFromMap); + this.contentDisposition = getQueryParameter(queryParamsMap, Constants.UrlConstants.SAS_CONTENT_DISPOSITION, + removeSasParametersFromMap); + this.contentEncoding = getQueryParameter(queryParamsMap, Constants.UrlConstants.SAS_CONTENT_ENCODING, + removeSasParametersFromMap); + this.contentLanguage = getQueryParameter(queryParamsMap, Constants.UrlConstants.SAS_CONTENT_LANGUAGE, + removeSasParametersFromMap); + this.contentType = getQueryParameter(queryParamsMap, Constants.UrlConstants.SAS_CONTENT_TYPE, + removeSasParametersFromMap); + } + + /** + * Helper method to get a query parameter + * + * @param parameters A {@code Map} of parameters to values to search. + * @param name The name of parameter to find. + * @param remove Whether or not to remove the parameter from the map. + * @return A String representing the query parameter + */ + private String getQueryParameter(Map parameters, String name, boolean remove) { + return getQueryParameter(parameters, name, remove, value -> value); + } + + /** + * Helper method to get a query parameter + * + * @param The object type. + * @param parameters A {@code Map} of parameters to values to search. + * @param name The name of parameter to find. + * @param remove Whether or not to remove the parameter from the map. + * @param converter Function that transforms the value to a String. + * @return The object + */ + private T getQueryParameter(Map parameters, String name, boolean remove, Function converter) { + String[] parameterValue = parameters.get(name); + if (parameterValue == null) { + return null; + } + + if (remove) { + parameters.remove(name); + } + + return converter.apply(parameterValue[0]); + } + + /** + * Encodes all SAS query parameters into a string that can be appended to a URL. + * + * @return A {@code String} representing all SAS query parameters. + */ + public String encode() { + /* + We should be url-encoding each key and each value, but because we know all the keys and values will encode to + themselves, we cheat except for the signature value. + */ + StringBuilder sb = new StringBuilder(); + + // Common + SasImplUtils.tryAppendQueryParameter(sb, Constants.UrlConstants.SAS_SERVICE_VERSION, this.version); + SasImplUtils.tryAppendQueryParameter(sb, Constants.UrlConstants.SAS_PROTOCOL, this.protocol); + SasImplUtils.tryAppendQueryParameter(sb, Constants.UrlConstants.SAS_START_TIME, + SasImplUtils.formatQueryParameterDate(this.startTime)); + SasImplUtils.tryAppendQueryParameter(sb, Constants.UrlConstants.SAS_EXPIRY_TIME, + SasImplUtils.formatQueryParameterDate(this.expiryTime)); + SasImplUtils.tryAppendQueryParameter(sb, Constants.UrlConstants.SAS_IP_RANGE, this.sasIpRange); + SasImplUtils.tryAppendQueryParameter(sb, Constants.UrlConstants.SAS_SIGNED_PERMISSIONS, this.permissions); + SasImplUtils.tryAppendQueryParameter(sb, Constants.UrlConstants.SAS_SIGNATURE, this.signature); + + // Account + SasImplUtils.tryAppendQueryParameter(sb, Constants.UrlConstants.SAS_SERVICES, this.services); + SasImplUtils.tryAppendQueryParameter(sb, Constants.UrlConstants.SAS_RESOURCES_TYPES, this.resourceTypes); + + // Services + SasImplUtils.tryAppendQueryParameter(sb, Constants.UrlConstants.SAS_SIGNED_IDENTIFIER, this.identifier); + SasImplUtils.tryAppendQueryParameter(sb, Constants.UrlConstants.SAS_SIGNED_OBJECT_ID, this.keyObjectId); + SasImplUtils.tryAppendQueryParameter(sb, Constants.UrlConstants.SAS_SIGNED_TENANT_ID, this.keyTenantId); + SasImplUtils.tryAppendQueryParameter(sb, Constants.UrlConstants.SAS_SIGNED_KEY_START, + SasImplUtils.formatQueryParameterDate(this.keyStart)); + SasImplUtils.tryAppendQueryParameter(sb, Constants.UrlConstants.SAS_SIGNED_KEY_EXPIRY, + SasImplUtils.formatQueryParameterDate(this.keyExpiry)); + SasImplUtils.tryAppendQueryParameter(sb, Constants.UrlConstants.SAS_SIGNED_KEY_SERVICE, this.keyService); + SasImplUtils.tryAppendQueryParameter(sb, Constants.UrlConstants.SAS_SIGNED_KEY_VERSION, this.keyVersion); + SasImplUtils.tryAppendQueryParameter(sb, Constants.UrlConstants.SAS_SIGNED_RESOURCE, this.resource); + SasImplUtils.tryAppendQueryParameter(sb, Constants.UrlConstants.SAS_CACHE_CONTROL, this.cacheControl); + SasImplUtils.tryAppendQueryParameter(sb, Constants.UrlConstants.SAS_CONTENT_DISPOSITION, + this.contentDisposition); + SasImplUtils.tryAppendQueryParameter(sb, Constants.UrlConstants.SAS_CONTENT_ENCODING, this.contentEncoding); + SasImplUtils.tryAppendQueryParameter(sb, Constants.UrlConstants.SAS_CONTENT_LANGUAGE, this.contentLanguage); + SasImplUtils.tryAppendQueryParameter(sb, Constants.UrlConstants.SAS_CONTENT_TYPE, this.contentType); + + return sb.toString(); + } + + /** + * @return The signed identifier. Please see here + * for more information. + */ + public String getIdentifier() { + return identifier; + } + + /** + * @return The storage resource. + */ + public String getResource() { + return resource; + } + + /** + * @return The Cache-Control header value when a client accesses the resource with this sas token. + */ + public String getCacheControl() { + return cacheControl; + } + + /** + * @return The Content-Disposition header value when a client accesses the resource with this sas token. + */ + public String getContentDisposition() { + return contentDisposition; + } + + /** + * @return The Content-Encoding header value when a client accesses the resource with this sas token. + */ + public String getContentEncoding() { + return contentEncoding; + } + + /** + * @return The Content-Language header value when a client accesses the resource with this sas token. + */ + public String getContentLanguage() { + return contentLanguage; + } + + /** + * @return The Content-Type header value when a client accesses the resource with this sas token. + */ + public String getContentType() { + return contentType; + } + + /** + * @return the object ID of the key. + */ + public String getKeyObjectId() { + return keyObjectId; + } + + /** + * @return the tenant ID of the key. + */ + public String getKeyTenantId() { + return keyTenantId; + } + + /** + * @return the datetime when the key becomes active. + */ + public OffsetDateTime getKeyStart() { + return keyStart; + } + + /** + * @return the datetime when the key expires. + */ + public OffsetDateTime getKeyExpiry() { + return keyExpiry; + } + + /** + * @return the services that are permitted by the key. + */ + public String getKeyService() { + return keyService; + } + + /** + * @return the service version that created the key. + */ + public String getKeyVersion() { + return keyVersion; + } + + /** + * @return The storage services being accessed (only for Account SAS). Please refer to {@link AccountSasService} for + * more details. + */ + public String getServices() { + return services; + } + + /** + * @return The storage resource types being accessed (only for Account SAS). Please refer to {@link + * AccountSasResourceType} for more details. + */ + public String getResourceTypes() { + return resourceTypes; + } + + /** + * @return The storage version + */ + public String getVersion() { + return version; + } + + /** + * @return The allowed HTTP protocol(s) or {@code null}. Please refer to {@link SasProtocol} for more details. + */ + public SasProtocol getProtocol() { + return protocol; + } + + /** + * @return The start time for this SAS token or {@code null}. + */ + public OffsetDateTime getStartTime() { + return startTime; + } + + /** + * @return The expiry time for this SAS token. + */ + public OffsetDateTime getExpiryTime() { + return expiryTime; + } + + /** + * @return {@link SasIpRange} + */ + public SasIpRange getSasIpRange() { + return sasIpRange; + } + + /** + * @return Please refer to *SASPermission classes for more details. + */ + public String getPermissions() { + return permissions; + } + + /** + * @return The signature for the SAS token. + */ + public String getSignature() { + return signature; + } +} diff --git a/sdk/storage/azure-storage-common/src/samples/java/com/azure/storage/common/sas/AccountSasSignatureValuesJavaDocCodeSnippets.java b/sdk/storage/azure-storage-common/src/samples/java/com/azure/storage/common/sas/AccountSasSignatureValuesJavaDocCodeSnippets.java deleted file mode 100644 index af33baca1953..000000000000 --- a/sdk/storage/azure-storage-common/src/samples/java/com/azure/storage/common/sas/AccountSasSignatureValuesJavaDocCodeSnippets.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.storage.common.sas; - -import com.azure.storage.common.StorageSharedKeyCredential; - -import java.time.Duration; -import java.time.OffsetDateTime; - -/** - * Code snippets for {@link AccountSasSignatureValues}. - */ -public class AccountSasSignatureValuesJavaDocCodeSnippets { - public void generateSas() { - // BEGIN: com.azure.storage.common.sas.accountSasSignatureValues.generateSasQueryParameters#StorageSharedKeyCredential - StorageSharedKeyCredential credential = new StorageSharedKeyCredential("my-account", "my-key"); - - AccountSasPermission permissions = new AccountSasPermission() - .setListPermission(true) - .setReadPermission(true); - String resourceTypes = new AccountSasResourceType().setContainer(true).toString(); - String services = new AccountSasService().setBlobAccess(true).setFileAccess(true).toString(); - - // Creates an account SAS that can read and list from blob containers and file shares. - // The following are required: permissions, resourceTypes, services, and expiry date. - AccountSasQueryParameters sasQueryParameters = new AccountSasSignatureValues() - .setPermissions(permissions) - .setResourceTypes(resourceTypes) - .setServices(services) - .setExpiryTime(OffsetDateTime.now().plus(Duration.ofDays(2))) - .generateSasQueryParameters(credential); - // END: com.azure.storage.common.sas.accountSasSignatureValues.generateSasQueryParameters#StorageSharedKeyCredential - } -} diff --git a/sdk/storage/azure-storage-file-datalake/pom.xml b/sdk/storage/azure-storage-file-datalake/pom.xml index 95d9a11ff51c..91eb06e103bf 100644 --- a/sdk/storage/azure-storage-file-datalake/pom.xml +++ b/sdk/storage/azure-storage-file-datalake/pom.xml @@ -13,7 +13,7 @@ com.azure azure-storage-file-datalake - 12.0.0-beta.7 + 12.0.0-beta.8 Microsoft Azure client library for File Storage Data Lake This module contains client library for Microsoft Azure File Storage Data Lake. @@ -55,7 +55,7 @@ com.azure azure-storage-blob - 12.1.0 + 12.2.0-beta.1 com.azure diff --git a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/DataLakeFileSystemAsyncClient.java b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/DataLakeFileSystemAsyncClient.java index 5d7d5fc3009c..03085cd85008 100644 --- a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/DataLakeFileSystemAsyncClient.java +++ b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/DataLakeFileSystemAsyncClient.java @@ -15,6 +15,7 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.storage.blob.BlobContainerAsyncClient; import com.azure.storage.blob.specialized.BlockBlobAsyncClient; +import com.azure.storage.common.StorageSharedKeyCredential; import com.azure.storage.common.Utility; import com.azure.storage.common.implementation.StorageImplUtils; import com.azure.storage.file.datalake.implementation.DataLakeStorageClientBuilder; @@ -29,9 +30,12 @@ import com.azure.storage.file.datalake.models.PathHttpHeaders; import com.azure.storage.file.datalake.models.PathItem; import com.azure.storage.file.datalake.models.PublicAccessType; +import com.azure.storage.file.datalake.models.UserDelegationKey; +import com.azure.storage.file.datalake.sas.DataLakeServiceSasSignatureValues; import reactor.core.publisher.Mono; import java.time.Duration; +import java.time.OffsetDateTime; import java.util.List; import java.util.Map; import java.util.Objects; @@ -710,4 +714,45 @@ public Mono> getAccessPolicyWithResponse(Stri BlobContainerAsyncClient getBlobContainerAsyncClient() { return blobContainerAsyncClient; } + + /** + * Generates a user delegation SAS for the file system using the specified + * {@link DataLakeServiceSasSignatureValues}. + *

See {@link DataLakeServiceSasSignatureValues} for more information on how to construct a user delegation SAS. + *

+ * + *

Code Samples

+ * + * {@codesnippet com.azure.storage.file.datalake.DataLakeFileSystemAsyncClient.generateUserDelegationSas#DataLakeServiceSasSignatureValues-UserDelegationKey} + * + * @param dataLakeServiceSasSignatureValues {@link DataLakeServiceSasSignatureValues} + * @param userDelegationKey A {@link UserDelegationKey} object used to sign the SAS values. + * @see DataLakeServiceAsyncClient#getUserDelegationKey(OffsetDateTime, OffsetDateTime) for more information on how + * to get a user delegation key. + * + * @return A {@code String} representing all SAS query parameters. + */ + public String generateUserDelegationSas(DataLakeServiceSasSignatureValues dataLakeServiceSasSignatureValues, + UserDelegationKey userDelegationKey) { + return blobContainerAsyncClient.generateUserDelegationSas( + Transforms.toBlobSasValues(dataLakeServiceSasSignatureValues), + Transforms.toBlobUserDelegationKey(userDelegationKey)); + } + + /** + * Generates a service SAS for the file system using the specified {@link DataLakeServiceSasSignatureValues} + * Note : The client must be authenticated via {@link StorageSharedKeyCredential} + *

See {@link DataLakeServiceSasSignatureValues} for more information on how to construct a service SAS.

+ * + *

Code Samples

+ * + * {@codesnippet com.azure.storage.file.datalake.DataLakeFileSystemAsyncClient.generateSas#DataLakeServiceSasSignatureValues} + * + * @param dataLakeServiceSasSignatureValues {@link DataLakeServiceSasSignatureValues} + * + * @return A {@code String} representing all SAS query parameters. + */ + public String generateSas(DataLakeServiceSasSignatureValues dataLakeServiceSasSignatureValues) { + return blobContainerAsyncClient.generateSas(Transforms.toBlobSasValues(dataLakeServiceSasSignatureValues)); + } } diff --git a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/DataLakeFileSystemClient.java b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/DataLakeFileSystemClient.java index 33f5708748d5..42a4c478c66f 100644 --- a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/DataLakeFileSystemClient.java +++ b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/DataLakeFileSystemClient.java @@ -13,6 +13,7 @@ import com.azure.storage.blob.BlobContainerClient; import com.azure.storage.blob.models.BlobContainerAccessPolicies; import com.azure.storage.blob.models.BlobContainerProperties; +import com.azure.storage.common.StorageSharedKeyCredential; import com.azure.storage.file.datalake.models.DataLakeRequestConditions; import com.azure.storage.file.datalake.models.DataLakeSignedIdentifier; import com.azure.storage.file.datalake.models.FileSystemAccessPolicies; @@ -21,8 +22,11 @@ import com.azure.storage.file.datalake.models.PathHttpHeaders; import com.azure.storage.file.datalake.models.PathItem; import com.azure.storage.file.datalake.models.PublicAccessType; +import com.azure.storage.file.datalake.models.UserDelegationKey; +import com.azure.storage.file.datalake.sas.DataLakeServiceSasSignatureValues; import java.time.Duration; +import java.time.OffsetDateTime; import java.util.List; import java.util.Map; import java.util.Objects; @@ -581,4 +585,44 @@ BlobContainerClient getBlobContainerClient() { return blobContainerClient; } + /** + * Generates a user delegation SAS for the file system using the specified + * {@link DataLakeServiceSasSignatureValues}. + *

See {@link DataLakeServiceSasSignatureValues} for more information on how to construct a user delegation SAS. + *

+ * + *

Code Samples

+ * + * {@codesnippet com.azure.storage.file.datalake.DataLakeFileSystemAsyncClient.generateUserDelegationSas#DataLakeServiceSasSignatureValues-UserDelegationKey} + * + * @param dataLakeServiceSasSignatureValues {@link DataLakeServiceSasSignatureValues} + * @param userDelegationKey A {@link UserDelegationKey} object used to sign the SAS values. + * @see DataLakeServiceClient#getUserDelegationKey(OffsetDateTime, OffsetDateTime) for more information on how to + * get a user delegation key. + * + * @return A {@code String} representing all SAS query parameters. + */ + public String generateUserDelegationSas(DataLakeServiceSasSignatureValues dataLakeServiceSasSignatureValues, + UserDelegationKey userDelegationKey) { + return dataLakeFileSystemAsyncClient.generateUserDelegationSas(dataLakeServiceSasSignatureValues, + userDelegationKey); + } + + /** + * Generates a service SAS for the file system using the specified {@link DataLakeServiceSasSignatureValues} + * Note : The client must be authenticated via {@link StorageSharedKeyCredential} + *

See {@link DataLakeServiceSasSignatureValues} for more information on how to construct a service SAS.

+ * + *

Code Samples

+ * + * {@codesnippet com.azure.storage.file.datalake.DataLakeFileSystemClient.generateSas#DataLakeServiceSasSignatureValues} + * + * @param dataLakeServiceSasSignatureValues {@link DataLakeServiceSasSignatureValues} + * + * @return A {@code String} representing all SAS query parameters. + */ + public String generateSas(DataLakeServiceSasSignatureValues dataLakeServiceSasSignatureValues) { + return dataLakeFileSystemAsyncClient.generateSas(dataLakeServiceSasSignatureValues); + } + } diff --git a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/DataLakeFileSystemClientBuilder.java b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/DataLakeFileSystemClientBuilder.java index cc2ecd44d5b1..53a96915e7c6 100644 --- a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/DataLakeFileSystemClientBuilder.java +++ b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/DataLakeFileSystemClientBuilder.java @@ -131,7 +131,7 @@ public DataLakeFileSystemClientBuilder endpoint(String endpoint) { this.fileSystemName = parts.getBlobContainerName(); this.endpoint = BuilderHelper.getEndpoint(parts); - String sasToken = parts.getSasQueryParameters().encode(); + String sasToken = parts.getCommonSasQueryParameters().encode(); if (!CoreUtils.isNullOrEmpty(sasToken)) { this.sasToken(sasToken); } diff --git a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/DataLakePathAsyncClient.java b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/DataLakePathAsyncClient.java index 0b2acf5aae0f..cf6b35526e04 100644 --- a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/DataLakePathAsyncClient.java +++ b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/DataLakePathAsyncClient.java @@ -15,6 +15,7 @@ import com.azure.storage.blob.BlobUrlParts; import com.azure.storage.blob.specialized.BlockBlobAsyncClient; import com.azure.storage.blob.specialized.SpecializedBlobClientBuilder; +import com.azure.storage.common.StorageSharedKeyCredential; import com.azure.storage.common.Utility; import com.azure.storage.file.datalake.implementation.DataLakeStorageClientBuilder; import com.azure.storage.file.datalake.implementation.DataLakeStorageClientImpl; @@ -33,9 +34,12 @@ import com.azure.storage.file.datalake.models.PathItem; import com.azure.storage.file.datalake.models.PathPermissions; import com.azure.storage.file.datalake.models.PathProperties; +import com.azure.storage.file.datalake.models.UserDelegationKey; +import com.azure.storage.file.datalake.sas.DataLakeServiceSasSignatureValues; import reactor.core.publisher.Mono; import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; import java.util.Base64; import java.util.List; import java.util.Map; @@ -686,4 +690,44 @@ SpecializedBlobClientBuilder prepareBuilderReplacePath(String destinationPath) { BlockBlobAsyncClient getBlockBlobAsyncClient() { return this.blockBlobAsyncClient; } + + /** + * Generates a user delegation SAS for the path using the specified {@link DataLakeServiceSasSignatureValues}. + *

See {@link DataLakeServiceSasSignatureValues} for more information on how to construct a user delegation SAS. + *

+ * + *

Code Samples

+ * + * {@codesnippet com.azure.storage.file.datalake.DataLakePathAsyncClient.generateUserDelegationSas#DataLakeServiceSasSignatureValues-UserDelegationKey} + * + * @param dataLakeServiceSasSignatureValues {@link DataLakeServiceSasSignatureValues} + * @param userDelegationKey A {@link UserDelegationKey} object used to sign the SAS values. + * @see DataLakeServiceAsyncClient#getUserDelegationKey(OffsetDateTime, OffsetDateTime) for more information on how + * to get a user delegation key. + * + * @return A {@code String} representing all SAS query parameters. + */ + public String generateUserDelegationSas(DataLakeServiceSasSignatureValues dataLakeServiceSasSignatureValues, + UserDelegationKey userDelegationKey) { + return blockBlobAsyncClient.generateUserDelegationSas( + Transforms.toBlobSasValues(dataLakeServiceSasSignatureValues), + Transforms.toBlobUserDelegationKey(userDelegationKey)); + } + + /** + * Generates a service SAS for the path using the specified {@link DataLakeServiceSasSignatureValues} + * Note : The client must be authenticated via {@link StorageSharedKeyCredential} + *

See {@link DataLakeServiceSasSignatureValues} for more information on how to construct a service SAS.

+ * + *

Code Samples

+ * + * {@codesnippet com.azure.storage.file.datalake.DataLakePathAsyncClient.generateSas#DataLakeServiceSasSignatureValues} + * + * @param dataLakeServiceSasSignatureValues {@link DataLakeServiceSasSignatureValues} + * + * @return A {@code String} representing all SAS query parameters. + */ + public String generateSas(DataLakeServiceSasSignatureValues dataLakeServiceSasSignatureValues) { + return blockBlobAsyncClient.generateSas(Transforms.toBlobSasValues(dataLakeServiceSasSignatureValues)); + } } diff --git a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/DataLakePathClient.java b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/DataLakePathClient.java index b200504ac844..29c1d6890053 100644 --- a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/DataLakePathClient.java +++ b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/DataLakePathClient.java @@ -10,6 +10,7 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.storage.blob.models.BlobProperties; import com.azure.storage.blob.specialized.BlockBlobClient; +import com.azure.storage.common.StorageSharedKeyCredential; import com.azure.storage.common.implementation.StorageImplUtils; import com.azure.storage.file.datalake.implementation.models.LeaseAccessConditions; import com.azure.storage.file.datalake.implementation.models.ModifiedAccessConditions; @@ -22,9 +23,12 @@ import com.azure.storage.file.datalake.models.PathInfo; import com.azure.storage.file.datalake.models.PathPermissions; import com.azure.storage.file.datalake.models.PathProperties; +import com.azure.storage.file.datalake.models.UserDelegationKey; +import com.azure.storage.file.datalake.sas.DataLakeServiceSasSignatureValues; import reactor.core.publisher.Mono; import java.time.Duration; +import java.time.OffsetDateTime; import java.util.List; import java.util.Map; @@ -456,4 +460,42 @@ BlockBlobClient getBlockBlobClient() { return blockBlobClient; } + /** + * Generates a user delegation SAS for the path using the specified {@link DataLakeServiceSasSignatureValues}. + *

See {@link DataLakeServiceSasSignatureValues} for more information on how to construct a user delegation SAS. + *

+ * + *

Code Samples

+ * + * {@codesnippet com.azure.storage.file.datalake.DataLakePathClient.generateUserDelegationSas#DataLakeServiceSasSignatureValues-UserDelegationKey} + * + * @param dataLakeServiceSasSignatureValues {@link DataLakeServiceSasSignatureValues} + * @param userDelegationKey A {@link UserDelegationKey} object used to sign the SAS values. + * @see DataLakeServiceClient#getUserDelegationKey(OffsetDateTime, OffsetDateTime) for more information on how to + * get a user delegation key. + * + * @return A {@code String} representing all SAS query parameters. + */ + public String generateUserDelegationSas(DataLakeServiceSasSignatureValues dataLakeServiceSasSignatureValues, + UserDelegationKey userDelegationKey) { + return dataLakePathAsyncClient.generateUserDelegationSas(dataLakeServiceSasSignatureValues, userDelegationKey); + } + + /** + * Generates a service SAS for the path using the specified {@link DataLakeServiceSasSignatureValues} + * Note : The client must be authenticated via {@link StorageSharedKeyCredential} + *

See {@link DataLakeServiceSasSignatureValues} for more information on how to construct a service SAS.

+ * + *

Code Samples

+ * + * {@codesnippet com.azure.storage.file.datalake.DataLakePathClient.generateSas#DataLakeServiceSasSignatureValues} + * + * @param dataLakeServiceSasSignatureValues {@link DataLakeServiceSasSignatureValues} + * + * @return A {@code String} representing all SAS query parameters. + */ + public String generateSas(DataLakeServiceSasSignatureValues dataLakeServiceSasSignatureValues) { + return dataLakePathAsyncClient.generateSas(dataLakeServiceSasSignatureValues); + } + } diff --git a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/DataLakePathClientBuilder.java b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/DataLakePathClientBuilder.java index e762c05776f8..7190fc36623e 100644 --- a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/DataLakePathClientBuilder.java +++ b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/DataLakePathClientBuilder.java @@ -262,7 +262,7 @@ public DataLakePathClientBuilder endpoint(String endpoint) { this.fileSystemName = parts.getBlobContainerName(); this.pathName = Utility.urlEncode(parts.getBlobName()); - String sasToken = parts.getSasQueryParameters().encode(); + String sasToken = parts.getCommonSasQueryParameters().encode(); if (!CoreUtils.isNullOrEmpty(sasToken)) { this.sasToken(sasToken); } diff --git a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/DataLakeServiceAsyncClient.java b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/DataLakeServiceAsyncClient.java index 145a3d08ca12..0ec038cdeacf 100644 --- a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/DataLakeServiceAsyncClient.java +++ b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/DataLakeServiceAsyncClient.java @@ -13,8 +13,10 @@ import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; import com.azure.storage.blob.BlobServiceAsyncClient; +import com.azure.storage.common.StorageSharedKeyCredential; import com.azure.storage.common.Utility; import com.azure.storage.common.implementation.StorageImplUtils; +import com.azure.storage.common.sas.AccountSasSignatureValues; import com.azure.storage.file.datalake.implementation.DataLakeStorageClientBuilder; import com.azure.storage.file.datalake.implementation.DataLakeStorageClientImpl; import com.azure.storage.file.datalake.models.DataLakeRequestConditions; @@ -317,4 +319,21 @@ public String getAccountName() { return this.accountName; } + /** + * Generates an account SAS for the Azure Storage account using the specified {@link AccountSasSignatureValues}. + * Note : The client must be authenticated via {@link StorageSharedKeyCredential} + *

See {@link AccountSasSignatureValues} for more information on how to construct an account SAS.

+ * + *

The snippet below generates a SAS that lasts for two days and gives the user read and list access to file + * systems and file shares.

+ * {@codesnippet com.azure.storage.file.datalake.DataLakeServiceAsyncClient.generateAccountSas#AccountSasSignatureValues} + * + * @param accountSasSignatureValues {@link AccountSasSignatureValues} + * + * @return A {@code String} representing all SAS query parameters. + */ + public String generateAccountSas(AccountSasSignatureValues accountSasSignatureValues) { + return blobServiceAsyncClient.generateAccountSas(accountSasSignatureValues); + } + } diff --git a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/DataLakeServiceClient.java b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/DataLakeServiceClient.java index 83dab73065d2..e07192712210 100644 --- a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/DataLakeServiceClient.java +++ b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/DataLakeServiceClient.java @@ -11,6 +11,8 @@ import com.azure.core.http.rest.SimpleResponse; import com.azure.core.util.Context; import com.azure.storage.blob.BlobServiceClient; +import com.azure.storage.common.StorageSharedKeyCredential; +import com.azure.storage.common.sas.AccountSasSignatureValues; import com.azure.storage.file.datalake.models.DataLakeRequestConditions; import com.azure.storage.file.datalake.models.FileSystemItem; import com.azure.storage.file.datalake.models.ListFileSystemsOptions; @@ -246,4 +248,21 @@ public Response getUserDelegationKeyWithResponse(OffsetDateTi public String getAccountName() { return this.dataLakeServiceAsyncClient.getAccountName(); } + + /** + * Generates an account SAS for the Azure Storage account using the specified {@link AccountSasSignatureValues}. + * Note : The client must be authenticated via {@link StorageSharedKeyCredential} + *

See {@link AccountSasSignatureValues} for more information on how to construct an account SAS.

+ * + *

The snippet below generates a SAS that lasts for two days and gives the user read and list access to file + * systems and file shares.

+ * {@codesnippet com.azure.storage.file.datalake.DataLakeServiceClient.generateAccountSas#AccountSasSignatureValues} + * + * @param accountSasSignatureValues {@link AccountSasSignatureValues} + * + * @return A {@code String} representing all SAS query parameters. + */ + public String generateAccountSas(AccountSasSignatureValues accountSasSignatureValues) { + return dataLakeServiceAsyncClient.generateAccountSas(accountSasSignatureValues); + } } diff --git a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/DataLakeServiceClientBuilder.java b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/DataLakeServiceClientBuilder.java index b6c467b11630..0db643a89cf1 100644 --- a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/DataLakeServiceClientBuilder.java +++ b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/DataLakeServiceClientBuilder.java @@ -114,7 +114,7 @@ public DataLakeServiceClientBuilder endpoint(String endpoint) { this.accountName = parts.getAccountName(); this.endpoint = BuilderHelper.getEndpoint(parts); - String sasToken = parts.getSasQueryParameters().encode(); + String sasToken = parts.getCommonSasQueryParameters().encode(); if (!CoreUtils.isNullOrEmpty(sasToken)) { this.sasToken(sasToken); } diff --git a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/Transforms.java b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/Transforms.java index 94f8e33160a7..c0f7cc9e0d41 100644 --- a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/Transforms.java +++ b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/Transforms.java @@ -18,6 +18,8 @@ import com.azure.storage.blob.models.BlobRequestConditions; import com.azure.storage.blob.models.BlobSignedIdentifier; import com.azure.storage.blob.models.ListBlobContainersOptions; +import com.azure.storage.blob.sas.BlobContainerSasPermission; +import com.azure.storage.blob.sas.BlobServiceSasSignatureValues; import com.azure.storage.file.datalake.implementation.models.Path; import com.azure.storage.file.datalake.models.AccessTier; import com.azure.storage.file.datalake.models.ArchiveStatus; @@ -44,6 +46,7 @@ import com.azure.storage.file.datalake.models.PublicAccessType; import com.azure.storage.file.datalake.models.DownloadRetryOptions; import com.azure.storage.file.datalake.models.UserDelegationKey; +import com.azure.storage.file.datalake.sas.DataLakeServiceSasSignatureValues; import java.time.OffsetDateTime; import java.time.format.DateTimeFormatter; @@ -155,6 +158,21 @@ static UserDelegationKey toDataLakeUserDelegationKey(com.azure.storage.blob.mode .setValue(blobUserDelegationKey.getValue()); } + static com.azure.storage.blob.models.UserDelegationKey toBlobUserDelegationKey(UserDelegationKey + dataLakeUserDelegationKey) { + if (dataLakeUserDelegationKey == null) { + return null; + } + return new com.azure.storage.blob.models.UserDelegationKey() + .setSignedExpiry(dataLakeUserDelegationKey.getSignedExpiry()) + .setSignedObjectId(dataLakeUserDelegationKey.getSignedObjectId()) + .setSignedTenantId(dataLakeUserDelegationKey.getSignedTenantId()) + .setSignedService(dataLakeUserDelegationKey.getSignedService()) + .setSignedStart(dataLakeUserDelegationKey.getSignedStart()) + .setSignedVersion(dataLakeUserDelegationKey.getSignedVersion()) + .setValue(dataLakeUserDelegationKey.getValue()); + } + static BlobHttpHeaders toBlobHttpHeaders(PathHttpHeaders pathHTTPHeaders) { if (pathHTTPHeaders == null) { return null; @@ -374,4 +392,37 @@ private static DataLakeAccessPolicy toDataLakeAccessPolicy(BlobAccessPolicy acce .setPermissions(accessPolicy.getPermissions()); } + static BlobServiceSasSignatureValues toBlobSasValues(DataLakeServiceSasSignatureValues + dataLakeServiceSasSignatureValues) { + if (dataLakeServiceSasSignatureValues == null) { + return null; + } + BlobServiceSasSignatureValues blobServiceSasSignatureValues; + if (dataLakeServiceSasSignatureValues.getIdentifier() != null) { + blobServiceSasSignatureValues = + new BlobServiceSasSignatureValues(dataLakeServiceSasSignatureValues.getIdentifier()); + } else { + // It's ok to use blob container sas permission since its a super set of blob sas permission + blobServiceSasSignatureValues = + new BlobServiceSasSignatureValues(dataLakeServiceSasSignatureValues.getExpiryTime(), + BlobContainerSasPermission.parse(dataLakeServiceSasSignatureValues.getPermissions())); + } + blobServiceSasSignatureValues.setVersion(dataLakeServiceSasSignatureValues.getVersion()) + .setProtocol(dataLakeServiceSasSignatureValues.getProtocol()) + .setStartTime(dataLakeServiceSasSignatureValues.getStartTime()) + .setExpiryTime(dataLakeServiceSasSignatureValues.getExpiryTime()) + .setSasIpRange(dataLakeServiceSasSignatureValues.getSasIpRange()) + .setIdentifier(dataLakeServiceSasSignatureValues.getIdentifier()) + .setCacheControl(dataLakeServiceSasSignatureValues.getCacheControl()) + .setContentDisposition(dataLakeServiceSasSignatureValues.getContentDisposition()) + .setContentEncoding(dataLakeServiceSasSignatureValues.getContentEncoding()) + .setContentLanguage(dataLakeServiceSasSignatureValues.getContentLanguage()) + .setContentType(dataLakeServiceSasSignatureValues.getContentType()); + if (dataLakeServiceSasSignatureValues.getPermissions() != null) { + // It's ok to use blob container sas permission since its a super set of blob sas permission + blobServiceSasSignatureValues.setPermissions(BlobContainerSasPermission.parse( + dataLakeServiceSasSignatureValues.getPermissions())); + } + return blobServiceSasSignatureValues; + } } diff --git a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/implementation/DataLakeStorageClientBuilder.java b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/implementation/DataLakeStorageClientBuilder.java index 4910238224ad..adb8496308a5 100644 --- a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/implementation/DataLakeStorageClientBuilder.java +++ b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/implementation/DataLakeStorageClientBuilder.java @@ -119,12 +119,7 @@ public DataLakeStorageClientBuilder pipeline(HttpPipeline pipeline) { */ public DataLakeStorageClientImpl build() { if (pipeline == null) { - this.pipeline = new HttpPipelineBuilder() - .policies( - new UserAgentPolicy(), - new RetryPolicy(), - new CookiePolicy()) - .build(); + this.pipeline = new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy(), new CookiePolicy()).build(); } DataLakeStorageClientImpl client = new DataLakeStorageClientImpl(pipeline); if (this.url != null) { diff --git a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/implementation/DataLakeStorageClientImpl.java b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/implementation/DataLakeStorageClientImpl.java index d7889190314c..5da07698529a 100644 --- a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/implementation/DataLakeStorageClientImpl.java +++ b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/implementation/DataLakeStorageClientImpl.java @@ -194,12 +194,7 @@ public PathsImpl paths() { * Initializes an instance of DataLakeStorageClient client. */ public DataLakeStorageClientImpl() { - this(new HttpPipelineBuilder() - .policies( - new UserAgentPolicy(), - new RetryPolicy(), - new CookiePolicy()) - .build()); + new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy(), new CookiePolicy()).build(); } /** diff --git a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/implementation/models/FileSystemCreateHeaders.java b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/implementation/models/FileSystemCreateHeaders.java index 6dec3d23abd4..43556a36daa6 100644 --- a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/implementation/models/FileSystemCreateHeaders.java +++ b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/implementation/models/FileSystemCreateHeaders.java @@ -7,7 +7,6 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.DateTimeRfc1123; import com.fasterxml.jackson.annotation.JsonProperty; - import java.time.OffsetDateTime; /** diff --git a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/implementation/models/FileSystemDeleteHeaders.java b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/implementation/models/FileSystemDeleteHeaders.java index 3badc1bcf8cb..c4960075336b 100644 --- a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/implementation/models/FileSystemDeleteHeaders.java +++ b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/implementation/models/FileSystemDeleteHeaders.java @@ -7,7 +7,6 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.DateTimeRfc1123; import com.fasterxml.jackson.annotation.JsonProperty; - import java.time.OffsetDateTime; /** diff --git a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/implementation/models/FileSystemGetPropertiesHeaders.java b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/implementation/models/FileSystemGetPropertiesHeaders.java index c05db6c5f7c4..fbc7c4c9cb9e 100644 --- a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/implementation/models/FileSystemGetPropertiesHeaders.java +++ b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/implementation/models/FileSystemGetPropertiesHeaders.java @@ -7,7 +7,6 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.DateTimeRfc1123; import com.fasterxml.jackson.annotation.JsonProperty; - import java.time.OffsetDateTime; /** diff --git a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/implementation/models/FileSystemListPathsHeaders.java b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/implementation/models/FileSystemListPathsHeaders.java index 54a8459846da..afbbaecfdea5 100644 --- a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/implementation/models/FileSystemListPathsHeaders.java +++ b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/implementation/models/FileSystemListPathsHeaders.java @@ -7,7 +7,6 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.DateTimeRfc1123; import com.fasterxml.jackson.annotation.JsonProperty; - import java.time.OffsetDateTime; /** diff --git a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/implementation/models/FileSystemSetPropertiesHeaders.java b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/implementation/models/FileSystemSetPropertiesHeaders.java index 773d3f07352f..3633fff610a6 100644 --- a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/implementation/models/FileSystemSetPropertiesHeaders.java +++ b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/implementation/models/FileSystemSetPropertiesHeaders.java @@ -7,7 +7,6 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.DateTimeRfc1123; import com.fasterxml.jackson.annotation.JsonProperty; - import java.time.OffsetDateTime; /** diff --git a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/implementation/models/ModifiedAccessConditions.java b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/implementation/models/ModifiedAccessConditions.java index c5eb910e020e..874d4b1bd026 100644 --- a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/implementation/models/ModifiedAccessConditions.java +++ b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/implementation/models/ModifiedAccessConditions.java @@ -7,7 +7,6 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.DateTimeRfc1123; import com.fasterxml.jackson.annotation.JsonProperty; - import java.time.OffsetDateTime; /** diff --git a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/implementation/models/Path.java b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/implementation/models/Path.java index a2701f214818..115d3db5037f 100644 --- a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/implementation/models/Path.java +++ b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/implementation/models/Path.java @@ -33,7 +33,7 @@ public final class Path { /* * The eTag property. */ - @JsonProperty(value = "eTag") + @JsonProperty(value = "etag") private String eTag; /* diff --git a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/implementation/models/PathAppendDataHeaders.java b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/implementation/models/PathAppendDataHeaders.java index ee0aabe9fdd4..97deadd6e10e 100644 --- a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/implementation/models/PathAppendDataHeaders.java +++ b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/implementation/models/PathAppendDataHeaders.java @@ -7,7 +7,6 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.DateTimeRfc1123; import com.fasterxml.jackson.annotation.JsonProperty; - import java.time.OffsetDateTime; /** diff --git a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/implementation/models/PathCreateHeaders.java b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/implementation/models/PathCreateHeaders.java index 6c346151763d..7752914d5f13 100644 --- a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/implementation/models/PathCreateHeaders.java +++ b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/implementation/models/PathCreateHeaders.java @@ -7,7 +7,6 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.DateTimeRfc1123; import com.fasterxml.jackson.annotation.JsonProperty; - import java.time.OffsetDateTime; /** diff --git a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/implementation/models/PathDeleteHeaders.java b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/implementation/models/PathDeleteHeaders.java index 32c81bf0c567..17ca7e86d857 100644 --- a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/implementation/models/PathDeleteHeaders.java +++ b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/implementation/models/PathDeleteHeaders.java @@ -7,7 +7,6 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.DateTimeRfc1123; import com.fasterxml.jackson.annotation.JsonProperty; - import java.time.OffsetDateTime; /** diff --git a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/implementation/models/PathFlushDataHeaders.java b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/implementation/models/PathFlushDataHeaders.java index 3433c873185b..c7859af45b72 100644 --- a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/implementation/models/PathFlushDataHeaders.java +++ b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/implementation/models/PathFlushDataHeaders.java @@ -7,7 +7,6 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.DateTimeRfc1123; import com.fasterxml.jackson.annotation.JsonProperty; - import java.time.OffsetDateTime; /** diff --git a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/implementation/models/PathGetPropertiesHeaders.java b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/implementation/models/PathGetPropertiesHeaders.java index a7d4a516131b..b6169c374e6e 100644 --- a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/implementation/models/PathGetPropertiesHeaders.java +++ b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/implementation/models/PathGetPropertiesHeaders.java @@ -7,7 +7,6 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.DateTimeRfc1123; import com.fasterxml.jackson.annotation.JsonProperty; - import java.time.OffsetDateTime; /** diff --git a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/implementation/models/PathLeaseHeaders.java b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/implementation/models/PathLeaseHeaders.java index 4c5bf855186c..5726c199cd3c 100644 --- a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/implementation/models/PathLeaseHeaders.java +++ b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/implementation/models/PathLeaseHeaders.java @@ -7,7 +7,6 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.DateTimeRfc1123; import com.fasterxml.jackson.annotation.JsonProperty; - import java.time.OffsetDateTime; /** diff --git a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/implementation/models/PathReadHeaders.java b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/implementation/models/PathReadHeaders.java index 537f18ccf019..26ec26eed3bc 100644 --- a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/implementation/models/PathReadHeaders.java +++ b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/implementation/models/PathReadHeaders.java @@ -7,7 +7,6 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.DateTimeRfc1123; import com.fasterxml.jackson.annotation.JsonProperty; - import java.time.OffsetDateTime; /** diff --git a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/implementation/models/PathSetAccessControlHeaders.java b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/implementation/models/PathSetAccessControlHeaders.java index 747563345ed7..204d4047cafe 100644 --- a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/implementation/models/PathSetAccessControlHeaders.java +++ b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/implementation/models/PathSetAccessControlHeaders.java @@ -7,7 +7,6 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.DateTimeRfc1123; import com.fasterxml.jackson.annotation.JsonProperty; - import java.time.OffsetDateTime; /** diff --git a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/implementation/models/PathUpdateHeaders.java b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/implementation/models/PathUpdateHeaders.java index cf329e32e0a8..9cbb747fcff8 100644 --- a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/implementation/models/PathUpdateHeaders.java +++ b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/implementation/models/PathUpdateHeaders.java @@ -7,7 +7,6 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.DateTimeRfc1123; import com.fasterxml.jackson.annotation.JsonProperty; - import java.time.OffsetDateTime; /** diff --git a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/implementation/models/ServiceListFileSystemsHeaders.java b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/implementation/models/ServiceListFileSystemsHeaders.java index 6c6c64045334..8617f0a5cd72 100644 --- a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/implementation/models/ServiceListFileSystemsHeaders.java +++ b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/implementation/models/ServiceListFileSystemsHeaders.java @@ -7,7 +7,6 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.DateTimeRfc1123; import com.fasterxml.jackson.annotation.JsonProperty; - import java.time.OffsetDateTime; /** diff --git a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/implementation/models/SourceModifiedAccessConditions.java b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/implementation/models/SourceModifiedAccessConditions.java index 2d83efc7cdd8..da453d6e32e5 100644 --- a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/implementation/models/SourceModifiedAccessConditions.java +++ b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/implementation/models/SourceModifiedAccessConditions.java @@ -7,7 +7,6 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.DateTimeRfc1123; import com.fasterxml.jackson.annotation.JsonProperty; - import java.time.OffsetDateTime; /** diff --git a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/implementation/util/BuilderHelper.java b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/implementation/util/BuilderHelper.java index a335d56e47ca..8b774a26bd09 100644 --- a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/implementation/util/BuilderHelper.java +++ b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/implementation/util/BuilderHelper.java @@ -16,6 +16,7 @@ import com.azure.core.http.policy.RequestIdPolicy; import com.azure.core.http.policy.UserAgentPolicy; import com.azure.core.util.Configuration; +import com.azure.core.util.CoreUtils; import com.azure.core.util.logging.ClientLogger; import com.azure.storage.blob.BlobUrlParts; import com.azure.storage.blob.implementation.util.ModelHelper; @@ -31,6 +32,7 @@ import java.util.ArrayList; import java.util.List; +import java.util.Map; /** * This class provides helper methods for common builder patterns. @@ -38,10 +40,10 @@ * RESERVED FOR INTERNAL USE. */ public final class BuilderHelper { - private static final String DEFAULT_USER_AGENT_NAME = "azure-storage-file-datalake"; - // {x-version-update-start;com.azure:azure-storage-file-datalake;current} - private static final String DEFAULT_USER_AGENT_VERSION = "12.0.0-preview.7"; - // {x-version-update-end} + private static final Map PROPERTIES = + CoreUtils.getProperties("azure-storage-file-datalake.properties"); + private static final String SDK_NAME = "name"; + private static final String SDK_VERSION = "version"; /** * Constructs a {@link HttpPipeline} from values passed from a builder. @@ -142,7 +144,7 @@ private static UserAgentPolicy getUserAgentPolicy(Configuration configuration) { configuration = (configuration == null) ? Configuration.NONE : configuration; return new UserAgentPolicy(getDefaultHttpLogOptions().getApplicationId(), - DEFAULT_USER_AGENT_NAME, DEFAULT_USER_AGENT_VERSION, configuration); + PROPERTIES.get(SDK_NAME), PROPERTIES.get(SDK_VERSION), configuration); } /* diff --git a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/models/package-info.java b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/models/package-info.java index 3f34db8854af..dfea091757bd 100644 --- a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/models/package-info.java +++ b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/models/package-info.java @@ -1,5 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. /** * Package containing classes for DataLakeStorageClient. diff --git a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/sas/DataLakeServiceSasQueryParameters.java b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/sas/DataLakeServiceSasQueryParameters.java deleted file mode 100644 index 9de0ee994b08..000000000000 --- a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/sas/DataLakeServiceSasQueryParameters.java +++ /dev/null @@ -1,276 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.storage.file.datalake.sas; - -import com.azure.storage.common.Utility; -import com.azure.storage.common.implementation.Constants; -import com.azure.storage.common.sas.BaseSasQueryParameters; -import com.azure.storage.common.sas.SasIpRange; -import com.azure.storage.common.sas.SasProtocol; -import com.azure.storage.file.datalake.DataLakePathClientBuilder; -import com.azure.storage.file.datalake.models.UserDelegationKey; - -import java.time.OffsetDateTime; -import java.util.Map; - -/** - * Represents the components that make up an Azure Storage SAS' query parameters. This type is not constructed directly - * by the user; it is only generated by the {@link DataLakeServiceSasSignatureValues} type. Once generated, it can be - * encoded to a {@code String} and set on a {@link DataLakePathClientBuilder} object to be constructed as part of a URL - * or appended to a URL directly (though caution should be taken here in case there are existing query parameters, - * which might affect the appropriate means of appending these query parameters). NOTE: Instances of this class are - * immutable to ensure thread safety. - */ -public final class DataLakeServiceSasQueryParameters extends BaseSasQueryParameters { - - private final String identifier; - - private final String keyObjectId; - - private final String keyTenantId; - - private final OffsetDateTime keyStart; - - private final OffsetDateTime keyExpiry; - - private final String keyService; - - private final String keyVersion; - - private final String resource; - - private final String cacheControl; - - private final String contentDisposition; - - private final String contentEncoding; - - private final String contentLanguage; - - private final String contentType; - - /** - * Creates a new {@link DataLakeServiceSasQueryParameters} object. - * - * @param queryParamsMap All query parameters for the request as key-value pairs - * @param removeSasParametersFromMap When {@code true}, the SAS query parameters will be removed from - * queryParamsMap - */ - public DataLakeServiceSasQueryParameters(Map queryParamsMap, boolean removeSasParametersFromMap) { - super(queryParamsMap, removeSasParametersFromMap); - this.identifier = getQueryParameter(queryParamsMap, Constants.UrlConstants.SAS_SIGNED_IDENTIFIER, - removeSasParametersFromMap); - this.keyObjectId = getQueryParameter(queryParamsMap, Constants.UrlConstants.SAS_SIGNED_OBJECT_ID, - removeSasParametersFromMap); - this.keyTenantId = getQueryParameter(queryParamsMap, Constants.UrlConstants.SAS_SIGNED_TENANT_ID, - removeSasParametersFromMap); - this.keyStart = getQueryParameter(queryParamsMap, Constants.UrlConstants.SAS_SIGNED_KEY_START, - removeSasParametersFromMap, Utility::parseDate); - this.keyExpiry = getQueryParameter(queryParamsMap, Constants.UrlConstants.SAS_SIGNED_KEY_EXPIRY, - removeSasParametersFromMap, Utility::parseDate); - this.keyService = getQueryParameter(queryParamsMap, Constants.UrlConstants.SAS_SIGNED_KEY_SERVICE, - removeSasParametersFromMap); - this.keyVersion = getQueryParameter(queryParamsMap, Constants.UrlConstants.SAS_SIGNED_KEY_VERSION, - removeSasParametersFromMap); - this.resource = getQueryParameter(queryParamsMap, Constants.UrlConstants.SAS_SIGNED_RESOURCE, - removeSasParametersFromMap); - this.cacheControl = getQueryParameter(queryParamsMap, Constants.UrlConstants.SAS_CACHE_CONTROL, - removeSasParametersFromMap); - this.contentDisposition = getQueryParameter(queryParamsMap, Constants.UrlConstants.SAS_CONTENT_DISPOSITION, - removeSasParametersFromMap); - this.contentEncoding = getQueryParameter(queryParamsMap, Constants.UrlConstants.SAS_CONTENT_ENCODING, - removeSasParametersFromMap); - this.contentLanguage = getQueryParameter(queryParamsMap, Constants.UrlConstants.SAS_CONTENT_LANGUAGE, - removeSasParametersFromMap); - this.contentType = getQueryParameter(queryParamsMap, Constants.UrlConstants.SAS_CONTENT_TYPE, - removeSasParametersFromMap); - } - - /** - * Creates a new {@link DataLakeServiceSasQueryParameters} object. These objects are only created internally by - * SASSignatureValues classes. - * - * @param version A {@code String} representing the storage version. - * @param protocol A {@code String} representing the allowed HTTP protocol(s) or {@code null}. - * @param startTime A {@code java.util.Date} representing the start time for this SAS token or {@code null}. - * @param expiryTime A {@code java.util.Date} representing the expiry time for this SAS token. - * @param sasIpRange A {@link SasIpRange} representing the range of valid IP addresses for this SAS token or - * {@code null}. - * @param identifier A {@code String} representing the signed identifier (only for Service SAS) or {@code null}. - * @param resource A {@code String} representing the storage file system or path (only for Service SAS). - * @param permissions A {@code String} representing the storage permissions or {@code null}. - * @param signature A {@code String} representing the signature for the SAS token. - */ - DataLakeServiceSasQueryParameters(String version, SasProtocol protocol, OffsetDateTime startTime, - OffsetDateTime expiryTime, SasIpRange sasIpRange, String identifier, String resource, String permissions, - String signature, String cacheControl, String contentDisposition, String contentEncoding, - String contentLanguage, String contentType, UserDelegationKey key) { - super(version, protocol, startTime, expiryTime, sasIpRange, permissions, signature); - - this.identifier = identifier; - this.resource = resource; - this.cacheControl = cacheControl; - this.contentDisposition = contentDisposition; - this.contentEncoding = contentEncoding; - this.contentLanguage = contentLanguage; - this.contentType = contentType; - - if (key != null) { - this.keyObjectId = key.getSignedObjectId(); - this.keyTenantId = key.getSignedTenantId(); - this.keyStart = key.getSignedStart(); - this.keyExpiry = key.getSignedExpiry(); - this.keyService = key.getSignedService(); - this.keyVersion = key.getSignedVersion(); - } else { - this.keyObjectId = null; - this.keyTenantId = null; - this.keyStart = null; - this.keyExpiry = null; - this.keyService = null; - this.keyVersion = null; - } - } - - /** - * @return The signed identifier (only for {@link DataLakeServiceSasSignatureValues}) or {@code null}. Please see - * here - * for more information. - */ - public String getIdentifier() { - return identifier; - } - - /** - * @return The storage file system or path (only for {@link DataLakeServiceSasSignatureValues}). - */ - public String getResource() { - return resource; - } - - /** - * @return The Cache-Control header value when a client accesses the resource with this sas token. - */ - public String getCacheControl() { - return cacheControl; - } - - /** - * @return The Content-Disposition header value when a client accesses the resource with this sas token. - */ - public String getContentDisposition() { - return contentDisposition; - } - - /** - * @return The Content-Encoding header value when a client accesses the resource with this sas token. - */ - public String getContentEncoding() { - return contentEncoding; - } - - /** - * @return The Content-Language header value when a client accesses the resource with this sas token. - */ - public String getContentLanguage() { - return contentLanguage; - } - - /** - * @return The Content-Type header value when a client accesses the resource with this sas token. - */ - public String getContentType() { - return contentType; - } - - /** - * @return the object ID of the key. - */ - public String getKeyObjectId() { - return keyObjectId; - } - - /** - * @return the tenant ID of the key. - */ - public String getKeyTenantId() { - return keyTenantId; - } - - /** - * @return the datetime when the key becomes active. - */ - public OffsetDateTime getKeyStart() { - return keyStart; - } - - /** - * @return the datetime when the key expires. - */ - public OffsetDateTime getKeyExpiry() { - return keyExpiry; - } - - /** - * @return the services that are permitted by the key. - */ - public String getKeyService() { - return keyService; - } - - /** - * @return the service version that created the key. - */ - public String getKeyVersion() { - return keyVersion; - } - - UserDelegationKey userDelegationKey() { - return new UserDelegationKey() - .setSignedExpiry(this.keyExpiry) - .setSignedObjectId(this.keyObjectId) - .setSignedService(this.keyService) - .setSignedStart(this.keyStart) - .setSignedTenantId(this.keyTenantId) - .setSignedVersion(this.keyVersion); - } - - /** - * Encodes all SAS query parameters into a string that can be appended to a URL. - * - * @return A {@code String} representing all SAS query parameters. - */ - public String encode() { - /* - We should be url-encoding each key and each value, but because we know all the keys and values will encode to - themselves, we cheat except for the signature value. - */ - StringBuilder sb = new StringBuilder(); - - tryAppendQueryParameter(sb, Constants.UrlConstants.SAS_SERVICE_VERSION, this.version); - tryAppendQueryParameter(sb, Constants.UrlConstants.SAS_PROTOCOL, this.protocol); - tryAppendQueryParameter(sb, Constants.UrlConstants.SAS_START_TIME, formatQueryParameterDate(this.startTime)); - tryAppendQueryParameter(sb, Constants.UrlConstants.SAS_EXPIRY_TIME, formatQueryParameterDate(this.expiryTime)); - tryAppendQueryParameter(sb, Constants.UrlConstants.SAS_IP_RANGE, this.sasIpRange); - tryAppendQueryParameter(sb, Constants.UrlConstants.SAS_SIGNED_IDENTIFIER, this.identifier); - tryAppendQueryParameter(sb, Constants.UrlConstants.SAS_SIGNED_OBJECT_ID, this.keyObjectId); - tryAppendQueryParameter(sb, Constants.UrlConstants.SAS_SIGNED_TENANT_ID, this.keyTenantId); - tryAppendQueryParameter(sb, Constants.UrlConstants.SAS_SIGNED_KEY_START, - formatQueryParameterDate(this.keyStart)); - tryAppendQueryParameter(sb, Constants.UrlConstants.SAS_SIGNED_KEY_EXPIRY, - formatQueryParameterDate(this.keyExpiry)); - tryAppendQueryParameter(sb, Constants.UrlConstants.SAS_SIGNED_KEY_SERVICE, this.keyService); - tryAppendQueryParameter(sb, Constants.UrlConstants.SAS_SIGNED_KEY_VERSION, this.keyVersion); - tryAppendQueryParameter(sb, Constants.UrlConstants.SAS_SIGNED_RESOURCE, this.resource); - tryAppendQueryParameter(sb, Constants.UrlConstants.SAS_SIGNED_PERMISSIONS, this.permissions); - tryAppendQueryParameter(sb, Constants.UrlConstants.SAS_SIGNATURE, this.signature); - tryAppendQueryParameter(sb, Constants.UrlConstants.SAS_CACHE_CONTROL, this.cacheControl); - tryAppendQueryParameter(sb, Constants.UrlConstants.SAS_CONTENT_DISPOSITION, this.contentDisposition); - tryAppendQueryParameter(sb, Constants.UrlConstants.SAS_CONTENT_ENCODING, this.contentEncoding); - tryAppendQueryParameter(sb, Constants.UrlConstants.SAS_CONTENT_LANGUAGE, this.contentLanguage); - tryAppendQueryParameter(sb, Constants.UrlConstants.SAS_CONTENT_TYPE, this.contentType); - - return sb.toString(); - } -} diff --git a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/sas/DataLakeServiceSasSignatureValues.java b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/sas/DataLakeServiceSasSignatureValues.java index 3dc9b5a7b391..ac996fbce298 100644 --- a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/sas/DataLakeServiceSasSignatureValues.java +++ b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/sas/DataLakeServiceSasSignatureValues.java @@ -3,55 +3,27 @@ package com.azure.storage.file.datalake.sas; -import com.azure.core.util.CoreUtils; -import com.azure.core.util.logging.ClientLogger; -import com.azure.storage.common.StorageSharedKeyCredential; -import com.azure.storage.common.Utility; -import com.azure.storage.common.implementation.Constants; import com.azure.storage.common.implementation.StorageImplUtils; import com.azure.storage.common.sas.SasIpRange; import com.azure.storage.common.sas.SasProtocol; -import com.azure.storage.file.datalake.DataLakeServiceVersion; import com.azure.storage.file.datalake.models.UserDelegationKey; import java.time.OffsetDateTime; /** - * Used to generate a Shared Access Signature (SAS) for an Azure Data Lake Storage service. Once all the values here - * are set, call {@link - * #generateSasQueryParameters(StorageSharedKeyCredential) generateSasQueryParameters(StorageSharedKeyCredential)} or - * {@link #generateSasQueryParameters(UserDelegationKey, String) generateSasQueryParameters(UserDelegationKey, String)} - * to obtain a representation of the SAS which can be applied to dfs urls. + * Used to initialize parameters for a Shared Access Signature (SAS) for an Azure Data Lake Storage service. Once all + * the values here are set, use the appropriate SAS generation method on the desired file system/path client to obtain a + * representation of the SAS which can then be applied to a new client using the .sasToken(String) method on the + * desired client builder. * - *

Generating SAS query parameters with {@link StorageSharedKeyCredential}

- * The following code generates SAS query parameters for an Azure storage path. - *

- * {@codesnippet com.azure.storage.file.datalake.sas.DataLakeServiceSasSignatureValues.generateSasQueryParameters#StorageSharedKeyCredential} - * - *

Generating SAS query parameters with {@link UserDelegationKey}

- * The following sample generates SAS query parameters for an Azure storage file system. - *

- * {@codesnippet com.azure.storage.file.datalake.sas.DataLakeServiceSasSignatureValues.generateSasQueryParameters#UserDelegationKey-String} - * - * @see DataLakeServiceSasQueryParameters * @see Storage SAS overview * @see Constructing a Service * SAS + * @see Constructing a + * User Delegation SAS */ public final class DataLakeServiceSasSignatureValues { - /** - * The SAS blob constant. - */ - private static final String SAS_BLOB_CONSTANT = "b"; - - /** - * The SAS blob container constant. - */ - private static final String SAS_CONTAINER_CONSTANT = "c"; - - private final ClientLogger logger = new ClientLogger(DataLakeServiceSasSignatureValues.class); - private String version; private SasProtocol protocol; @@ -64,14 +36,6 @@ public final class DataLakeServiceSasSignatureValues { private SasIpRange sasIpRange; - private String fileSystemName; - - private String pathName; - - private String resource; - - private String snapshotId; - private String identifier; private String cacheControl; @@ -84,66 +48,41 @@ public final class DataLakeServiceSasSignatureValues { private String contentType; - /** - * Creates an object with empty values for all fields. - */ - public DataLakeServiceSasSignatureValues() { - } - /** * Creates an object with the specified expiry time and permissions * - * @param expiryTime Time the SAS becomes valid - * @param permissions Permissions granted by the SAS + * @param expiryTime The time after which the SAS will no longer work. + * @param permissions {@link FileSystemSasPermission} allowed by the SAS. */ - DataLakeServiceSasSignatureValues(OffsetDateTime expiryTime, String permissions) { + public DataLakeServiceSasSignatureValues(OffsetDateTime expiryTime, FileSystemSasPermission permissions) { + StorageImplUtils.assertNotNull("expiryTime", expiryTime); + StorageImplUtils.assertNotNull("permissions", permissions); this.expiryTime = expiryTime; - this.permissions = permissions; + this.permissions = permissions.toString(); } /** - * Creates an object with the specified identifier + * Creates an object with the specified expiry time and permissions * - * @param identifier Identifier for the SAS + * @param expiryTime When the SAS will no longer work + * @param permissions {@link PathSasPermission} allowed by the SAS */ - DataLakeServiceSasSignatureValues(String identifier) { - this.identifier = identifier; + public DataLakeServiceSasSignatureValues(OffsetDateTime expiryTime, PathSasPermission permissions) { + StorageImplUtils.assertNotNull("expiryTime", expiryTime); + StorageImplUtils.assertNotNull("permissions", permissions); + this.expiryTime = expiryTime; + this.permissions = permissions.toString(); } /** - * Creates an object with specified values. + * Creates an object with the specified identifier. + * NOTE: Identifier can not be used for a {@link UserDelegationKey} SAS. * - * @param version The version of the service this SAS will target. If not specified, it will default to the version - * targeted by the library. - * @param sasProtocol The {@link SasProtocol} which determines the protocols allowed by the SAS. - * @param startTime When the SAS will take effect. - * @param expiryTime The time after which the SAS will no longer work. - * @param permission The permissions string allowed by the SAS. - * @param sasIpRange The {@link SasIpRange} which determines the IP ranges that are allowed to use the SAS. - * @param identifier The name of the access policy on the container this SAS references if any. - * @param cacheControl The cache-control header for the SAS. - * @param contentDisposition The content-disposition header for the SAS. - * @param contentEncoding The content-encoding header for the SAS. - * @param contentLanguage The content-language header for the SAS. - * @param contentType The content-type header for the SAS. + * @param identifier Name of the access policy */ - public DataLakeServiceSasSignatureValues(String version, SasProtocol sasProtocol, OffsetDateTime startTime, - OffsetDateTime expiryTime, String permission, SasIpRange sasIpRange, String identifier, String cacheControl, - String contentDisposition, String contentEncoding, String contentLanguage, String contentType) { - if (version != null) { - this.version = version; - } - this.protocol = sasProtocol; - this.startTime = startTime; - this.expiryTime = expiryTime; - this.permissions = permission; - this.sasIpRange = sasIpRange; + public DataLakeServiceSasSignatureValues(String identifier) { + StorageImplUtils.assertNotNull("identifier", identifier); this.identifier = identifier; - this.cacheControl = cacheControl; - this.contentDisposition = contentDisposition; - this.contentEncoding = contentEncoding; - this.contentLanguage = contentLanguage; - this.contentType = contentType; } /** @@ -272,48 +211,6 @@ public DataLakeServiceSasSignatureValues setSasIpRange(SasIpRange sasIpRange) { return this; } - /** - * Gets the name of the file system the SAS user may access. - * - * @return The name of the file system the SAS user may access. - */ - public String getFileSystemName() { - return fileSystemName; - } - - /** - * Sets the container the SAS user may access. - * - * @param fileSystemName The name of the file system. - * @return The updated DataLakeServiceSasSignatureValues object. - */ - public DataLakeServiceSasSignatureValues setFileSystemName(String fileSystemName) { - this.fileSystemName = fileSystemName; - return this; - } - - /** - * Decodes and gets the name of the path the SAS user may access. {@code null} or an empty string is returned when a - * creating a file system SAS. - * - * @return The decoded name of the path the SAS user may access. {@code null} or an empty string is returned when a - * creating a file system SAS. - */ - public String getPathName() { - return pathName; - } - - /** - * Sets the path the SAS user may access. Use {@code null} or an empty string to create a file system SAS. - * - * @param pathName The name of the path. Use {@code null} or an empty string to create a file system SAS. - * @return The updated DataLakeServiceSasSignatureValues object. - */ - public DataLakeServiceSasSignatureValues setPathName(String pathName) { - this.pathName = (pathName == null) ? null : Utility.urlDecode(pathName); - return this; - } - /** * @return the name of the access policy on the file system this SAS references if any. Please see * here @@ -425,198 +322,4 @@ public DataLakeServiceSasSignatureValues setContentType(String contentType) { this.contentType = contentType; return this; } - - /** - * Uses an account's shared key credential to sign these signature values to produce the proper SAS query - * parameters. - * - *

Notes on SAS generation

- *

- *

    - *
  • If {@link #setVersion(String) version} is not set, the {@link DataLakeServiceVersion#getLatest() latest - * service version} is used.
  • - *
  • If {@link #setIdentifier(String) identifier} is set, {@link #setExpiryTime(OffsetDateTime) expiryTime} and - * permissions should not be set. These values are inherited from the stored access policy.
  • - *
  • Otherwise, {@link #setExpiryTime(OffsetDateTime) expiryTime} and {@link #getPermissions() permissions} must - * be set.
  • - *
- * - *

- * The type of SAS query parameters returned depends on the following: - *

    - *
  1. If {@link #getPathName()} is not set, file system SAS query parameters are returned.
  2. - *
  3. If only {@link #getPathName()} is set, path SAS query parameters are returned.
  4. - *
- * - * See class level JavaDocs for code snippets. - * - * @param storageSharedKeyCredentials A {@link StorageSharedKeyCredential} object used to sign the SAS values. - * @return {@link DataLakeServiceSasQueryParameters} - * @throws IllegalStateException If the HMAC-SHA256 algorithm isn't supported, if the key isn't a valid Base64 - * encoded string, or the UTF-8 charset isn't supported. - * @throws IllegalArgumentException if {@link #getPermissions()} contains an invalid character for the SAS resource. - * @throws NullPointerException if {@code storageSharedKeyCredentials} is null. - */ - public DataLakeServiceSasQueryParameters generateSasQueryParameters( - StorageSharedKeyCredential storageSharedKeyCredentials) { - StorageImplUtils.assertNotNull("storageSharedKeyCredentials", storageSharedKeyCredentials); - - ensureState(); - - // Signature is generated on the un-url-encoded values. - final String canonicalName = getCanonicalName(storageSharedKeyCredentials.getAccountName()); - final String signature = storageSharedKeyCredentials.computeHmac256(stringToSign(canonicalName)); - - return new DataLakeServiceSasQueryParameters(this.version, this.protocol, this.startTime, this.expiryTime, - this.sasIpRange, this.identifier, this.resource, this.permissions, signature, this.cacheControl, - this.contentDisposition, this.contentEncoding, this.contentLanguage, this.contentType, null /* delegate */); - } - - /** - * Uses a user delegation key to sign these signature values to produce the proper SAS query parameters. - * - *

Notes on SAS generation

- *

- *

    - *
  • If {@link #setVersion(String) version} is not set, the {@link DataLakeServiceVersion#getLatest() latest - * service version} is used.
  • - *
  • If {@link #setIdentifier(String) identifier} is set, {@link #setExpiryTime(OffsetDateTime) expiryTime} and - * permissions should not be set. These values are inherited from the stored access policy.
  • - *
  • Otherwise, {@link #setExpiryTime(OffsetDateTime) expiryTime} and {@link #getPermissions() permissions} must - * be set.
  • - *
- * - *

- * The type of SAS query parameters returned depends on the following: - *

    - *
  1. If {@link #getPathName()} is not set, file system SAS query parameters are returned.
  2. - *
  3. If only {@link #getPathName()} is set, path SAS query parameters are returned.
  4. - *
- * - * See class level JavaDocs for code snippets. - * - * @param delegationKey A {@link UserDelegationKey} object used to sign the SAS values. - * @param accountName Azure Storage account name to generate SAS for. - * @return {@link DataLakeServiceSasQueryParameters} - * @throws IllegalStateException If the HMAC-SHA256 algorithm isn't supported, if the key isn't a valid Base64 - * encoded string, or the UTF-8 charset isn't supported. - * @throws IllegalArgumentException if {@link #getPermissions()} contains an invalid character for the SAS resource. - * @throws NullPointerException if {@code delegationKey} or {@code account} is null. - * @see - * Create a user delegation SAS - */ - public DataLakeServiceSasQueryParameters generateSasQueryParameters(UserDelegationKey delegationKey, - String accountName) { - StorageImplUtils.assertNotNull("delegationKey", delegationKey); - StorageImplUtils.assertNotNull("accountName", accountName); - - ensureState(); - - // Signature is generated on the un-url-encoded values. - final String canonicalName = getCanonicalName(accountName); - String signature = StorageImplUtils.computeHMac256( - delegationKey.getValue(), stringToSign(delegationKey, canonicalName)); - - - return new DataLakeServiceSasQueryParameters(this.version, this.protocol, this.startTime, this.expiryTime, - this.sasIpRange, null /* identifier */, this.resource, this.permissions, signature, - this.cacheControl, this.contentDisposition, this.contentEncoding, this.contentLanguage, this.contentType, - delegationKey); - } - - /** - * Ensures that the builder's properties are in a consistent state. - - * 1. If there is no version, use latest. - * 2. Resource name is chosen by: - * a. If "pathName" is _not_ set, it is a file system resource. - * b. Otherwise, it is a path resource. - * 3. Reparse permissions depending on what the resource is. If it is an unrecognised resource, do nothing. - * - * Taken from: - * https://github.com/Azure/azure-storage-blob-go/blob/master/azblob/sas_service.go#L33 - * https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/storage/Azure.Storage.Blobs/src/Sas/BlobSasBuilder.cs - */ - private void ensureState() { - if (version == null) { - version = DataLakeServiceVersion.getLatest().getVersion(); - } - - if (CoreUtils.isNullOrEmpty(pathName)) { - resource = SAS_CONTAINER_CONSTANT; - } else { - resource = SAS_BLOB_CONSTANT; - } - - if (permissions != null) { - switch (resource) { - case SAS_BLOB_CONSTANT: - permissions = PathSasPermission.parse(permissions).toString(); - break; - case SAS_CONTAINER_CONSTANT: - permissions = FileSystemSasPermission.parse(permissions).toString(); - break; - default: - // We won't reparse the permissions if we don't know the type. - logger.info("Not re-parsing permissions. Resource type '{}' is unknown.", resource); - break; - } - } - } - - /** - * Computes the canonical name for a file system or path resource for SAS signing. - */ - private String getCanonicalName(String account) { - // File System: "/blob/account/containername" - // Path: "/blob/account/containername/blobname" - return CoreUtils.isNullOrEmpty(pathName) - ? String.format("/blob/%s/%s", account, fileSystemName) - : String.format("/blob/%s/%s/%s", account, fileSystemName, pathName.replace("\\", "/")); - } - - private String stringToSign(String canonicalName) { - return String.join("\n", - this.permissions == null ? "" : permissions, - this.startTime == null ? "" : Constants.ISO_8601_UTC_DATE_FORMATTER.format(this.startTime), - this.expiryTime == null ? "" : Constants.ISO_8601_UTC_DATE_FORMATTER.format(this.expiryTime), - canonicalName, - this.identifier == null ? "" : this.identifier, - this.sasIpRange == null ? "" : this.sasIpRange.toString(), - this.protocol == null ? "" : this.protocol.toString(), - version, - resource, - this.snapshotId == null ? "" : this.snapshotId, - this.cacheControl == null ? "" : this.cacheControl, - this.contentDisposition == null ? "" : this.contentDisposition, - this.contentEncoding == null ? "" : this.contentEncoding, - this.contentLanguage == null ? "" : this.contentLanguage, - this.contentType == null ? "" : this.contentType - ); - } - - private String stringToSign(final UserDelegationKey key, String canonicalName) { - return String.join("\n", - this.permissions == null ? "" : this.permissions, - this.startTime == null ? "" : Constants.ISO_8601_UTC_DATE_FORMATTER.format(this.startTime), - this.expiryTime == null ? "" : Constants.ISO_8601_UTC_DATE_FORMATTER.format(this.expiryTime), - canonicalName, - key.getSignedObjectId() == null ? "" : key.getSignedObjectId(), - key.getSignedTenantId() == null ? "" : key.getSignedTenantId(), - key.getSignedStart() == null ? "" : Constants.ISO_8601_UTC_DATE_FORMATTER.format(key.getSignedStart()), - key.getSignedExpiry() == null ? "" : Constants.ISO_8601_UTC_DATE_FORMATTER.format(key.getSignedExpiry()), - key.getSignedService() == null ? "" : key.getSignedService(), - key.getSignedVersion() == null ? "" : key.getSignedVersion(), - this.sasIpRange == null ? "" : this.sasIpRange.toString(), - this.protocol == null ? "" : this.protocol.toString(), - version, - resource, - this.snapshotId == null ? "" : this.snapshotId, - this.cacheControl == null ? "" : this.cacheControl, - this.contentDisposition == null ? "" : this.contentDisposition, - this.contentEncoding == null ? "" : this.contentEncoding, - this.contentLanguage == null ? "" : this.contentLanguage, - this.contentType == null ? "" : this.contentType - ); - } } diff --git a/sdk/storage/azure-storage-file-datalake/src/main/resources/azure-storage-file-datalake.properties b/sdk/storage/azure-storage-file-datalake/src/main/resources/azure-storage-file-datalake.properties new file mode 100644 index 000000000000..ca812989b4f2 --- /dev/null +++ b/sdk/storage/azure-storage-file-datalake/src/main/resources/azure-storage-file-datalake.properties @@ -0,0 +1,2 @@ +name=${project.artifactId} +version=${project.version} diff --git a/sdk/storage/azure-storage-file-datalake/src/samples/java/com/azure/storage/file/datalake/DataLakeServiceAsyncClientJavaDocCodeSnippets.java b/sdk/storage/azure-storage-file-datalake/src/samples/java/com/azure/storage/file/datalake/DataLakeServiceAsyncClientJavaDocCodeSnippets.java index 070e1a0c0ad7..b5d147f90f8a 100644 --- a/sdk/storage/azure-storage-file-datalake/src/samples/java/com/azure/storage/file/datalake/DataLakeServiceAsyncClientJavaDocCodeSnippets.java +++ b/sdk/storage/azure-storage-file-datalake/src/samples/java/com/azure/storage/file/datalake/DataLakeServiceAsyncClientJavaDocCodeSnippets.java @@ -3,11 +3,16 @@ package com.azure.storage.file.datalake; +import com.azure.storage.common.sas.AccountSasPermission; +import com.azure.storage.common.sas.AccountSasResourceType; +import com.azure.storage.common.sas.AccountSasService; +import com.azure.storage.common.sas.AccountSasSignatureValues; import com.azure.storage.file.datalake.models.DataLakeRequestConditions; import com.azure.storage.file.datalake.models.FileSystemListDetails; import com.azure.storage.file.datalake.models.ListFileSystemsOptions; import com.azure.storage.file.datalake.models.PublicAccessType; +import java.time.Duration; import java.time.OffsetDateTime; import java.util.Collections; import java.util.Map; @@ -112,4 +117,24 @@ public void getUserDelegationKeyWithResponse() { System.out.printf("User delegation key: %s%n", response.getValue().getValue())); // END: com.azure.storage.file.datalake.DataLakeServiceAsyncClient.getUserDelegationKeyWithResponse#OffsetDateTime-OffsetDateTime } + + /** + * Code snippet for {@link DataLakeServiceAsyncClient#generateAccountSas(AccountSasSignatureValues)} + */ + public void generateAccountSas() { + // BEGIN: com.azure.storage.file.datalake.DataLakeServiceAsyncClient.generateAccountSas#AccountSasSignatureValues + AccountSasPermission permissions = new AccountSasPermission() + .setListPermission(true) + .setReadPermission(true); + AccountSasResourceType resourceTypes = new AccountSasResourceType().setContainer(true); + AccountSasService services = new AccountSasService().setBlobAccess(true).setFileAccess(true); + OffsetDateTime expiryTime = OffsetDateTime.now().plus(Duration.ofDays(2)); + + AccountSasSignatureValues sasValues = + new AccountSasSignatureValues(expiryTime, permissions, services, resourceTypes); + + // Client must be authenticated via StorageSharedKeyCredential + String sas = client.generateAccountSas(sasValues); + // END: com.azure.storage.file.datalake.DataLakeServiceAsyncClient.generateAccountSas#AccountSasSignatureValues + } } diff --git a/sdk/storage/azure-storage-file-datalake/src/samples/java/com/azure/storage/file/datalake/DataLakeServiceClientJavaDocCodeSnippets.java b/sdk/storage/azure-storage-file-datalake/src/samples/java/com/azure/storage/file/datalake/DataLakeServiceClientJavaDocCodeSnippets.java index 37556922941d..bfdb8d1ca731 100644 --- a/sdk/storage/azure-storage-file-datalake/src/samples/java/com/azure/storage/file/datalake/DataLakeServiceClientJavaDocCodeSnippets.java +++ b/sdk/storage/azure-storage-file-datalake/src/samples/java/com/azure/storage/file/datalake/DataLakeServiceClientJavaDocCodeSnippets.java @@ -4,6 +4,10 @@ package com.azure.storage.file.datalake; import com.azure.core.util.Context; +import com.azure.storage.common.sas.AccountSasPermission; +import com.azure.storage.common.sas.AccountSasResourceType; +import com.azure.storage.common.sas.AccountSasService; +import com.azure.storage.common.sas.AccountSasSignatureValues; import com.azure.storage.file.datalake.models.DataLakeRequestConditions; import com.azure.storage.file.datalake.models.FileSystemListDetails; import com.azure.storage.file.datalake.models.ListFileSystemsOptions; @@ -122,4 +126,24 @@ public void getUserDelegationKey() { // END: com.azure.storage.file.datalake.DataLakeServiceClient.getUserDelegationKeyWithResponse#OffsetDateTime-OffsetDateTime-Duration-Context } + /** + * Code snippet for {@link DataLakeServiceClient#generateAccountSas(AccountSasSignatureValues)} + */ + public void generateAccountSas() { + // BEGIN: com.azure.storage.file.datalake.DataLakeServiceClient.generateAccountSas#AccountSasSignatureValues + AccountSasPermission permissions = new AccountSasPermission() + .setListPermission(true) + .setReadPermission(true); + AccountSasResourceType resourceTypes = new AccountSasResourceType().setContainer(true); + AccountSasService services = new AccountSasService().setBlobAccess(true).setFileAccess(true); + OffsetDateTime expiryTime = OffsetDateTime.now().plus(Duration.ofDays(2)); + + AccountSasSignatureValues sasValues = + new AccountSasSignatureValues(expiryTime, permissions, services, resourceTypes); + + // Client must be authenticated via StorageSharedKeyCredential + String sas = client.generateAccountSas(sasValues); + // END: com.azure.storage.file.datalake.DataLakeServiceClient.generateAccountSas#AccountSasSignatureValues + } + } diff --git a/sdk/storage/azure-storage-file-datalake/src/samples/java/com/azure/storage/file/datalake/DataLakeServiceSasSignatureValuesJavaDocCodeSnippets.java b/sdk/storage/azure-storage-file-datalake/src/samples/java/com/azure/storage/file/datalake/DataLakeServiceSasSignatureValuesJavaDocCodeSnippets.java deleted file mode 100644 index 0334f7eb9624..000000000000 --- a/sdk/storage/azure-storage-file-datalake/src/samples/java/com/azure/storage/file/datalake/DataLakeServiceSasSignatureValuesJavaDocCodeSnippets.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.storage.file.datalake; - -import com.azure.storage.common.StorageSharedKeyCredential; -import com.azure.storage.common.sas.SasProtocol; -import com.azure.storage.file.datalake.models.UserDelegationKey; -import com.azure.storage.file.datalake.sas.DataLakeServiceSasQueryParameters; -import com.azure.storage.file.datalake.sas.DataLakeServiceSasSignatureValues; -import com.azure.storage.file.datalake.sas.PathSasPermission; - -import java.time.OffsetDateTime; - -/** - * Code snippets for {@link DataLakeServiceSasSignatureValues}. - */ -public class DataLakeServiceSasSignatureValuesJavaDocCodeSnippets { - /** - * Generates a file or directory SAS with {@link StorageSharedKeyCredential} - */ - public void fileSas() { - // BEGIN: com.azure.storage.file.datalake.sas.DataLakeServiceSasSignatureValues.generateSasQueryParameters#StorageSharedKeyCredential - PathSasPermission pathPermission = new PathSasPermission().setReadPermission(true); - - // We are creating a SAS to a path because we set both the file system name and path name. - DataLakeServiceSasSignatureValues builder = new DataLakeServiceSasSignatureValues() - .setProtocol(SasProtocol.HTTPS_ONLY) // Users MUST use HTTPS (not HTTP). - .setExpiryTime(OffsetDateTime.now().plusDays(2)) - .setFileSystemName("my-file-system") - .setPathName("HelloWorld.txt") - .setPermissions(pathPermission); - - StorageSharedKeyCredential credential = new StorageSharedKeyCredential("account-name", "key"); - DataLakeServiceSasQueryParameters sasQueryParameters = builder.generateSasQueryParameters(credential); - // END: com.azure.storage.file.datalake.sas.DataLakeServiceSasSignatureValues.generateSasQueryParameters#StorageSharedKeyCredential - } - - /** - * Generates a file system SAS using {@link UserDelegationKey}. - */ - public void userDelegationKey() { - // BEGIN: com.azure.storage.file.datalake.sas.DataLakeServiceSasSignatureValues.generateSasQueryParameters#UserDelegationKey-String - PathSasPermission pathPermission = new PathSasPermission() - .setReadPermission(true) - .setWritePermission(true); - - // We are creating a SAS to a file system because only file system name is set. - DataLakeServiceSasSignatureValues builder = new DataLakeServiceSasSignatureValues() - .setProtocol(SasProtocol.HTTPS_ONLY) // Users MUST use HTTPS (not HTTP). - .setExpiryTime(OffsetDateTime.now().plusDays(2)) - .setFileSystemName("my-file-system") - .setPermissions(pathPermission); - - // Get a user delegation key after signing in with Azure AD - UserDelegationKey credential = new UserDelegationKey(); - String account = "my-path-storage-account"; - DataLakeServiceSasQueryParameters sasQueryParameters = builder.generateSasQueryParameters(credential, account); - // END: com.azure.storage.file.datalake.sas.DataLakeServiceSasSignatureValues.generateSasQueryParameters#UserDelegationKey-String - } -} diff --git a/sdk/storage/azure-storage-file-datalake/src/samples/java/com/azure/storage/file/datalake/FileSystemAsyncClientJavaDocCodeSamples.java b/sdk/storage/azure-storage-file-datalake/src/samples/java/com/azure/storage/file/datalake/FileSystemAsyncClientJavaDocCodeSamples.java index 17a3a1841e69..11fbee3cea5b 100644 --- a/sdk/storage/azure-storage-file-datalake/src/samples/java/com/azure/storage/file/datalake/FileSystemAsyncClientJavaDocCodeSamples.java +++ b/sdk/storage/azure-storage-file-datalake/src/samples/java/com/azure/storage/file/datalake/FileSystemAsyncClientJavaDocCodeSamples.java @@ -10,6 +10,9 @@ import com.azure.storage.file.datalake.models.ListPathsOptions; import com.azure.storage.file.datalake.models.PathHttpHeaders; import com.azure.storage.file.datalake.models.PublicAccessType; +import com.azure.storage.file.datalake.models.UserDelegationKey; +import com.azure.storage.file.datalake.sas.DataLakeServiceSasSignatureValues; +import com.azure.storage.file.datalake.sas.FileSystemSasPermission; import reactor.core.publisher.Mono; import java.time.Duration; @@ -30,6 +33,7 @@ public class FileSystemAsyncClientJavaDocCodeSamples { private String leaseId = "leaseId"; private String proposedId = "proposedId"; private int leaseDuration = (int) Duration.ofSeconds(30).getSeconds(); + private UserDelegationKey userDelegationKey = JavaDocCodeSnippetsHelpers.getUserDelegationKey(); /** * Code snippet for {@link DataLakeFileSystemAsyncClient#getFileAsyncClient(String)} @@ -335,4 +339,30 @@ public void setAccessPolicy2() { // END: com.azure.storage.file.datalake.DataLakeFileSystemAsyncClient.setAccessPolicyWithResponse#PublicAccessType-List-DataLakeRequestConditions } + /** + * Code snippet for {@link DataLakeFileSystemAsyncClient#generateUserDelegationSas(DataLakeServiceSasSignatureValues, UserDelegationKey)} + * and {@link DataLakeFileSystemAsyncClient#generateSas(DataLakeServiceSasSignatureValues)} + */ + public void generateSas() { + // BEGIN: com.azure.storage.file.datalake.DataLakeFileSystemAsyncClient.generateSas#DataLakeServiceSasSignatureValues + OffsetDateTime expiryTime = OffsetDateTime.now().plusDays(1); + FileSystemSasPermission permission = new FileSystemSasPermission().setReadPermission(true); + + DataLakeServiceSasSignatureValues values = new DataLakeServiceSasSignatureValues(expiryTime, permission) + .setStartTime(OffsetDateTime.now()); + + client.generateSas(values); // Client must be authenticated via StorageSharedKeyCredential + // END: com.azure.storage.file.datalake.DataLakeFileSystemAsyncClient.generateSas#DataLakeServiceSasSignatureValues + + // BEGIN: com.azure.storage.file.datalake.DataLakeFileSystemAsyncClient.generateUserDelegationSas#DataLakeServiceSasSignatureValues-UserDelegationKey + OffsetDateTime myExpiryTime = OffsetDateTime.now().plusDays(1); + FileSystemSasPermission myPermission = new FileSystemSasPermission().setReadPermission(true); + + DataLakeServiceSasSignatureValues myValues = new DataLakeServiceSasSignatureValues(expiryTime, permission) + .setStartTime(OffsetDateTime.now()); + + client.generateUserDelegationSas(values, userDelegationKey); + // END: com.azure.storage.file.datalake.DataLakeFileSystemAsyncClient.generateUserDelegationSas#DataLakeServiceSasSignatureValues-UserDelegationKey + } + } diff --git a/sdk/storage/azure-storage-file-datalake/src/samples/java/com/azure/storage/file/datalake/FileSystemClientJavaDocCodeSamples.java b/sdk/storage/azure-storage-file-datalake/src/samples/java/com/azure/storage/file/datalake/FileSystemClientJavaDocCodeSamples.java index ceb88c4ed074..665d263fe5de 100644 --- a/sdk/storage/azure-storage-file-datalake/src/samples/java/com/azure/storage/file/datalake/FileSystemClientJavaDocCodeSamples.java +++ b/sdk/storage/azure-storage-file-datalake/src/samples/java/com/azure/storage/file/datalake/FileSystemClientJavaDocCodeSamples.java @@ -15,6 +15,9 @@ import com.azure.storage.file.datalake.models.ListPathsOptions; import com.azure.storage.file.datalake.models.PathHttpHeaders; import com.azure.storage.file.datalake.models.PublicAccessType; +import com.azure.storage.file.datalake.models.UserDelegationKey; +import com.azure.storage.file.datalake.sas.DataLakeServiceSasSignatureValues; +import com.azure.storage.file.datalake.sas.FileSystemSasPermission; import java.time.Duration; import java.time.OffsetDateTime; @@ -37,6 +40,7 @@ public class FileSystemClientJavaDocCodeSamples { private Duration timeout = Duration.ofSeconds(30); private String key1 = "key1"; private String value1 = "value1"; + private UserDelegationKey userDelegationKey = JavaDocCodeSnippetsHelpers.getUserDelegationKey(); /** * Code snippet for {@link DataLakeFileSystemClient#getFileClient(String)} @@ -373,4 +377,30 @@ public void setAccessPolicy2() { // END: com.azure.storage.file.datalake.DataLakeFileSystemClient.setAccessPolicyWithResponse#PublicAccessType-List-DataLakeRequestConditions-Duration-Context } + /** + * Code snippet for {@link DataLakeFileSystemClient#generateUserDelegationSas(DataLakeServiceSasSignatureValues, UserDelegationKey)} + * and {@link DataLakeFileSystemClient#generateSas(DataLakeServiceSasSignatureValues)} + */ + public void generateSas() { + // BEGIN: com.azure.storage.file.datalake.DataLakeFileSystemClient.generateSas#DataLakeServiceSasSignatureValues + OffsetDateTime expiryTime = OffsetDateTime.now().plusDays(1); + FileSystemSasPermission permission = new FileSystemSasPermission().setReadPermission(true); + + DataLakeServiceSasSignatureValues values = new DataLakeServiceSasSignatureValues(expiryTime, permission) + .setStartTime(OffsetDateTime.now()); + + client.generateSas(values); // Client must be authenticated via StorageSharedKeyCredential + // END: com.azure.storage.file.datalake.DataLakeFileSystemClient.generateSas#DataLakeServiceSasSignatureValues + + // BEGIN: com.azure.storage.file.datalake.DataLakeFileSystemClient.generateUserDelegationSas#DataLakeServiceSasSignatureValues-UserDelegationKey + OffsetDateTime myExpiryTime = OffsetDateTime.now().plusDays(1); + FileSystemSasPermission myPermission = new FileSystemSasPermission().setReadPermission(true); + + DataLakeServiceSasSignatureValues myValues = new DataLakeServiceSasSignatureValues(expiryTime, permission) + .setStartTime(OffsetDateTime.now()); + + client.generateUserDelegationSas(values, userDelegationKey); + // END: com.azure.storage.file.datalake.DataLakeFileSystemClient.generateUserDelegationSas#DataLakeServiceSasSignatureValues-UserDelegationKey + } + } diff --git a/sdk/storage/azure-storage-file-datalake/src/samples/java/com/azure/storage/file/datalake/JavaDocCodeSnippetsHelpers.java b/sdk/storage/azure-storage-file-datalake/src/samples/java/com/azure/storage/file/datalake/JavaDocCodeSnippetsHelpers.java index 4f9ab36bf0d5..1422c7212a71 100644 --- a/sdk/storage/azure-storage-file-datalake/src/samples/java/com/azure/storage/file/datalake/JavaDocCodeSnippetsHelpers.java +++ b/sdk/storage/azure-storage-file-datalake/src/samples/java/com/azure/storage/file/datalake/JavaDocCodeSnippetsHelpers.java @@ -3,6 +3,8 @@ package com.azure.storage.file.datalake; +import com.azure.storage.file.datalake.models.UserDelegationKey; + import java.net.MalformedURLException; import java.net.URL; @@ -47,4 +49,8 @@ static URL generateURL(String urlString) { throw new RuntimeException(ex); } } + + static UserDelegationKey getUserDelegationKey() { + return getDataLakeServiceClient().getUserDelegationKey(null, null); + } } diff --git a/sdk/storage/azure-storage-file-datalake/src/samples/java/com/azure/storage/file/datalake/PathAsyncClientJavaDocCodeSamples.java b/sdk/storage/azure-storage-file-datalake/src/samples/java/com/azure/storage/file/datalake/PathAsyncClientJavaDocCodeSamples.java index fa999dc74a08..edc66aeefcdc 100644 --- a/sdk/storage/azure-storage-file-datalake/src/samples/java/com/azure/storage/file/datalake/PathAsyncClientJavaDocCodeSamples.java +++ b/sdk/storage/azure-storage-file-datalake/src/samples/java/com/azure/storage/file/datalake/PathAsyncClientJavaDocCodeSamples.java @@ -8,7 +8,11 @@ import com.azure.storage.file.datalake.models.PathHttpHeaders; import com.azure.storage.file.datalake.models.PathPermissions; import com.azure.storage.file.datalake.models.RolePermissions; +import com.azure.storage.file.datalake.models.UserDelegationKey; +import com.azure.storage.file.datalake.sas.DataLakeServiceSasSignatureValues; +import com.azure.storage.file.datalake.sas.PathSasPermission; +import java.time.OffsetDateTime; import java.util.ArrayList; import java.util.Collections; import java.util.List; @@ -22,6 +26,7 @@ public class PathAsyncClientJavaDocCodeSamples { private String fileName = "fileName"; private DataLakeFileAsyncClient client = JavaDocCodeSnippetsHelpers.getFileAsyncClient(fileName); private String leaseId = "leaseId"; + private UserDelegationKey userDelegationKey = JavaDocCodeSnippetsHelpers.getUserDelegationKey(); /** * Code snippets for {@link DataLakePathAsyncClient#create()} and @@ -218,4 +223,30 @@ public void getAccessControlWithResponseCodeSnippets() { // END: com.azure.storage.file.datalake.DataLakePathAsyncClient.getAccessControlWithResponse#boolean-DataLakeRequestConditions } + /** + * Code snippet for {@link DataLakePathAsyncClient#generateUserDelegationSas(DataLakeServiceSasSignatureValues, UserDelegationKey)} + * and {@link DataLakePathAsyncClient#generateSas(DataLakeServiceSasSignatureValues)} + */ + public void generateSas() { + // BEGIN: com.azure.storage.file.datalake.DataLakePathAsyncClient.generateSas#DataLakeServiceSasSignatureValues + OffsetDateTime expiryTime = OffsetDateTime.now().plusDays(1); + PathSasPermission permission = new PathSasPermission().setReadPermission(true); + + DataLakeServiceSasSignatureValues values = new DataLakeServiceSasSignatureValues(expiryTime, permission) + .setStartTime(OffsetDateTime.now()); + + client.generateSas(values); // Client must be authenticated via StorageSharedKeyCredential + // END: com.azure.storage.file.datalake.DataLakePathAsyncClient.generateSas#DataLakeServiceSasSignatureValues + + // BEGIN: com.azure.storage.file.datalake.DataLakePathAsyncClient.generateUserDelegationSas#DataLakeServiceSasSignatureValues-UserDelegationKey + OffsetDateTime myExpiryTime = OffsetDateTime.now().plusDays(1); + PathSasPermission myPermission = new PathSasPermission().setReadPermission(true); + + DataLakeServiceSasSignatureValues myValues = new DataLakeServiceSasSignatureValues(expiryTime, permission) + .setStartTime(OffsetDateTime.now()); + + client.generateUserDelegationSas(values, userDelegationKey); + // END: com.azure.storage.file.datalake.DataLakePathAsyncClient.generateUserDelegationSas#DataLakeServiceSasSignatureValues-UserDelegationKey + } + } diff --git a/sdk/storage/azure-storage-file-datalake/src/samples/java/com/azure/storage/file/datalake/PathClientJavaDocCodeSamples.java b/sdk/storage/azure-storage-file-datalake/src/samples/java/com/azure/storage/file/datalake/PathClientJavaDocCodeSamples.java index 56864ed64e55..e81213c850fa 100644 --- a/sdk/storage/azure-storage-file-datalake/src/samples/java/com/azure/storage/file/datalake/PathClientJavaDocCodeSamples.java +++ b/sdk/storage/azure-storage-file-datalake/src/samples/java/com/azure/storage/file/datalake/PathClientJavaDocCodeSamples.java @@ -13,8 +13,12 @@ import com.azure.storage.file.datalake.models.PathPermissions; import com.azure.storage.file.datalake.models.PathProperties; import com.azure.storage.file.datalake.models.RolePermissions; +import com.azure.storage.file.datalake.models.UserDelegationKey; +import com.azure.storage.file.datalake.sas.DataLakeServiceSasSignatureValues; +import com.azure.storage.file.datalake.sas.PathSasPermission; import java.time.Duration; +import java.time.OffsetDateTime; import java.util.ArrayList; import java.util.Collections; import java.util.List; @@ -34,6 +38,7 @@ public class PathClientJavaDocCodeSamples { private String key2 = "key2"; private String value1 = "val1"; private String value2 = "val2"; + private UserDelegationKey userDelegationKey = JavaDocCodeSnippetsHelpers.getUserDelegationKey(); /** * Code snippets for {@link DataLakePathClient#create()} and @@ -239,4 +244,30 @@ public void getAccessControlWithResponseCodeSnippets() { // END: com.azure.storage.file.datalake.DataLakePathClient.getAccessControlWithResponse#boolean-DataLakeRequestConditions-Duration-Context } + /** + * Code snippet for {@link DataLakePathClient#generateUserDelegationSas(DataLakeServiceSasSignatureValues, UserDelegationKey)} + * and {@link DataLakePathClient#generateSas(DataLakeServiceSasSignatureValues)} + */ + public void generateSas() { + // BEGIN: com.azure.storage.file.datalake.DataLakePathClient.generateSas#DataLakeServiceSasSignatureValues + OffsetDateTime expiryTime = OffsetDateTime.now().plusDays(1); + PathSasPermission permission = new PathSasPermission().setReadPermission(true); + + DataLakeServiceSasSignatureValues values = new DataLakeServiceSasSignatureValues(expiryTime, permission) + .setStartTime(OffsetDateTime.now()); + + client.generateSas(values); // Client must be authenticated via StorageSharedKeyCredential + // END: com.azure.storage.file.datalake.DataLakePathClient.generateSas#DataLakeServiceSasSignatureValues + + // BEGIN: com.azure.storage.file.datalake.DataLakePathClient.generateUserDelegationSas#DataLakeServiceSasSignatureValues-UserDelegationKey + OffsetDateTime myExpiryTime = OffsetDateTime.now().plusDays(1); + PathSasPermission myPermission = new PathSasPermission().setReadPermission(true); + + DataLakeServiceSasSignatureValues myValues = new DataLakeServiceSasSignatureValues(expiryTime, permission) + .setStartTime(OffsetDateTime.now()); + + client.generateUserDelegationSas(values, userDelegationKey); + // END: com.azure.storage.file.datalake.DataLakePathClient.generateUserDelegationSas#DataLakeServiceSasSignatureValues-UserDelegationKey + } + } diff --git a/sdk/storage/azure-storage-file-datalake/src/test/java/com/azure/storage/file/datalake/APISpec.groovy b/sdk/storage/azure-storage-file-datalake/src/test/java/com/azure/storage/file/datalake/APISpec.groovy index 9a20a5e6e21b..a1dd75362b39 100644 --- a/sdk/storage/azure-storage-file-datalake/src/test/java/com/azure/storage/file/datalake/APISpec.groovy +++ b/sdk/storage/azure-storage-file-datalake/src/test/java/com/azure/storage/file/datalake/APISpec.groovy @@ -368,6 +368,10 @@ class APISpec extends Specification { } DataLakeFileSystemClient getFileSystemClient(String sasToken, String endpoint) { + getFileSystemClientBuilder(endpoint).sasToken(sasToken).buildClient() + } + + DataLakeFileSystemClientBuilder getFileSystemClientBuilder(String endpoint) { DataLakeFileSystemClientBuilder builder = new DataLakeFileSystemClientBuilder() .endpoint(endpoint) .httpClient(getHttpClient()) @@ -377,7 +381,7 @@ class APISpec extends Specification { builder.addPolicy(interceptorManager.getRecordPolicy()) } - builder.sasToken(sasToken).buildClient() + return builder } def generateFileSystemName() { @@ -630,4 +634,11 @@ class APISpec extends Specification { return false } + def sleepIfLive(long milliseconds) { + if (testMode == TestMode.PLAYBACK) { + return + } + sleep(milliseconds) + } + } diff --git a/sdk/storage/azure-storage-file-datalake/src/test/java/com/azure/storage/file/datalake/FileSystemAPITest.groovy b/sdk/storage/azure-storage-file-datalake/src/test/java/com/azure/storage/file/datalake/FileSystemAPITest.groovy index 54a7e1f3df19..ce46723f3273 100644 --- a/sdk/storage/azure-storage-file-datalake/src/test/java/com/azure/storage/file/datalake/FileSystemAPITest.groovy +++ b/sdk/storage/azure-storage-file-datalake/src/test/java/com/azure/storage/file/datalake/FileSystemAPITest.groovy @@ -828,23 +828,23 @@ class FileSystemAPITest extends APISpec { then: def dirPath = response.next() dirPath.getName() == dirName -// dirPath.getETag() + dirPath.getETag() dirPath.getGroup() dirPath.getLastModified() dirPath.getOwner() dirPath.getPermissions() -// dirPath.getContentLength() +// dirPath.getContentLength() // known issue with service dirPath.isDirectory() response.hasNext() def filePath = response.next() filePath.getName() == fileName -// filePath.getETag() + filePath.getETag() filePath.getGroup() filePath.getLastModified() filePath.getOwner() filePath.getPermissions() -// filePath.getContentLength() +// filePath.getContentLength() // known issue with service !filePath.isDirectory() !response.hasNext() diff --git a/sdk/storage/azure-storage-file-datalake/src/test/java/com/azure/storage/file/datalake/SASTest.groovy b/sdk/storage/azure-storage-file-datalake/src/test/java/com/azure/storage/file/datalake/SASTest.groovy index b081e0a67dd0..fe1e2e8789db 100644 --- a/sdk/storage/azure-storage-file-datalake/src/test/java/com/azure/storage/file/datalake/SASTest.groovy +++ b/sdk/storage/azure-storage-file-datalake/src/test/java/com/azure/storage/file/datalake/SASTest.groovy @@ -3,6 +3,7 @@ package com.azure.storage.file.datalake +import com.azure.storage.blob.implementation.util.BlobSasImplUtil import com.azure.storage.blob.models.BlobStorageException import com.azure.storage.common.implementation.Constants import com.azure.storage.common.implementation.StorageImplUtils @@ -11,6 +12,7 @@ import com.azure.storage.file.datalake.implementation.models.StorageErrorExcepti import com.azure.storage.file.datalake.models.DataLakeAccessPolicy import com.azure.storage.file.datalake.models.DataLakeSignedIdentifier import com.azure.storage.file.datalake.models.FileRange +import com.azure.storage.file.datalake.models.PathProperties import com.azure.storage.file.datalake.models.UserDelegationKey import com.azure.storage.file.datalake.sas.DataLakeServiceSasSignatureValues import com.azure.storage.file.datalake.sas.FileSystemSasPermission @@ -23,6 +25,17 @@ import java.time.ZoneOffset class SASTest extends APISpec { + DataLakeFileClient sasClient + String pathName + + def setup() { + pathName = generatePathName() + sasClient = getFileClient(primaryCredential, fsc.getFileSystemUrl(), pathName) + sasClient.create() + sasClient.append(defaultInputStream.get(), 0, defaultDataSize) + sasClient.flush(defaultDataSize) + } + @Unroll def "File range"() { expect: @@ -54,48 +67,51 @@ class SASTest extends APISpec { 0 | -1 } + DataLakeServiceSasSignatureValues generateValues(PathSasPermission permission) { + return new DataLakeServiceSasSignatureValues(getUTCNow().plusDays(1), permission) + .setStartTime(getUTCNow().minusDays(1)) + .setProtocol(SasProtocol.HTTPS_HTTP) + .setSasIpRange(new SasIpRange() + .setIpMin("0.0.0.0") + .setIpMax("255.255.255.255")) + .setCacheControl("cache") + .setContentDisposition("disposition") + .setContentEncoding("encoding") + .setContentLanguage("language") + .setContentType("type") + } + + def validateSasProperties(PathProperties properties) { + boolean ret = true + ret &= properties.getCacheControl() == "cache" + ret &= properties.getContentDisposition() == "disposition" + ret &= properties.getContentEncoding() == "encoding" + ret &= properties.getContentLanguage() == "language" + return ret + } + + UserDelegationKey getUserDelegationInfo() { + def key = getOAuthServiceClient().getUserDelegationKey(getUTCNow().minusDays(1), getUTCNow().plusDays(1)) + def keyOid = getConfigValue(key.getSignedObjectId()) + key.setSignedObjectId(keyOid) + def keyTid = getConfigValue(key.getSignedTenantId()) + key.setSignedTenantId(keyTid) + return key + } + def "serviceSASSignatureValues network test file"() { setup: - def pathName = generatePathName() - def fc = getFileClient(primaryCredential, fsc.getFileSystemUrl(), pathName) - fc.create() - fc.append(defaultInputStream.get(), 0, defaultDataSize) - fc.flush(defaultDataSize) - def permissions = new PathSasPermission() .setReadPermission(true) .setWritePermission(true) .setCreatePermission(true) .setDeletePermission(true) .setAddPermission(true) - def startTime = getUTCNow().minusDays(1) - def expiryTime = getUTCNow().plusDays(1) - def ipRange = new SasIpRange() - .setIpMin("0.0.0.0") - .setIpMax("255.255.255.255") - def sasProtocol = SasProtocol.HTTPS_HTTP - def cacheControl = "cache" - def contentDisposition = "disposition" - def contentEncoding = "encoding" - def contentLanguage = "language" - def contentType = "type" + + def sasValues = generateValues(permissions) when: - def sas = new DataLakeServiceSasSignatureValues() - .setPermissions(permissions) - .setExpiryTime(expiryTime) - .setStartTime(startTime) - .setProtocol(sasProtocol) - .setSasIpRange(ipRange) - .setCacheControl(cacheControl) - .setContentDisposition(contentDisposition) - .setContentEncoding(contentEncoding) - .setContentLanguage(contentLanguage) - .setContentType(contentType) - .setPathName(fc.getFilePath()) - .setFileSystemName(fc.getFileSystemName()) - .generateSasQueryParameters(primaryCredential) - .encode() + def sas = sasClient.generateSas(sasValues) def client = getFileClient(sas, fsc.getFileSystemUrl(), pathName) @@ -104,15 +120,11 @@ class SASTest extends APISpec { def properties = client.getProperties() then: - os.toString() == defaultText - properties.getCacheControl() == "cache" - properties.getContentDisposition() == "disposition" - properties.getContentEncoding() == "encoding" - properties.getContentLanguage() == "language" + os.toString() == new String(defaultData.array()) + validateSasProperties(properties) notThrown(BlobStorageException) } - // Set Access Policy on File System not implemented yet def "serviceSASSignatureValues network test file system"() { setup: def identifier = new DataLakeSignedIdentifier() @@ -134,22 +146,18 @@ class SASTest extends APISpec { def expiryTime = getUTCNow().plusDays(1) when: - def sasWithId = new DataLakeServiceSasSignatureValues() - .setIdentifier(identifier.getId()) - .setFileSystemName(fsc.getFileSystemName()) - .generateSasQueryParameters(primaryCredential) - .encode() + def sasValues = new DataLakeServiceSasSignatureValues(identifier.getId()) + def sasWithId = fsc.generateSas(sasValues) def client1 = getFileSystemClient(sasWithId, fsc.getFileSystemUrl()) + // Wait 30 seconds as it may take time for the access policy to take effect. + sleepIfLive(30000) + client1.listPaths().iterator().hasNext() - def sasWithPermissions = new DataLakeServiceSasSignatureValues() - .setPermissions(permissions) - .setExpiryTime(expiryTime) - .setFileSystemName(fsc.getFileSystemName()) - .generateSasQueryParameters(primaryCredential) - .encode() + sasValues = new DataLakeServiceSasSignatureValues(expiryTime, permissions) + def sasWithPermissions = fsc.generateSas(sasValues) def client2 = getFileSystemClient(sasWithPermissions, fsc.getFileSystemUrl()) client2.listPaths().iterator().hasNext() @@ -160,12 +168,6 @@ class SASTest extends APISpec { def "serviceSASSignatureValues network test file user delegation"() { setup: - def pathName = generatePathName() - def fc = fsc.getFileClient(pathName) - fc.create() - fc.append(defaultInputStream.get(), 0, defaultDataSize) - fc.flush(defaultDataSize) - def permissions = new PathSasPermission() .setReadPermission(true) .setWritePermission(true) @@ -173,49 +175,11 @@ class SASTest extends APISpec { .setDeletePermission(true) .setAddPermission(true) - def startTime = getUTCNow().minusDays(1) - def expiryTime = getUTCNow().plusDays(1) - - def ipRange = new SasIpRange() - .setIpMin("0.0.0.0") - .setIpMax("255.255.255.255") + def sasValues = generateValues(permissions) - def sasProtocol = SasProtocol.HTTPS_HTTP - def cacheControl = "cache" - def contentDisposition = "disposition" - def contentEncoding = "encoding" - def contentLanguage = "language" - def contentType = "type" - - def key = getOAuthServiceClient().getUserDelegationKey(null, expiryTime) - - def keyOid = getConfigValue(key.getSignedObjectId()) - key.setSignedObjectId(keyOid) - - def keyTid = getConfigValue(key.getSignedTenantId()) - key.setSignedTenantId(keyTid) when: - def sas = new DataLakeServiceSasSignatureValues() - .setPermissions(permissions) - .setExpiryTime(expiryTime) - .setStartTime(startTime) - .setProtocol(sasProtocol) - .setSasIpRange(ipRange) - .setCacheControl(cacheControl) - .setContentDisposition(contentDisposition) - .setContentEncoding(contentEncoding) - .setContentLanguage(contentLanguage) - .setContentType(contentType) - .setFileSystemName(fsc.getFileSystemName()) - .setPathName(fc.getFilePath()) - .setVersion(key.getSignedVersion()) - .generateSasQueryParameters(key, primaryCredential.getAccountName()) - .encode() + def sas = sasClient.generateUserDelegationSas(sasValues, getUserDelegationInfo()) - then: - sas != null - - when: def client = getFileClient(sas, fsc.getFileSystemUrl(), pathName) def os = new ByteArrayOutputStream() @@ -223,11 +187,8 @@ class SASTest extends APISpec { def properties = client.getProperties() then: - os.toString() == defaultText - properties.getCacheControl() == "cache" - properties.getContentDisposition() == "disposition" - properties.getContentEncoding() == "encoding" - properties.getContentLanguage() == "language" + os.toString() == new String(defaultData.array()) + validateSasProperties(properties) notThrown(BlobStorageException) } @@ -250,13 +211,10 @@ class SASTest extends APISpec { def keyTid = getConfigValue(key.getSignedTenantId()) key.setSignedTenantId(keyTid) + when: - def sasWithPermissions = new DataLakeServiceSasSignatureValues() - .setPermissions(permissions) - .setExpiryTime(expiryTime) - .setFileSystemName(fsc.getFileSystemName()) - .generateSasQueryParameters(key, primaryCredential.getAccountName()) - .encode() + def sasValues = new DataLakeServiceSasSignatureValues(expiryTime, permissions) + def sasWithPermissions = fsc.generateUserDelegationSas(sasValues, key) def client = getFileSystemClient(sasWithPermissions, fsc.getFileSystemUrl()) client.listPaths().iterator().hasNext() @@ -284,13 +242,8 @@ class SASTest extends APISpec { def expiryTime = getUTCNow().plusDays(1) when: - def sas = new AccountSasSignatureValues() - .setServices(service.toString()) - .setResourceTypes(resourceType.toString()) - .setPermissions(permissions) - .setExpiryTime(expiryTime) - .generateSasQueryParameters(primaryCredential) - .encode() + def sasValues = new AccountSasSignatureValues(expiryTime, permissions, service, resourceType) + def sas = primaryDataLakeServiceClient.generateAccountSas(sasValues) def client = getFileClient(sas, fsc.getFileSystemUrl(), pathName).getBlockBlobClient() def os = new ByteArrayOutputStream() client.download(os) @@ -316,13 +269,8 @@ class SASTest extends APISpec { def expiryTime = getUTCNow().plusDays(1) when: - def sas = new AccountSasSignatureValues() - .setServices(service.toString()) - .setResourceTypes(resourceType.toString()) - .setPermissions(permissions) - .setExpiryTime(expiryTime) - .generateSasQueryParameters(primaryCredential) - .encode() + def sasValues = new AccountSasSignatureValues(expiryTime, permissions, service, resourceType) + def sas = primaryDataLakeServiceClient.generateAccountSas(sasValues) def client = getFileClient(sas, fsc.getFileSystemUrl(), pathName) client.delete() @@ -344,13 +292,8 @@ class SASTest extends APISpec { def expiryTime = getUTCNow().plusDays(1) when: - def sas = new AccountSasSignatureValues() - .setServices(service.toString()) - .setResourceTypes(resourceType.toString()) - .setPermissions(permissions) - .setExpiryTime(expiryTime) - .generateSasQueryParameters(primaryCredential) - .encode() + def sasValues = new AccountSasSignatureValues(expiryTime, permissions, service, resourceType) + def sas = primaryDataLakeServiceClient.generateAccountSas(sasValues) def sc = getServiceClient(sas, primaryDataLakeServiceClient.getAccountUrl()) sc.createFileSystem(generateFileSystemName()) @@ -372,13 +315,8 @@ class SASTest extends APISpec { def expiryTime = getUTCNow().plusDays(1) when: - def sas = new AccountSasSignatureValues() - .setServices(service.toString()) - .setResourceTypes(resourceType.toString()) - .setPermissions(permissions) - .setExpiryTime(expiryTime) - .generateSasQueryParameters(primaryCredential) - .encode() + def sasValues = new AccountSasSignatureValues(expiryTime, permissions, service, resourceType) + def sas = primaryDataLakeServiceClient.generateAccountSas(sasValues) def sc = getServiceClient(sas, primaryDataLakeServiceClient.getAccountUrl()) sc.createFileSystem(generateFileSystemName()) @@ -386,6 +324,39 @@ class SASTest extends APISpec { notThrown(BlobStorageException) } + def "accountSAS network account sas token on endpoint"() { + setup: + def service = new AccountSasService() + .setBlobAccess(true) + def resourceType = new AccountSasResourceType() + .setContainer(true) + .setService(true) + .setObject(true) + def permissions = new AccountSasPermission() + .setReadPermission(true) + .setCreatePermission(true) + def expiryTime = getUTCNow().plusDays(1) + + def sasValues = new AccountSasSignatureValues(expiryTime, permissions, service, resourceType) + def sas = primaryDataLakeServiceClient.generateAccountSas(sasValues) + def fileSystemName = generateFileSystemName() + def pathName = generatePathName() + + when: + def sc = getServiceClientBuilder(null, primaryDataLakeServiceClient.getAccountUrl() + "?" + sas, null).buildClient() + sc.createFileSystem(fileSystemName) + + def fsc = getFileSystemClientBuilder(primaryDataLakeServiceClient.getAccountUrl() + "/" + fileSystemName + "?" + sas).buildClient() + fsc.listPaths() + + def fc = getFileClient(primaryCredential, primaryDataLakeServiceClient.getAccountUrl() + "/" + fileSystemName + "/" + pathName + "?" + sas) + + fc.create() + + then: + notThrown(Exception) + } + /* This test will ensure that each field gets placed into the proper location within the string to sign and that null values are handled correctly. We will validate the whole SAS with service calls as well as correct serialization of @@ -393,21 +364,26 @@ class SASTest extends APISpec { */ @Unroll - def "serviceSasSignatures string to sign"() { + def "sas impl util string to sign"() { when: - def v = new DataLakeServiceSasSignatureValues() + def e = OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC) + def p = new PathSasPermission() + p.setReadPermission(true) + + def v + if (identifier != null) { + v = new DataLakeServiceSasSignatureValues(identifier) + } else { + v = new DataLakeServiceSasSignatureValues(e, p) + } def expected = String.format(expectedStringToSign, primaryCredential.getAccountName()) - p.setReadPermission(true) v.setPermissions(p) v.setStartTime(startTime) - def e = OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC) v.setExpiryTime(e) - v.setFileSystemName("fileSystemName") - .setPathName("pathName") if (ipRange != null) { def ipR = new SasIpRange() ipR.setIpMin("ip") @@ -421,9 +397,12 @@ class SASTest extends APISpec { .setContentLanguage(language) .setContentType(type) - def token = v.generateSasQueryParameters(primaryCredential) + def util = new BlobSasImplUtil(Transforms.toBlobSasValues(v), "fileSystemName", "pathName", null) + util.ensureState() + def sasToken = util.stringToSign(util.getCanonicalName(primaryCredential.getAccountName())) + then: - token.getSignature() == primaryCredential.computeHmac256(expected) + sasToken == expected /* We don't test the blob or containerName properties because canonicalized resource is always added as at least @@ -445,21 +424,22 @@ class SASTest extends APISpec { } @Unroll - def "serviceSasSignatures string to sign user delegation key"() { + def "sas impl util string to sign user delegation key"() { when: - def v = new DataLakeServiceSasSignatureValues() - def expected = String.format(expectedStringToSign, primaryCredential.getAccountName()) + def e = OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC) def p = new PathSasPermission() + p.setReadPermission(true) + + def v = new DataLakeServiceSasSignatureValues(e, p) + def expected = String.format(expectedStringToSign, primaryCredential.getAccountName()) + p.setReadPermission(true) v.setPermissions(p) v.setStartTime(startTime) - def e = OffsetDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC) v.setExpiryTime(e) - v.setFileSystemName("fileSystemName") - .setPathName("pathName") if (ipRange != null) { def ipR = new SasIpRange() ipR.setIpMin("ip") @@ -479,10 +459,13 @@ class SASTest extends APISpec { .setSignedService(keyService) .setSignedVersion(keyVersion) .setValue(keyValue) - def token = v.generateSasQueryParameters(key, primaryCredential.getAccountName()) + + def util = new BlobSasImplUtil(Transforms.toBlobSasValues(v), "fileSystemName", "pathName", null) + util.ensureState() + def sasToken = util.stringToSign(Transforms.toBlobUserDelegationKey(key), util.getCanonicalName(primaryCredential.getAccountName())) then: - token.getSignature() == StorageImplUtils.computeHMac256(key.getValue(), expected) + sasToken == expected /* We test string to sign functionality directly related to user delegation sas specific parameters diff --git a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestaccountsasnetworkaccountsastokenonendpoint.json b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestaccountsasnetworkaccountsastokenonendpoint.json new file mode 100644 index 000000000000..43c5ec0069ce --- /dev/null +++ b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestaccountsasnetworkaccountsastokenonendpoint.json @@ -0,0 +1,190 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfsaccountsasnetworkaccountsastokenonendpoint09344544830?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.2.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "517c2ecd-676a-4f1d-b3dd-5473316b42ea" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D77CD750CFFB00", + "Last-Modified" : "Mon, 09 Dec 2019 18:40:51 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "6c49419c-d01e-00d5-07c0-ae06a7000000", + "Date" : "Mon, 09 Dec 2019 18:40:50 GMT", + "x-ms-client-request-id" : "517c2ecd-676a-4f1d-b3dd-5473316b42ea" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsaccountsasnetworkaccountsastokenonendpoint09344544830/javapathaccountsasnetworkaccountsastokenonendpoint188049ca2?resource=file", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.7 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "3ea3afa5-3541-423c-9bbf-69c6d5e8b12b" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D77CD751358A95", + "Last-Modified" : "Mon, 09 Dec 2019 18:40:51 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "f130591e-b01f-0009-1ec0-ae54f4000000", + "Date" : "Mon, 09 Dec 2019 18:40:50 GMT", + "x-ms-client-request-id" : "3ea3afa5-3541-423c-9bbf-69c6d5e8b12b" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsaccountsasnetworkaccountsastokenonendpoint09344544830/javapathaccountsasnetworkaccountsastokenonendpoint188049ca2?position=0&action=append", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.7 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "71f67702-c123-40d0-9061-3e5cca5d6a90", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "f1305920-b01f-0009-20c0-ae54f4000000", + "Date" : "Mon, 09 Dec 2019 18:40:51 GMT", + "x-ms-client-request-id" : "71f67702-c123-40d0-9061-3e5cca5d6a90" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsaccountsasnetworkaccountsastokenonendpoint09344544830/javapathaccountsasnetworkaccountsastokenonendpoint188049ca2?position=7&retainUncommittedData=false&close=false&action=flush", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.7 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "c78a3f61-7110-467b-8058-596b6f6720d7" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D77CD751500761", + "Last-Modified" : "Mon, 09 Dec 2019 18:40:52 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "f1305921-b01f-0009-21c0-ae54f4000000", + "Date" : "Mon, 09 Dec 2019 18:40:51 GMT", + "x-ms-client-request-id" : "c78a3f61-7110-467b-8058-596b6f6720d7" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfsaccountsasnetworkaccountsastokenonendpoint24465198d45?restype=container&sv=2019-02-02&se=2019-12-10T18%3A40%3A52Z&sp=rc&sig=REDACTED&ss=b&srt=sco", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.2.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "5812494f-4474-4808-9c09-c3fe1c7ff34e" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D77CD7515AD6B1", + "Last-Modified" : "Mon, 09 Dec 2019 18:40:52 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "6c49437f-d01e-00d5-40c0-ae06a7000000", + "Date" : "Mon, 09 Dec 2019 18:40:51 GMT", + "x-ms-client-request-id" : "5812494f-4474-4808-9c09-c3fe1c7ff34e" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsaccountsasnetworkaccountsastokenonendpoint24465198d45/javapathaccountsasnetworkaccountsastokenonendpoint364863086?resource=file", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.7 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "78465d1b-e15c-4d1a-9844-026f7008d45d" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D77CD751738A69", + "Last-Modified" : "Mon, 09 Dec 2019 18:40:52 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "f1305923-b01f-0009-23c0-ae54f4000000", + "Date" : "Mon, 09 Dec 2019 18:40:51 GMT", + "x-ms-client-request-id" : "78465d1b-e15c-4d1a-9844-026f7008d45d" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://gaprahns.blob.core.windows.net?prefix=jtfsaccountsasnetworkaccountsastokenonendpoint&comp=list", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.2.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "97574596-2d2e-4db9-bf85-f68977c26674" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "6c4943ea-d01e-00d5-1fc0-ae06a7000000", + "Body" : "jtfsaccountsasnetworkaccountsastokenonendpointjtfsaccountsasnetworkaccountsastokenonendpoint09344544830Mon, 09 Dec 2019 18:40:51 GMT\"0x8D77CD750CFFB00\"unlockedavailable$account-encryption-keyfalsefalsefalsejtfsaccountsasnetworkaccountsastokenonendpoint24465198d45Mon, 09 Dec 2019 18:40:52 GMT\"0x8D77CD7515AD6B1\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 09 Dec 2019 18:40:51 GMT", + "x-ms-client-request-id" : "97574596-2d2e-4db9-bf85-f68977c26674", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfsaccountsasnetworkaccountsastokenonendpoint09344544830?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.2.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "8d564ca1-5e1f-4068-919a-5969e1b0cba6" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "6c49441d-d01e-00d5-4dc0-ae06a7000000", + "Date" : "Mon, 09 Dec 2019 18:40:51 GMT", + "x-ms-client-request-id" : "8d564ca1-5e1f-4068-919a-5969e1b0cba6" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfsaccountsasnetworkaccountsastokenonendpoint24465198d45?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.2.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "2e98fb1f-3857-4d25-a4e0-c209e193e2b6" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "6c494440-d01e-00d5-70c0-ae06a7000000", + "Date" : "Mon, 09 Dec 2019 18:40:51 GMT", + "x-ms-client-request-id" : "2e98fb1f-3857-4d25-a4e0-c209e193e2b6" + }, + "Exception" : null + } ], + "variables" : [ "jtfsaccountsasnetworkaccountsastokenonendpoint09344544830", "javapathaccountsasnetworkaccountsastokenonendpoint188049ca2", "2019-12-09T18:40:52.023035900Z", "jtfsaccountsasnetworkaccountsastokenonendpoint24465198d45", "javapathaccountsasnetworkaccountsastokenonendpoint364863086" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestaccountsasnetworkcreatefilesystemfails.json b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestaccountsasnetworkcreatefilesystemfails.json index 58c2710bd90d..e695c60f7033 100644 --- a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestaccountsasnetworkcreatefilesystemfails.json +++ b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestaccountsasnetworkcreatefilesystemfails.json @@ -1,32 +1,96 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfsaccountsasnetworkcreatefilesystemfails080155720eb17?restype=container", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfsaccountsasnetworkcreatefilesystemfails09423009e30b1?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "2bfab773-8855-435f-823f-40ad1a398d8c" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "7591ab30-1a05-4532-95a6-1f3a68ac490b" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D75EEA1FBB42A4", - "Last-Modified" : "Fri, 01 Nov 2019 16:39:54 GMT", + "ETag" : "0x8D77826458673A5", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:26 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "b520fae3-701e-0097-01d2-902db3000000", - "Date" : "Fri, 01 Nov 2019 16:39:53 GMT", - "x-ms-client-request-id" : "2bfab773-8855-435f-823f-40ad1a398d8c" + "x-ms-request-id" : "1d9a46ab-e01e-0092-270f-aad9cc000000", + "Date" : "Tue, 03 Dec 2019 19:23:26 GMT", + "x-ms-client-request-id" : "7591ab30-1a05-4532-95a6-1f3a68ac490b" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfsaccountsasnetworkcreatefilesystemfails154188bd1b9fd?restype=container&sv=2019-02-02&ss=b&srt=sco&se=2019-11-02T16%3A39%3A54Z&sp=r&sig=REDACTED", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsaccountsasnetworkcreatefilesystemfails09423009e30b1/javapathaccountsasnetworkcreatefilesystemfails154705f81f2?resource=file", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "e52d2689-4332-48c7-9ff4-12b72160ca32" + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "64e31f4b-f0ff-46cf-bc03-75dad0fafde1" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D778264595043B", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:26 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "053c9b47-101f-004b-120f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:25 GMT", + "x-ms-client-request-id" : "64e31f4b-f0ff-46cf-bc03-75dad0fafde1" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsaccountsasnetworkcreatefilesystemfails09423009e30b1/javapathaccountsasnetworkcreatefilesystemfails154705f81f2?position=0&action=append", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "ae6a5b05-a81d-4b2c-9f07-cde5d53a75ea", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "053c9b51-101f-004b-1c0f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:25 GMT", + "x-ms-client-request-id" : "ae6a5b05-a81d-4b2c-9f07-cde5d53a75ea" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsaccountsasnetworkcreatefilesystemfails09423009e30b1/javapathaccountsasnetworkcreatefilesystemfails154705f81f2?position=7&retainUncommittedData=false&close=false&action=flush", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "b1467355-740f-4a0a-b138-ce92583be3e1" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D7782645B128E4", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:26 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "053c9b54-101f-004b-1f0f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:25 GMT", + "x-ms-client-request-id" : "b1467355-740f-4a0a-b138-ce92583be3e1" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfsaccountsasnetworkcreatefilesystemfails22183881547cb?restype=container&sv=2019-02-02&ss=b&srt=sco&se=2019-12-04T19%3A23%3A26Z&sp=r&sig=REDACTED", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "dffde78c-909f-4801-9bfa-ab8183166603" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -35,10 +99,10 @@ "retry-after" : "0", "Content-Length" : "279", "StatusCode" : "403", - "x-ms-request-id" : "b520fb00-701e-0097-1dd2-902db3000000", - "Body" : "AuthorizationPermissionMismatchThis request is not authorized to perform this operation using this permission.\nRequestId:b520fb00-701e-0097-1dd2-902db3000000\nTime:2019-11-01T16:39:54.4519136Z", - "Date" : "Fri, 01 Nov 2019 16:39:54 GMT", - "x-ms-client-request-id" : "e52d2689-4332-48c7-9ff4-12b72160ca32", + "x-ms-request-id" : "1d9a4704-e01e-0092-790f-aad9cc000000", + "Body" : "AuthorizationPermissionMismatchThis request is not authorized to perform this operation using this permission.\nRequestId:1d9a4704-e01e-0092-790f-aad9cc000000\nTime:2019-12-03T19:23:27.0066554Z", + "Date" : "Tue, 03 Dec 2019 19:23:26 GMT", + "x-ms-client-request-id" : "dffde78c-909f-4801-9bfa-ab8183166603", "Content-Type" : "application/xml" }, "Exception" : null @@ -47,8 +111,8 @@ "Uri" : "https://gaprahns.blob.core.windows.net?prefix=jtfsaccountsasnetworkcreatefilesystemfails&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "461c2f0c-2ac1-4bd0-adb0-ecde38722e75" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "e7162f5f-546f-4951-b320-5243be27681c" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -56,20 +120,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "b520fb12-701e-0097-2ed2-902db3000000", - "Body" : "jtfsaccountsasnetworkcreatefilesystemfailsjtfsaccountsasnetworkcreatefilesystemfails080155720eb17Fri, 01 Nov 2019 16:39:54 GMT\"0x8D75EEA1FBB42A4\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Fri, 01 Nov 2019 16:39:54 GMT", - "x-ms-client-request-id" : "461c2f0c-2ac1-4bd0-adb0-ecde38722e75", + "x-ms-request-id" : "1d9a4719-e01e-0092-0a0f-aad9cc000000", + "Body" : "jtfsaccountsasnetworkcreatefilesystemfailsjtfsaccountsasnetworkcreatefilesystemfails09423009e30b1Tue, 03 Dec 2019 19:23:26 GMT\"0x8D77826458673A5\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Tue, 03 Dec 2019 19:23:26 GMT", + "x-ms-client-request-id" : "e7162f5f-546f-4951-b320-5243be27681c", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfsaccountsasnetworkcreatefilesystemfails080155720eb17?restype=container", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfsaccountsasnetworkcreatefilesystemfails09423009e30b1?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "f00059f1-fca7-4f8d-8614-096f00ce897e" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "6fbe3671-f4b7-4942-a298-9b9e366fea44" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -77,11 +141,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "b520fb2f-701e-0097-44d2-902db3000000", - "Date" : "Fri, 01 Nov 2019 16:39:54 GMT", - "x-ms-client-request-id" : "f00059f1-fca7-4f8d-8614-096f00ce897e" + "x-ms-request-id" : "1d9a4720-e01e-0092-110f-aad9cc000000", + "Date" : "Tue, 03 Dec 2019 19:23:27 GMT", + "x-ms-client-request-id" : "6fbe3671-f4b7-4942-a298-9b9e366fea44" }, "Exception" : null } ], - "variables" : [ "jtfsaccountsasnetworkcreatefilesystemfails080155720eb17", "2019-11-01T16:39:54.413Z", "jtfsaccountsasnetworkcreatefilesystemfails154188bd1b9fd" ] + "variables" : [ "jtfsaccountsasnetworkcreatefilesystemfails09423009e30b1", "javapathaccountsasnetworkcreatefilesystemfails154705f81f2", "2019-12-03T19:23:26.934572600Z", "jtfsaccountsasnetworkcreatefilesystemfails22183881547cb" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestaccountsasnetworkcreatefilesystemsucceeds.json b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestaccountsasnetworkcreatefilesystemsucceeds.json index 86ec0c5475d8..167aed43e120 100644 --- a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestaccountsasnetworkcreatefilesystemsucceeds.json +++ b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestaccountsasnetworkcreatefilesystemsucceeds.json @@ -1,44 +1,108 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfsaccountsasnetworkcreatefilesystemsucceeds099875f5e7f7?restype=container", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfsaccountsasnetworkcreatefilesystemsucceeds04922171127f?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "26f18aee-74f7-46e6-b1ad-e266e2c557b6" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "0c5c2cb0-b078-4d56-8540-1e16f6554ac4" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D75EEA1FDD289F", - "Last-Modified" : "Fri, 01 Nov 2019 16:39:54 GMT", + "ETag" : "0x8D7782645D4EFCE", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:27 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "b520fb4d-701e-0097-61d2-902db3000000", - "Date" : "Fri, 01 Nov 2019 16:39:54 GMT", - "x-ms-client-request-id" : "26f18aee-74f7-46e6-b1ad-e266e2c557b6" + "x-ms-request-id" : "1d9a472b-e01e-0092-1a0f-aad9cc000000", + "Date" : "Tue, 03 Dec 2019 19:23:27 GMT", + "x-ms-client-request-id" : "0c5c2cb0-b078-4d56-8540-1e16f6554ac4" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfsaccountsasnetworkcreatefilesystemsucceeds1858371cc775?restype=container&sv=2019-02-02&ss=b&srt=sco&se=2019-11-02T16%3A39%3A54Z&sp=rc&sig=REDACTED", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsaccountsasnetworkcreatefilesystemsucceeds04922171127f/javapathaccountsasnetworkcreatefilesystemsucceeds1197996d8d?resource=file", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "2585ac2b-bc02-4638-8950-32a48e3a9611" + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "df4e3d79-c272-432e-ac44-155979d988c7" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D7782645FA3990", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:27 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "053c9b6f-101f-004b-3a0f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:26 GMT", + "x-ms-client-request-id" : "df4e3d79-c272-432e-ac44-155979d988c7" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsaccountsasnetworkcreatefilesystemsucceeds04922171127f/javapathaccountsasnetworkcreatefilesystemsucceeds1197996d8d?position=0&action=append", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "06088601-8c43-4d3f-b9cf-def7d796cf08", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "053c9b7d-101f-004b-480f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:26 GMT", + "x-ms-client-request-id" : "06088601-8c43-4d3f-b9cf-def7d796cf08" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsaccountsasnetworkcreatefilesystemsucceeds04922171127f/javapathaccountsasnetworkcreatefilesystemsucceeds1197996d8d?position=7&retainUncommittedData=false&close=false&action=flush", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "d3993ec1-5116-4e62-a4b9-a364b8333105" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D77826460B58DF", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:27 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "053c9b7e-101f-004b-490f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:26 GMT", + "x-ms-client-request-id" : "d3993ec1-5116-4e62-a4b9-a364b8333105" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfsaccountsasnetworkcreatefilesystemsucceeds27281327c861?restype=container&sv=2019-02-02&ss=b&srt=sco&se=2019-12-04T19%3A23%3A27Z&sp=rc&sig=REDACTED", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "35bc7a55-5eea-4088-a3cb-1a0a52630a1d" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D75EEA1FE6C74A", - "Last-Modified" : "Fri, 01 Nov 2019 16:39:54 GMT", + "ETag" : "0x8D778264613D8CF", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:27 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "b520fb69-701e-0097-7bd2-902db3000000", - "Date" : "Fri, 01 Nov 2019 16:39:54 GMT", - "x-ms-client-request-id" : "2585ac2b-bc02-4638-8950-32a48e3a9611" + "x-ms-request-id" : "1d9a47a3-e01e-0092-7e0f-aad9cc000000", + "Date" : "Tue, 03 Dec 2019 19:23:27 GMT", + "x-ms-client-request-id" : "35bc7a55-5eea-4088-a3cb-1a0a52630a1d" }, "Exception" : null }, { @@ -46,8 +110,8 @@ "Uri" : "https://gaprahns.blob.core.windows.net?prefix=jtfsaccountsasnetworkcreatefilesystemsucceeds&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "db324899-f750-4d78-85d0-228749be53dc" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "3b408eef-2105-4397-8347-0cc01e5eed07" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -55,20 +119,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "b520fb84-701e-0097-13d2-902db3000000", - "Body" : "jtfsaccountsasnetworkcreatefilesystemsucceedsjtfsaccountsasnetworkcreatefilesystemsucceeds099875f5e7f7Fri, 01 Nov 2019 16:39:54 GMT\"0x8D75EEA1FDD289F\"unlockedavailable$account-encryption-keyfalsefalsefalsejtfsaccountsasnetworkcreatefilesystemsucceeds1858371cc775Fri, 01 Nov 2019 16:39:54 GMT\"0x8D75EEA1FE6C74A\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Fri, 01 Nov 2019 16:39:54 GMT", - "x-ms-client-request-id" : "db324899-f750-4d78-85d0-228749be53dc", + "x-ms-request-id" : "1d9a47bf-e01e-0092-140f-aad9cc000000", + "Body" : "jtfsaccountsasnetworkcreatefilesystemsucceedsjtfsaccountsasnetworkcreatefilesystemsucceeds04922171127fTue, 03 Dec 2019 19:23:27 GMT\"0x8D7782645D4EFCE\"unlockedavailable$account-encryption-keyfalsefalsefalsejtfsaccountsasnetworkcreatefilesystemsucceeds27281327c861Tue, 03 Dec 2019 19:23:27 GMT\"0x8D778264613D8CF\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Tue, 03 Dec 2019 19:23:27 GMT", + "x-ms-client-request-id" : "3b408eef-2105-4397-8347-0cc01e5eed07", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfsaccountsasnetworkcreatefilesystemsucceeds099875f5e7f7?restype=container", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfsaccountsasnetworkcreatefilesystemsucceeds04922171127f?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "6e14ed5c-8ff7-4051-bfb8-292bec753adf" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "587cc6b7-55b0-4d30-8d48-4d73cfbb3e5f" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -76,18 +140,18 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "b520fb97-701e-0097-23d2-902db3000000", - "Date" : "Fri, 01 Nov 2019 16:39:54 GMT", - "x-ms-client-request-id" : "6e14ed5c-8ff7-4051-bfb8-292bec753adf" + "x-ms-request-id" : "1d9a47d0-e01e-0092-240f-aad9cc000000", + "Date" : "Tue, 03 Dec 2019 19:23:27 GMT", + "x-ms-client-request-id" : "587cc6b7-55b0-4d30-8d48-4d73cfbb3e5f" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfsaccountsasnetworkcreatefilesystemsucceeds1858371cc775?restype=container", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfsaccountsasnetworkcreatefilesystemsucceeds27281327c861?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "36eedfa2-3f72-48b1-ac9b-9f5b8a719b60" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "4a90cefa-8a09-4e0e-971e-6124dad61569" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -95,11 +159,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "b520fbb3-701e-0097-3dd2-902db3000000", - "Date" : "Fri, 01 Nov 2019 16:39:54 GMT", - "x-ms-client-request-id" : "36eedfa2-3f72-48b1-ac9b-9f5b8a719b60" + "x-ms-request-id" : "1d9a47de-e01e-0092-320f-aad9cc000000", + "Date" : "Tue, 03 Dec 2019 19:23:27 GMT", + "x-ms-client-request-id" : "4a90cefa-8a09-4e0e-971e-6124dad61569" }, "Exception" : null } ], - "variables" : [ "jtfsaccountsasnetworkcreatefilesystemsucceeds099875f5e7f7", "2019-11-01T16:39:54.641Z", "jtfsaccountsasnetworkcreatefilesystemsucceeds1858371cc775" ] + "variables" : [ "jtfsaccountsasnetworkcreatefilesystemsucceeds04922171127f", "javapathaccountsasnetworkcreatefilesystemsucceeds1197996d8d", "2019-12-03T19:23:27.524779200Z", "jtfsaccountsasnetworkcreatefilesystemsucceeds27281327c861" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestaccountsasnetworktestfiledeletefails.json b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestaccountsasnetworktestfiledeletefails.json index 6ece95bb7d32..651cc04e6553 100644 --- a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestaccountsasnetworktestfiledeletefails.json +++ b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestaccountsasnetworktestfiledeletefails.json @@ -1,53 +1,117 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfsaccountsasnetworktestfiledeletefails001012aa90ce9f?restype=container", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfsaccountsasnetworktestfiledeletefails05709054b382b9?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "b242ce2e-9549-4681-9cc5-a9c347d34c9a" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "35a11943-48e3-45aa-b688-30296e4c910f" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D75EEA1F911DCD", - "Last-Modified" : "Fri, 01 Nov 2019 16:39:54 GMT", + "ETag" : "0x8D778264536497E", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:26 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "b520fa30-701e-0097-55d2-902db3000000", - "Date" : "Fri, 01 Nov 2019 16:39:53 GMT", - "x-ms-client-request-id" : "b242ce2e-9549-4681-9cc5-a9c347d34c9a" + "x-ms-request-id" : "1d9a462d-e01e-0092-3c0f-aad9cc000000", + "Date" : "Tue, 03 Dec 2019 19:23:26 GMT", + "x-ms-client-request-id" : "35a11943-48e3-45aa-b688-30296e4c910f" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsaccountsasnetworktestfiledeletefails001012aa90ce9f/javapathaccountsasnetworktestfiledeletefails117284d51493?resource=file", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsaccountsasnetworktestfiledeletefails05709054b382b9/javapathaccountsasnetworktestfiledeletefails10336822cc25?resource=file", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "d57272e4-01bb-48af-94ab-1e7e4a4dbdb3" + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "0173fa97-efa5-4668-81ea-2208d49e42e9" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D75EEA1F9B188A", - "Last-Modified" : "Fri, 01 Nov 2019 16:39:54 GMT", + "ETag" : "0x8D778264543B0CF", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:26 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "3074d95b-a01f-003f-3fd2-90f9a6000000", - "Date" : "Fri, 01 Nov 2019 16:39:53 GMT", - "x-ms-client-request-id" : "d57272e4-01bb-48af-94ab-1e7e4a4dbdb3" + "x-ms-request-id" : "053c9b03-101f-004b-4e0f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:25 GMT", + "x-ms-client-request-id" : "0173fa97-efa5-4668-81ea-2208d49e42e9" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsaccountsasnetworktestfiledeletefails05709054b382b9/javapathaccountsasnetworktestfiledeletefails10336822cc25?position=0&action=append", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "74e23a15-6299-4974-aea9-a61eff0dc1c3", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "053c9b0f-101f-004b-5a0f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:25 GMT", + "x-ms-client-request-id" : "74e23a15-6299-4974-aea9-a61eff0dc1c3" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsaccountsasnetworktestfiledeletefails05709054b382b9/javapathaccountsasnetworktestfiledeletefails10336822cc25?position=7&retainUncommittedData=false&close=false&action=flush", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "4493afe4-686f-4412-bfdb-09391d24d1ba" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D77826455815A1", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:26 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "053c9b14-101f-004b-5f0f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:25 GMT", + "x-ms-client-request-id" : "4493afe4-686f-4412-bfdb-09391d24d1ba" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsaccountsasnetworktestfiledeletefails05709054b382b9/javapathaccountsasnetworktestfiledeletefails27227311cfef?resource=file", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "6e174676-54ba-4260-ad48-ba73220e2af4" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D778264565F9C9", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:26 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "053c9b21-101f-004b-6c0f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:25 GMT", + "x-ms-client-request-id" : "6e174676-54ba-4260-ad48-ba73220e2af4" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsaccountsasnetworktestfiledeletefails001012aa90ce9f/javapathaccountsasnetworktestfiledeletefails117284d51493?sv=2019-02-02&ss=b&srt=sco&se=2019-11-02T16%3A39%3A54Z&sp=r&sig=REDACTED", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsaccountsasnetworktestfiledeletefails05709054b382b9/javapathaccountsasnetworktestfiledeletefails27227311cfef?sv=2019-02-02&ss=b&srt=sco&se=2019-12-04T19%3A23%3A26Z&sp=r&sig=REDACTED", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "4fc356b9-7e71-4213-8644-140d1aeb2c9a" + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "7d88c36c-809d-4d09-a0e0-b2367159ff26" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -56,10 +120,10 @@ "retry-after" : "0", "Content-Length" : "227", "StatusCode" : "403", - "x-ms-request-id" : "3074d95c-a01f-003f-40d2-90f9a6000000", - "Body" : "{\"error\":{\"code\":\"AuthorizationPermissionMismatch\",\"message\":\"This request is not authorized to perform this operation using this permission.\\nRequestId:3074d95c-a01f-003f-40d2-90f9a6000000\\nTime:2019-11-01T16:39:54.2298369Z\"}}", - "Date" : "Fri, 01 Nov 2019 16:39:53 GMT", - "x-ms-client-request-id" : "4fc356b9-7e71-4213-8644-140d1aeb2c9a", + "x-ms-request-id" : "053c9b2c-101f-004b-770f-aa7fe0000000", + "Body" : "{\"error\":{\"code\":\"AuthorizationPermissionMismatch\",\"message\":\"This request is not authorized to perform this operation using this permission.\\nRequestId:053c9b2c-101f-004b-770f-aa7fe0000000\\nTime:2019-12-03T19:23:26.5161685Z\"}}", + "Date" : "Tue, 03 Dec 2019 19:23:25 GMT", + "x-ms-client-request-id" : "7d88c36c-809d-4d09-a0e0-b2367159ff26", "Content-Type" : "application/json;charset=utf-8" }, "Exception" : null @@ -68,8 +132,8 @@ "Uri" : "https://gaprahns.blob.core.windows.net?prefix=jtfsaccountsasnetworktestfiledeletefails&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "ac22c5d8-109d-43f6-bdb5-107540a18439" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "2b3b20e2-51d8-4e9e-930c-4617960ab829" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -77,20 +141,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "b520fa99-701e-0097-38d2-902db3000000", - "Body" : "jtfsaccountsasnetworktestfiledeletefailsjtfsaccountsasnetworktestfiledeletefails001012aa90ce9fFri, 01 Nov 2019 16:39:54 GMT\"0x8D75EEA1F911DCD\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Fri, 01 Nov 2019 16:39:53 GMT", - "x-ms-client-request-id" : "ac22c5d8-109d-43f6-bdb5-107540a18439", + "x-ms-request-id" : "1d9a468c-e01e-0092-0b0f-aad9cc000000", + "Body" : "jtfsaccountsasnetworktestfiledeletefailsjtfsaccountsasnetworktestfiledeletefails05709054b382b9Tue, 03 Dec 2019 19:23:26 GMT\"0x8D778264536497E\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Tue, 03 Dec 2019 19:23:26 GMT", + "x-ms-client-request-id" : "2b3b20e2-51d8-4e9e-930c-4617960ab829", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfsaccountsasnetworktestfiledeletefails001012aa90ce9f?restype=container", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfsaccountsasnetworktestfiledeletefails05709054b382b9?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "1096bfa9-360f-41ee-b876-10bf155b1d9b" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "8da4d882-31f0-4951-8b09-359dd0857272" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -98,11 +162,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "b520faba-701e-0097-58d2-902db3000000", - "Date" : "Fri, 01 Nov 2019 16:39:53 GMT", - "x-ms-client-request-id" : "1096bfa9-360f-41ee-b876-10bf155b1d9b" + "x-ms-request-id" : "1d9a4694-e01e-0092-120f-aad9cc000000", + "Date" : "Tue, 03 Dec 2019 19:23:26 GMT", + "x-ms-client-request-id" : "8da4d882-31f0-4951-8b09-359dd0857272" }, "Exception" : null } ], - "variables" : [ "jtfsaccountsasnetworktestfiledeletefails001012aa90ce9f", "javapathaccountsasnetworktestfiledeletefails117284d51493", "2019-11-01T16:39:54.192Z" ] + "variables" : [ "jtfsaccountsasnetworktestfiledeletefails05709054b382b9", "javapathaccountsasnetworktestfiledeletefails10336822cc25", "javapathaccountsasnetworktestfiledeletefails27227311cfef", "2019-12-03T19:23:26.440565200Z" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestaccountsasnetworktestfileread.json b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestaccountsasnetworktestfileread.json index ad4d8521327c..09190d71f1cd 100644 --- a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestaccountsasnetworktestfileread.json +++ b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestaccountsasnetworktestfileread.json @@ -1,53 +1,53 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfsaccountsasnetworktestfileread063774bc3e30ccc081?restype=container", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfsaccountsasnetworktestfileread04140474000823cce6?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "0eadffed-104e-4db1-90fb-3a8794d698e5" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "16bc3c49-c222-420d-898e-d11000b1531d" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D75EEA1F495981", - "Last-Modified" : "Fri, 01 Nov 2019 16:39:53 GMT", + "ETag" : "0x8D7782644C8CE18", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:25 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "b520f918-701e-0097-51d2-902db3000000", - "Date" : "Fri, 01 Nov 2019 16:39:53 GMT", - "x-ms-client-request-id" : "0eadffed-104e-4db1-90fb-3a8794d698e5" + "x-ms-request-id" : "1d9a4584-e01e-0092-2c0f-aad9cc000000", + "Date" : "Tue, 03 Dec 2019 19:23:25 GMT", + "x-ms-client-request-id" : "16bc3c49-c222-420d-898e-d11000b1531d" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsaccountsasnetworktestfileread063774bc3e30ccc081/javapathaccountsasnetworktestfileread1217387f91607bfd?resource=file", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsaccountsasnetworktestfileread04140474000823cce6/javapathaccountsasnetworktestfileread15643094dcda8954?resource=file", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "fd5f646e-235b-4cbb-b46a-97afbcf82b2a" + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "552725f4-1c60-49b1-84e0-491ab7d6012f" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D75EEA1F53A556", - "Last-Modified" : "Fri, 01 Nov 2019 16:39:53 GMT", + "ETag" : "0x8D7782644DC0234", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:25 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "3074d958-a01f-003f-3cd2-90f9a6000000", - "Date" : "Fri, 01 Nov 2019 16:39:53 GMT", - "x-ms-client-request-id" : "fd5f646e-235b-4cbb-b46a-97afbcf82b2a" + "x-ms-request-id" : "053c9aea-101f-004b-360f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:24 GMT", + "x-ms-client-request-id" : "552725f4-1c60-49b1-84e0-491ab7d6012f" }, "Exception" : null }, { "Method" : "PATCH", - "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsaccountsasnetworktestfileread063774bc3e30ccc081/javapathaccountsasnetworktestfileread1217387f91607bfd?position=0&action=append", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsaccountsasnetworktestfileread04140474000823cce6/javapathaccountsasnetworktestfileread15643094dcda8954?position=0&action=append", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "001afafc-fd7d-4345-a37a-d5688a718f26", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "13093bef-36a3-4a36-bdd5-6891e6f67049", "Content-Type" : "application/octet-stream" }, "Response" : { @@ -57,59 +57,123 @@ "Content-Length" : "0", "StatusCode" : "202", "x-ms-request-server-encrypted" : "true", - "x-ms-request-id" : "3074d959-a01f-003f-3dd2-90f9a6000000", - "Date" : "Fri, 01 Nov 2019 16:39:53 GMT", - "x-ms-client-request-id" : "001afafc-fd7d-4345-a37a-d5688a718f26" + "x-ms-request-id" : "053c9aeb-101f-004b-370f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:24 GMT", + "x-ms-client-request-id" : "13093bef-36a3-4a36-bdd5-6891e6f67049" }, "Exception" : null }, { "Method" : "PATCH", - "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsaccountsasnetworktestfileread063774bc3e30ccc081/javapathaccountsasnetworktestfileread1217387f91607bfd?position=7&retainUncommittedData=false&close=false&action=flush", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsaccountsasnetworktestfileread04140474000823cce6/javapathaccountsasnetworktestfileread15643094dcda8954?position=7&retainUncommittedData=false&close=false&action=flush", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "5dc6b6a4-6d25-494a-9018-1d68d229125b" + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "c3aa21a8-543d-4ca0-8adf-f20bae3cf653" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D75EEA1F63E895", - "Last-Modified" : "Fri, 01 Nov 2019 16:39:53 GMT", + "ETag" : "0x8D7782644ED10E5", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:25 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "200", "x-ms-request-server-encrypted" : "true", - "x-ms-request-id" : "3074d95a-a01f-003f-3ed2-90f9a6000000", - "Date" : "Fri, 01 Nov 2019 16:39:53 GMT", - "x-ms-client-request-id" : "5dc6b6a4-6d25-494a-9018-1d68d229125b" + "x-ms-request-id" : "053c9aec-101f-004b-380f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:24 GMT", + "x-ms-client-request-id" : "c3aa21a8-543d-4ca0-8adf-f20bae3cf653" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsaccountsasnetworktestfileread04140474000823cce6/javapathaccountsasnetworktestfileread2692164a07695d0e?resource=file", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "b5fe3e2f-adf2-48b4-9548-6db7e29d53c4" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D7782644F855CE", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:25 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "053c9aed-101f-004b-390f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:24 GMT", + "x-ms-client-request-id" : "b5fe3e2f-adf2-48b4-9548-6db7e29d53c4" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsaccountsasnetworktestfileread04140474000823cce6/javapathaccountsasnetworktestfileread2692164a07695d0e?position=0&action=append", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "f8814bd1-35fc-41d2-ad25-d211bffb5b5e", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "053c9aef-101f-004b-3a0f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:24 GMT", + "x-ms-client-request-id" : "f8814bd1-35fc-41d2-ad25-d211bffb5b5e" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsaccountsasnetworktestfileread04140474000823cce6/javapathaccountsasnetworktestfileread2692164a07695d0e?position=7&retainUncommittedData=false&close=false&action=flush", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "8baefd0d-b36d-4478-8ced-3c14bbd0516d" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D77826450862D5", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:25 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "053c9af0-101f-004b-3b0f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:24 GMT", + "x-ms-client-request-id" : "8baefd0d-b36d-4478-8ced-3c14bbd0516d" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfsaccountsasnetworktestfileread063774bc3e30ccc081/javapathaccountsasnetworktestfileread1217387f91607bfd?sv=2019-02-02&ss=b&srt=sco&se=2019-11-02T16%3A39%3A53Z&sp=r&sig=REDACTED", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfsaccountsasnetworktestfileread04140474000823cce6/javapathaccountsasnetworktestfileread2692164a07695d0e?sv=2019-02-02&ss=b&srt=sco&se=2019-12-04T19%3A23%3A25Z&sp=r&sig=REDACTED", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "a4cbf3ae-f15d-4c6c-89c1-0b299281eb3f" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "ee7b197f-b1c9-4de7-8da1-4212d26aedf4" }, "Response" : { "x-ms-version" : "2019-02-02", "x-ms-lease-status" : "unlocked", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-lease-state" : "available", - "Last-Modified" : "Fri, 01 Nov 2019 16:39:53 GMT", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:25 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Fri, 01 Nov 2019 16:39:53 GMT", + "Date" : "Tue, 03 Dec 2019 19:23:25 GMT", "x-ms-blob-type" : "BlockBlob", "Accept-Ranges" : "bytes", "x-ms-server-encrypted" : "true", - "ETag" : "0x8D75EEA1F63E895", - "x-ms-creation-time" : "Fri, 01 Nov 2019 16:39:53 GMT", + "ETag" : "0x8D77826450862D5", + "x-ms-creation-time" : "Tue, 03 Dec 2019 19:23:25 GMT", "Content-Length" : "7", - "x-ms-request-id" : "b520f9cf-701e-0097-7ad2-902db3000000", + "x-ms-request-id" : "1d9a45fd-e01e-0092-110f-aad9cc000000", "Body" : "[100, 101, 102, 97, 117, 108, 116]", - "x-ms-client-request-id" : "a4cbf3ae-f15d-4c6c-89c1-0b299281eb3f", + "x-ms-client-request-id" : "ee7b197f-b1c9-4de7-8da1-4212d26aedf4", "Content-Type" : "application/octet-stream" }, "Exception" : null @@ -118,8 +182,8 @@ "Uri" : "https://gaprahns.blob.core.windows.net?prefix=jtfsaccountsasnetworktestfileread&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "3935d246-5da8-4626-bd1f-e3afaf60513c" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "11403d6d-79d7-4f56-8d8c-5b7a219b301f" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -127,20 +191,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "b520f9f0-701e-0097-19d2-902db3000000", - "Body" : "jtfsaccountsasnetworktestfilereadjtfsaccountsasnetworktestfileread063774bc3e30ccc081Fri, 01 Nov 2019 16:39:53 GMT\"0x8D75EEA1F495981\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Fri, 01 Nov 2019 16:39:53 GMT", - "x-ms-client-request-id" : "3935d246-5da8-4626-bd1f-e3afaf60513c", + "x-ms-request-id" : "1d9a460b-e01e-0092-1d0f-aad9cc000000", + "Body" : "jtfsaccountsasnetworktestfilereadjtfsaccountsasnetworktestfileread04140474000823cce6Tue, 03 Dec 2019 19:23:25 GMT\"0x8D7782644C8CE18\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Tue, 03 Dec 2019 19:23:25 GMT", + "x-ms-client-request-id" : "11403d6d-79d7-4f56-8d8c-5b7a219b301f", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfsaccountsasnetworktestfileread063774bc3e30ccc081?restype=container", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfsaccountsasnetworktestfileread04140474000823cce6?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "2d584296-7f4f-43bc-98af-713dcdf9ca96" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "cf4fa3b6-9561-44cc-a3f3-9fe30876871a" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -148,11 +212,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "b520fa01-701e-0097-29d2-902db3000000", - "Date" : "Fri, 01 Nov 2019 16:39:53 GMT", - "x-ms-client-request-id" : "2d584296-7f4f-43bc-98af-713dcdf9ca96" + "x-ms-request-id" : "1d9a461d-e01e-0092-2c0f-aad9cc000000", + "Date" : "Tue, 03 Dec 2019 19:23:26 GMT", + "x-ms-client-request-id" : "cf4fa3b6-9561-44cc-a3f3-9fe30876871a" }, "Exception" : null } ], - "variables" : [ "jtfsaccountsasnetworktestfileread063774bc3e30ccc081", "javapathaccountsasnetworktestfileread1217387f91607bfd", "2019-11-01T16:39:53.844Z" ] + "variables" : [ "jtfsaccountsasnetworktestfileread04140474000823cce6", "javapathaccountsasnetworktestfileread15643094dcda8954", "javapathaccountsasnetworktestfileread2692164a07695d0e", "2019-12-03T19:23:25.852327300Z" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestfilerange[0].json b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestfilerange[0].json index 8105c148393c..1f25cc3eeecb 100644 --- a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestfilerange[0].json +++ b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestfilerange[0].json @@ -1,23 +1,87 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfsfilerange0sastestfilerangebdd94165687b4b702c90?restype=container", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfsfilerange0sastestfilerangedb893618b7d9706e5e38?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "fc4556dd-d619-4a76-a267-4e4d1b15be39" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "ace0f844-c91d-4d6b-b384-4509a1986dbc" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D75EEA1BBAACC3", - "Last-Modified" : "Fri, 01 Nov 2019 16:39:47 GMT", + "ETag" : "0x8D778264134F16A", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:19 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "b520ecd5-701e-0097-23d2-902db3000000", - "Date" : "Fri, 01 Nov 2019 16:39:47 GMT", - "x-ms-client-request-id" : "fc4556dd-d619-4a76-a267-4e4d1b15be39" + "x-ms-request-id" : "1d9a3f16-e01e-0092-2b0f-aad9cc000000", + "Date" : "Tue, 03 Dec 2019 19:23:19 GMT", + "x-ms-client-request-id" : "ace0f844-c91d-4d6b-b384-4509a1986dbc" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsfilerange0sastestfilerangedb893618b7d9706e5e38/javapathfilerange1sastestfilerangedb809236f255142ba2?resource=file", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "dd625247-7bc8-46df-b02f-8e0d37c76866" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D77826418020E5", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:19 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "053c9ac9-101f-004b-160f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:18 GMT", + "x-ms-client-request-id" : "dd625247-7bc8-46df-b02f-8e0d37c76866" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsfilerange0sastestfilerangedb893618b7d9706e5e38/javapathfilerange1sastestfilerangedb809236f255142ba2?position=0&action=append", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "00765b6c-d254-4407-a3c0-2479cabebd81", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "053c9aca-101f-004b-170f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:19 GMT", + "x-ms-client-request-id" : "00765b6c-d254-4407-a3c0-2479cabebd81" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsfilerange0sastestfilerangedb893618b7d9706e5e38/javapathfilerange1sastestfilerangedb809236f255142ba2?position=7&retainUncommittedData=false&close=false&action=flush", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "6f14ca68-090f-443a-ac72-716cfd357520" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D778264196E508", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:20 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "053c9acb-101f-004b-180f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:19 GMT", + "x-ms-client-request-id" : "6f14ca68-090f-443a-ac72-716cfd357520" }, "Exception" : null }, { @@ -25,8 +89,8 @@ "Uri" : "https://gaprahns.blob.core.windows.net?prefix=jtfsfilerange&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "8b0af2d6-c419-46a5-9058-f0a9718d7fa2" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "119891da-08d3-46f7-b2a1-a42c89672836" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -34,20 +98,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "b520eded-701e-0097-1ed2-902db3000000", - "Body" : "jtfsfilerangejtfsfilerange0sastestfilerangebdd94165687b4b702c90Fri, 01 Nov 2019 16:39:47 GMT\"0x8D75EEA1BBAACC3\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Fri, 01 Nov 2019 16:39:47 GMT", - "x-ms-client-request-id" : "8b0af2d6-c419-46a5-9058-f0a9718d7fa2", + "x-ms-request-id" : "1d9a3fd2-e01e-0092-450f-aad9cc000000", + "Body" : "jtfsfilerangejtfsfilerange0sastestfilerangedb893618b7d9706e5e38Tue, 03 Dec 2019 19:23:19 GMT\"0x8D778264134F16A\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Tue, 03 Dec 2019 19:23:20 GMT", + "x-ms-client-request-id" : "119891da-08d3-46f7-b2a1-a42c89672836", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfsfilerange0sastestfilerangebdd94165687b4b702c90?restype=container", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfsfilerange0sastestfilerangedb893618b7d9706e5e38?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "7af308ee-2a52-40bc-89f4-dd2fe17074eb" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "2972a376-2e68-4933-a8b0-d9780e9d19e1" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -55,11 +119,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "b520ee48-701e-0097-76d2-902db3000000", - "Date" : "Fri, 01 Nov 2019 16:39:47 GMT", - "x-ms-client-request-id" : "7af308ee-2a52-40bc-89f4-dd2fe17074eb" + "x-ms-request-id" : "1d9a3fed-e01e-0092-5d0f-aad9cc000000", + "Date" : "Tue, 03 Dec 2019 19:23:20 GMT", + "x-ms-client-request-id" : "2972a376-2e68-4933-a8b0-d9780e9d19e1" }, "Exception" : null } ], - "variables" : [ "jtfsfilerange0sastestfilerangebdd94165687b4b702c90" ] + "variables" : [ "jtfsfilerange0sastestfilerangedb893618b7d9706e5e38", "javapathfilerange1sastestfilerangedb809236f255142ba2" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestfilerange[1].json b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestfilerange[1].json index f91856668201..2c5542e30331 100644 --- a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestfilerange[1].json +++ b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestfilerange[1].json @@ -1,23 +1,87 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfsfilerange0sastestfilerange12408533a832bb853343?restype=container", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfsfilerange0sastestfilerange0e11306291a6a76e7b90?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "2312b905-4a65-41a8-a311-d4fe84333130" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "1b842950-55d8-4b7f-9c10-22187cffa093" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D75EEA1C1D02B9", - "Last-Modified" : "Fri, 01 Nov 2019 16:39:48 GMT", + "ETag" : "0x8D7782641C05A66", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:20 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "b520ee6a-701e-0097-17d2-902db3000000", - "Date" : "Fri, 01 Nov 2019 16:39:48 GMT", - "x-ms-client-request-id" : "2312b905-4a65-41a8-a311-d4fe84333130" + "x-ms-request-id" : "1d9a400b-e01e-0092-720f-aad9cc000000", + "Date" : "Tue, 03 Dec 2019 19:23:20 GMT", + "x-ms-client-request-id" : "1b842950-55d8-4b7f-9c10-22187cffa093" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsfilerange0sastestfilerange0e11306291a6a76e7b90/javapathfilerange1sastestfilerange0e182333bd487ee611?resource=file", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "64addad3-5f60-4b77-bb73-6d3ac40bd32b" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D7782641D14826", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:20 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "053c9acc-101f-004b-190f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:19 GMT", + "x-ms-client-request-id" : "64addad3-5f60-4b77-bb73-6d3ac40bd32b" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsfilerange0sastestfilerange0e11306291a6a76e7b90/javapathfilerange1sastestfilerange0e182333bd487ee611?position=0&action=append", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "dd9ee95e-80ca-47a5-8850-7f75b8931614", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "053c9acd-101f-004b-1a0f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:19 GMT", + "x-ms-client-request-id" : "dd9ee95e-80ca-47a5-8850-7f75b8931614" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsfilerange0sastestfilerange0e11306291a6a76e7b90/javapathfilerange1sastestfilerange0e182333bd487ee611?position=7&retainUncommittedData=false&close=false&action=flush", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "e1f32ef4-e4d3-41a2-b3be-e717a3fd8ba3" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D7782641E5D4DD", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:20 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "053c9ace-101f-004b-1b0f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:19 GMT", + "x-ms-client-request-id" : "e1f32ef4-e4d3-41a2-b3be-e717a3fd8ba3" }, "Exception" : null }, { @@ -25,8 +89,8 @@ "Uri" : "https://gaprahns.blob.core.windows.net?prefix=jtfsfilerange&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "2144112e-f1cb-4f17-af7f-a498c064764d" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "681dfcbf-7c80-45c1-964c-a70e5c4367b7" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -34,20 +98,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "b520ef10-701e-0097-2cd2-902db3000000", - "Body" : "jtfsfilerangejtfsfilerange0sastestfilerange12408533a832bb853343Fri, 01 Nov 2019 16:39:48 GMT\"0x8D75EEA1C1D02B9\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Fri, 01 Nov 2019 16:39:48 GMT", - "x-ms-client-request-id" : "2144112e-f1cb-4f17-af7f-a498c064764d", + "x-ms-request-id" : "1d9a405e-e01e-0092-3a0f-aad9cc000000", + "Body" : "jtfsfilerangejtfsfilerange0sastestfilerange0e11306291a6a76e7b90Tue, 03 Dec 2019 19:23:20 GMT\"0x8D7782641C05A66\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Tue, 03 Dec 2019 19:23:20 GMT", + "x-ms-client-request-id" : "681dfcbf-7c80-45c1-964c-a70e5c4367b7", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfsfilerange0sastestfilerange12408533a832bb853343?restype=container", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfsfilerange0sastestfilerange0e11306291a6a76e7b90?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "b9e5d8e5-742c-46f0-be31-fe4ae732bef5" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "d282f17d-5273-4592-996f-351a51d61937" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -55,11 +119,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "b520ef1e-701e-0097-3ad2-902db3000000", - "Date" : "Fri, 01 Nov 2019 16:39:48 GMT", - "x-ms-client-request-id" : "b9e5d8e5-742c-46f0-be31-fe4ae732bef5" + "x-ms-request-id" : "1d9a4069-e01e-0092-430f-aad9cc000000", + "Date" : "Tue, 03 Dec 2019 19:23:20 GMT", + "x-ms-client-request-id" : "d282f17d-5273-4592-996f-351a51d61937" }, "Exception" : null } ], - "variables" : [ "jtfsfilerange0sastestfilerange12408533a832bb853343" ] + "variables" : [ "jtfsfilerange0sastestfilerange0e11306291a6a76e7b90", "javapathfilerange1sastestfilerange0e182333bd487ee611" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestfilerange[2].json b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestfilerange[2].json index f49c810b9ff3..da20f47dfc16 100644 --- a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestfilerange[2].json +++ b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestfilerange[2].json @@ -1,23 +1,87 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfsfilerange0sastestfilerange58d622718597c9070c30?restype=container", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfsfilerange0sastestfilerangef3e695519063e62439d9?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "c870207c-7a1c-423e-8ef0-7269910b43da" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "8ec42856-1183-4705-8ed9-5d2b15ffaac1" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D75EEA1C5ED282", - "Last-Modified" : "Fri, 01 Nov 2019 16:39:48 GMT", + "ETag" : "0x8D778264202C67C", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:20 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "b520ef40-701e-0097-59d2-902db3000000", - "Date" : "Fri, 01 Nov 2019 16:39:48 GMT", - "x-ms-client-request-id" : "c870207c-7a1c-423e-8ef0-7269910b43da" + "x-ms-request-id" : "1d9a4082-e01e-0092-570f-aad9cc000000", + "Date" : "Tue, 03 Dec 2019 19:23:20 GMT", + "x-ms-client-request-id" : "8ec42856-1183-4705-8ed9-5d2b15ffaac1" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsfilerange0sastestfilerangef3e695519063e62439d9/javapathfilerange1sastestfilerangef3e368908e98932242?resource=file", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "37b847de-1923-4089-a162-11cc200469a5" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D77826420F73E2", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:20 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "053c9acf-101f-004b-1c0f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:19 GMT", + "x-ms-client-request-id" : "37b847de-1923-4089-a162-11cc200469a5" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsfilerange0sastestfilerangef3e695519063e62439d9/javapathfilerange1sastestfilerangef3e368908e98932242?position=0&action=append", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "bc4eaa4f-8de9-4847-ade9-671f75a60ee3", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "053c9ad0-101f-004b-1d0f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:19 GMT", + "x-ms-client-request-id" : "bc4eaa4f-8de9-4847-ade9-671f75a60ee3" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsfilerange0sastestfilerangef3e695519063e62439d9/javapathfilerange1sastestfilerangef3e368908e98932242?position=7&retainUncommittedData=false&close=false&action=flush", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "8c3dd1cb-d432-481d-b8b8-7bca87ff7b4a" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D7782642208826", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:20 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "053c9ad1-101f-004b-1e0f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:19 GMT", + "x-ms-client-request-id" : "8c3dd1cb-d432-481d-b8b8-7bca87ff7b4a" }, "Exception" : null }, { @@ -25,8 +89,8 @@ "Uri" : "https://gaprahns.blob.core.windows.net?prefix=jtfsfilerange&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "5893e7fa-200f-42de-a502-262e446b12ac" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "010cfd7c-ace6-4494-8f51-56d210eafbac" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -34,20 +98,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "b520ef76-701e-0097-0bd2-902db3000000", - "Body" : "jtfsfilerangejtfsfilerange0sastestfilerange58d622718597c9070c30Fri, 01 Nov 2019 16:39:48 GMT\"0x8D75EEA1C5ED282\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Fri, 01 Nov 2019 16:39:48 GMT", - "x-ms-client-request-id" : "5893e7fa-200f-42de-a502-262e446b12ac", + "x-ms-request-id" : "1d9a40cb-e01e-0092-0f0f-aad9cc000000", + "Body" : "jtfsfilerangejtfsfilerange0sastestfilerangef3e695519063e62439d9Tue, 03 Dec 2019 19:23:20 GMT\"0x8D778264202C67C\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Tue, 03 Dec 2019 19:23:20 GMT", + "x-ms-client-request-id" : "010cfd7c-ace6-4494-8f51-56d210eafbac", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfsfilerange0sastestfilerange58d622718597c9070c30?restype=container", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfsfilerange0sastestfilerangef3e695519063e62439d9?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "ef0e950b-7f67-457a-8e6f-035fb55620ce" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "4d461a0b-25e1-4b67-9bd5-8d9d950f7e19" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -55,11 +119,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "b520ef8b-701e-0097-1fd2-902db3000000", - "Date" : "Fri, 01 Nov 2019 16:39:48 GMT", - "x-ms-client-request-id" : "ef0e950b-7f67-457a-8e6f-035fb55620ce" + "x-ms-request-id" : "1d9a40e3-e01e-0092-200f-aad9cc000000", + "Date" : "Tue, 03 Dec 2019 19:23:21 GMT", + "x-ms-client-request-id" : "4d461a0b-25e1-4b67-9bd5-8d9d950f7e19" }, "Exception" : null } ], - "variables" : [ "jtfsfilerange0sastestfilerange58d622718597c9070c30" ] + "variables" : [ "jtfsfilerange0sastestfilerangef3e695519063e62439d9", "javapathfilerange1sastestfilerangef3e368908e98932242" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestfilerangeia[0].json b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestfilerangeia[0].json index cd07f6d41d58..5b70e4db90d3 100644 --- a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestfilerangeia[0].json +++ b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestfilerangeia[0].json @@ -1,23 +1,87 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfsfilerangeia0sastestfilerangeia94c1962980ca9970eb?restype=container", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfsfilerangeia0sastestfilerangeia2168924360257cb889?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "21e07bff-865f-4d92-a873-ec18f3eaf713" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "8def2d42-09df-4a51-abc0-e5c976bd7e8f" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D75EEA1C81CA1E", - "Last-Modified" : "Fri, 01 Nov 2019 16:39:48 GMT", + "ETag" : "0x8D77826423997BA", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:21 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "b520efa6-701e-0097-38d2-902db3000000", - "Date" : "Fri, 01 Nov 2019 16:39:48 GMT", - "x-ms-client-request-id" : "21e07bff-865f-4d92-a873-ec18f3eaf713" + "x-ms-request-id" : "1d9a40fc-e01e-0092-370f-aad9cc000000", + "Date" : "Tue, 03 Dec 2019 19:23:21 GMT", + "x-ms-client-request-id" : "8def2d42-09df-4a51-abc0-e5c976bd7e8f" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsfilerangeia0sastestfilerangeia2168924360257cb889/javapathfilerangeia1sastestfilerangeia216794501c94b80a?resource=file", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "24ecf75a-2d0d-405a-a15b-1fa63e814e10" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D778264248BD30", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:21 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "053c9ad2-101f-004b-1f0f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:20 GMT", + "x-ms-client-request-id" : "24ecf75a-2d0d-405a-a15b-1fa63e814e10" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsfilerangeia0sastestfilerangeia2168924360257cb889/javapathfilerangeia1sastestfilerangeia216794501c94b80a?position=0&action=append", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "d6526773-8a98-4aff-b931-01a0051e1454", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "053c9ad3-101f-004b-200f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:20 GMT", + "x-ms-client-request-id" : "d6526773-8a98-4aff-b931-01a0051e1454" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsfilerangeia0sastestfilerangeia2168924360257cb889/javapathfilerangeia1sastestfilerangeia216794501c94b80a?position=7&retainUncommittedData=false&close=false&action=flush", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "1b38b386-2746-4ddc-b2ad-90dc3c75184b" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D77826426E54E1", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:21 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "053c9ad4-101f-004b-210f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:20 GMT", + "x-ms-client-request-id" : "1b38b386-2746-4ddc-b2ad-90dc3c75184b" }, "Exception" : null }, { @@ -25,8 +89,8 @@ "Uri" : "https://gaprahns.blob.core.windows.net?prefix=jtfsfilerangeia&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "b4bec743-20f4-43b7-9bd6-dbcedeaa3496" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "5b57c031-0382-4b83-8a59-4d0c029dc5e9" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -34,20 +98,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "b520f006-701e-0097-11d2-902db3000000", - "Body" : "jtfsfilerangeiajtfsfilerangeia0sastestfilerangeia94c1962980ca9970ebFri, 01 Nov 2019 16:39:48 GMT\"0x8D75EEA1C81CA1E\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Fri, 01 Nov 2019 16:39:48 GMT", - "x-ms-client-request-id" : "b4bec743-20f4-43b7-9bd6-dbcedeaa3496", + "x-ms-request-id" : "1d9a4150-e01e-0092-010f-aad9cc000000", + "Body" : "jtfsfilerangeiajtfsfilerangeia0sastestfilerangeia2168924360257cb889Tue, 03 Dec 2019 19:23:21 GMT\"0x8D77826423997BA\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Tue, 03 Dec 2019 19:23:21 GMT", + "x-ms-client-request-id" : "5b57c031-0382-4b83-8a59-4d0c029dc5e9", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfsfilerangeia0sastestfilerangeia94c1962980ca9970eb?restype=container", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfsfilerangeia0sastestfilerangeia2168924360257cb889?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "c186c85e-1303-4487-80e5-cd56d799c015" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "4b6c0b9c-ef0c-4159-bc71-02c5e5ec7ccb" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -55,11 +119,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "b520f01e-701e-0097-26d2-902db3000000", - "Date" : "Fri, 01 Nov 2019 16:39:48 GMT", - "x-ms-client-request-id" : "c186c85e-1303-4487-80e5-cd56d799c015" + "x-ms-request-id" : "1d9a415c-e01e-0092-0d0f-aad9cc000000", + "Date" : "Tue, 03 Dec 2019 19:23:21 GMT", + "x-ms-client-request-id" : "4b6c0b9c-ef0c-4159-bc71-02c5e5ec7ccb" }, "Exception" : null } ], - "variables" : [ "jtfsfilerangeia0sastestfilerangeia94c1962980ca9970eb" ] + "variables" : [ "jtfsfilerangeia0sastestfilerangeia2168924360257cb889", "javapathfilerangeia1sastestfilerangeia216794501c94b80a" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestfilerangeia[1].json b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestfilerangeia[1].json index 826ceaf40bb3..511403d2873e 100644 --- a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestfilerangeia[1].json +++ b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestfilerangeia[1].json @@ -1,23 +1,87 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfsfilerangeia0sastestfilerangeiad887410668f058f310?restype=container", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfsfilerangeia0sastestfilerangeia22221314f3cf21b11d?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "c9f16230-6442-46b1-8191-ae79b41c4794" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "e5951823-bbf7-48c5-9678-cd5a23570ab3" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D75EEA1CAC160C", - "Last-Modified" : "Fri, 01 Nov 2019 16:39:49 GMT", + "ETag" : "0x8D778264288FE69", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:21 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "b520f038-701e-0097-3cd2-902db3000000", - "Date" : "Fri, 01 Nov 2019 16:39:49 GMT", - "x-ms-client-request-id" : "c9f16230-6442-46b1-8191-ae79b41c4794" + "x-ms-request-id" : "1d9a417b-e01e-0092-250f-aad9cc000000", + "Date" : "Tue, 03 Dec 2019 19:23:21 GMT", + "x-ms-client-request-id" : "e5951823-bbf7-48c5-9678-cd5a23570ab3" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsfilerangeia0sastestfilerangeia22221314f3cf21b11d/javapathfilerangeia1sastestfilerangeia222122084e7073f3?resource=file", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "72e1d91f-d5f5-425a-8720-953f6e362bb2" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D77826429605A5", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:21 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "053c9ad5-101f-004b-220f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:20 GMT", + "x-ms-client-request-id" : "72e1d91f-d5f5-425a-8720-953f6e362bb2" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsfilerangeia0sastestfilerangeia22221314f3cf21b11d/javapathfilerangeia1sastestfilerangeia222122084e7073f3?position=0&action=append", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "f2286027-7b12-4974-84b2-b446a7133feb", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "053c9ad6-101f-004b-230f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:20 GMT", + "x-ms-client-request-id" : "f2286027-7b12-4974-84b2-b446a7133feb" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsfilerangeia0sastestfilerangeia22221314f3cf21b11d/javapathfilerangeia1sastestfilerangeia222122084e7073f3?position=7&retainUncommittedData=false&close=false&action=flush", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "9790ef40-76c5-4bbf-bcb5-6bfd2072d304" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D7782642A8C14E", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:21 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "053c9ad7-101f-004b-240f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:20 GMT", + "x-ms-client-request-id" : "9790ef40-76c5-4bbf-bcb5-6bfd2072d304" }, "Exception" : null }, { @@ -25,8 +89,8 @@ "Uri" : "https://gaprahns.blob.core.windows.net?prefix=jtfsfilerangeia&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "917e78df-a5d7-4baf-8feb-95e685266c9d" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "0f854fc6-3dc5-4d98-9ba0-cf3831620cd4" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -34,20 +98,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "b520f13a-701e-0097-2dd2-902db3000000", - "Body" : "jtfsfilerangeiajtfsfilerangeia0sastestfilerangeiad887410668f058f310Fri, 01 Nov 2019 16:39:49 GMT\"0x8D75EEA1CAC160C\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Fri, 01 Nov 2019 16:39:49 GMT", - "x-ms-client-request-id" : "917e78df-a5d7-4baf-8feb-95e685266c9d", + "x-ms-request-id" : "1d9a41b4-e01e-0092-580f-aad9cc000000", + "Body" : "jtfsfilerangeiajtfsfilerangeia0sastestfilerangeia22221314f3cf21b11dTue, 03 Dec 2019 19:23:21 GMT\"0x8D778264288FE69\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Tue, 03 Dec 2019 19:23:21 GMT", + "x-ms-client-request-id" : "0f854fc6-3dc5-4d98-9ba0-cf3831620cd4", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfsfilerangeia0sastestfilerangeiad887410668f058f310?restype=container", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfsfilerangeia0sastestfilerangeia22221314f3cf21b11d?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "ef397a9d-84e9-413d-95d1-d46932cfb674" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "308a0d90-527b-4dc9-a01c-17a3a10d2536" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -55,11 +119,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "b520f14e-701e-0097-3fd2-902db3000000", - "Date" : "Fri, 01 Nov 2019 16:39:49 GMT", - "x-ms-client-request-id" : "ef397a9d-84e9-413d-95d1-d46932cfb674" + "x-ms-request-id" : "1d9a41bf-e01e-0092-630f-aad9cc000000", + "Date" : "Tue, 03 Dec 2019 19:23:21 GMT", + "x-ms-client-request-id" : "308a0d90-527b-4dc9-a01c-17a3a10d2536" }, "Exception" : null } ], - "variables" : [ "jtfsfilerangeia0sastestfilerangeiad887410668f058f310" ] + "variables" : [ "jtfsfilerangeia0sastestfilerangeia22221314f3cf21b11d", "javapathfilerangeia1sastestfilerangeia222122084e7073f3" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestfilesystemsaspermissionparse[0].json b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestfilesystemsaspermissionparse[0].json index d308604d28d6..e6eb67f2a02c 100644 --- a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestfilesystemsaspermissionparse[0].json +++ b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestfilesystemsaspermissionparse[0].json @@ -1,23 +1,87 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfsfilesystemsaspermissionparse04634890dfddfdc6e9?restype=container", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfsfilesystemsaspermissionparse04864888f3cc8d3242?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "4715593e-6313-43f1-9c25-49164eb5a67d" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "50c1aaf8-e3fa-4588-8804-29e9f2124186" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D75EEA2522D556", - "Last-Modified" : "Fri, 01 Nov 2019 16:40:03 GMT", + "ETag" : "0x8D77826513BB1D8", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:46 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "b5210c41-701e-0097-1fd3-902db3000000", - "Date" : "Fri, 01 Nov 2019 16:40:03 GMT", - "x-ms-client-request-id" : "4715593e-6313-43f1-9c25-49164eb5a67d" + "x-ms-request-id" : "1d9a5b88-e01e-0092-0b0f-aad9cc000000", + "Date" : "Tue, 03 Dec 2019 19:23:46 GMT", + "x-ms-client-request-id" : "50c1aaf8-e3fa-4588-8804-29e9f2124186" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsfilesystemsaspermissionparse04864888f3cc8d3242/javapathfilesystemsaspermissionparse19448242cc41d9fc?resource=file", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "1699405f-11ca-45e8-a8d5-213dea89285e" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D77826514D373E", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:46 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "053c9dee-101f-004b-2d0f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:46 GMT", + "x-ms-client-request-id" : "1699405f-11ca-45e8-a8d5-213dea89285e" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsfilesystemsaspermissionparse04864888f3cc8d3242/javapathfilesystemsaspermissionparse19448242cc41d9fc?position=0&action=append", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "282b448e-97ba-42ff-802c-e976e0d156c8", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "053c9def-101f-004b-2e0f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:46 GMT", + "x-ms-client-request-id" : "282b448e-97ba-42ff-802c-e976e0d156c8" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsfilesystemsaspermissionparse04864888f3cc8d3242/javapathfilesystemsaspermissionparse19448242cc41d9fc?position=7&retainUncommittedData=false&close=false&action=flush", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "9b9ad668-df76-4bac-89b7-6bb0aaecf410" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D77826516369FE", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:46 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "053c9df0-101f-004b-2f0f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:46 GMT", + "x-ms-client-request-id" : "9b9ad668-df76-4bac-89b7-6bb0aaecf410" }, "Exception" : null }, { @@ -25,8 +89,8 @@ "Uri" : "https://gaprahns.blob.core.windows.net?prefix=jtfsfilesystemsaspermissionparse&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "58ebb282-9c73-49e0-bfdb-87689bee47a1" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "ca03c496-1eab-48d1-8968-645d40444721" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -34,20 +98,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "b5210c76-701e-0097-4fd3-902db3000000", - "Body" : "jtfsfilesystemsaspermissionparsejtfsfilesystemsaspermissionparse04634890dfddfdc6e9Fri, 01 Nov 2019 16:40:03 GMT\"0x8D75EEA2522D556\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Fri, 01 Nov 2019 16:40:03 GMT", - "x-ms-client-request-id" : "58ebb282-9c73-49e0-bfdb-87689bee47a1", + "x-ms-request-id" : "1d9a5bd1-e01e-0092-490f-aad9cc000000", + "Body" : "jtfsfilesystemsaspermissionparsejtfsfilesystemsaspermissionparse04864888f3cc8d3242Tue, 03 Dec 2019 19:23:46 GMT\"0x8D77826513BB1D8\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Tue, 03 Dec 2019 19:23:46 GMT", + "x-ms-client-request-id" : "ca03c496-1eab-48d1-8968-645d40444721", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfsfilesystemsaspermissionparse04634890dfddfdc6e9?restype=container", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfsfilesystemsaspermissionparse04864888f3cc8d3242?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "d34e1d39-a7d4-4113-91d1-53cd758e5adc" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "13c1ce4b-86a5-47bf-b24c-12e62d80c7f1" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -55,11 +119,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "b5210c96-701e-0097-6dd3-902db3000000", - "Date" : "Fri, 01 Nov 2019 16:40:03 GMT", - "x-ms-client-request-id" : "d34e1d39-a7d4-4113-91d1-53cd758e5adc" + "x-ms-request-id" : "1d9a5bd6-e01e-0092-4e0f-aad9cc000000", + "Date" : "Tue, 03 Dec 2019 19:23:46 GMT", + "x-ms-client-request-id" : "13c1ce4b-86a5-47bf-b24c-12e62d80c7f1" }, "Exception" : null } ], - "variables" : [ "jtfsfilesystemsaspermissionparse04634890dfddfdc6e9" ] + "variables" : [ "jtfsfilesystemsaspermissionparse04864888f3cc8d3242", "javapathfilesystemsaspermissionparse19448242cc41d9fc" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestfilesystemsaspermissionparse[1].json b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestfilesystemsaspermissionparse[1].json index 948e33e00e1e..45f1feb85658 100644 --- a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestfilesystemsaspermissionparse[1].json +++ b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestfilesystemsaspermissionparse[1].json @@ -1,23 +1,87 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfsfilesystemsaspermissionparse0621708616a10fd2cb?restype=container", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfsfilesystemsaspermissionparse0083948444dc2f1da7?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "e421cadd-83bc-466f-923a-10576d845257" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "1a48cc02-2acc-454d-9a96-e5b439ff977c" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D75EEA253D18D5", - "Last-Modified" : "Fri, 01 Nov 2019 16:40:03 GMT", + "ETag" : "0x8D77826517C48D2", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:46 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "b5210cdb-701e-0097-28d3-902db3000000", - "Date" : "Fri, 01 Nov 2019 16:40:03 GMT", - "x-ms-client-request-id" : "e421cadd-83bc-466f-923a-10576d845257" + "x-ms-request-id" : "1d9a5be9-e01e-0092-5e0f-aad9cc000000", + "Date" : "Tue, 03 Dec 2019 19:23:46 GMT", + "x-ms-client-request-id" : "1a48cc02-2acc-454d-9a96-e5b439ff977c" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsfilesystemsaspermissionparse0083948444dc2f1da7/javapathfilesystemsaspermissionparse1057671dc9a974a4?resource=file", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "8cbe387b-d458-41e6-a331-a3b8c6575a6c" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D7782651866A02", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:46 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "053c9df1-101f-004b-300f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:46 GMT", + "x-ms-client-request-id" : "8cbe387b-d458-41e6-a331-a3b8c6575a6c" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsfilesystemsaspermissionparse0083948444dc2f1da7/javapathfilesystemsaspermissionparse1057671dc9a974a4?position=0&action=append", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "5fe2ec2f-1a09-47f9-9086-bd09c6c5b134", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "053c9df5-101f-004b-340f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:46 GMT", + "x-ms-client-request-id" : "5fe2ec2f-1a09-47f9-9086-bd09c6c5b134" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsfilesystemsaspermissionparse0083948444dc2f1da7/javapathfilesystemsaspermissionparse1057671dc9a974a4?position=7&retainUncommittedData=false&close=false&action=flush", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "0045784d-b50f-4cef-9586-fb0c6c875f82" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D7782651980944", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:46 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "053c9dfa-101f-004b-390f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:46 GMT", + "x-ms-client-request-id" : "0045784d-b50f-4cef-9586-fb0c6c875f82" }, "Exception" : null }, { @@ -25,8 +89,8 @@ "Uri" : "https://gaprahns.blob.core.windows.net?prefix=jtfsfilesystemsaspermissionparse&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "80d65a59-0987-439b-a3a7-961e15f80ac7" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "f3eb9692-a4c4-4129-9a23-a8b79327b452" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -34,20 +98,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "b5210d07-701e-0097-50d3-902db3000000", - "Body" : "jtfsfilesystemsaspermissionparsejtfsfilesystemsaspermissionparse0621708616a10fd2cbFri, 01 Nov 2019 16:40:03 GMT\"0x8D75EEA253D18D5\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Fri, 01 Nov 2019 16:40:03 GMT", - "x-ms-client-request-id" : "80d65a59-0987-439b-a3a7-961e15f80ac7", + "x-ms-request-id" : "1d9a5c19-e01e-0092-070f-aad9cc000000", + "Body" : "jtfsfilesystemsaspermissionparsejtfsfilesystemsaspermissionparse0083948444dc2f1da7Tue, 03 Dec 2019 19:23:46 GMT\"0x8D77826517C48D2\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Tue, 03 Dec 2019 19:23:46 GMT", + "x-ms-client-request-id" : "f3eb9692-a4c4-4129-9a23-a8b79327b452", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfsfilesystemsaspermissionparse0621708616a10fd2cb?restype=container", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfsfilesystemsaspermissionparse0083948444dc2f1da7?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "2b30e3d2-bffd-49e2-9c92-cdff150f7655" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "d18c66b4-ea78-4403-b05e-d1acfaae3d86" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -55,11 +119,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "b5210d28-701e-0097-6cd3-902db3000000", - "Date" : "Fri, 01 Nov 2019 16:40:03 GMT", - "x-ms-client-request-id" : "2b30e3d2-bffd-49e2-9c92-cdff150f7655" + "x-ms-request-id" : "1d9a5c20-e01e-0092-0e0f-aad9cc000000", + "Date" : "Tue, 03 Dec 2019 19:23:46 GMT", + "x-ms-client-request-id" : "d18c66b4-ea78-4403-b05e-d1acfaae3d86" }, "Exception" : null } ], - "variables" : [ "jtfsfilesystemsaspermissionparse0621708616a10fd2cb" ] + "variables" : [ "jtfsfilesystemsaspermissionparse0083948444dc2f1da7", "javapathfilesystemsaspermissionparse1057671dc9a974a4" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestfilesystemsaspermissionparse[2].json b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestfilesystemsaspermissionparse[2].json index 276cc321a507..bb96234cb3a8 100644 --- a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestfilesystemsaspermissionparse[2].json +++ b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestfilesystemsaspermissionparse[2].json @@ -1,23 +1,87 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfsfilesystemsaspermissionparse04858460d9f0f32d60?restype=container", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfsfilesystemsaspermissionparse024973e4bcb1d1cd9e?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "d5117aa3-a16b-4d70-b390-64657b19b9e6" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "846e1f33-7027-41d6-87f0-33e180980a31" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D75EEA25581FDB", - "Last-Modified" : "Fri, 01 Nov 2019 16:40:03 GMT", + "ETag" : "0x8D7782651B2086F", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:47 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "b5210d51-701e-0097-10d3-902db3000000", - "Date" : "Fri, 01 Nov 2019 16:40:03 GMT", - "x-ms-client-request-id" : "d5117aa3-a16b-4d70-b390-64657b19b9e6" + "x-ms-request-id" : "1d9a5c40-e01e-0092-280f-aad9cc000000", + "Date" : "Tue, 03 Dec 2019 19:23:47 GMT", + "x-ms-client-request-id" : "846e1f33-7027-41d6-87f0-33e180980a31" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsfilesystemsaspermissionparse024973e4bcb1d1cd9e/javapathfilesystemsaspermissionparse102594aceb31d8fb?resource=file", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "e2ad5398-18eb-48a0-9c50-6efe1196f0ce" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D7782651BDAB04", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:47 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "053c9e0c-101f-004b-4b0f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:47 GMT", + "x-ms-client-request-id" : "e2ad5398-18eb-48a0-9c50-6efe1196f0ce" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsfilesystemsaspermissionparse024973e4bcb1d1cd9e/javapathfilesystemsaspermissionparse102594aceb31d8fb?position=0&action=append", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "ec05f149-345e-4b14-bc38-096e8843a3bf", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "053c9e0d-101f-004b-4c0f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:47 GMT", + "x-ms-client-request-id" : "ec05f149-345e-4b14-bc38-096e8843a3bf" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsfilesystemsaspermissionparse024973e4bcb1d1cd9e/javapathfilesystemsaspermissionparse102594aceb31d8fb?position=7&retainUncommittedData=false&close=false&action=flush", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "ae84540e-3b18-477d-9951-485788c7fef6" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D7782651CFFAFA", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:47 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "053c9e12-101f-004b-510f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:47 GMT", + "x-ms-client-request-id" : "ae84540e-3b18-477d-9951-485788c7fef6" }, "Exception" : null }, { @@ -25,8 +89,8 @@ "Uri" : "https://gaprahns.blob.core.windows.net?prefix=jtfsfilesystemsaspermissionparse&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "efe617b0-b750-466a-a71f-22951ba5d60a" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "eb24cc17-d23b-4c19-a68f-1a00da66ab58" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -34,20 +98,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "b5210d82-701e-0097-3ad3-902db3000000", - "Body" : "jtfsfilesystemsaspermissionparsejtfsfilesystemsaspermissionparse04858460d9f0f32d60Fri, 01 Nov 2019 16:40:03 GMT\"0x8D75EEA25581FDB\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Fri, 01 Nov 2019 16:40:03 GMT", - "x-ms-client-request-id" : "efe617b0-b750-466a-a71f-22951ba5d60a", + "x-ms-request-id" : "1d9a5c89-e01e-0092-600f-aad9cc000000", + "Body" : "jtfsfilesystemsaspermissionparsejtfsfilesystemsaspermissionparse024973e4bcb1d1cd9eTue, 03 Dec 2019 19:23:47 GMT\"0x8D7782651B2086F\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Tue, 03 Dec 2019 19:23:47 GMT", + "x-ms-client-request-id" : "eb24cc17-d23b-4c19-a68f-1a00da66ab58", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfsfilesystemsaspermissionparse04858460d9f0f32d60?restype=container", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfsfilesystemsaspermissionparse024973e4bcb1d1cd9e?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "097255ee-2563-407e-8e40-5eb6b13e4fbc" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "03d519c0-1525-4563-85a6-7c5c46b6d7ba" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -55,11 +119,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "b5210dac-701e-0097-5cd3-902db3000000", - "Date" : "Fri, 01 Nov 2019 16:40:03 GMT", - "x-ms-client-request-id" : "097255ee-2563-407e-8e40-5eb6b13e4fbc" + "x-ms-request-id" : "1d9a5c96-e01e-0092-6c0f-aad9cc000000", + "Date" : "Tue, 03 Dec 2019 19:23:47 GMT", + "x-ms-client-request-id" : "03d519c0-1525-4563-85a6-7c5c46b6d7ba" }, "Exception" : null } ], - "variables" : [ "jtfsfilesystemsaspermissionparse04858460d9f0f32d60" ] + "variables" : [ "jtfsfilesystemsaspermissionparse024973e4bcb1d1cd9e", "javapathfilesystemsaspermissionparse102594aceb31d8fb" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestfilesystemsaspermissionparse[3].json b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestfilesystemsaspermissionparse[3].json index 01790ab0e711..6a8255134213 100644 --- a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestfilesystemsaspermissionparse[3].json +++ b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestfilesystemsaspermissionparse[3].json @@ -1,23 +1,87 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfsfilesystemsaspermissionparse007858f6de7a082842?restype=container", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfsfilesystemsaspermissionparse0163166ca6565fe728?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "6657b5ad-21a2-4626-ae47-cb69bd947ed5" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "540a9966-5fed-457d-be23-747ddca50f53" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D75EEA257682FF", - "Last-Modified" : "Fri, 01 Nov 2019 16:40:04 GMT", + "ETag" : "0x8D7782651EBC062", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:47 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "b5210dd7-701e-0097-06d3-902db3000000", - "Date" : "Fri, 01 Nov 2019 16:40:03 GMT", - "x-ms-client-request-id" : "6657b5ad-21a2-4626-ae47-cb69bd947ed5" + "x-ms-request-id" : "1d9a5c9e-e01e-0092-730f-aad9cc000000", + "Date" : "Tue, 03 Dec 2019 19:23:47 GMT", + "x-ms-client-request-id" : "540a9966-5fed-457d-be23-747ddca50f53" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsfilesystemsaspermissionparse0163166ca6565fe728/javapathfilesystemsaspermissionparse1934721a42076c07?resource=file", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "ffeca8bc-4168-4a76-bdc6-1975ea84838a" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D7782651F8D8AA", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:47 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "053c9e23-101f-004b-620f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:47 GMT", + "x-ms-client-request-id" : "ffeca8bc-4168-4a76-bdc6-1975ea84838a" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsfilesystemsaspermissionparse0163166ca6565fe728/javapathfilesystemsaspermissionparse1934721a42076c07?position=0&action=append", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "8d1e5d66-2fb4-4405-bae6-48b2f91e9745", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "053c9e29-101f-004b-680f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:47 GMT", + "x-ms-client-request-id" : "8d1e5d66-2fb4-4405-bae6-48b2f91e9745" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsfilesystemsaspermissionparse0163166ca6565fe728/javapathfilesystemsaspermissionparse1934721a42076c07?position=7&retainUncommittedData=false&close=false&action=flush", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "13a0841f-6d72-46c4-8a59-53b6f4f07c68" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D77826520919C3", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:47 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "053c9e2a-101f-004b-690f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:47 GMT", + "x-ms-client-request-id" : "13a0841f-6d72-46c4-8a59-53b6f4f07c68" }, "Exception" : null }, { @@ -25,8 +89,8 @@ "Uri" : "https://gaprahns.blob.core.windows.net?prefix=jtfsfilesystemsaspermissionparse&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "37693ee0-2292-4218-8901-d678c8c0485b" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "b06e120b-137c-4596-be2f-00819069110d" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -34,20 +98,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "b5210dfd-701e-0097-27d3-902db3000000", - "Body" : "jtfsfilesystemsaspermissionparsejtfsfilesystemsaspermissionparse007858f6de7a082842Fri, 01 Nov 2019 16:40:04 GMT\"0x8D75EEA257682FF\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Fri, 01 Nov 2019 16:40:03 GMT", - "x-ms-client-request-id" : "37693ee0-2292-4218-8901-d678c8c0485b", + "x-ms-request-id" : "1d9a5cf1-e01e-0092-320f-aad9cc000000", + "Body" : "jtfsfilesystemsaspermissionparsejtfsfilesystemsaspermissionparse0163166ca6565fe728Tue, 03 Dec 2019 19:23:47 GMT\"0x8D7782651EBC062\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Tue, 03 Dec 2019 19:23:47 GMT", + "x-ms-client-request-id" : "b06e120b-137c-4596-be2f-00819069110d", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfsfilesystemsaspermissionparse007858f6de7a082842?restype=container", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfsfilesystemsaspermissionparse0163166ca6565fe728?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "82b5876b-e869-436d-9492-d67b9c526824" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "4d1903f4-3a73-4f6d-911c-2a317605c1ab" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -55,11 +119,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "b5210e1b-701e-0097-41d3-902db3000000", - "Date" : "Fri, 01 Nov 2019 16:40:03 GMT", - "x-ms-client-request-id" : "82b5876b-e869-436d-9492-d67b9c526824" + "x-ms-request-id" : "1d9a5cfe-e01e-0092-3f0f-aad9cc000000", + "Date" : "Tue, 03 Dec 2019 19:23:47 GMT", + "x-ms-client-request-id" : "4d1903f4-3a73-4f6d-911c-2a317605c1ab" }, "Exception" : null } ], - "variables" : [ "jtfsfilesystemsaspermissionparse007858f6de7a082842" ] + "variables" : [ "jtfsfilesystemsaspermissionparse0163166ca6565fe728", "javapathfilesystemsaspermissionparse1934721a42076c07" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestfilesystemsaspermissionparse[4].json b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestfilesystemsaspermissionparse[4].json index 5ff54f114457..debaf95fcbd5 100644 --- a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestfilesystemsaspermissionparse[4].json +++ b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestfilesystemsaspermissionparse[4].json @@ -1,23 +1,87 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfsfilesystemsaspermissionparse051076853d81e60c3f?restype=container", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfsfilesystemsaspermissionparse091479aae9c59345a3?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "00a60233-5920-4a7d-9888-e3adb119ed95" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "189145aa-477b-458d-8410-2647cf2c8367" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D75EEA25902A53", - "Last-Modified" : "Fri, 01 Nov 2019 16:40:04 GMT", + "ETag" : "0x8D778265220E3A3", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:47 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "b5210e49-701e-0097-6dd3-902db3000000", - "Date" : "Fri, 01 Nov 2019 16:40:03 GMT", - "x-ms-client-request-id" : "00a60233-5920-4a7d-9888-e3adb119ed95" + "x-ms-request-id" : "1d9a5d0f-e01e-0092-4d0f-aad9cc000000", + "Date" : "Tue, 03 Dec 2019 19:23:47 GMT", + "x-ms-client-request-id" : "189145aa-477b-458d-8410-2647cf2c8367" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsfilesystemsaspermissionparse091479aae9c59345a3/javapathfilesystemsaspermissionparse110660d0801ca499?resource=file", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "4f55f25c-507f-41c3-88db-b80dabce1042" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D77826522D667F", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:47 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "053c9e35-101f-004b-740f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:47 GMT", + "x-ms-client-request-id" : "4f55f25c-507f-41c3-88db-b80dabce1042" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsfilesystemsaspermissionparse091479aae9c59345a3/javapathfilesystemsaspermissionparse110660d0801ca499?position=0&action=append", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "6b11a64f-c324-42af-be25-c6ae18a934d5", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "053c9e36-101f-004b-750f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:47 GMT", + "x-ms-client-request-id" : "6b11a64f-c324-42af-be25-c6ae18a934d5" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsfilesystemsaspermissionparse091479aae9c59345a3/javapathfilesystemsaspermissionparse110660d0801ca499?position=7&retainUncommittedData=false&close=false&action=flush", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "2525cbc0-2a2c-404d-be69-ea836c3e854a" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D77826523DA405", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:48 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "053c9e37-101f-004b-760f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:48 GMT", + "x-ms-client-request-id" : "2525cbc0-2a2c-404d-be69-ea836c3e854a" }, "Exception" : null }, { @@ -25,8 +89,8 @@ "Uri" : "https://gaprahns.blob.core.windows.net?prefix=jtfsfilesystemsaspermissionparse&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "8fde327f-db06-4f8f-9299-709b31eb003d" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "3fb06803-b986-4e72-9d6a-79a7dfaadb4a" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -34,20 +98,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "b5210e69-701e-0097-0bd3-902db3000000", - "Body" : "jtfsfilesystemsaspermissionparsejtfsfilesystemsaspermissionparse051076853d81e60c3fFri, 01 Nov 2019 16:40:04 GMT\"0x8D75EEA25902A53\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Fri, 01 Nov 2019 16:40:03 GMT", - "x-ms-client-request-id" : "8fde327f-db06-4f8f-9299-709b31eb003d", + "x-ms-request-id" : "1d9a5d96-e01e-0092-410f-aad9cc000000", + "Body" : "jtfsfilesystemsaspermissionparsejtfsfilesystemsaspermissionparse091479aae9c59345a3Tue, 03 Dec 2019 19:23:47 GMT\"0x8D778265220E3A3\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Tue, 03 Dec 2019 19:23:48 GMT", + "x-ms-client-request-id" : "3fb06803-b986-4e72-9d6a-79a7dfaadb4a", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfsfilesystemsaspermissionparse051076853d81e60c3f?restype=container", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfsfilesystemsaspermissionparse091479aae9c59345a3?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "f6503ad1-9f8a-431b-865a-769617c3dcf4" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "12e2577c-c1e2-4c54-a02c-a83643ef0a46" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -55,11 +119,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "b5210e81-701e-0097-21d3-902db3000000", - "Date" : "Fri, 01 Nov 2019 16:40:03 GMT", - "x-ms-client-request-id" : "f6503ad1-9f8a-431b-865a-769617c3dcf4" + "x-ms-request-id" : "1d9a5d9b-e01e-0092-460f-aad9cc000000", + "Date" : "Tue, 03 Dec 2019 19:23:48 GMT", + "x-ms-client-request-id" : "12e2577c-c1e2-4c54-a02c-a83643ef0a46" }, "Exception" : null } ], - "variables" : [ "jtfsfilesystemsaspermissionparse051076853d81e60c3f" ] + "variables" : [ "jtfsfilesystemsaspermissionparse091479aae9c59345a3", "javapathfilesystemsaspermissionparse110660d0801ca499" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestfilesystemsaspermissionparse[5].json b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestfilesystemsaspermissionparse[5].json index 8a0440afb833..58e3d1dbdbd8 100644 --- a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestfilesystemsaspermissionparse[5].json +++ b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestfilesystemsaspermissionparse[5].json @@ -1,23 +1,87 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfsfilesystemsaspermissionparse074162166f5367ddcf?restype=container", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfsfilesystemsaspermissionparse0064098125c5462427?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "52427c53-8373-4bf2-a128-f9f543c1e658" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "c90750cb-d153-4273-a3a9-5c6cd3c541f1" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D75EEA25ABA6BF", - "Last-Modified" : "Fri, 01 Nov 2019 16:40:04 GMT", + "ETag" : "0x8D778265283FCED", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:48 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "b5210ea4-701e-0097-3cd3-902db3000000", - "Date" : "Fri, 01 Nov 2019 16:40:03 GMT", - "x-ms-client-request-id" : "52427c53-8373-4bf2-a128-f9f543c1e658" + "x-ms-request-id" : "1d9a5db1-e01e-0092-5a0f-aad9cc000000", + "Date" : "Tue, 03 Dec 2019 19:23:48 GMT", + "x-ms-client-request-id" : "c90750cb-d153-4273-a3a9-5c6cd3c541f1" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsfilesystemsaspermissionparse0064098125c5462427/javapathfilesystemsaspermissionparse1692743858f059ee?resource=file", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "18a1ff8f-0ab2-48c3-b26f-afb59ebc6aea" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D77826528F8E82", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:48 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "053c9e38-101f-004b-770f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:48 GMT", + "x-ms-client-request-id" : "18a1ff8f-0ab2-48c3-b26f-afb59ebc6aea" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsfilesystemsaspermissionparse0064098125c5462427/javapathfilesystemsaspermissionparse1692743858f059ee?position=0&action=append", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "e1337240-7525-4215-a0d5-3f106e6071cb", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "053c9e39-101f-004b-780f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:48 GMT", + "x-ms-client-request-id" : "e1337240-7525-4215-a0d5-3f106e6071cb" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsfilesystemsaspermissionparse0064098125c5462427/javapathfilesystemsaspermissionparse1692743858f059ee?position=7&retainUncommittedData=false&close=false&action=flush", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "908bdfb8-cf1b-4c71-8653-d4c37bea788f" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D77826529F38DC", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:48 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "053c9e3a-101f-004b-790f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:48 GMT", + "x-ms-client-request-id" : "908bdfb8-cf1b-4c71-8653-d4c37bea788f" }, "Exception" : null }, { @@ -25,8 +89,8 @@ "Uri" : "https://gaprahns.blob.core.windows.net?prefix=jtfsfilesystemsaspermissionparse&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "d28645ea-34b3-48ff-af6d-bec9a7eedd35" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "6b6ae7d1-dbef-4a90-8ad6-6f9a0b49186e" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -34,20 +98,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "b5210ec5-701e-0097-5bd3-902db3000000", - "Body" : "jtfsfilesystemsaspermissionparsejtfsfilesystemsaspermissionparse074162166f5367ddcfFri, 01 Nov 2019 16:40:04 GMT\"0x8D75EEA25ABA6BF\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Fri, 01 Nov 2019 16:40:03 GMT", - "x-ms-client-request-id" : "d28645ea-34b3-48ff-af6d-bec9a7eedd35", + "x-ms-request-id" : "1d9a5de4-e01e-0092-080f-aad9cc000000", + "Body" : "jtfsfilesystemsaspermissionparsejtfsfilesystemsaspermissionparse0064098125c5462427Tue, 03 Dec 2019 19:23:48 GMT\"0x8D778265283FCED\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Tue, 03 Dec 2019 19:23:48 GMT", + "x-ms-client-request-id" : "6b6ae7d1-dbef-4a90-8ad6-6f9a0b49186e", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfsfilesystemsaspermissionparse074162166f5367ddcf?restype=container", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfsfilesystemsaspermissionparse0064098125c5462427?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "ec195219-38d5-45a9-af9b-afb44e329548" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "b47b69e4-049a-476c-abc6-e44e68fbacdd" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -55,11 +119,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "b5210eeb-701e-0097-7ed3-902db3000000", - "Date" : "Fri, 01 Nov 2019 16:40:04 GMT", - "x-ms-client-request-id" : "ec195219-38d5-45a9-af9b-afb44e329548" + "x-ms-request-id" : "1d9a5de7-e01e-0092-0b0f-aad9cc000000", + "Date" : "Tue, 03 Dec 2019 19:23:48 GMT", + "x-ms-client-request-id" : "b47b69e4-049a-476c-abc6-e44e68fbacdd" }, "Exception" : null } ], - "variables" : [ "jtfsfilesystemsaspermissionparse074162166f5367ddcf" ] + "variables" : [ "jtfsfilesystemsaspermissionparse0064098125c5462427", "javapathfilesystemsaspermissionparse1692743858f059ee" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestfilesystemsaspermissionparse[6].json b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestfilesystemsaspermissionparse[6].json index f9e629bc23ef..ce2aa432a986 100644 --- a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestfilesystemsaspermissionparse[6].json +++ b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestfilesystemsaspermissionparse[6].json @@ -1,23 +1,87 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfsfilesystemsaspermissionparse0459330cb56d016b78?restype=container", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfsfilesystemsaspermissionparse009063380fce8ac279?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "0ecd2d2f-69ce-42b6-bd2c-cb4bf966c873" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "76f39263-754c-4a89-930d-353f44d54d12" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D75EEA25C52700", - "Last-Modified" : "Fri, 01 Nov 2019 16:40:04 GMT", + "ETag" : "0x8D7782652BDB4E0", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:48 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "b5210f11-701e-0097-1dd3-902db3000000", - "Date" : "Fri, 01 Nov 2019 16:40:04 GMT", - "x-ms-client-request-id" : "0ecd2d2f-69ce-42b6-bd2c-cb4bf966c873" + "x-ms-request-id" : "1d9a5df0-e01e-0092-130f-aad9cc000000", + "Date" : "Tue, 03 Dec 2019 19:23:48 GMT", + "x-ms-client-request-id" : "76f39263-754c-4a89-930d-353f44d54d12" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsfilesystemsaspermissionparse009063380fce8ac279/javapathfilesystemsaspermissionparse1857908c690f9171?resource=file", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "444c4bc5-2304-4193-bcbb-67f9b30b5bc6" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D7782652C8F105", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:48 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "053c9e4e-101f-004b-0d0f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:48 GMT", + "x-ms-client-request-id" : "444c4bc5-2304-4193-bcbb-67f9b30b5bc6" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsfilesystemsaspermissionparse009063380fce8ac279/javapathfilesystemsaspermissionparse1857908c690f9171?position=0&action=append", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "016be6a6-f3f9-42c4-ba1f-6c8701fcd528", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "053c9e4f-101f-004b-0e0f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:48 GMT", + "x-ms-client-request-id" : "016be6a6-f3f9-42c4-ba1f-6c8701fcd528" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsfilesystemsaspermissionparse009063380fce8ac279/javapathfilesystemsaspermissionparse1857908c690f9171?position=7&retainUncommittedData=false&close=false&action=flush", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "85f869e8-9b25-4bec-9d2c-e71177dbc02c" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D7782652DC2274", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:49 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "053c9e57-101f-004b-160f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:49 GMT", + "x-ms-client-request-id" : "85f869e8-9b25-4bec-9d2c-e71177dbc02c" }, "Exception" : null }, { @@ -25,8 +89,8 @@ "Uri" : "https://gaprahns.blob.core.windows.net?prefix=jtfsfilesystemsaspermissionparse&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "da2a8d34-c4ff-4a2d-b919-1f016603c80b" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "5e3d282a-8592-4596-be99-229180f65dd3" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -34,20 +98,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "b5210f77-701e-0097-7bd3-902db3000000", - "Body" : "jtfsfilesystemsaspermissionparsejtfsfilesystemsaspermissionparse0459330cb56d016b78Fri, 01 Nov 2019 16:40:04 GMT\"0x8D75EEA25C52700\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Fri, 01 Nov 2019 16:40:04 GMT", - "x-ms-client-request-id" : "da2a8d34-c4ff-4a2d-b919-1f016603c80b", + "x-ms-request-id" : "1d9a5e2b-e01e-0092-480f-aad9cc000000", + "Body" : "jtfsfilesystemsaspermissionparsejtfsfilesystemsaspermissionparse009063380fce8ac279Tue, 03 Dec 2019 19:23:48 GMT\"0x8D7782652BDB4E0\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Tue, 03 Dec 2019 19:23:48 GMT", + "x-ms-client-request-id" : "5e3d282a-8592-4596-be99-229180f65dd3", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfsfilesystemsaspermissionparse0459330cb56d016b78?restype=container", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfsfilesystemsaspermissionparse009063380fce8ac279?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "cf62ec48-c593-40be-b082-c945b8d6f408" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "789c1f36-b2b0-4c28-8935-87a8328f71b5" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -55,11 +119,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "b5210f89-701e-0097-0bd3-902db3000000", - "Date" : "Fri, 01 Nov 2019 16:40:04 GMT", - "x-ms-client-request-id" : "cf62ec48-c593-40be-b082-c945b8d6f408" + "x-ms-request-id" : "1d9a5e3f-e01e-0092-570f-aad9cc000000", + "Date" : "Tue, 03 Dec 2019 19:23:49 GMT", + "x-ms-client-request-id" : "789c1f36-b2b0-4c28-8935-87a8328f71b5" }, "Exception" : null } ], - "variables" : [ "jtfsfilesystemsaspermissionparse0459330cb56d016b78" ] + "variables" : [ "jtfsfilesystemsaspermissionparse009063380fce8ac279", "javapathfilesystemsaspermissionparse1857908c690f9171" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestfilesystemsaspermissionparse[7].json b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestfilesystemsaspermissionparse[7].json index e228adaa9a45..bee46e3c387d 100644 --- a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestfilesystemsaspermissionparse[7].json +++ b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestfilesystemsaspermissionparse[7].json @@ -1,23 +1,87 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfsfilesystemsaspermissionparse06108076481c26bf78?restype=container", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfsfilesystemsaspermissionparse052331924c07d3d83c?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "1e0cb203-9ca4-4c33-9ea3-c97ef6a4ec7b" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "cdf341c6-6ab5-4c4c-900e-99702a1c8bda" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D75EEA25ECB38F", - "Last-Modified" : "Fri, 01 Nov 2019 16:40:04 GMT", + "ETag" : "0x8D7782652FA055A", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:49 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "b5210fbe-701e-0097-38d3-902db3000000", - "Date" : "Fri, 01 Nov 2019 16:40:04 GMT", - "x-ms-client-request-id" : "1e0cb203-9ca4-4c33-9ea3-c97ef6a4ec7b" + "x-ms-request-id" : "1d9a5e5a-e01e-0092-6f0f-aad9cc000000", + "Date" : "Tue, 03 Dec 2019 19:23:49 GMT", + "x-ms-client-request-id" : "cdf341c6-6ab5-4c4c-900e-99702a1c8bda" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsfilesystemsaspermissionparse052331924c07d3d83c/javapathfilesystemsaspermissionparse196229a210512f85?resource=file", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "c8c346ab-95c8-4fca-9319-95b57851d7e2" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D778265305CA69", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:49 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "053c9e77-101f-004b-360f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:49 GMT", + "x-ms-client-request-id" : "c8c346ab-95c8-4fca-9319-95b57851d7e2" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsfilesystemsaspermissionparse052331924c07d3d83c/javapathfilesystemsaspermissionparse196229a210512f85?position=0&action=append", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "c6cc7a8b-5be4-4bfd-8dd3-20344530ceac", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "053c9e83-101f-004b-420f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:49 GMT", + "x-ms-client-request-id" : "c6cc7a8b-5be4-4bfd-8dd3-20344530ceac" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsfilesystemsaspermissionparse052331924c07d3d83c/javapathfilesystemsaspermissionparse196229a210512f85?position=7&retainUncommittedData=false&close=false&action=flush", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "f8245412-3f9c-41cd-87fa-d87db4c22396" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D7782653252C82", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:49 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "053c9e89-101f-004b-480f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:49 GMT", + "x-ms-client-request-id" : "f8245412-3f9c-41cd-87fa-d87db4c22396" }, "Exception" : null }, { @@ -25,8 +89,8 @@ "Uri" : "https://gaprahns.blob.core.windows.net?prefix=jtfsfilesystemsaspermissionparse&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "cebf66d0-bda4-4e2c-a9ce-d36848810286" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "3f9da2e5-abdd-4e2b-b05f-2a265c2612cd" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -34,20 +98,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "b5210ff1-701e-0097-63d3-902db3000000", - "Body" : "jtfsfilesystemsaspermissionparsejtfsfilesystemsaspermissionparse06108076481c26bf78Fri, 01 Nov 2019 16:40:04 GMT\"0x8D75EEA25ECB38F\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Fri, 01 Nov 2019 16:40:04 GMT", - "x-ms-client-request-id" : "cebf66d0-bda4-4e2c-a9ce-d36848810286", + "x-ms-request-id" : "1d9a5ebd-e01e-0092-4b0f-aad9cc000000", + "Body" : "jtfsfilesystemsaspermissionparsejtfsfilesystemsaspermissionparse052331924c07d3d83cTue, 03 Dec 2019 19:23:49 GMT\"0x8D7782652FA055A\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Tue, 03 Dec 2019 19:23:49 GMT", + "x-ms-client-request-id" : "3f9da2e5-abdd-4e2b-b05f-2a265c2612cd", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfsfilesystemsaspermissionparse06108076481c26bf78?restype=container", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfsfilesystemsaspermissionparse052331924c07d3d83c?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "30d5bfb3-e8db-4ff3-a901-1bada96305ce" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "89278bd0-95e7-46bf-b43d-b4bfb704c13c" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -55,11 +119,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "b5211011-701e-0097-80d3-902db3000000", - "Date" : "Fri, 01 Nov 2019 16:40:04 GMT", - "x-ms-client-request-id" : "30d5bfb3-e8db-4ff3-a901-1bada96305ce" + "x-ms-request-id" : "1d9a5ec8-e01e-0092-530f-aad9cc000000", + "Date" : "Tue, 03 Dec 2019 19:23:49 GMT", + "x-ms-client-request-id" : "89278bd0-95e7-46bf-b43d-b4bfb704c13c" }, "Exception" : null } ], - "variables" : [ "jtfsfilesystemsaspermissionparse06108076481c26bf78" ] + "variables" : [ "jtfsfilesystemsaspermissionparse052331924c07d3d83c", "javapathfilesystemsaspermissionparse196229a210512f85" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestfilesystemsaspermissionparseia.json b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestfilesystemsaspermissionparseia.json index 9a7332c06f83..ab408b687b70 100644 --- a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestfilesystemsaspermissionparseia.json +++ b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestfilesystemsaspermissionparseia.json @@ -1,23 +1,87 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfsfilesystemsaspermissionparseia011805cf4c4727417?restype=container", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfsfilesystemsaspermissionparseia0777005864730c72f?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "f280312a-ebd3-49a2-afe2-e929d4d7c48a" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "61b61084-a78d-497f-864e-7b295e2c2455" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D75EEA26076C59", - "Last-Modified" : "Fri, 01 Nov 2019 16:40:04 GMT", + "ETag" : "0x8D77826533EBBC9", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:49 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "b521103f-701e-0097-27d3-902db3000000", - "Date" : "Fri, 01 Nov 2019 16:40:04 GMT", - "x-ms-client-request-id" : "f280312a-ebd3-49a2-afe2-e929d4d7c48a" + "x-ms-request-id" : "1d9a5ed5-e01e-0092-600f-aad9cc000000", + "Date" : "Tue, 03 Dec 2019 19:23:49 GMT", + "x-ms-client-request-id" : "61b61084-a78d-497f-864e-7b295e2c2455" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsfilesystemsaspermissionparseia0777005864730c72f/javapathfilesystemsaspermissionparseia1062562d53db932?resource=file", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "e16b11aa-fa19-4e45-aa83-e8acc5914aa3" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D778265351BAFA", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:49 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "053c9e91-101f-004b-500f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:49 GMT", + "x-ms-client-request-id" : "e16b11aa-fa19-4e45-aa83-e8acc5914aa3" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsfilesystemsaspermissionparseia0777005864730c72f/javapathfilesystemsaspermissionparseia1062562d53db932?position=0&action=append", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "ed7b7ad3-c436-435b-8ad7-2a5f4bc2f771", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "053c9e9a-101f-004b-590f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:49 GMT", + "x-ms-client-request-id" : "ed7b7ad3-c436-435b-8ad7-2a5f4bc2f771" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsfilesystemsaspermissionparseia0777005864730c72f/javapathfilesystemsaspermissionparseia1062562d53db932?position=7&retainUncommittedData=false&close=false&action=flush", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "341e4cc9-c044-4162-b81a-b4b7f75138c7" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D77826536503C6", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:49 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "053c9e9f-101f-004b-5e0f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:49 GMT", + "x-ms-client-request-id" : "341e4cc9-c044-4162-b81a-b4b7f75138c7" }, "Exception" : null }, { @@ -25,8 +89,8 @@ "Uri" : "https://gaprahns.blob.core.windows.net?prefix=jtfsfilesystemsaspermissionparseia&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "3b872bb9-09f9-4e4b-8b84-0962f06db384" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "003afc94-6f95-4acb-9e54-aa2b11b6412b" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -34,20 +98,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "b521105c-701e-0097-42d3-902db3000000", - "Body" : "jtfsfilesystemsaspermissionparseiajtfsfilesystemsaspermissionparseia011805cf4c4727417Fri, 01 Nov 2019 16:40:04 GMT\"0x8D75EEA26076C59\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Fri, 01 Nov 2019 16:40:04 GMT", - "x-ms-client-request-id" : "3b872bb9-09f9-4e4b-8b84-0962f06db384", + "x-ms-request-id" : "1d9a5f0b-e01e-0092-0f0f-aad9cc000000", + "Body" : "jtfsfilesystemsaspermissionparseiajtfsfilesystemsaspermissionparseia0777005864730c72fTue, 03 Dec 2019 19:23:49 GMT\"0x8D77826533EBBC9\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Tue, 03 Dec 2019 19:23:49 GMT", + "x-ms-client-request-id" : "003afc94-6f95-4acb-9e54-aa2b11b6412b", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfsfilesystemsaspermissionparseia011805cf4c4727417?restype=container", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfsfilesystemsaspermissionparseia0777005864730c72f?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "23aae34e-cddb-45da-8e79-b0bcc52398f2" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "8b841a05-f9cc-4e0f-87d6-3970d419b79f" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -55,11 +119,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "b5211071-701e-0097-57d3-902db3000000", - "Date" : "Fri, 01 Nov 2019 16:40:04 GMT", - "x-ms-client-request-id" : "23aae34e-cddb-45da-8e79-b0bcc52398f2" + "x-ms-request-id" : "1d9a5f18-e01e-0092-1a0f-aad9cc000000", + "Date" : "Tue, 03 Dec 2019 19:23:49 GMT", + "x-ms-client-request-id" : "8b841a05-f9cc-4e0f-87d6-3970d419b79f" }, "Exception" : null } ], - "variables" : [ "jtfsfilesystemsaspermissionparseia011805cf4c4727417" ] + "variables" : [ "jtfsfilesystemsaspermissionparseia0777005864730c72f", "javapathfilesystemsaspermissionparseia1062562d53db932" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestfilesystemsaspermissiontostring[0].json b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestfilesystemsaspermissiontostring[0].json index eb07b1a7d87e..ef50acaf3bfd 100644 --- a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestfilesystemsaspermissiontostring[0].json +++ b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestfilesystemsaspermissiontostring[0].json @@ -1,23 +1,87 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfsfilesystemsaspermissiontostring07531143d7512b0f1?restype=container", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfsfilesystemsaspermissiontostring01386059adaaa839e?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "85eabc83-4091-4dc4-b3cf-80a575b85848" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "d1459cdb-cabd-4ed4-9417-ae9fe24b8dc7" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D75EEA2442AD3C", - "Last-Modified" : "Fri, 01 Nov 2019 16:40:01 GMT", + "ETag" : "0x8D778264F70157E", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:43 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "b5210956-701e-0097-0ed3-902db3000000", - "Date" : "Fri, 01 Nov 2019 16:40:01 GMT", - "x-ms-client-request-id" : "85eabc83-4091-4dc4-b3cf-80a575b85848" + "x-ms-request-id" : "1d9a57e7-e01e-0092-720f-aad9cc000000", + "Date" : "Tue, 03 Dec 2019 19:23:43 GMT", + "x-ms-client-request-id" : "d1459cdb-cabd-4ed4-9417-ae9fe24b8dc7" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsfilesystemsaspermissiontostring01386059adaaa839e/javapathfilesystemsaspermissiontostring130676ec91be606?resource=file", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "3e45b604-856c-4303-8395-f0f608eea75c" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D778264F7FEEEA", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:43 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "053c9dd1-101f-004b-100f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:43 GMT", + "x-ms-client-request-id" : "3e45b604-856c-4303-8395-f0f608eea75c" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsfilesystemsaspermissiontostring01386059adaaa839e/javapathfilesystemsaspermissiontostring130676ec91be606?position=0&action=append", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "a10901a4-1e7b-4c04-affe-cd5ec2d69be4", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "053c9dd2-101f-004b-110f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:43 GMT", + "x-ms-client-request-id" : "a10901a4-1e7b-4c04-affe-cd5ec2d69be4" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsfilesystemsaspermissiontostring01386059adaaa839e/javapathfilesystemsaspermissiontostring130676ec91be606?position=7&retainUncommittedData=false&close=false&action=flush", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "e3fa80af-8c0d-4372-8b30-4e9caf0fcce1" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D778264F94CB58", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:43 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "053c9dd3-101f-004b-120f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:43 GMT", + "x-ms-client-request-id" : "e3fa80af-8c0d-4372-8b30-4e9caf0fcce1" }, "Exception" : null }, { @@ -25,8 +89,8 @@ "Uri" : "https://gaprahns.blob.core.windows.net?prefix=jtfsfilesystemsaspermissiontostring&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "427be6f2-945a-4d51-ad4d-a3684d7a8d5d" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "937db7f7-c487-4412-8146-dc053555d57d" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -34,20 +98,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "b5210987-701e-0097-39d3-902db3000000", - "Body" : "jtfsfilesystemsaspermissiontostringjtfsfilesystemsaspermissiontostring07531143d7512b0f1Fri, 01 Nov 2019 16:40:01 GMT\"0x8D75EEA2442AD3C\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Fri, 01 Nov 2019 16:40:01 GMT", - "x-ms-client-request-id" : "427be6f2-945a-4d51-ad4d-a3684d7a8d5d", + "x-ms-request-id" : "1d9a582c-e01e-0092-290f-aad9cc000000", + "Body" : "jtfsfilesystemsaspermissiontostringjtfsfilesystemsaspermissiontostring01386059adaaa839eTue, 03 Dec 2019 19:23:43 GMT\"0x8D778264F70157E\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Tue, 03 Dec 2019 19:23:43 GMT", + "x-ms-client-request-id" : "937db7f7-c487-4412-8146-dc053555d57d", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfsfilesystemsaspermissiontostring07531143d7512b0f1?restype=container", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfsfilesystemsaspermissiontostring01386059adaaa839e?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "b68416cd-b0d8-4069-99d1-41caeb10d67a" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "33dad7be-0de4-492e-ab5f-f3be5c4a8ffd" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -55,11 +119,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "b52109a0-701e-0097-4ed3-902db3000000", - "Date" : "Fri, 01 Nov 2019 16:40:01 GMT", - "x-ms-client-request-id" : "b68416cd-b0d8-4069-99d1-41caeb10d67a" + "x-ms-request-id" : "1d9a583a-e01e-0092-350f-aad9cc000000", + "Date" : "Tue, 03 Dec 2019 19:23:43 GMT", + "x-ms-client-request-id" : "33dad7be-0de4-492e-ab5f-f3be5c4a8ffd" }, "Exception" : null } ], - "variables" : [ "jtfsfilesystemsaspermissiontostring07531143d7512b0f1" ] + "variables" : [ "jtfsfilesystemsaspermissiontostring01386059adaaa839e", "javapathfilesystemsaspermissiontostring130676ec91be606" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestfilesystemsaspermissiontostring[1].json b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestfilesystemsaspermissiontostring[1].json index a2fe8aa81d7a..e5e94823088b 100644 --- a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestfilesystemsaspermissiontostring[1].json +++ b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestfilesystemsaspermissiontostring[1].json @@ -1,23 +1,87 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfsfilesystemsaspermissiontostring0784696a8aeb5e2ef?restype=container", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfsfilesystemsaspermissiontostring02199496bf36039c1?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "43f755b2-e508-4ce3-80af-1985dbaa3dc2" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "75cd9cd4-805a-4a74-8358-1f3ba498359a" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D75EEA246B2416", - "Last-Modified" : "Fri, 01 Nov 2019 16:40:02 GMT", + "ETag" : "0x8D778264FB5DD89", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:43 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "b52109bb-701e-0097-66d3-902db3000000", - "Date" : "Fri, 01 Nov 2019 16:40:01 GMT", - "x-ms-client-request-id" : "43f755b2-e508-4ce3-80af-1985dbaa3dc2" + "x-ms-request-id" : "1d9a584e-e01e-0092-460f-aad9cc000000", + "Date" : "Tue, 03 Dec 2019 19:23:43 GMT", + "x-ms-client-request-id" : "75cd9cd4-805a-4a74-8358-1f3ba498359a" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsfilesystemsaspermissiontostring02199496bf36039c1/javapathfilesystemsaspermissiontostring194832c5e5d9037?resource=file", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "3d5784fa-d3e7-4fd7-b5df-5a36f61a2ec8" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D778264FC325F8", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:43 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "053c9dd4-101f-004b-130f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:43 GMT", + "x-ms-client-request-id" : "3d5784fa-d3e7-4fd7-b5df-5a36f61a2ec8" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsfilesystemsaspermissiontostring02199496bf36039c1/javapathfilesystemsaspermissiontostring194832c5e5d9037?position=0&action=append", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "21226c24-a84a-4f67-a7f1-3eeca0a80caf", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "053c9dd7-101f-004b-160f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:43 GMT", + "x-ms-client-request-id" : "21226c24-a84a-4f67-a7f1-3eeca0a80caf" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsfilesystemsaspermissiontostring02199496bf36039c1/javapathfilesystemsaspermissiontostring194832c5e5d9037?position=7&retainUncommittedData=false&close=false&action=flush", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "ef824d44-fc10-4f69-9142-5e0317099b10" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D778264FD4D46E", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:43 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "053c9dd8-101f-004b-170f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:43 GMT", + "x-ms-client-request-id" : "ef824d44-fc10-4f69-9142-5e0317099b10" }, "Exception" : null }, { @@ -25,8 +89,8 @@ "Uri" : "https://gaprahns.blob.core.windows.net?prefix=jtfsfilesystemsaspermissiontostring&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "865c4ede-8193-48e6-92b9-f276037688d1" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "299681e2-1bb3-40a6-86fa-bc803b60c716" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -34,20 +98,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "b52109d7-701e-0097-7ed3-902db3000000", - "Body" : "jtfsfilesystemsaspermissiontostringjtfsfilesystemsaspermissiontostring0784696a8aeb5e2efFri, 01 Nov 2019 16:40:02 GMT\"0x8D75EEA246B2416\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Fri, 01 Nov 2019 16:40:01 GMT", - "x-ms-client-request-id" : "865c4ede-8193-48e6-92b9-f276037688d1", + "x-ms-request-id" : "1d9a588a-e01e-0092-7b0f-aad9cc000000", + "Body" : "jtfsfilesystemsaspermissiontostringjtfsfilesystemsaspermissiontostring02199496bf36039c1Tue, 03 Dec 2019 19:23:43 GMT\"0x8D778264FB5DD89\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Tue, 03 Dec 2019 19:23:43 GMT", + "x-ms-client-request-id" : "299681e2-1bb3-40a6-86fa-bc803b60c716", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfsfilesystemsaspermissiontostring0784696a8aeb5e2ef?restype=container", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfsfilesystemsaspermissiontostring02199496bf36039c1?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "20281d1c-081b-4a5b-bb32-c9e971567054" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "0da16b61-4662-42f9-9801-e83dfa03a6cb" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -55,11 +119,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "b52109e7-701e-0097-0bd3-902db3000000", - "Date" : "Fri, 01 Nov 2019 16:40:01 GMT", - "x-ms-client-request-id" : "20281d1c-081b-4a5b-bb32-c9e971567054" + "x-ms-request-id" : "1d9a58b1-e01e-0092-200f-aad9cc000000", + "Date" : "Tue, 03 Dec 2019 19:23:43 GMT", + "x-ms-client-request-id" : "0da16b61-4662-42f9-9801-e83dfa03a6cb" }, "Exception" : null } ], - "variables" : [ "jtfsfilesystemsaspermissiontostring0784696a8aeb5e2ef" ] + "variables" : [ "jtfsfilesystemsaspermissiontostring02199496bf36039c1", "javapathfilesystemsaspermissiontostring194832c5e5d9037" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestfilesystemsaspermissiontostring[2].json b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestfilesystemsaspermissiontostring[2].json index 44b07b36cee6..dee19cc4c34d 100644 --- a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestfilesystemsaspermissiontostring[2].json +++ b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestfilesystemsaspermissiontostring[2].json @@ -1,23 +1,87 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfsfilesystemsaspermissiontostring025082995c23cb12d?restype=container", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfsfilesystemsaspermissiontostring031927cdda3dadb49?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "6713cc76-0297-4814-93d2-75558dea9c94" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "0c9d0293-a7e2-42b1-a741-e6c872a69670" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D75EEA24884E46", - "Last-Modified" : "Fri, 01 Nov 2019 16:40:02 GMT", + "ETag" : "0x8D778264FEDE784", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:44 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "b5210a12-701e-0097-31d3-902db3000000", - "Date" : "Fri, 01 Nov 2019 16:40:02 GMT", - "x-ms-client-request-id" : "6713cc76-0297-4814-93d2-75558dea9c94" + "x-ms-request-id" : "1d9a58cf-e01e-0092-390f-aad9cc000000", + "Date" : "Tue, 03 Dec 2019 19:23:44 GMT", + "x-ms-client-request-id" : "0c9d0293-a7e2-42b1-a741-e6c872a69670" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsfilesystemsaspermissiontostring031927cdda3dadb49/javapathfilesystemsaspermissiontostring145725d2cf1f9c4?resource=file", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "5a74adcd-d8c4-4344-b4a2-9f1821190a8c" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D778264FF9F5D9", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:44 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "053c9dd9-101f-004b-180f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:44 GMT", + "x-ms-client-request-id" : "5a74adcd-d8c4-4344-b4a2-9f1821190a8c" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsfilesystemsaspermissiontostring031927cdda3dadb49/javapathfilesystemsaspermissiontostring145725d2cf1f9c4?position=0&action=append", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "251f912e-6621-4658-9788-879a67539973", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "053c9dda-101f-004b-190f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:44 GMT", + "x-ms-client-request-id" : "251f912e-6621-4658-9788-879a67539973" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsfilesystemsaspermissiontostring031927cdda3dadb49/javapathfilesystemsaspermissiontostring145725d2cf1f9c4?position=7&retainUncommittedData=false&close=false&action=flush", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "9d0f5f09-7221-474e-a597-16fa85264ad5" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D77826500ACED9", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:44 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "053c9ddb-101f-004b-1a0f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:44 GMT", + "x-ms-client-request-id" : "9d0f5f09-7221-474e-a597-16fa85264ad5" }, "Exception" : null }, { @@ -25,8 +89,8 @@ "Uri" : "https://gaprahns.blob.core.windows.net?prefix=jtfsfilesystemsaspermissiontostring&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "1ccda68d-e52d-4c84-b2b7-92d552c862f9" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "45cabcfb-2f98-48d3-8e0a-1f0eb8bfe0b1" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -34,20 +98,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "b5210a2b-701e-0097-46d3-902db3000000", - "Body" : "jtfsfilesystemsaspermissiontostringjtfsfilesystemsaspermissiontostring025082995c23cb12dFri, 01 Nov 2019 16:40:02 GMT\"0x8D75EEA24884E46\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Fri, 01 Nov 2019 16:40:02 GMT", - "x-ms-client-request-id" : "1ccda68d-e52d-4c84-b2b7-92d552c862f9", + "x-ms-request-id" : "1d9a5917-e01e-0092-750f-aad9cc000000", + "Body" : "jtfsfilesystemsaspermissiontostringjtfsfilesystemsaspermissiontostring031927cdda3dadb49Tue, 03 Dec 2019 19:23:44 GMT\"0x8D778264FEDE784\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Tue, 03 Dec 2019 19:23:44 GMT", + "x-ms-client-request-id" : "45cabcfb-2f98-48d3-8e0a-1f0eb8bfe0b1", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfsfilesystemsaspermissiontostring025082995c23cb12d?restype=container", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfsfilesystemsaspermissiontostring031927cdda3dadb49?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "d4de863b-593d-4d29-9f43-b168f4788056" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "de2b7ba3-e673-4558-bab4-3bfd545d86a2" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -55,11 +119,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "b5210a45-701e-0097-60d3-902db3000000", - "Date" : "Fri, 01 Nov 2019 16:40:02 GMT", - "x-ms-client-request-id" : "d4de863b-593d-4d29-9f43-b168f4788056" + "x-ms-request-id" : "1d9a5920-e01e-0092-7d0f-aad9cc000000", + "Date" : "Tue, 03 Dec 2019 19:23:44 GMT", + "x-ms-client-request-id" : "de2b7ba3-e673-4558-bab4-3bfd545d86a2" }, "Exception" : null } ], - "variables" : [ "jtfsfilesystemsaspermissiontostring025082995c23cb12d" ] + "variables" : [ "jtfsfilesystemsaspermissiontostring031927cdda3dadb49", "javapathfilesystemsaspermissiontostring145725d2cf1f9c4" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestfilesystemsaspermissiontostring[3].json b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestfilesystemsaspermissiontostring[3].json index 3818c4585607..300055ba5fd1 100644 --- a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestfilesystemsaspermissiontostring[3].json +++ b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestfilesystemsaspermissiontostring[3].json @@ -1,23 +1,87 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfsfilesystemsaspermissiontostring066934bef27715a4d?restype=container", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfsfilesystemsaspermissiontostring0256519610f7f5542?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "cc41f090-6f1b-47b6-b831-05489b134f08" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "15854cc6-fd49-4f66-aa42-c265358886c6" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D75EEA24A291BD", - "Last-Modified" : "Fri, 01 Nov 2019 16:40:02 GMT", + "ETag" : "0x8D77826503472FE", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:44 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "b5210a6d-701e-0097-04d3-902db3000000", - "Date" : "Fri, 01 Nov 2019 16:40:02 GMT", - "x-ms-client-request-id" : "cc41f090-6f1b-47b6-b831-05489b134f08" + "x-ms-request-id" : "1d9a594a-e01e-0092-230f-aad9cc000000", + "Date" : "Tue, 03 Dec 2019 19:23:44 GMT", + "x-ms-client-request-id" : "15854cc6-fd49-4f66-aa42-c265358886c6" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsfilesystemsaspermissiontostring0256519610f7f5542/javapathfilesystemsaspermissiontostring1070868d68a64c5?resource=file", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "40e346c7-22b4-49a1-a25b-70480d5ad750" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D77826503F0FD2", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:44 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "053c9ddd-101f-004b-1c0f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:44 GMT", + "x-ms-client-request-id" : "40e346c7-22b4-49a1-a25b-70480d5ad750" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsfilesystemsaspermissiontostring0256519610f7f5542/javapathfilesystemsaspermissiontostring1070868d68a64c5?position=0&action=append", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "5ce717df-c48f-4757-9435-248454c58ad2", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "053c9dde-101f-004b-1d0f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:44 GMT", + "x-ms-client-request-id" : "5ce717df-c48f-4757-9435-248454c58ad2" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsfilesystemsaspermissiontostring0256519610f7f5542/javapathfilesystemsaspermissiontostring1070868d68a64c5?position=7&retainUncommittedData=false&close=false&action=flush", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "aa2f719f-6617-417c-aef0-226d9c5f2b7e" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D77826504E8436", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:44 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "053c9de0-101f-004b-1f0f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:44 GMT", + "x-ms-client-request-id" : "aa2f719f-6617-417c-aef0-226d9c5f2b7e" }, "Exception" : null }, { @@ -25,8 +89,8 @@ "Uri" : "https://gaprahns.blob.core.windows.net?prefix=jtfsfilesystemsaspermissiontostring&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "d598f77f-403c-4ced-8311-a48d01eace40" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "ccdf5952-ad5a-41c7-8578-2a96b20bb916" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -34,20 +98,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "b5210abc-701e-0097-44d3-902db3000000", - "Body" : "jtfsfilesystemsaspermissiontostringjtfsfilesystemsaspermissiontostring066934bef27715a4dFri, 01 Nov 2019 16:40:02 GMT\"0x8D75EEA24A291BD\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Fri, 01 Nov 2019 16:40:02 GMT", - "x-ms-client-request-id" : "d598f77f-403c-4ced-8311-a48d01eace40", + "x-ms-request-id" : "1d9a596c-e01e-0092-410f-aad9cc000000", + "Body" : "jtfsfilesystemsaspermissiontostringjtfsfilesystemsaspermissiontostring0256519610f7f5542Tue, 03 Dec 2019 19:23:44 GMT\"0x8D77826503472FE\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Tue, 03 Dec 2019 19:23:44 GMT", + "x-ms-client-request-id" : "ccdf5952-ad5a-41c7-8578-2a96b20bb916", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfsfilesystemsaspermissiontostring066934bef27715a4d?restype=container", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfsfilesystemsaspermissiontostring0256519610f7f5542?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "1a34ad4e-b291-4720-8633-867e8346ace3" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "377bc9db-540e-497f-a5c2-c55b1b93bf54" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -55,11 +119,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "b5210ad6-701e-0097-5bd3-902db3000000", - "Date" : "Fri, 01 Nov 2019 16:40:02 GMT", - "x-ms-client-request-id" : "1a34ad4e-b291-4720-8633-867e8346ace3" + "x-ms-request-id" : "1d9a5973-e01e-0092-470f-aad9cc000000", + "Date" : "Tue, 03 Dec 2019 19:23:44 GMT", + "x-ms-client-request-id" : "377bc9db-540e-497f-a5c2-c55b1b93bf54" }, "Exception" : null } ], - "variables" : [ "jtfsfilesystemsaspermissiontostring066934bef27715a4d" ] + "variables" : [ "jtfsfilesystemsaspermissiontostring0256519610f7f5542", "javapathfilesystemsaspermissiontostring1070868d68a64c5" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestfilesystemsaspermissiontostring[4].json b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestfilesystemsaspermissiontostring[4].json index c7b9401be405..64a9a5a2dbcb 100644 --- a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestfilesystemsaspermissiontostring[4].json +++ b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestfilesystemsaspermissiontostring[4].json @@ -1,23 +1,87 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfsfilesystemsaspermissiontostring0549119c2ba0a131e?restype=container", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfsfilesystemsaspermissiontostring04767791918a6d00d?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "4311c1f8-8877-442a-a578-f25f56b750ac" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "0eca37bc-da31-4058-8fa6-be106da1d02e" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D75EEA24CE1663", - "Last-Modified" : "Fri, 01 Nov 2019 16:40:02 GMT", + "ETag" : "0x8D77826507186EB", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:44 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "b5210af8-701e-0097-7bd3-902db3000000", - "Date" : "Fri, 01 Nov 2019 16:40:02 GMT", - "x-ms-client-request-id" : "4311c1f8-8877-442a-a578-f25f56b750ac" + "x-ms-request-id" : "1d9a599c-e01e-0092-680f-aad9cc000000", + "Date" : "Tue, 03 Dec 2019 19:23:44 GMT", + "x-ms-client-request-id" : "0eca37bc-da31-4058-8fa6-be106da1d02e" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsfilesystemsaspermissiontostring04767791918a6d00d/javapathfilesystemsaspermissiontostring178217f42460348?resource=file", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "749d8752-3a21-42dc-a2e9-82371b9f3df9" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D77826507B772D", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:45 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "053c9de3-101f-004b-220f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:45 GMT", + "x-ms-client-request-id" : "749d8752-3a21-42dc-a2e9-82371b9f3df9" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsfilesystemsaspermissiontostring04767791918a6d00d/javapathfilesystemsaspermissiontostring178217f42460348?position=0&action=append", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "f27ed7ad-714e-41f1-8584-12a2486a4f5a", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "053c9de4-101f-004b-230f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:45 GMT", + "x-ms-client-request-id" : "f27ed7ad-714e-41f1-8584-12a2486a4f5a" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsfilesystemsaspermissiontostring04767791918a6d00d/javapathfilesystemsaspermissiontostring178217f42460348?position=7&retainUncommittedData=false&close=false&action=flush", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "22c5c7cc-9b82-40b6-8f9c-4c49ea93e32c" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D77826508BAEB8", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:45 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "053c9de5-101f-004b-240f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:45 GMT", + "x-ms-client-request-id" : "22c5c7cc-9b82-40b6-8f9c-4c49ea93e32c" }, "Exception" : null }, { @@ -25,8 +89,8 @@ "Uri" : "https://gaprahns.blob.core.windows.net?prefix=jtfsfilesystemsaspermissiontostring&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "04394b71-60f6-4b49-9004-c1f9f313c990" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "4487894b-75e7-4001-abf1-71dd920b9094" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -34,20 +98,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "b5210b14-701e-0097-14d3-902db3000000", - "Body" : "jtfsfilesystemsaspermissiontostringjtfsfilesystemsaspermissiontostring0549119c2ba0a131eFri, 01 Nov 2019 16:40:02 GMT\"0x8D75EEA24CE1663\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Fri, 01 Nov 2019 16:40:02 GMT", - "x-ms-client-request-id" : "04394b71-60f6-4b49-9004-c1f9f313c990", + "x-ms-request-id" : "1d9a5a13-e01e-0092-530f-aad9cc000000", + "Body" : "jtfsfilesystemsaspermissiontostringjtfsfilesystemsaspermissiontostring04767791918a6d00dTue, 03 Dec 2019 19:23:44 GMT\"0x8D77826507186EB\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Tue, 03 Dec 2019 19:23:45 GMT", + "x-ms-client-request-id" : "4487894b-75e7-4001-abf1-71dd920b9094", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfsfilesystemsaspermissiontostring0549119c2ba0a131e?restype=container", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfsfilesystemsaspermissiontostring04767791918a6d00d?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "42ae4a8d-9e94-46c3-b86d-f728dbb13a59" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "3e2099c2-b166-457e-8695-456f8f9f5db7" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -55,11 +119,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "b5210b2d-701e-0097-28d3-902db3000000", - "Date" : "Fri, 01 Nov 2019 16:40:02 GMT", - "x-ms-client-request-id" : "42ae4a8d-9e94-46c3-b86d-f728dbb13a59" + "x-ms-request-id" : "1d9a5a21-e01e-0092-600f-aad9cc000000", + "Date" : "Tue, 03 Dec 2019 19:23:45 GMT", + "x-ms-client-request-id" : "3e2099c2-b166-457e-8695-456f8f9f5db7" }, "Exception" : null } ], - "variables" : [ "jtfsfilesystemsaspermissiontostring0549119c2ba0a131e" ] + "variables" : [ "jtfsfilesystemsaspermissiontostring04767791918a6d00d", "javapathfilesystemsaspermissiontostring178217f42460348" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestfilesystemsaspermissiontostring[5].json b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestfilesystemsaspermissiontostring[5].json index 17262a1d7359..1b9492b9e5ff 100644 --- a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestfilesystemsaspermissiontostring[5].json +++ b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestfilesystemsaspermissiontostring[5].json @@ -1,23 +1,87 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfsfilesystemsaspermissiontostring04104239b95a5fca7?restype=container", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfsfilesystemsaspermissiontostring013384278db941a64?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "a7770abf-9ae9-4f6b-97db-ee13c82d3c2a" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "b628d3ed-107f-4c39-913b-44b9d307c424" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D75EEA24E832C6", - "Last-Modified" : "Fri, 01 Nov 2019 16:40:03 GMT", + "ETag" : "0x8D7782650A4FC33", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:45 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "b5210b4c-701e-0097-43d3-902db3000000", - "Date" : "Fri, 01 Nov 2019 16:40:02 GMT", - "x-ms-client-request-id" : "a7770abf-9ae9-4f6b-97db-ee13c82d3c2a" + "x-ms-request-id" : "1d9a5a35-e01e-0092-6c0f-aad9cc000000", + "Date" : "Tue, 03 Dec 2019 19:23:45 GMT", + "x-ms-client-request-id" : "b628d3ed-107f-4c39-913b-44b9d307c424" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsfilesystemsaspermissiontostring013384278db941a64/javapathfilesystemsaspermissiontostring109252497eeb485?resource=file", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "f95eb42e-1b8e-4b26-8ad5-e9bd60f9fa62" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D7782650CFE52A", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:45 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "053c9de7-101f-004b-260f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:45 GMT", + "x-ms-client-request-id" : "f95eb42e-1b8e-4b26-8ad5-e9bd60f9fa62" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsfilesystemsaspermissiontostring013384278db941a64/javapathfilesystemsaspermissiontostring109252497eeb485?position=0&action=append", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "ebd37136-395b-4f12-b151-bb13c7ac297e", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "053c9de8-101f-004b-270f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:45 GMT", + "x-ms-client-request-id" : "ebd37136-395b-4f12-b151-bb13c7ac297e" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsfilesystemsaspermissiontostring013384278db941a64/javapathfilesystemsaspermissiontostring109252497eeb485?position=7&retainUncommittedData=false&close=false&action=flush", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "dd87601c-ca02-4c9b-8f43-f808393d51e5" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D7782650E11051", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:45 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "053c9de9-101f-004b-280f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:45 GMT", + "x-ms-client-request-id" : "dd87601c-ca02-4c9b-8f43-f808393d51e5" }, "Exception" : null }, { @@ -25,8 +89,8 @@ "Uri" : "https://gaprahns.blob.core.windows.net?prefix=jtfsfilesystemsaspermissiontostring&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "e1e38dcb-aca7-4a4f-808d-561f649c57b1" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "9c79f355-1af6-4027-9eae-403dc7cc6df3" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -34,20 +98,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "b5210b7d-701e-0097-6ed3-902db3000000", - "Body" : "jtfsfilesystemsaspermissiontostringjtfsfilesystemsaspermissiontostring04104239b95a5fca7Fri, 01 Nov 2019 16:40:03 GMT\"0x8D75EEA24E832C6\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Fri, 01 Nov 2019 16:40:02 GMT", - "x-ms-client-request-id" : "e1e38dcb-aca7-4a4f-808d-561f649c57b1", + "x-ms-request-id" : "1d9a5aef-e01e-0092-0f0f-aad9cc000000", + "Body" : "jtfsfilesystemsaspermissiontostringjtfsfilesystemsaspermissiontostring013384278db941a64Tue, 03 Dec 2019 19:23:45 GMT\"0x8D7782650A4FC33\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Tue, 03 Dec 2019 19:23:45 GMT", + "x-ms-client-request-id" : "9c79f355-1af6-4027-9eae-403dc7cc6df3", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfsfilesystemsaspermissiontostring04104239b95a5fca7?restype=container", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfsfilesystemsaspermissiontostring013384278db941a64?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "b25a6142-327c-4f52-b451-501fed6c372c" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "48c42b59-2de1-4c2d-89d7-3fdd5aee1f0b" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -55,11 +119,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "b5210b94-701e-0097-04d3-902db3000000", - "Date" : "Fri, 01 Nov 2019 16:40:02 GMT", - "x-ms-client-request-id" : "b25a6142-327c-4f52-b451-501fed6c372c" + "x-ms-request-id" : "1d9a5b02-e01e-0092-1f0f-aad9cc000000", + "Date" : "Tue, 03 Dec 2019 19:23:45 GMT", + "x-ms-client-request-id" : "48c42b59-2de1-4c2d-89d7-3fdd5aee1f0b" }, "Exception" : null } ], - "variables" : [ "jtfsfilesystemsaspermissiontostring04104239b95a5fca7" ] + "variables" : [ "jtfsfilesystemsaspermissiontostring013384278db941a64", "javapathfilesystemsaspermissiontostring109252497eeb485" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestfilesystemsaspermissiontostring[6].json b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestfilesystemsaspermissiontostring[6].json index 441a80fa5be4..2119d9c49c0d 100644 --- a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestfilesystemsaspermissiontostring[6].json +++ b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestfilesystemsaspermissiontostring[6].json @@ -1,23 +1,87 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfsfilesystemsaspermissiontostring075424f8e11b21398?restype=container", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfsfilesystemsaspermissiontostring0887338943a986ac4?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "f5834a86-7793-4c98-ae57-ed97812c02e7" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "bec89994-4f12-4b90-8aac-4290ad4e1c88" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D75EEA2507F583", - "Last-Modified" : "Fri, 01 Nov 2019 16:40:03 GMT", + "ETag" : "0x8D7782650FAF3BF", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:45 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "b5210bcd-701e-0097-36d3-902db3000000", - "Date" : "Fri, 01 Nov 2019 16:40:02 GMT", - "x-ms-client-request-id" : "f5834a86-7793-4c98-ae57-ed97812c02e7" + "x-ms-request-id" : "1d9a5b14-e01e-0092-2f0f-aad9cc000000", + "Date" : "Tue, 03 Dec 2019 19:23:45 GMT", + "x-ms-client-request-id" : "bec89994-4f12-4b90-8aac-4290ad4e1c88" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsfilesystemsaspermissiontostring0887338943a986ac4/javapathfilesystemsaspermissiontostring109036294177a35?resource=file", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "070b20c1-205b-4bc9-8538-3c23e6e24544" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D77826510AD3DB", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:45 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "053c9deb-101f-004b-2a0f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:45 GMT", + "x-ms-client-request-id" : "070b20c1-205b-4bc9-8538-3c23e6e24544" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsfilesystemsaspermissiontostring0887338943a986ac4/javapathfilesystemsaspermissiontostring109036294177a35?position=0&action=append", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "508204a0-9644-4158-9e88-6d4c8c0c8c73", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "053c9dec-101f-004b-2b0f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:46 GMT", + "x-ms-client-request-id" : "508204a0-9644-4158-9e88-6d4c8c0c8c73" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsfilesystemsaspermissiontostring0887338943a986ac4/javapathfilesystemsaspermissiontostring109036294177a35?position=7&retainUncommittedData=false&close=false&action=flush", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "9086ef9b-1083-4647-a257-43dbd9d5265c" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D77826511D7172", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:46 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "053c9ded-101f-004b-2c0f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:46 GMT", + "x-ms-client-request-id" : "9086ef9b-1083-4647-a257-43dbd9d5265c" }, "Exception" : null }, { @@ -25,8 +89,8 @@ "Uri" : "https://gaprahns.blob.core.windows.net?prefix=jtfsfilesystemsaspermissiontostring&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "2050af5d-a6fb-4f82-9561-ba02cf81fd52" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "d3b49a70-4210-4792-a2ef-8ac9fba9ad49" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -34,20 +98,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "b5210bf7-701e-0097-5dd3-902db3000000", - "Body" : "jtfsfilesystemsaspermissiontostringjtfsfilesystemsaspermissiontostring075424f8e11b21398Fri, 01 Nov 2019 16:40:03 GMT\"0x8D75EEA2507F583\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Fri, 01 Nov 2019 16:40:02 GMT", - "x-ms-client-request-id" : "2050af5d-a6fb-4f82-9561-ba02cf81fd52", + "x-ms-request-id" : "1d9a5b73-e01e-0092-770f-aad9cc000000", + "Body" : "jtfsfilesystemsaspermissiontostringjtfsfilesystemsaspermissiontostring0887338943a986ac4Tue, 03 Dec 2019 19:23:45 GMT\"0x8D7782650FAF3BF\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Tue, 03 Dec 2019 19:23:46 GMT", + "x-ms-client-request-id" : "d3b49a70-4210-4792-a2ef-8ac9fba9ad49", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfsfilesystemsaspermissiontostring075424f8e11b21398?restype=container", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfsfilesystemsaspermissiontostring0887338943a986ac4?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "61c836f9-8746-4a3b-a801-fb8ca48a19a6" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "4e892e03-fe0a-4fb0-9758-dbfd28061448" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -55,11 +119,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "b5210c17-701e-0097-79d3-902db3000000", - "Date" : "Fri, 01 Nov 2019 16:40:02 GMT", - "x-ms-client-request-id" : "61c836f9-8746-4a3b-a801-fb8ca48a19a6" + "x-ms-request-id" : "1d9a5b7e-e01e-0092-020f-aad9cc000000", + "Date" : "Tue, 03 Dec 2019 19:23:46 GMT", + "x-ms-client-request-id" : "4e892e03-fe0a-4fb0-9758-dbfd28061448" }, "Exception" : null } ], - "variables" : [ "jtfsfilesystemsaspermissiontostring075424f8e11b21398" ] + "variables" : [ "jtfsfilesystemsaspermissiontostring0887338943a986ac4", "javapathfilesystemsaspermissiontostring109036294177a35" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestpathsaspermissionparse[0].json b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestpathsaspermissionparse[0].json index 1d6c084356d2..2a69579571b3 100644 --- a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestpathsaspermissionparse[0].json +++ b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestpathsaspermissionparse[0].json @@ -1,23 +1,87 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfspathsaspermissionparse055236cc7e9f053022426?restype=container", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfspathsaspermissionparse0948052ddef0e51dbd4f0?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "4d9d4f70-7dc6-4b43-9817-112dfdb8aa6b" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "70eb5014-f1d5-432f-b610-5402aa6105c3" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D75EEA23632177", - "Last-Modified" : "Fri, 01 Nov 2019 16:40:00 GMT", + "ETag" : "0x8D778264D8E2E0F", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:40 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "b521069d-701e-0097-26d3-902db3000000", - "Date" : "Fri, 01 Nov 2019 16:40:00 GMT", - "x-ms-client-request-id" : "4d9d4f70-7dc6-4b43-9817-112dfdb8aa6b" + "x-ms-request-id" : "1d9a5455-e01e-0092-660f-aad9cc000000", + "Date" : "Tue, 03 Dec 2019 19:23:40 GMT", + "x-ms-client-request-id" : "70eb5014-f1d5-432f-b610-5402aa6105c3" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfspathsaspermissionparse0948052ddef0e51dbd4f0/javapathpathsaspermissionparse184843adf87d26bb5d4?resource=file", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "c19a6de3-b753-4d1b-8916-2e71fe9d287e" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D778264DB2FDA8", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:40 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "053c9db6-101f-004b-760f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:40 GMT", + "x-ms-client-request-id" : "c19a6de3-b753-4d1b-8916-2e71fe9d287e" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfspathsaspermissionparse0948052ddef0e51dbd4f0/javapathpathsaspermissionparse184843adf87d26bb5d4?position=0&action=append", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "3b8fa8b3-c095-4ef7-876f-06b608114ce7", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "053c9db8-101f-004b-770f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:40 GMT", + "x-ms-client-request-id" : "3b8fa8b3-c095-4ef7-876f-06b608114ce7" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfspathsaspermissionparse0948052ddef0e51dbd4f0/javapathpathsaspermissionparse184843adf87d26bb5d4?position=7&retainUncommittedData=false&close=false&action=flush", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "1efee66b-5db7-4283-a89a-df013c7c7f59" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D778264DC36B93", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:40 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "053c9db9-101f-004b-780f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:40 GMT", + "x-ms-client-request-id" : "1efee66b-5db7-4283-a89a-df013c7c7f59" }, "Exception" : null }, { @@ -25,8 +89,8 @@ "Uri" : "https://gaprahns.blob.core.windows.net?prefix=jtfspathsaspermissionparse&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "3836c180-516a-4339-ae9e-1811a87cf164" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "d9becd21-2413-4f88-aeaa-62ae0a725861" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -34,20 +98,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "b52106c8-701e-0097-4dd3-902db3000000", - "Body" : "jtfspathsaspermissionparsejtfspathsaspermissionparse055236cc7e9f053022426Fri, 01 Nov 2019 16:40:00 GMT\"0x8D75EEA23632177\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Fri, 01 Nov 2019 16:40:00 GMT", - "x-ms-client-request-id" : "3836c180-516a-4339-ae9e-1811a87cf164", + "x-ms-request-id" : "1d9a54c2-e01e-0092-410f-aad9cc000000", + "Body" : "jtfspathsaspermissionparsejtfspathsaspermissionparse0948052ddef0e51dbd4f0Tue, 03 Dec 2019 19:23:40 GMT\"0x8D778264D8E2E0F\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Tue, 03 Dec 2019 19:23:40 GMT", + "x-ms-client-request-id" : "d9becd21-2413-4f88-aeaa-62ae0a725861", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfspathsaspermissionparse055236cc7e9f053022426?restype=container", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfspathsaspermissionparse0948052ddef0e51dbd4f0?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "930a819d-487f-4d47-bacb-232bdf157718" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "59f7f521-88ed-4f05-8125-ff3326d42554" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -55,11 +119,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "b52106dc-701e-0097-5ed3-902db3000000", - "Date" : "Fri, 01 Nov 2019 16:40:00 GMT", - "x-ms-client-request-id" : "930a819d-487f-4d47-bacb-232bdf157718" + "x-ms-request-id" : "1d9a54cb-e01e-0092-4a0f-aad9cc000000", + "Date" : "Tue, 03 Dec 2019 19:23:40 GMT", + "x-ms-client-request-id" : "59f7f521-88ed-4f05-8125-ff3326d42554" }, "Exception" : null } ], - "variables" : [ "jtfspathsaspermissionparse055236cc7e9f053022426" ] + "variables" : [ "jtfspathsaspermissionparse0948052ddef0e51dbd4f0", "javapathpathsaspermissionparse184843adf87d26bb5d4" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestpathsaspermissionparse[1].json b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestpathsaspermissionparse[1].json index 70d59d9ece8d..cda517db2430 100644 --- a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestpathsaspermissionparse[1].json +++ b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestpathsaspermissionparse[1].json @@ -1,23 +1,87 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfspathsaspermissionparse060344a8744378fbc0403?restype=container", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfspathsaspermissionparse08613386d4b431ad934e5?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "77c072ab-0f48-49fd-a12a-00f49183b185" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "8eb0c727-50d0-4a2d-a282-5ad83dda4e5a" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D75EEA238555A0", - "Last-Modified" : "Fri, 01 Nov 2019 16:40:00 GMT", + "ETag" : "0x8D778264DDCAA35", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:40 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "b52106f5-701e-0097-71d3-902db3000000", - "Date" : "Fri, 01 Nov 2019 16:40:00 GMT", - "x-ms-client-request-id" : "77c072ab-0f48-49fd-a12a-00f49183b185" + "x-ms-request-id" : "1d9a54de-e01e-0092-5d0f-aad9cc000000", + "Date" : "Tue, 03 Dec 2019 19:23:40 GMT", + "x-ms-client-request-id" : "8eb0c727-50d0-4a2d-a282-5ad83dda4e5a" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfspathsaspermissionparse08613386d4b431ad934e5/javapathpathsaspermissionparse10930213890d8ca7d24?resource=file", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "8680611a-cf70-447e-817f-4654443efd37" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D778264DE70E55", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:40 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "053c9dba-101f-004b-790f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:40 GMT", + "x-ms-client-request-id" : "8680611a-cf70-447e-817f-4654443efd37" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfspathsaspermissionparse08613386d4b431ad934e5/javapathpathsaspermissionparse10930213890d8ca7d24?position=0&action=append", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "a3a74110-0d54-4df7-a0a8-af7b214646ed", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "053c9dbb-101f-004b-7a0f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:40 GMT", + "x-ms-client-request-id" : "a3a74110-0d54-4df7-a0a8-af7b214646ed" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfspathsaspermissionparse08613386d4b431ad934e5/javapathpathsaspermissionparse10930213890d8ca7d24?position=7&retainUncommittedData=false&close=false&action=flush", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "058b9b78-0770-4e2b-a461-b93910ef4a74" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D778264DF961C5", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:40 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "053c9dbc-101f-004b-7b0f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:40 GMT", + "x-ms-client-request-id" : "058b9b78-0770-4e2b-a461-b93910ef4a74" }, "Exception" : null }, { @@ -25,8 +89,8 @@ "Uri" : "https://gaprahns.blob.core.windows.net?prefix=jtfspathsaspermissionparse&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "99298d84-5735-415c-b553-c9246576369b" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "b38c05f8-0006-4e32-a62e-9453b48806ed" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -34,20 +98,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "b521070a-701e-0097-03d3-902db3000000", - "Body" : "jtfspathsaspermissionparsejtfspathsaspermissionparse060344a8744378fbc0403Fri, 01 Nov 2019 16:40:00 GMT\"0x8D75EEA238555A0\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Fri, 01 Nov 2019 16:40:00 GMT", - "x-ms-client-request-id" : "99298d84-5735-415c-b553-c9246576369b", + "x-ms-request-id" : "1d9a5523-e01e-0092-170f-aad9cc000000", + "Body" : "jtfspathsaspermissionparsejtfspathsaspermissionparse08613386d4b431ad934e5Tue, 03 Dec 2019 19:23:40 GMT\"0x8D778264DDCAA35\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Tue, 03 Dec 2019 19:23:40 GMT", + "x-ms-client-request-id" : "b38c05f8-0006-4e32-a62e-9453b48806ed", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfspathsaspermissionparse060344a8744378fbc0403?restype=container", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfspathsaspermissionparse08613386d4b431ad934e5?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "ba21ab9c-8bdc-4a02-8788-744ba774a675" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "19635448-47c6-4880-9c64-a88bd7fa2509" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -55,11 +119,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "b5210719-701e-0097-11d3-902db3000000", - "Date" : "Fri, 01 Nov 2019 16:40:00 GMT", - "x-ms-client-request-id" : "ba21ab9c-8bdc-4a02-8788-744ba774a675" + "x-ms-request-id" : "1d9a552d-e01e-0092-1f0f-aad9cc000000", + "Date" : "Tue, 03 Dec 2019 19:23:40 GMT", + "x-ms-client-request-id" : "19635448-47c6-4880-9c64-a88bd7fa2509" }, "Exception" : null } ], - "variables" : [ "jtfspathsaspermissionparse060344a8744378fbc0403" ] + "variables" : [ "jtfspathsaspermissionparse08613386d4b431ad934e5", "javapathpathsaspermissionparse10930213890d8ca7d24" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestpathsaspermissionparse[2].json b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestpathsaspermissionparse[2].json index a1167c4c6eec..c2672c33db99 100644 --- a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestpathsaspermissionparse[2].json +++ b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestpathsaspermissionparse[2].json @@ -1,23 +1,87 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfspathsaspermissionparse000545eca66af2743e43d?restype=container", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfspathsaspermissionparse01616093780a7df5214ec?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "db65a5a9-4e43-4d2c-9410-c23fa7962c67" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "02c14f9c-360e-4dcf-beb1-92ceff05c48c" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D75EEA239E394B", - "Last-Modified" : "Fri, 01 Nov 2019 16:40:00 GMT", + "ETag" : "0x8D778264E117F4C", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:41 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "b5210732-701e-0097-29d3-902db3000000", - "Date" : "Fri, 01 Nov 2019 16:40:00 GMT", - "x-ms-client-request-id" : "db65a5a9-4e43-4d2c-9410-c23fa7962c67" + "x-ms-request-id" : "1d9a553c-e01e-0092-2a0f-aad9cc000000", + "Date" : "Tue, 03 Dec 2019 19:23:40 GMT", + "x-ms-client-request-id" : "02c14f9c-360e-4dcf-beb1-92ceff05c48c" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfspathsaspermissionparse01616093780a7df5214ec/javapathpathsaspermissionparse1937386be8e1be3f3d4?resource=file", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "bfa7f12a-53ee-4c44-9000-1218714786eb" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D778264E1EBD69", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:41 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "053c9dbd-101f-004b-7c0f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:41 GMT", + "x-ms-client-request-id" : "bfa7f12a-53ee-4c44-9000-1218714786eb" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfspathsaspermissionparse01616093780a7df5214ec/javapathpathsaspermissionparse1937386be8e1be3f3d4?position=0&action=append", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "033b70e6-85ae-4cd4-9878-0d9a8569cf1d", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "053c9dbe-101f-004b-7d0f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:41 GMT", + "x-ms-client-request-id" : "033b70e6-85ae-4cd4-9878-0d9a8569cf1d" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfspathsaspermissionparse01616093780a7df5214ec/javapathpathsaspermissionparse1937386be8e1be3f3d4?position=7&retainUncommittedData=false&close=false&action=flush", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "29f5fd54-f903-42e5-970c-64d55533f450" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D778264E2EB660", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:41 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "053c9dbf-101f-004b-7e0f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:41 GMT", + "x-ms-client-request-id" : "29f5fd54-f903-42e5-970c-64d55533f450" }, "Exception" : null }, { @@ -25,8 +89,8 @@ "Uri" : "https://gaprahns.blob.core.windows.net?prefix=jtfspathsaspermissionparse&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "f4fbc234-f18e-4ba4-aaec-2ea700c56be4" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "71de831d-67f9-4356-82a6-dc116c0a90ea" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -34,20 +98,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "b5210751-701e-0097-45d3-902db3000000", - "Body" : "jtfspathsaspermissionparsejtfspathsaspermissionparse000545eca66af2743e43dFri, 01 Nov 2019 16:40:00 GMT\"0x8D75EEA239E394B\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Fri, 01 Nov 2019 16:40:00 GMT", - "x-ms-client-request-id" : "f4fbc234-f18e-4ba4-aaec-2ea700c56be4", + "x-ms-request-id" : "1d9a557f-e01e-0092-630f-aad9cc000000", + "Body" : "jtfspathsaspermissionparsejtfspathsaspermissionparse01616093780a7df5214ecTue, 03 Dec 2019 19:23:41 GMT\"0x8D778264E117F4C\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Tue, 03 Dec 2019 19:23:41 GMT", + "x-ms-client-request-id" : "71de831d-67f9-4356-82a6-dc116c0a90ea", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfspathsaspermissionparse000545eca66af2743e43d?restype=container", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfspathsaspermissionparse01616093780a7df5214ec?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "de524333-8476-43ee-88b0-dce574dab9ef" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "2f2494af-237b-440a-9874-8d71617ceacb" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -55,11 +119,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "b5210768-701e-0097-5bd3-902db3000000", - "Date" : "Fri, 01 Nov 2019 16:40:00 GMT", - "x-ms-client-request-id" : "de524333-8476-43ee-88b0-dce574dab9ef" + "x-ms-request-id" : "1d9a558f-e01e-0092-6f0f-aad9cc000000", + "Date" : "Tue, 03 Dec 2019 19:23:41 GMT", + "x-ms-client-request-id" : "2f2494af-237b-440a-9874-8d71617ceacb" }, "Exception" : null } ], - "variables" : [ "jtfspathsaspermissionparse000545eca66af2743e43d" ] + "variables" : [ "jtfspathsaspermissionparse01616093780a7df5214ec", "javapathpathsaspermissionparse1937386be8e1be3f3d4" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestpathsaspermissionparse[3].json b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestpathsaspermissionparse[3].json index 86537997305e..d084bb1932f9 100644 --- a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestpathsaspermissionparse[3].json +++ b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestpathsaspermissionparse[3].json @@ -1,23 +1,87 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfspathsaspermissionparse00150332d6c9f05ff9445?restype=container", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfspathsaspermissionparse050912cc38f435711d49f?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "1d7a60d5-9150-4b3b-8ae4-a90da0e4c9db" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "6f6cf649-1dd9-4476-9760-7a371e1dc881" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D75EEA23B71CF6", - "Last-Modified" : "Fri, 01 Nov 2019 16:40:01 GMT", + "ETag" : "0x8D778264E49622B", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:41 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "b521079d-701e-0097-0bd3-902db3000000", - "Date" : "Fri, 01 Nov 2019 16:40:00 GMT", - "x-ms-client-request-id" : "1d7a60d5-9150-4b3b-8ae4-a90da0e4c9db" + "x-ms-request-id" : "1d9a559a-e01e-0092-7a0f-aad9cc000000", + "Date" : "Tue, 03 Dec 2019 19:23:41 GMT", + "x-ms-client-request-id" : "6f6cf649-1dd9-4476-9760-7a371e1dc881" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfspathsaspermissionparse050912cc38f435711d49f/javapathpathsaspermissionparse133519cce000aef9a34?resource=file", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "5ed85344-3ec7-48a2-879d-137fb149a4b6" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D778264E5BA17D", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:41 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "053c9dc0-101f-004b-7f0f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:41 GMT", + "x-ms-client-request-id" : "5ed85344-3ec7-48a2-879d-137fb149a4b6" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfspathsaspermissionparse050912cc38f435711d49f/javapathpathsaspermissionparse133519cce000aef9a34?position=0&action=append", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "ff799b8f-baec-4a1c-bd0d-478d9e26bd37", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "053c9dc1-101f-004b-800f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:41 GMT", + "x-ms-client-request-id" : "ff799b8f-baec-4a1c-bd0d-478d9e26bd37" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfspathsaspermissionparse050912cc38f435711d49f/javapathpathsaspermissionparse133519cce000aef9a34?position=7&retainUncommittedData=false&close=false&action=flush", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "e5e3f17b-2713-48ef-a69a-82c48e3e8453" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D778264E7088B1", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:41 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "053c9dc2-101f-004b-010f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:41 GMT", + "x-ms-client-request-id" : "e5e3f17b-2713-48ef-a69a-82c48e3e8453" }, "Exception" : null }, { @@ -25,8 +89,8 @@ "Uri" : "https://gaprahns.blob.core.windows.net?prefix=jtfspathsaspermissionparse&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "66677d17-471d-4d89-b502-179dffa43413" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "ab4b5215-8a2a-4b10-a6d3-80d8ae705939" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -34,20 +98,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "b52107b9-701e-0097-23d3-902db3000000", - "Body" : "jtfspathsaspermissionparsejtfspathsaspermissionparse00150332d6c9f05ff9445Fri, 01 Nov 2019 16:40:01 GMT\"0x8D75EEA23B71CF6\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Fri, 01 Nov 2019 16:40:00 GMT", - "x-ms-client-request-id" : "66677d17-471d-4d89-b502-179dffa43413", + "x-ms-request-id" : "1d9a55d9-e01e-0092-330f-aad9cc000000", + "Body" : "jtfspathsaspermissionparsejtfspathsaspermissionparse050912cc38f435711d49fTue, 03 Dec 2019 19:23:41 GMT\"0x8D778264E49622B\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Tue, 03 Dec 2019 19:23:41 GMT", + "x-ms-client-request-id" : "ab4b5215-8a2a-4b10-a6d3-80d8ae705939", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfspathsaspermissionparse00150332d6c9f05ff9445?restype=container", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfspathsaspermissionparse050912cc38f435711d49f?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "721593c6-9db0-4c1a-9a88-292f35e99d8c" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "55172f59-84a8-4bff-9012-ee8dbfb9380b" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -55,11 +119,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "b52107c8-701e-0097-31d3-902db3000000", - "Date" : "Fri, 01 Nov 2019 16:40:00 GMT", - "x-ms-client-request-id" : "721593c6-9db0-4c1a-9a88-292f35e99d8c" + "x-ms-request-id" : "1d9a55ef-e01e-0092-430f-aad9cc000000", + "Date" : "Tue, 03 Dec 2019 19:23:41 GMT", + "x-ms-client-request-id" : "55172f59-84a8-4bff-9012-ee8dbfb9380b" }, "Exception" : null } ], - "variables" : [ "jtfspathsaspermissionparse00150332d6c9f05ff9445" ] + "variables" : [ "jtfspathsaspermissionparse050912cc38f435711d49f", "javapathpathsaspermissionparse133519cce000aef9a34" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestpathsaspermissionparse[4].json b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestpathsaspermissionparse[4].json index 17d608728a92..b05f826ee4e3 100644 --- a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestpathsaspermissionparse[4].json +++ b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestpathsaspermissionparse[4].json @@ -1,23 +1,87 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfspathsaspermissionparse0267494fc6e214e1bf449?restype=container", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfspathsaspermissionparse0514172c3f5e0ad48d405?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "9bc9b06b-0c51-4872-83e4-e3adfd18ae70" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "3524a7d1-995d-4149-8eb2-ebabd02b2e5c" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D75EEA23D04ED0", - "Last-Modified" : "Fri, 01 Nov 2019 16:40:01 GMT", + "ETag" : "0x8D778264E88E784", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:41 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "b52107e3-701e-0097-4ad3-902db3000000", - "Date" : "Fri, 01 Nov 2019 16:40:00 GMT", - "x-ms-client-request-id" : "9bc9b06b-0c51-4872-83e4-e3adfd18ae70" + "x-ms-request-id" : "1d9a55f7-e01e-0092-4a0f-aad9cc000000", + "Date" : "Tue, 03 Dec 2019 19:23:41 GMT", + "x-ms-client-request-id" : "3524a7d1-995d-4149-8eb2-ebabd02b2e5c" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfspathsaspermissionparse0514172c3f5e0ad48d405/javapathpathsaspermissionparse155307eb38b937c89e4?resource=file", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "5d41976c-e2a9-4a69-97eb-552d3711248d" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D778264E97D9F4", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:41 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "053c9dc4-101f-004b-030f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:41 GMT", + "x-ms-client-request-id" : "5d41976c-e2a9-4a69-97eb-552d3711248d" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfspathsaspermissionparse0514172c3f5e0ad48d405/javapathpathsaspermissionparse155307eb38b937c89e4?position=0&action=append", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "594331d5-c9be-409f-b5b4-e41f6181aebb", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "053c9dc6-101f-004b-050f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:41 GMT", + "x-ms-client-request-id" : "594331d5-c9be-409f-b5b4-e41f6181aebb" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfspathsaspermissionparse0514172c3f5e0ad48d405/javapathpathsaspermissionparse155307eb38b937c89e4?position=7&retainUncommittedData=false&close=false&action=flush", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "3504362b-320f-4cb4-9107-f0c7d89370c3" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D778264EB0B5F9", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:42 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "053c9dc7-101f-004b-060f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:42 GMT", + "x-ms-client-request-id" : "3504362b-320f-4cb4-9107-f0c7d89370c3" }, "Exception" : null }, { @@ -25,8 +89,8 @@ "Uri" : "https://gaprahns.blob.core.windows.net?prefix=jtfspathsaspermissionparse&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "86f4035c-5f6d-4800-b2dd-7dd8d21efd12" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "875d4b95-dea4-4bf1-a863-94735da01372" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -34,20 +98,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "b52107fe-701e-0097-62d3-902db3000000", - "Body" : "jtfspathsaspermissionparsejtfspathsaspermissionparse0267494fc6e214e1bf449Fri, 01 Nov 2019 16:40:01 GMT\"0x8D75EEA23D04ED0\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Fri, 01 Nov 2019 16:40:00 GMT", - "x-ms-client-request-id" : "86f4035c-5f6d-4800-b2dd-7dd8d21efd12", + "x-ms-request-id" : "1d9a5659-e01e-0092-1c0f-aad9cc000000", + "Body" : "jtfspathsaspermissionparsejtfspathsaspermissionparse0514172c3f5e0ad48d405Tue, 03 Dec 2019 19:23:41 GMT\"0x8D778264E88E784\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Tue, 03 Dec 2019 19:23:42 GMT", + "x-ms-client-request-id" : "875d4b95-dea4-4bf1-a863-94735da01372", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfspathsaspermissionparse0267494fc6e214e1bf449?restype=container", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfspathsaspermissionparse0514172c3f5e0ad48d405?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "ba0980f7-9ebf-41c9-82c9-54bdcbc5315e" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "5b60e62d-fd83-40dd-83a4-cc38704a2e8d" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -55,11 +119,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "b521081c-701e-0097-7bd3-902db3000000", - "Date" : "Fri, 01 Nov 2019 16:40:01 GMT", - "x-ms-client-request-id" : "ba0980f7-9ebf-41c9-82c9-54bdcbc5315e" + "x-ms-request-id" : "1d9a5674-e01e-0092-340f-aad9cc000000", + "Date" : "Tue, 03 Dec 2019 19:23:42 GMT", + "x-ms-client-request-id" : "5b60e62d-fd83-40dd-83a4-cc38704a2e8d" }, "Exception" : null } ], - "variables" : [ "jtfspathsaspermissionparse0267494fc6e214e1bf449" ] + "variables" : [ "jtfspathsaspermissionparse0514172c3f5e0ad48d405", "javapathpathsaspermissionparse155307eb38b937c89e4" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestpathsaspermissionparse[5].json b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestpathsaspermissionparse[5].json index 29cfef3c9d39..e777f8294498 100644 --- a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestpathsaspermissionparse[5].json +++ b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestpathsaspermissionparse[5].json @@ -1,23 +1,87 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfspathsaspermissionparse000107017cedecc0bd476?restype=container", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfspathsaspermissionparse0546886831c6d780c04d5?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "970b7438-7d8f-443e-81b7-11783a4279dd" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "9c56c9ce-8d71-4e44-ae25-6f9083cd7241" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D75EEA23F6F095", - "Last-Modified" : "Fri, 01 Nov 2019 16:40:01 GMT", + "ETag" : "0x8D778264EC9A599", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:42 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "b521085a-701e-0097-32d3-902db3000000", - "Date" : "Fri, 01 Nov 2019 16:40:01 GMT", - "x-ms-client-request-id" : "970b7438-7d8f-443e-81b7-11783a4279dd" + "x-ms-request-id" : "1d9a5684-e01e-0092-440f-aad9cc000000", + "Date" : "Tue, 03 Dec 2019 19:23:42 GMT", + "x-ms-client-request-id" : "9c56c9ce-8d71-4e44-ae25-6f9083cd7241" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfspathsaspermissionparse0546886831c6d780c04d5/javapathpathsaspermissionparse176095136c20e2def84?resource=file", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "60b86554-ff63-4879-9028-8f9d948fe32e" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D778264ED6613B", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:42 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "053c9dc8-101f-004b-070f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:42 GMT", + "x-ms-client-request-id" : "60b86554-ff63-4879-9028-8f9d948fe32e" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfspathsaspermissionparse0546886831c6d780c04d5/javapathpathsaspermissionparse176095136c20e2def84?position=0&action=append", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "d5ca2208-f0b9-466f-9edd-32f30a3acdd7", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "053c9dc9-101f-004b-080f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:42 GMT", + "x-ms-client-request-id" : "d5ca2208-f0b9-466f-9edd-32f30a3acdd7" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfspathsaspermissionparse0546886831c6d780c04d5/javapathpathsaspermissionparse176095136c20e2def84?position=7&retainUncommittedData=false&close=false&action=flush", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "68b164e0-f47d-4f0b-8540-12f34dd9fb83" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D778264EE64387", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:42 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "053c9dca-101f-004b-090f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:42 GMT", + "x-ms-client-request-id" : "68b164e0-f47d-4f0b-8540-12f34dd9fb83" }, "Exception" : null }, { @@ -25,8 +89,8 @@ "Uri" : "https://gaprahns.blob.core.windows.net?prefix=jtfspathsaspermissionparse&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "9a636b29-2e65-422c-8b22-07f26b74b670" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "07ad52b2-b2c1-4c33-9c52-6a1188816760" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -34,20 +98,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "b5210875-701e-0097-4ad3-902db3000000", - "Body" : "jtfspathsaspermissionparsejtfspathsaspermissionparse000107017cedecc0bd476Fri, 01 Nov 2019 16:40:01 GMT\"0x8D75EEA23F6F095\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Fri, 01 Nov 2019 16:40:01 GMT", - "x-ms-client-request-id" : "9a636b29-2e65-422c-8b22-07f26b74b670", + "x-ms-request-id" : "1d9a56d1-e01e-0092-070f-aad9cc000000", + "Body" : "jtfspathsaspermissionparsejtfspathsaspermissionparse0546886831c6d780c04d5Tue, 03 Dec 2019 19:23:42 GMT\"0x8D778264EC9A599\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Tue, 03 Dec 2019 19:23:42 GMT", + "x-ms-client-request-id" : "07ad52b2-b2c1-4c33-9c52-6a1188816760", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfspathsaspermissionparse000107017cedecc0bd476?restype=container", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfspathsaspermissionparse0546886831c6d780c04d5?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "0e60a63e-af52-4946-a7e6-5d08d383a09e" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "8133d2ef-3913-4204-9f71-a6943f052c1a" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -55,11 +119,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "b521088e-701e-0097-60d3-902db3000000", - "Date" : "Fri, 01 Nov 2019 16:40:01 GMT", - "x-ms-client-request-id" : "0e60a63e-af52-4946-a7e6-5d08d383a09e" + "x-ms-request-id" : "1d9a56d8-e01e-0092-0d0f-aad9cc000000", + "Date" : "Tue, 03 Dec 2019 19:23:42 GMT", + "x-ms-client-request-id" : "8133d2ef-3913-4204-9f71-a6943f052c1a" }, "Exception" : null } ], - "variables" : [ "jtfspathsaspermissionparse000107017cedecc0bd476" ] + "variables" : [ "jtfspathsaspermissionparse0546886831c6d780c04d5", "javapathpathsaspermissionparse176095136c20e2def84" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestpathsaspermissionparse[6].json b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestpathsaspermissionparse[6].json index 596b3a36c1d0..f201254f0d69 100644 --- a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestpathsaspermissionparse[6].json +++ b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestpathsaspermissionparse[6].json @@ -1,23 +1,87 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfspathsaspermissionparse033962133d8b2e382f464?restype=container", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfspathsaspermissionparse034699a05d7d200f4e4fd?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "20b1d36a-ff50-4f2c-b481-e15186915259" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "1ec460ac-32be-440a-8baf-d23839675a82" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D75EEA240FFB53", - "Last-Modified" : "Fri, 01 Nov 2019 16:40:01 GMT", + "ETag" : "0x8D778264EFE7AAC", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:42 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "b52108a0-701e-0097-70d3-902db3000000", - "Date" : "Fri, 01 Nov 2019 16:40:01 GMT", - "x-ms-client-request-id" : "20b1d36a-ff50-4f2c-b481-e15186915259" + "x-ms-request-id" : "1d9a56ea-e01e-0092-1b0f-aad9cc000000", + "Date" : "Tue, 03 Dec 2019 19:23:42 GMT", + "x-ms-client-request-id" : "1ec460ac-32be-440a-8baf-d23839675a82" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfspathsaspermissionparse034699a05d7d200f4e4fd/javapathpathsaspermissionparse144145abf36786b4954?resource=file", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "35468b81-49ce-40cc-88f6-89fe8600adb1" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D778264F0EDC2E", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:42 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "053c9dcb-101f-004b-0a0f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:42 GMT", + "x-ms-client-request-id" : "35468b81-49ce-40cc-88f6-89fe8600adb1" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfspathsaspermissionparse034699a05d7d200f4e4fd/javapathpathsaspermissionparse144145abf36786b4954?position=0&action=append", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "54a32eb5-8890-4ba6-b74b-b7b15a56a190", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "053c9dcc-101f-004b-0b0f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:42 GMT", + "x-ms-client-request-id" : "54a32eb5-8890-4ba6-b74b-b7b15a56a190" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfspathsaspermissionparse034699a05d7d200f4e4fd/javapathpathsaspermissionparse144145abf36786b4954?position=7&retainUncommittedData=false&close=false&action=flush", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "88e6f664-65e8-4be3-a3bc-44fff4b5263a" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D778264F1F50E9", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:42 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "053c9dcd-101f-004b-0c0f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:42 GMT", + "x-ms-client-request-id" : "88e6f664-65e8-4be3-a3bc-44fff4b5263a" }, "Exception" : null }, { @@ -25,8 +89,8 @@ "Uri" : "https://gaprahns.blob.core.windows.net?prefix=jtfspathsaspermissionparse&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "7e9e6187-1199-4a98-91a8-e09ec56a48a4" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "614da981-25e1-46d8-b628-fdbe1908d5de" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -34,20 +98,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "b52108c9-701e-0097-11d3-902db3000000", - "Body" : "jtfspathsaspermissionparsejtfspathsaspermissionparse033962133d8b2e382f464Fri, 01 Nov 2019 16:40:01 GMT\"0x8D75EEA240FFB53\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Fri, 01 Nov 2019 16:40:01 GMT", - "x-ms-client-request-id" : "7e9e6187-1199-4a98-91a8-e09ec56a48a4", + "x-ms-request-id" : "1d9a5747-e01e-0092-650f-aad9cc000000", + "Body" : "jtfspathsaspermissionparsejtfspathsaspermissionparse034699a05d7d200f4e4fdTue, 03 Dec 2019 19:23:42 GMT\"0x8D778264EFE7AAC\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Tue, 03 Dec 2019 19:23:42 GMT", + "x-ms-client-request-id" : "614da981-25e1-46d8-b628-fdbe1908d5de", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfspathsaspermissionparse033962133d8b2e382f464?restype=container", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfspathsaspermissionparse034699a05d7d200f4e4fd?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "8dc81d1c-8ad6-450b-ad33-76c118c34e18" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "c2e90dcd-9eab-470e-aa7b-f11f53d86a73" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -55,11 +119,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "b52108e0-701e-0097-27d3-902db3000000", - "Date" : "Fri, 01 Nov 2019 16:40:01 GMT", - "x-ms-client-request-id" : "8dc81d1c-8ad6-450b-ad33-76c118c34e18" + "x-ms-request-id" : "1d9a575a-e01e-0092-760f-aad9cc000000", + "Date" : "Tue, 03 Dec 2019 19:23:42 GMT", + "x-ms-client-request-id" : "c2e90dcd-9eab-470e-aa7b-f11f53d86a73" }, "Exception" : null } ], - "variables" : [ "jtfspathsaspermissionparse033962133d8b2e382f464" ] + "variables" : [ "jtfspathsaspermissionparse034699a05d7d200f4e4fd", "javapathpathsaspermissionparse144145abf36786b4954" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestpathsaspermissionparseia.json b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestpathsaspermissionparseia.json index 1db03c2ddd6b..86011b13c51e 100644 --- a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestpathsaspermissionparseia.json +++ b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestpathsaspermissionparseia.json @@ -1,23 +1,87 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfspathsaspermissionparseia007554c30c4eb2282e4e?restype=container", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfspathsaspermissionparseia049059a3e1562dc6c14e?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "9b203474-8913-4ada-81d9-7d0c8eb59c31" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "e420902e-68e4-4ea0-8299-8e732862459c" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D75EEA2428B7EB", - "Last-Modified" : "Fri, 01 Nov 2019 16:40:01 GMT", + "ETag" : "0x8D778264F394440", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:42 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "b5210903-701e-0097-48d3-902db3000000", - "Date" : "Fri, 01 Nov 2019 16:40:01 GMT", - "x-ms-client-request-id" : "9b203474-8913-4ada-81d9-7d0c8eb59c31" + "x-ms-request-id" : "1d9a5770-e01e-0092-090f-aad9cc000000", + "Date" : "Tue, 03 Dec 2019 19:23:42 GMT", + "x-ms-client-request-id" : "e420902e-68e4-4ea0-8299-8e732862459c" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfspathsaspermissionparseia049059a3e1562dc6c14e/javapathpathsaspermissionparseia167978f596a2b3e99e?resource=file", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "2d4da678-0c87-4b87-a2a9-4d6bd834438a" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D778264F448EA9", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:43 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "053c9dce-101f-004b-0d0f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:43 GMT", + "x-ms-client-request-id" : "2d4da678-0c87-4b87-a2a9-4d6bd834438a" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfspathsaspermissionparseia049059a3e1562dc6c14e/javapathpathsaspermissionparseia167978f596a2b3e99e?position=0&action=append", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "1fc78e46-2c9d-4967-813c-10f31c512eb0", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "053c9dcf-101f-004b-0e0f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:43 GMT", + "x-ms-client-request-id" : "1fc78e46-2c9d-4967-813c-10f31c512eb0" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfspathsaspermissionparseia049059a3e1562dc6c14e/javapathpathsaspermissionparseia167978f596a2b3e99e?position=7&retainUncommittedData=false&close=false&action=flush", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "22bc62b3-c0f2-489a-9d94-913c04868c93" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D778264F57E93D", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:43 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "053c9dd0-101f-004b-0f0f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:43 GMT", + "x-ms-client-request-id" : "22bc62b3-c0f2-489a-9d94-913c04868c93" }, "Exception" : null }, { @@ -25,8 +89,8 @@ "Uri" : "https://gaprahns.blob.core.windows.net?prefix=jtfspathsaspermissionparseia&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "e8ca6d0d-f128-4959-a258-33084be0c26f" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "81e531b1-a9cb-4177-8ec6-ef3ac86ed4b6" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -34,20 +98,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "b5210928-701e-0097-66d3-902db3000000", - "Body" : "jtfspathsaspermissionparseiajtfspathsaspermissionparseia007554c30c4eb2282e4eFri, 01 Nov 2019 16:40:01 GMT\"0x8D75EEA2428B7EB\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Fri, 01 Nov 2019 16:40:01 GMT", - "x-ms-client-request-id" : "e8ca6d0d-f128-4959-a258-33084be0c26f", + "x-ms-request-id" : "1d9a57bf-e01e-0092-4e0f-aad9cc000000", + "Body" : "jtfspathsaspermissionparseiajtfspathsaspermissionparseia049059a3e1562dc6c14eTue, 03 Dec 2019 19:23:42 GMT\"0x8D778264F394440\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Tue, 03 Dec 2019 19:23:43 GMT", + "x-ms-client-request-id" : "81e531b1-a9cb-4177-8ec6-ef3ac86ed4b6", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfspathsaspermissionparseia007554c30c4eb2282e4e?restype=container", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfspathsaspermissionparseia049059a3e1562dc6c14e?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "47595369-449f-4bec-ac07-049d8af75989" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "75bb59e1-eec2-4ca0-a41c-f88223d1cf56" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -55,11 +119,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "b5210937-701e-0097-75d3-902db3000000", - "Date" : "Fri, 01 Nov 2019 16:40:01 GMT", - "x-ms-client-request-id" : "47595369-449f-4bec-ac07-049d8af75989" + "x-ms-request-id" : "1d9a57d3-e01e-0092-610f-aad9cc000000", + "Date" : "Tue, 03 Dec 2019 19:23:43 GMT", + "x-ms-client-request-id" : "75bb59e1-eec2-4ca0-a41c-f88223d1cf56" }, "Exception" : null } ], - "variables" : [ "jtfspathsaspermissionparseia007554c30c4eb2282e4e" ] + "variables" : [ "jtfspathsaspermissionparseia049059a3e1562dc6c14e", "javapathpathsaspermissionparseia167978f596a2b3e99e" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestpathsaspermissiontostring[0].json b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestpathsaspermissiontostring[0].json index 7ca2e4f38e5a..7175b299cf75 100644 --- a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestpathsaspermissiontostring[0].json +++ b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestpathsaspermissiontostring[0].json @@ -1,23 +1,87 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfspathsaspermissiontostring01987059cf107cf7434e?restype=container", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfspathsaspermissiontostring072024d4173173a4c44a?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "949ca8d7-5462-41b9-81d3-c2ae1bd24e23" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "31f7dab8-5336-46e4-a2b5-00ffc9c20ac6" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D75EEA22BBEDEB", - "Last-Modified" : "Fri, 01 Nov 2019 16:39:59 GMT", + "ETag" : "0x8D778264C2227F2", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:37 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "b521046d-701e-0097-2bd3-902db3000000", - "Date" : "Fri, 01 Nov 2019 16:39:59 GMT", - "x-ms-client-request-id" : "949ca8d7-5462-41b9-81d3-c2ae1bd24e23" + "x-ms-request-id" : "1d9a5173-e01e-0092-620f-aad9cc000000", + "Date" : "Tue, 03 Dec 2019 19:23:37 GMT", + "x-ms-client-request-id" : "31f7dab8-5336-46e4-a2b5-00ffc9c20ac6" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfspathsaspermissiontostring072024d4173173a4c44a/javapathpathsaspermissiontostring143051005876fa6cfc?resource=file", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "9eced2e5-7bea-4873-838d-e1a69261ce5c" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D778264C309FFF", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:37 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "053c9d27-101f-004b-680f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:37 GMT", + "x-ms-client-request-id" : "9eced2e5-7bea-4873-838d-e1a69261ce5c" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfspathsaspermissiontostring072024d4173173a4c44a/javapathpathsaspermissiontostring143051005876fa6cfc?position=0&action=append", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "b9c8cc90-3d75-4ed2-b6f9-5d9acd3c5330", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "053c9d2d-101f-004b-6e0f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:37 GMT", + "x-ms-client-request-id" : "b9c8cc90-3d75-4ed2-b6f9-5d9acd3c5330" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfspathsaspermissiontostring072024d4173173a4c44a/javapathpathsaspermissiontostring143051005876fa6cfc?position=7&retainUncommittedData=false&close=false&action=flush", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "c60c6db5-9ab5-4d6b-b5c5-90215ac386bb" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D778264C41904C", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:37 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "053c9d38-101f-004b-790f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:37 GMT", + "x-ms-client-request-id" : "c60c6db5-9ab5-4d6b-b5c5-90215ac386bb" }, "Exception" : null }, { @@ -25,8 +89,8 @@ "Uri" : "https://gaprahns.blob.core.windows.net?prefix=jtfspathsaspermissiontostring&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "e59ac04d-d765-4f7e-b902-970fce2da38f" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "1c7dda1c-3533-4188-9835-214e6bd54938" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -34,20 +98,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "b52104c0-701e-0097-76d3-902db3000000", - "Body" : "jtfspathsaspermissiontostringjtfspathsaspermissiontostring01987059cf107cf7434eFri, 01 Nov 2019 16:39:59 GMT\"0x8D75EEA22BBEDEB\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Fri, 01 Nov 2019 16:39:59 GMT", - "x-ms-client-request-id" : "e59ac04d-d765-4f7e-b902-970fce2da38f", + "x-ms-request-id" : "1d9a51dd-e01e-0092-410f-aad9cc000000", + "Body" : "jtfspathsaspermissiontostringjtfspathsaspermissiontostring072024d4173173a4c44aTue, 03 Dec 2019 19:23:37 GMT\"0x8D778264C2227F2\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Tue, 03 Dec 2019 19:23:37 GMT", + "x-ms-client-request-id" : "1c7dda1c-3533-4188-9835-214e6bd54938", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfspathsaspermissiontostring01987059cf107cf7434e?restype=container", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfspathsaspermissiontostring072024d4173173a4c44a?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "be4d7073-39c6-44b0-a519-e6edeebbf4f9" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "4eeca0a9-f07a-4f8f-b63b-7f367abb4f0d" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -55,11 +119,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "b52104e2-701e-0097-15d3-902db3000000", - "Date" : "Fri, 01 Nov 2019 16:39:59 GMT", - "x-ms-client-request-id" : "be4d7073-39c6-44b0-a519-e6edeebbf4f9" + "x-ms-request-id" : "1d9a51f5-e01e-0092-570f-aad9cc000000", + "Date" : "Tue, 03 Dec 2019 19:23:38 GMT", + "x-ms-client-request-id" : "4eeca0a9-f07a-4f8f-b63b-7f367abb4f0d" }, "Exception" : null } ], - "variables" : [ "jtfspathsaspermissiontostring01987059cf107cf7434e" ] + "variables" : [ "jtfspathsaspermissiontostring072024d4173173a4c44a", "javapathpathsaspermissiontostring143051005876fa6cfc" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestpathsaspermissiontostring[1].json b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestpathsaspermissiontostring[1].json index 1e0de213fd64..6ad0059bd447 100644 --- a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestpathsaspermissiontostring[1].json +++ b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestpathsaspermissiontostring[1].json @@ -1,23 +1,87 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfspathsaspermissiontostring0361931d6e1dfb4e6b4b?restype=container", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfspathsaspermissiontostring03589768f34951866a4d?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "c4736af9-8a30-4f12-9103-e47209e88cde" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "296daa4a-c287-4f06-8a61-d83c427e0453" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D75EEA22E0E1B2", - "Last-Modified" : "Fri, 01 Nov 2019 16:39:59 GMT", + "ETag" : "0x8D778264C5D1899", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:38 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "b52104f6-701e-0097-29d3-902db3000000", - "Date" : "Fri, 01 Nov 2019 16:39:59 GMT", - "x-ms-client-request-id" : "c4736af9-8a30-4f12-9103-e47209e88cde" + "x-ms-request-id" : "1d9a5216-e01e-0092-710f-aad9cc000000", + "Date" : "Tue, 03 Dec 2019 19:23:38 GMT", + "x-ms-client-request-id" : "296daa4a-c287-4f06-8a61-d83c427e0453" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfspathsaspermissiontostring03589768f34951866a4d/javapathpathsaspermissiontostring135218d0959f0c218c?resource=file", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "73c0fda5-af24-4baa-a4b6-5819330042f8" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D778264C7C63AD", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:38 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "053c9d51-101f-004b-120f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:38 GMT", + "x-ms-client-request-id" : "73c0fda5-af24-4baa-a4b6-5819330042f8" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfspathsaspermissiontostring03589768f34951866a4d/javapathpathsaspermissiontostring135218d0959f0c218c?position=0&action=append", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "ab0a23e5-9d44-422a-91c6-5ce2edb2cb17", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "053c9d63-101f-004b-240f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:38 GMT", + "x-ms-client-request-id" : "ab0a23e5-9d44-422a-91c6-5ce2edb2cb17" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfspathsaspermissiontostring03589768f34951866a4d/javapathpathsaspermissiontostring135218d0959f0c218c?position=7&retainUncommittedData=false&close=false&action=flush", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "0c8587fa-84e0-449c-a737-5ee25ace2fd8" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D778264C8D6FED", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:38 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "053c9d6c-101f-004b-2d0f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:38 GMT", + "x-ms-client-request-id" : "0c8587fa-84e0-449c-a737-5ee25ace2fd8" }, "Exception" : null }, { @@ -25,8 +89,8 @@ "Uri" : "https://gaprahns.blob.core.windows.net?prefix=jtfspathsaspermissiontostring&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "8f03d0e8-6465-4924-9780-36a68cfd42f0" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "f461480e-6864-45e6-b5ca-a84b651c37af" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -34,20 +98,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "b5210517-701e-0097-44d3-902db3000000", - "Body" : "jtfspathsaspermissiontostringjtfspathsaspermissiontostring0361931d6e1dfb4e6b4bFri, 01 Nov 2019 16:39:59 GMT\"0x8D75EEA22E0E1B2\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Fri, 01 Nov 2019 16:39:59 GMT", - "x-ms-client-request-id" : "8f03d0e8-6465-4924-9780-36a68cfd42f0", + "x-ms-request-id" : "1d9a5269-e01e-0092-390f-aad9cc000000", + "Body" : "jtfspathsaspermissiontostringjtfspathsaspermissiontostring03589768f34951866a4dTue, 03 Dec 2019 19:23:38 GMT\"0x8D778264C5D1899\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Tue, 03 Dec 2019 19:23:38 GMT", + "x-ms-client-request-id" : "f461480e-6864-45e6-b5ca-a84b651c37af", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfspathsaspermissiontostring0361931d6e1dfb4e6b4b?restype=container", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfspathsaspermissiontostring03589768f34951866a4d?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "e7e81de1-6982-42f2-ac2c-7cc2d56ce64c" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "33d8a681-4b9a-404e-be18-06e78667f634" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -55,11 +119,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "b5210528-701e-0097-55d3-902db3000000", - "Date" : "Fri, 01 Nov 2019 16:39:59 GMT", - "x-ms-client-request-id" : "e7e81de1-6982-42f2-ac2c-7cc2d56ce64c" + "x-ms-request-id" : "1d9a5274-e01e-0092-440f-aad9cc000000", + "Date" : "Tue, 03 Dec 2019 19:23:38 GMT", + "x-ms-client-request-id" : "33d8a681-4b9a-404e-be18-06e78667f634" }, "Exception" : null } ], - "variables" : [ "jtfspathsaspermissiontostring0361931d6e1dfb4e6b4b" ] + "variables" : [ "jtfspathsaspermissiontostring03589768f34951866a4d", "javapathpathsaspermissiontostring135218d0959f0c218c" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestpathsaspermissiontostring[2].json b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestpathsaspermissiontostring[2].json index 79d15f44136f..418c6d1ee66c 100644 --- a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestpathsaspermissiontostring[2].json +++ b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestpathsaspermissiontostring[2].json @@ -1,23 +1,87 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfspathsaspermissiontostring03475360eabfb015ce4d?restype=container", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfspathsaspermissiontostring036492992ee45eefbd40?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "cb6dbef8-4064-4137-83ed-588b53347494" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "9d1be064-deb2-4670-8223-f84e626de6a3" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D75EEA22FAAFE8", - "Last-Modified" : "Fri, 01 Nov 2019 16:39:59 GMT", + "ETag" : "0x8D778264CA79C6D", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:38 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "b5210547-701e-0097-73d3-902db3000000", - "Date" : "Fri, 01 Nov 2019 16:39:59 GMT", - "x-ms-client-request-id" : "cb6dbef8-4064-4137-83ed-588b53347494" + "x-ms-request-id" : "1d9a5285-e01e-0092-530f-aad9cc000000", + "Date" : "Tue, 03 Dec 2019 19:23:38 GMT", + "x-ms-client-request-id" : "9d1be064-deb2-4670-8223-f84e626de6a3" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfspathsaspermissiontostring036492992ee45eefbd40/javapathpathsaspermissiontostring106498069657eecdfb?resource=file", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "aabaa652-8185-4023-bd66-be58658362c0" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D778264CB1EE86", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:38 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "053c9d84-101f-004b-450f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:38 GMT", + "x-ms-client-request-id" : "aabaa652-8185-4023-bd66-be58658362c0" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfspathsaspermissiontostring036492992ee45eefbd40/javapathpathsaspermissiontostring106498069657eecdfb?position=0&action=append", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "3446db9f-e549-4568-9361-0c5c4f3c33fc", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "053c9d85-101f-004b-460f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:38 GMT", + "x-ms-client-request-id" : "3446db9f-e549-4568-9361-0c5c4f3c33fc" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfspathsaspermissiontostring036492992ee45eefbd40/javapathpathsaspermissiontostring106498069657eecdfb?position=7&retainUncommittedData=false&close=false&action=flush", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "b899671f-547e-4e27-8f08-1dc3ac672bdc" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D778264CC353FF", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:38 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "053c9d8b-101f-004b-4c0f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:38 GMT", + "x-ms-client-request-id" : "b899671f-547e-4e27-8f08-1dc3ac672bdc" }, "Exception" : null }, { @@ -25,8 +89,8 @@ "Uri" : "https://gaprahns.blob.core.windows.net?prefix=jtfspathsaspermissiontostring&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "aaa48a6b-a55d-4eee-9cee-406b0a1d8f46" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "49cc205e-e2d9-4017-88dc-674f6ff8cadb" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -34,20 +98,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "b521055f-701e-0097-08d3-902db3000000", - "Body" : "jtfspathsaspermissiontostringjtfspathsaspermissiontostring03475360eabfb015ce4dFri, 01 Nov 2019 16:39:59 GMT\"0x8D75EEA22FAAFE8\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Fri, 01 Nov 2019 16:39:59 GMT", - "x-ms-client-request-id" : "aaa48a6b-a55d-4eee-9cee-406b0a1d8f46", + "x-ms-request-id" : "1d9a52b9-e01e-0092-7d0f-aad9cc000000", + "Body" : "jtfspathsaspermissiontostringjtfspathsaspermissiontostring036492992ee45eefbd40Tue, 03 Dec 2019 19:23:38 GMT\"0x8D778264CA79C6D\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Tue, 03 Dec 2019 19:23:38 GMT", + "x-ms-client-request-id" : "49cc205e-e2d9-4017-88dc-674f6ff8cadb", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfspathsaspermissiontostring03475360eabfb015ce4d?restype=container", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfspathsaspermissiontostring036492992ee45eefbd40?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "406ae038-1fdf-401b-85b3-480ffdd49628" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "4f98f4c2-d30e-4505-b22e-91e3feb8eb88" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -55,11 +119,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "b5210577-701e-0097-1dd3-902db3000000", - "Date" : "Fri, 01 Nov 2019 16:39:59 GMT", - "x-ms-client-request-id" : "406ae038-1fdf-401b-85b3-480ffdd49628" + "x-ms-request-id" : "1d9a52c4-e01e-0092-070f-aad9cc000000", + "Date" : "Tue, 03 Dec 2019 19:23:38 GMT", + "x-ms-client-request-id" : "4f98f4c2-d30e-4505-b22e-91e3feb8eb88" }, "Exception" : null } ], - "variables" : [ "jtfspathsaspermissiontostring03475360eabfb015ce4d" ] + "variables" : [ "jtfspathsaspermissiontostring036492992ee45eefbd40", "javapathpathsaspermissiontostring106498069657eecdfb" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestpathsaspermissiontostring[3].json b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestpathsaspermissiontostring[3].json index 69d39e2eb5ae..18a05f0a2860 100644 --- a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestpathsaspermissiontostring[3].json +++ b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestpathsaspermissiontostring[3].json @@ -1,23 +1,87 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfspathsaspermissiontostring055360238572107a7146?restype=container", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfspathsaspermissiontostring06114432ab9681dffa4b?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "6a0cb3b3-ea04-43c0-833f-e3d30dfc0781" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "c149b481-fcd5-476f-8630-9c0b63a19fb6" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D75EEA2315DDF1", - "Last-Modified" : "Fri, 01 Nov 2019 16:40:00 GMT", + "ETag" : "0x8D778264CDCBFAE", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:38 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "b5210591-701e-0097-35d3-902db3000000", - "Date" : "Fri, 01 Nov 2019 16:39:59 GMT", - "x-ms-client-request-id" : "6a0cb3b3-ea04-43c0-833f-e3d30dfc0781" + "x-ms-request-id" : "1d9a52d6-e01e-0092-170f-aad9cc000000", + "Date" : "Tue, 03 Dec 2019 19:23:38 GMT", + "x-ms-client-request-id" : "c149b481-fcd5-476f-8630-9c0b63a19fb6" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfspathsaspermissiontostring06114432ab9681dffa4b/javapathpathsaspermissiontostring113553ce06e15a2912?resource=file", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "4c139e55-aed9-4ac6-ae93-f30357690d66" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D778264CEBD003", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:39 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "053c9da0-101f-004b-610f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:39 GMT", + "x-ms-client-request-id" : "4c139e55-aed9-4ac6-ae93-f30357690d66" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfspathsaspermissiontostring06114432ab9681dffa4b/javapathpathsaspermissiontostring113553ce06e15a2912?position=0&action=append", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "ae648e28-d60a-4e9a-a26f-fc7e7a4438f4", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "053c9da2-101f-004b-620f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:39 GMT", + "x-ms-client-request-id" : "ae648e28-d60a-4e9a-a26f-fc7e7a4438f4" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfspathsaspermissiontostring06114432ab9681dffa4b/javapathpathsaspermissiontostring113553ce06e15a2912?position=7&retainUncommittedData=false&close=false&action=flush", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "0cc882a2-3eee-44ff-904c-f45d0bbcecc9" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D778264D02B83F", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:39 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "053c9da5-101f-004b-650f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:39 GMT", + "x-ms-client-request-id" : "0cc882a2-3eee-44ff-904c-f45d0bbcecc9" }, "Exception" : null }, { @@ -25,8 +89,8 @@ "Uri" : "https://gaprahns.blob.core.windows.net?prefix=jtfspathsaspermissiontostring&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "45d1ccdc-eb4a-4c61-9d98-195ba3bb39cd" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "026d4900-38dc-46dc-a1c0-a8a3e5832248" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -34,20 +98,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "b52105ad-701e-0097-4bd3-902db3000000", - "Body" : "jtfspathsaspermissiontostringjtfspathsaspermissiontostring055360238572107a7146Fri, 01 Nov 2019 16:40:00 GMT\"0x8D75EEA2315DDF1\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Fri, 01 Nov 2019 16:39:59 GMT", - "x-ms-client-request-id" : "45d1ccdc-eb4a-4c61-9d98-195ba3bb39cd", + "x-ms-request-id" : "1d9a532f-e01e-0092-5f0f-aad9cc000000", + "Body" : "jtfspathsaspermissiontostringjtfspathsaspermissiontostring06114432ab9681dffa4bTue, 03 Dec 2019 19:23:38 GMT\"0x8D778264CDCBFAE\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Tue, 03 Dec 2019 19:23:39 GMT", + "x-ms-client-request-id" : "026d4900-38dc-46dc-a1c0-a8a3e5832248", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfspathsaspermissiontostring055360238572107a7146?restype=container", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfspathsaspermissiontostring06114432ab9681dffa4b?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "f03f8783-2d22-4057-b588-563628446c6d" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "e7fa64cb-e5f1-4d42-b6d0-ac3d1cbcf722" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -55,11 +119,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "b52105d0-701e-0097-6cd3-902db3000000", - "Date" : "Fri, 01 Nov 2019 16:39:59 GMT", - "x-ms-client-request-id" : "f03f8783-2d22-4057-b588-563628446c6d" + "x-ms-request-id" : "1d9a533c-e01e-0092-6a0f-aad9cc000000", + "Date" : "Tue, 03 Dec 2019 19:23:39 GMT", + "x-ms-client-request-id" : "e7fa64cb-e5f1-4d42-b6d0-ac3d1cbcf722" }, "Exception" : null } ], - "variables" : [ "jtfspathsaspermissiontostring055360238572107a7146" ] + "variables" : [ "jtfspathsaspermissiontostring06114432ab9681dffa4b", "javapathpathsaspermissiontostring113553ce06e15a2912" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestpathsaspermissiontostring[4].json b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestpathsaspermissiontostring[4].json index 0fadaaede814..3561cc6a9926 100644 --- a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestpathsaspermissiontostring[4].json +++ b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestpathsaspermissiontostring[4].json @@ -1,23 +1,87 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfspathsaspermissiontostring035129e2363e87c66445?restype=container", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfspathsaspermissiontostring087872e1afa4000a464d?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "9b9d3e59-1875-4ce8-bd74-7cecc704fc2e" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "5f748999-8900-49bb-b311-bf419fba2dca" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D75EEA232F36E2", - "Last-Modified" : "Fri, 01 Nov 2019 16:40:00 GMT", + "ETag" : "0x8D778264D1B5A81", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:39 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "b52105fe-701e-0097-16d3-902db3000000", - "Date" : "Fri, 01 Nov 2019 16:39:59 GMT", - "x-ms-client-request-id" : "9b9d3e59-1875-4ce8-bd74-7cecc704fc2e" + "x-ms-request-id" : "1d9a534c-e01e-0092-790f-aad9cc000000", + "Date" : "Tue, 03 Dec 2019 19:23:39 GMT", + "x-ms-client-request-id" : "5f748999-8900-49bb-b311-bf419fba2dca" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfspathsaspermissiontostring087872e1afa4000a464d/javapathpathsaspermissiontostring1673988a8dfd946a88?resource=file", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "b2e9a7a6-4d15-4f02-ae97-9d77207303e0" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D778264D283BCC", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:39 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "053c9db0-101f-004b-700f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:39 GMT", + "x-ms-client-request-id" : "b2e9a7a6-4d15-4f02-ae97-9d77207303e0" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfspathsaspermissiontostring087872e1afa4000a464d/javapathpathsaspermissiontostring1673988a8dfd946a88?position=0&action=append", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "5977e892-3f7e-4de3-987a-f61605e3ef23", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "053c9db1-101f-004b-710f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:39 GMT", + "x-ms-client-request-id" : "5977e892-3f7e-4de3-987a-f61605e3ef23" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfspathsaspermissiontostring087872e1afa4000a464d/javapathpathsaspermissiontostring1673988a8dfd946a88?position=7&retainUncommittedData=false&close=false&action=flush", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "17b7b50b-f017-4eb8-bf0b-eafade9fc0ee" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D778264D394F90", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:39 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "053c9db2-101f-004b-720f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:39 GMT", + "x-ms-client-request-id" : "17b7b50b-f017-4eb8-bf0b-eafade9fc0ee" }, "Exception" : null }, { @@ -25,8 +89,8 @@ "Uri" : "https://gaprahns.blob.core.windows.net?prefix=jtfspathsaspermissiontostring&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "1f2ec4f8-069e-44a5-a59f-40b5324ed4a8" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "871047f9-9a91-446e-824d-4cb75405a9ba" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -34,20 +98,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "b521061f-701e-0097-35d3-902db3000000", - "Body" : "jtfspathsaspermissiontostringjtfspathsaspermissiontostring035129e2363e87c66445Fri, 01 Nov 2019 16:40:00 GMT\"0x8D75EEA232F36E2\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Fri, 01 Nov 2019 16:39:59 GMT", - "x-ms-client-request-id" : "1f2ec4f8-069e-44a5-a59f-40b5324ed4a8", + "x-ms-request-id" : "1d9a53ac-e01e-0092-4b0f-aad9cc000000", + "Body" : "jtfspathsaspermissiontostringjtfspathsaspermissiontostring087872e1afa4000a464dTue, 03 Dec 2019 19:23:39 GMT\"0x8D778264D1B5A81\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Tue, 03 Dec 2019 19:23:39 GMT", + "x-ms-client-request-id" : "871047f9-9a91-446e-824d-4cb75405a9ba", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfspathsaspermissiontostring035129e2363e87c66445?restype=container", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfspathsaspermissiontostring087872e1afa4000a464d?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "af72e9cf-0823-4d04-a417-6f2cfd1008e7" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "6886a143-5fcd-4c1e-be21-ef948aa649ca" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -55,11 +119,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "b5210635-701e-0097-48d3-902db3000000", - "Date" : "Fri, 01 Nov 2019 16:39:59 GMT", - "x-ms-client-request-id" : "af72e9cf-0823-4d04-a417-6f2cfd1008e7" + "x-ms-request-id" : "1d9a53bf-e01e-0092-5c0f-aad9cc000000", + "Date" : "Tue, 03 Dec 2019 19:23:39 GMT", + "x-ms-client-request-id" : "6886a143-5fcd-4c1e-be21-ef948aa649ca" }, "Exception" : null } ], - "variables" : [ "jtfspathsaspermissiontostring035129e2363e87c66445" ] + "variables" : [ "jtfspathsaspermissiontostring087872e1afa4000a464d", "javapathpathsaspermissiontostring1673988a8dfd946a88" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestpathsaspermissiontostring[5].json b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestpathsaspermissiontostring[5].json index eac1eacdf30c..2f547e3cd002 100644 --- a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestpathsaspermissiontostring[5].json +++ b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestpathsaspermissiontostring[5].json @@ -1,23 +1,87 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfspathsaspermissiontostring063559c0c50fbee59b43?restype=container", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfspathsaspermissiontostring068712a1dcf3142fdc41?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "d8e4e24a-7974-4b72-b6a3-ee346448a17f" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "5c9bc1b3-a234-48d0-932f-e2b8ec18c9b3" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D75EEA23488FCE", - "Last-Modified" : "Fri, 01 Nov 2019 16:40:00 GMT", + "ETag" : "0x8D778264D51DD91", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:39 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "b5210653-701e-0097-61d3-902db3000000", - "Date" : "Fri, 01 Nov 2019 16:39:59 GMT", - "x-ms-client-request-id" : "d8e4e24a-7974-4b72-b6a3-ee346448a17f" + "x-ms-request-id" : "1d9a53cf-e01e-0092-6b0f-aad9cc000000", + "Date" : "Tue, 03 Dec 2019 19:23:39 GMT", + "x-ms-client-request-id" : "5c9bc1b3-a234-48d0-932f-e2b8ec18c9b3" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfspathsaspermissiontostring068712a1dcf3142fdc41/javapathpathsaspermissiontostring16625940ac20b6e368?resource=file", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "a028a993-d457-4e9f-ad6e-1390be6bfee5" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D778264D623775", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:39 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "053c9db3-101f-004b-730f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:39 GMT", + "x-ms-client-request-id" : "a028a993-d457-4e9f-ad6e-1390be6bfee5" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfspathsaspermissiontostring068712a1dcf3142fdc41/javapathpathsaspermissiontostring16625940ac20b6e368?position=0&action=append", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "3561c194-2268-43c5-8fb6-e8f85c8a38f2", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "053c9db4-101f-004b-740f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:39 GMT", + "x-ms-client-request-id" : "3561c194-2268-43c5-8fb6-e8f85c8a38f2" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfspathsaspermissiontostring068712a1dcf3142fdc41/javapathpathsaspermissiontostring16625940ac20b6e368?position=7&retainUncommittedData=false&close=false&action=flush", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "2e3ca330-07f2-4763-8fb4-d91f670792b8" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D778264D75652A", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:39 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "053c9db5-101f-004b-750f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:39 GMT", + "x-ms-client-request-id" : "2e3ca330-07f2-4763-8fb4-d91f670792b8" }, "Exception" : null }, { @@ -25,8 +89,8 @@ "Uri" : "https://gaprahns.blob.core.windows.net?prefix=jtfspathsaspermissiontostring&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "f1f24870-9327-484a-ab34-9e62ff2995aa" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "027ff9d5-7b36-4da6-970e-2379fe68d133" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -34,20 +98,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "b5210667-701e-0097-74d3-902db3000000", - "Body" : "jtfspathsaspermissiontostringjtfspathsaspermissiontostring063559c0c50fbee59b43Fri, 01 Nov 2019 16:40:00 GMT\"0x8D75EEA23488FCE\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Fri, 01 Nov 2019 16:39:59 GMT", - "x-ms-client-request-id" : "f1f24870-9327-484a-ab34-9e62ff2995aa", + "x-ms-request-id" : "1d9a542a-e01e-0092-3f0f-aad9cc000000", + "Body" : "jtfspathsaspermissiontostringjtfspathsaspermissiontostring068712a1dcf3142fdc41Tue, 03 Dec 2019 19:23:39 GMT\"0x8D778264D51DD91\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Tue, 03 Dec 2019 19:23:39 GMT", + "x-ms-client-request-id" : "027ff9d5-7b36-4da6-970e-2379fe68d133", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfspathsaspermissiontostring063559c0c50fbee59b43?restype=container", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfspathsaspermissiontostring068712a1dcf3142fdc41?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "e65367ca-9825-4a83-b1b7-babc34a3354f" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "98ee6e17-abc2-4704-908d-775aedcd573d" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -55,11 +119,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "b5210681-701e-0097-0dd3-902db3000000", - "Date" : "Fri, 01 Nov 2019 16:40:00 GMT", - "x-ms-client-request-id" : "e65367ca-9825-4a83-b1b7-babc34a3354f" + "x-ms-request-id" : "1d9a5442-e01e-0092-550f-aad9cc000000", + "Date" : "Tue, 03 Dec 2019 19:23:40 GMT", + "x-ms-client-request-id" : "98ee6e17-abc2-4704-908d-775aedcd573d" }, "Exception" : null } ], - "variables" : [ "jtfspathsaspermissiontostring063559c0c50fbee59b43" ] + "variables" : [ "jtfspathsaspermissiontostring068712a1dcf3142fdc41", "javapathpathsaspermissiontostring16625940ac20b6e368" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestsasimplutilstringtosign[0].json b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestsasimplutilstringtosign[0].json new file mode 100644 index 000000000000..09afc88c99d5 --- /dev/null +++ b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestsasimplutilstringtosign[0].json @@ -0,0 +1,129 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfssasimplutilstringtosign03901525986b39a0af44b?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.2.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "34f0151a-c992-48a3-ba23-bebfffc2d91e" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D77CDE822536FD", + "Last-Modified" : "Mon, 09 Dec 2019 19:32:20 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "a37b1e27-501e-00cf-2dc7-ae29c8000000", + "Date" : "Mon, 09 Dec 2019 19:32:20 GMT", + "x-ms-client-request-id" : "34f0151a-c992-48a3-ba23-bebfffc2d91e" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfssasimplutilstringtosign03901525986b39a0af44b/javapathsasimplutilstringtosign168874abc944fed5cf4?resource=file", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.7 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "a049e601-e0aa-4447-b788-d20949559862" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D77CDE8233318A", + "Last-Modified" : "Mon, 09 Dec 2019 19:32:20 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "1f177306-101f-002d-2ec7-aecdba000000", + "Date" : "Mon, 09 Dec 2019 19:32:19 GMT", + "x-ms-client-request-id" : "a049e601-e0aa-4447-b788-d20949559862" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfssasimplutilstringtosign03901525986b39a0af44b/javapathsasimplutilstringtosign168874abc944fed5cf4?position=0&action=append", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.7 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "838e5fd5-4eec-48a4-a228-aa44159dea95", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "1f177308-101f-002d-30c7-aecdba000000", + "Date" : "Mon, 09 Dec 2019 19:32:19 GMT", + "x-ms-client-request-id" : "838e5fd5-4eec-48a4-a228-aa44159dea95" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfssasimplutilstringtosign03901525986b39a0af44b/javapathsasimplutilstringtosign168874abc944fed5cf4?position=7&retainUncommittedData=false&close=false&action=flush", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.7 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "21e1ccfd-b6df-4f73-b9f3-84b3306f3a0c" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D77CDE824519BB", + "Last-Modified" : "Mon, 09 Dec 2019 19:32:20 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "1f177309-101f-002d-31c7-aecdba000000", + "Date" : "Mon, 09 Dec 2019 19:32:19 GMT", + "x-ms-client-request-id" : "21e1ccfd-b6df-4f73-b9f3-84b3306f3a0c" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://gaprahns.blob.core.windows.net?prefix=jtfssasimplutilstringtosign&comp=list", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.2.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "548c1803-ca96-4cc5-9c89-3808079e4363" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "a37b1e8e-501e-00cf-09c7-ae29c8000000", + "Body" : "jtfssasimplutilstringtosignjtfssasimplutilstringtosign03901525986b39a0af44bMon, 09 Dec 2019 19:32:20 GMT\"0x8D77CDE822536FD\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 09 Dec 2019 19:32:20 GMT", + "x-ms-client-request-id" : "548c1803-ca96-4cc5-9c89-3808079e4363", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfssasimplutilstringtosign03901525986b39a0af44b?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.2.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "aa3907d7-81d2-40b6-b9c9-d5306a4e58d0" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "a37b1ea6-501e-00cf-1ec7-ae29c8000000", + "Date" : "Mon, 09 Dec 2019 19:32:20 GMT", + "x-ms-client-request-id" : "aa3907d7-81d2-40b6-b9c9-d5306a4e58d0" + }, + "Exception" : null + } ], + "variables" : [ "jtfssasimplutilstringtosign03901525986b39a0af44b", "javapathsasimplutilstringtosign168874abc944fed5cf4" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestsasimplutilstringtosign[1].json b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestsasimplutilstringtosign[1].json new file mode 100644 index 000000000000..b428f34a9f76 --- /dev/null +++ b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestsasimplutilstringtosign[1].json @@ -0,0 +1,129 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfssasimplutilstringtosign089305a1e33256578c480?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.2.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "15eddd35-9f62-4bf3-81a0-a778c839697c" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D77CDE825F0C00", + "Last-Modified" : "Mon, 09 Dec 2019 19:32:20 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "a37b1ec8-501e-00cf-3dc7-ae29c8000000", + "Date" : "Mon, 09 Dec 2019 19:32:20 GMT", + "x-ms-client-request-id" : "15eddd35-9f62-4bf3-81a0-a778c839697c" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfssasimplutilstringtosign089305a1e33256578c480/javapathsasimplutilstringtosign1430413ec9fa3145b14?resource=file", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.7 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "02ab74ac-bbac-438b-b7d6-f37b12ceada1" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D77CDE826B3EEE", + "Last-Modified" : "Mon, 09 Dec 2019 19:32:20 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "1f17730b-101f-002d-33c7-aecdba000000", + "Date" : "Mon, 09 Dec 2019 19:32:19 GMT", + "x-ms-client-request-id" : "02ab74ac-bbac-438b-b7d6-f37b12ceada1" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfssasimplutilstringtosign089305a1e33256578c480/javapathsasimplutilstringtosign1430413ec9fa3145b14?position=0&action=append", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.7 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "51a89301-3e91-45a7-8ed0-6d8e3979feaf", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "1f17730c-101f-002d-34c7-aecdba000000", + "Date" : "Mon, 09 Dec 2019 19:32:19 GMT", + "x-ms-client-request-id" : "51a89301-3e91-45a7-8ed0-6d8e3979feaf" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfssasimplutilstringtosign089305a1e33256578c480/javapathsasimplutilstringtosign1430413ec9fa3145b14?position=7&retainUncommittedData=false&close=false&action=flush", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.7 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "3e397118-e813-4f16-9430-de0d77f1de3c" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D77CDE827C6148", + "Last-Modified" : "Mon, 09 Dec 2019 19:32:20 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "1f17730d-101f-002d-35c7-aecdba000000", + "Date" : "Mon, 09 Dec 2019 19:32:20 GMT", + "x-ms-client-request-id" : "3e397118-e813-4f16-9430-de0d77f1de3c" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://gaprahns.blob.core.windows.net?prefix=jtfssasimplutilstringtosign&comp=list", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.2.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "c16d2141-3554-402e-9ee2-4254a1f06d4f" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "a37b1f43-501e-00cf-2bc7-ae29c8000000", + "Body" : "jtfssasimplutilstringtosignjtfssasimplutilstringtosign089305a1e33256578c480Mon, 09 Dec 2019 19:32:20 GMT\"0x8D77CDE825F0C00\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 09 Dec 2019 19:32:20 GMT", + "x-ms-client-request-id" : "c16d2141-3554-402e-9ee2-4254a1f06d4f", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfssasimplutilstringtosign089305a1e33256578c480?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.2.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "9cdf7a19-b7f8-4023-8542-b3cbb5872728" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "a37b1f6c-501e-00cf-50c7-ae29c8000000", + "Date" : "Mon, 09 Dec 2019 19:32:20 GMT", + "x-ms-client-request-id" : "9cdf7a19-b7f8-4023-8542-b3cbb5872728" + }, + "Exception" : null + } ], + "variables" : [ "jtfssasimplutilstringtosign089305a1e33256578c480", "javapathsasimplutilstringtosign1430413ec9fa3145b14" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestsasimplutilstringtosign[2].json b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestsasimplutilstringtosign[2].json new file mode 100644 index 000000000000..c240b0fd28ea --- /dev/null +++ b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestsasimplutilstringtosign[2].json @@ -0,0 +1,129 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfssasimplutilstringtosign052543e74e75c0f317474?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.2.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "352ff7f9-5e61-476e-b6c5-0ca3161d7f84" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D77CDE8296E53C", + "Last-Modified" : "Mon, 09 Dec 2019 19:32:21 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "a37b1f95-501e-00cf-70c7-ae29c8000000", + "Date" : "Mon, 09 Dec 2019 19:32:20 GMT", + "x-ms-client-request-id" : "352ff7f9-5e61-476e-b6c5-0ca3161d7f84" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfssasimplutilstringtosign052543e74e75c0f317474/javapathsasimplutilstringtosign1752872740f7656f044?resource=file", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.7 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "cf6a95bd-9b96-43b7-a46c-0969ffa10d62" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D77CDE82A238C1", + "Last-Modified" : "Mon, 09 Dec 2019 19:32:21 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "1f17730e-101f-002d-36c7-aecdba000000", + "Date" : "Mon, 09 Dec 2019 19:32:20 GMT", + "x-ms-client-request-id" : "cf6a95bd-9b96-43b7-a46c-0969ffa10d62" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfssasimplutilstringtosign052543e74e75c0f317474/javapathsasimplutilstringtosign1752872740f7656f044?position=0&action=append", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.7 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "9b02a196-41ae-4eb5-86e8-7ea9db4d2115", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "1f17730f-101f-002d-37c7-aecdba000000", + "Date" : "Mon, 09 Dec 2019 19:32:20 GMT", + "x-ms-client-request-id" : "9b02a196-41ae-4eb5-86e8-7ea9db4d2115" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfssasimplutilstringtosign052543e74e75c0f317474/javapathsasimplutilstringtosign1752872740f7656f044?position=7&retainUncommittedData=false&close=false&action=flush", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.7 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "ce6a1203-e158-48d2-b394-e7cd86653097" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D77CDE82BE7131", + "Last-Modified" : "Mon, 09 Dec 2019 19:32:21 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "1f177310-101f-002d-38c7-aecdba000000", + "Date" : "Mon, 09 Dec 2019 19:32:20 GMT", + "x-ms-client-request-id" : "ce6a1203-e158-48d2-b394-e7cd86653097" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://gaprahns.blob.core.windows.net?prefix=jtfssasimplutilstringtosign&comp=list", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.2.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "f0f64c82-9731-402e-b7b6-5dbc73c55991" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "a37b2033-501e-00cf-7cc7-ae29c8000000", + "Body" : "jtfssasimplutilstringtosignjtfssasimplutilstringtosign052543e74e75c0f317474Mon, 09 Dec 2019 19:32:21 GMT\"0x8D77CDE8296E53C\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 09 Dec 2019 19:32:21 GMT", + "x-ms-client-request-id" : "f0f64c82-9731-402e-b7b6-5dbc73c55991", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfssasimplutilstringtosign052543e74e75c0f317474?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.2.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "835f726b-2ed5-46ea-a878-a65949289ef0" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "a37b204f-501e-00cf-16c7-ae29c8000000", + "Date" : "Mon, 09 Dec 2019 19:32:21 GMT", + "x-ms-client-request-id" : "835f726b-2ed5-46ea-a878-a65949289ef0" + }, + "Exception" : null + } ], + "variables" : [ "jtfssasimplutilstringtosign052543e74e75c0f317474", "javapathsasimplutilstringtosign1752872740f7656f044" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestsasimplutilstringtosign[3].json b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestsasimplutilstringtosign[3].json new file mode 100644 index 000000000000..493476e57a14 --- /dev/null +++ b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestsasimplutilstringtosign[3].json @@ -0,0 +1,129 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfssasimplutilstringtosign043671371172ec31524f7?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.2.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "45b099c3-3d84-46fe-be4d-dd6b31d6297b" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D77CDE82D7983E", + "Last-Modified" : "Mon, 09 Dec 2019 19:32:21 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "a37b206d-501e-00cf-32c7-ae29c8000000", + "Date" : "Mon, 09 Dec 2019 19:32:21 GMT", + "x-ms-client-request-id" : "45b099c3-3d84-46fe-be4d-dd6b31d6297b" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfssasimplutilstringtosign043671371172ec31524f7/javapathsasimplutilstringtosign1509771e15a747496a4?resource=file", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.7 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "70be16eb-b773-4ba1-8dd1-4aafcfd578c7" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D77CDE82E1B66F", + "Last-Modified" : "Mon, 09 Dec 2019 19:32:21 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "1f177311-101f-002d-39c7-aecdba000000", + "Date" : "Mon, 09 Dec 2019 19:32:20 GMT", + "x-ms-client-request-id" : "70be16eb-b773-4ba1-8dd1-4aafcfd578c7" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfssasimplutilstringtosign043671371172ec31524f7/javapathsasimplutilstringtosign1509771e15a747496a4?position=0&action=append", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.7 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "59f9424e-e396-4e0e-a74c-8d2b04aaffa7", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "1f177312-101f-002d-3ac7-aecdba000000", + "Date" : "Mon, 09 Dec 2019 19:32:20 GMT", + "x-ms-client-request-id" : "59f9424e-e396-4e0e-a74c-8d2b04aaffa7" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfssasimplutilstringtosign043671371172ec31524f7/javapathsasimplutilstringtosign1509771e15a747496a4?position=7&retainUncommittedData=false&close=false&action=flush", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.7 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "08f57dfb-4184-4197-a6f5-e263d2dcef62" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D77CDE82F224B4", + "Last-Modified" : "Mon, 09 Dec 2019 19:32:21 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "1f177313-101f-002d-3bc7-aecdba000000", + "Date" : "Mon, 09 Dec 2019 19:32:20 GMT", + "x-ms-client-request-id" : "08f57dfb-4184-4197-a6f5-e263d2dcef62" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://gaprahns.blob.core.windows.net?prefix=jtfssasimplutilstringtosign&comp=list", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.2.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "d3b28beb-57a0-4828-98f3-8f6f455bf14c" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "a37b20ef-501e-00cf-22c7-ae29c8000000", + "Body" : "jtfssasimplutilstringtosignjtfssasimplutilstringtosign043671371172ec31524f7Mon, 09 Dec 2019 19:32:21 GMT\"0x8D77CDE82D7983E\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 09 Dec 2019 19:32:21 GMT", + "x-ms-client-request-id" : "d3b28beb-57a0-4828-98f3-8f6f455bf14c", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfssasimplutilstringtosign043671371172ec31524f7?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.2.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "5dd75a40-5d79-4e76-9fee-8f8bc211b725" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "a37b20f7-501e-00cf-29c7-ae29c8000000", + "Date" : "Mon, 09 Dec 2019 19:32:21 GMT", + "x-ms-client-request-id" : "5dd75a40-5d79-4e76-9fee-8f8bc211b725" + }, + "Exception" : null + } ], + "variables" : [ "jtfssasimplutilstringtosign043671371172ec31524f7", "javapathsasimplutilstringtosign1509771e15a747496a4" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestsasimplutilstringtosign[4].json b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestsasimplutilstringtosign[4].json new file mode 100644 index 000000000000..97dc1d192731 --- /dev/null +++ b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestsasimplutilstringtosign[4].json @@ -0,0 +1,129 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfssasimplutilstringtosign072433be7d54a7005740d?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.2.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "c73a6ff7-313d-441a-b2bf-19d12b8dbfdb" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D77CDE830A4171", + "Last-Modified" : "Mon, 09 Dec 2019 19:32:21 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "a37b2119-501e-00cf-48c7-ae29c8000000", + "Date" : "Mon, 09 Dec 2019 19:32:21 GMT", + "x-ms-client-request-id" : "c73a6ff7-313d-441a-b2bf-19d12b8dbfdb" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfssasimplutilstringtosign072433be7d54a7005740d/javapathsasimplutilstringtosign166485a062902e2ba04?resource=file", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.7 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "87a6d2c7-0acd-464b-be62-d38311e6bbd6" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D77CDE831440F6", + "Last-Modified" : "Mon, 09 Dec 2019 19:32:21 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "1f177314-101f-002d-3cc7-aecdba000000", + "Date" : "Mon, 09 Dec 2019 19:32:21 GMT", + "x-ms-client-request-id" : "87a6d2c7-0acd-464b-be62-d38311e6bbd6" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfssasimplutilstringtosign072433be7d54a7005740d/javapathsasimplutilstringtosign166485a062902e2ba04?position=0&action=append", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.7 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "c5733ff6-2c8b-42b6-98da-30a6ef1b8596", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "1f177315-101f-002d-3dc7-aecdba000000", + "Date" : "Mon, 09 Dec 2019 19:32:21 GMT", + "x-ms-client-request-id" : "c5733ff6-2c8b-42b6-98da-30a6ef1b8596" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfssasimplutilstringtosign072433be7d54a7005740d/javapathsasimplutilstringtosign166485a062902e2ba04?position=7&retainUncommittedData=false&close=false&action=flush", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.7 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "64ead3fa-be3d-45cf-ae03-7cde7e8a0423" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D77CDE8325485D", + "Last-Modified" : "Mon, 09 Dec 2019 19:32:22 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "1f177316-101f-002d-3ec7-aecdba000000", + "Date" : "Mon, 09 Dec 2019 19:32:21 GMT", + "x-ms-client-request-id" : "64ead3fa-be3d-45cf-ae03-7cde7e8a0423" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://gaprahns.blob.core.windows.net?prefix=jtfssasimplutilstringtosign&comp=list", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.2.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "cb7fb9c4-bf94-4f97-9dd9-352215c1db83" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "a37b217c-501e-00cf-1fc7-ae29c8000000", + "Body" : "jtfssasimplutilstringtosignjtfssasimplutilstringtosign072433be7d54a7005740dMon, 09 Dec 2019 19:32:21 GMT\"0x8D77CDE830A4171\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 09 Dec 2019 19:32:21 GMT", + "x-ms-client-request-id" : "cb7fb9c4-bf94-4f97-9dd9-352215c1db83", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfssasimplutilstringtosign072433be7d54a7005740d?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.2.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "eb1919d2-420b-4f8a-9a87-88977f1649fc" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "a37b218b-501e-00cf-2cc7-ae29c8000000", + "Date" : "Mon, 09 Dec 2019 19:32:21 GMT", + "x-ms-client-request-id" : "eb1919d2-420b-4f8a-9a87-88977f1649fc" + }, + "Exception" : null + } ], + "variables" : [ "jtfssasimplutilstringtosign072433be7d54a7005740d", "javapathsasimplutilstringtosign166485a062902e2ba04" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestsasimplutilstringtosign[5].json b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestsasimplutilstringtosign[5].json new file mode 100644 index 000000000000..20179789bc4e --- /dev/null +++ b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestsasimplutilstringtosign[5].json @@ -0,0 +1,129 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfssasimplutilstringtosign037421ac16d4d3abc346f?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.2.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "4da1ba8e-ac37-4247-ac65-23e743f95a7d" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D77CDE8341A58B", + "Last-Modified" : "Mon, 09 Dec 2019 19:32:22 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "a37b21c2-501e-00cf-60c7-ae29c8000000", + "Date" : "Mon, 09 Dec 2019 19:32:21 GMT", + "x-ms-client-request-id" : "4da1ba8e-ac37-4247-ac65-23e743f95a7d" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfssasimplutilstringtosign037421ac16d4d3abc346f/javapathsasimplutilstringtosign198951d48a4197d3c54?resource=file", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.7 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "4dbbc105-2aeb-4cbe-a768-8f11aac636ca" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D77CDE834DB666", + "Last-Modified" : "Mon, 09 Dec 2019 19:32:22 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "1f177317-101f-002d-3fc7-aecdba000000", + "Date" : "Mon, 09 Dec 2019 19:32:21 GMT", + "x-ms-client-request-id" : "4dbbc105-2aeb-4cbe-a768-8f11aac636ca" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfssasimplutilstringtosign037421ac16d4d3abc346f/javapathsasimplutilstringtosign198951d48a4197d3c54?position=0&action=append", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.7 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "a0306b7e-a1eb-4a4d-9e18-d88885161c0d", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "1f177318-101f-002d-40c7-aecdba000000", + "Date" : "Mon, 09 Dec 2019 19:32:21 GMT", + "x-ms-client-request-id" : "a0306b7e-a1eb-4a4d-9e18-d88885161c0d" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfssasimplutilstringtosign037421ac16d4d3abc346f/javapathsasimplutilstringtosign198951d48a4197d3c54?position=7&retainUncommittedData=false&close=false&action=flush", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.7 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "8d577425-f2f1-4ccd-84ed-26f08f46cb74" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D77CDE835EC2F7", + "Last-Modified" : "Mon, 09 Dec 2019 19:32:22 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "1f177319-101f-002d-41c7-aecdba000000", + "Date" : "Mon, 09 Dec 2019 19:32:21 GMT", + "x-ms-client-request-id" : "8d577425-f2f1-4ccd-84ed-26f08f46cb74" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://gaprahns.blob.core.windows.net?prefix=jtfssasimplutilstringtosign&comp=list", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.2.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "ea9407e3-3a42-4fed-8d6d-ac3d107c8f1b" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "a37b2249-501e-00cf-57c7-ae29c8000000", + "Body" : "jtfssasimplutilstringtosignjtfssasimplutilstringtosign037421ac16d4d3abc346fMon, 09 Dec 2019 19:32:22 GMT\"0x8D77CDE8341A58B\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 09 Dec 2019 19:32:22 GMT", + "x-ms-client-request-id" : "ea9407e3-3a42-4fed-8d6d-ac3d107c8f1b", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfssasimplutilstringtosign037421ac16d4d3abc346f?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.2.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "39ddb409-e28d-41f3-b0a3-c22cde04da27" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "a37b225d-501e-00cf-68c7-ae29c8000000", + "Date" : "Mon, 09 Dec 2019 19:32:22 GMT", + "x-ms-client-request-id" : "39ddb409-e28d-41f3-b0a3-c22cde04da27" + }, + "Exception" : null + } ], + "variables" : [ "jtfssasimplutilstringtosign037421ac16d4d3abc346f", "javapathsasimplutilstringtosign198951d48a4197d3c54" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestsasimplutilstringtosign[6].json b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestsasimplutilstringtosign[6].json new file mode 100644 index 000000000000..a22aec991616 --- /dev/null +++ b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestsasimplutilstringtosign[6].json @@ -0,0 +1,129 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfssasimplutilstringtosign0678856616265b8642451?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.2.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "22867a0e-f581-486f-ab89-bcd8caa8582e" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D77CDE837B2C74", + "Last-Modified" : "Mon, 09 Dec 2019 19:32:22 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "a37b228c-501e-00cf-0fc7-ae29c8000000", + "Date" : "Mon, 09 Dec 2019 19:32:22 GMT", + "x-ms-client-request-id" : "22867a0e-f581-486f-ab89-bcd8caa8582e" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfssasimplutilstringtosign0678856616265b8642451/javapathsasimplutilstringtosign168162b5fb9530acfa4?resource=file", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.7 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "a5ff3b70-81f0-4cfa-9ef8-f5ad973fab02" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D77CDE83913641", + "Last-Modified" : "Mon, 09 Dec 2019 19:32:22 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "1f17731a-101f-002d-42c7-aecdba000000", + "Date" : "Mon, 09 Dec 2019 19:32:21 GMT", + "x-ms-client-request-id" : "a5ff3b70-81f0-4cfa-9ef8-f5ad973fab02" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfssasimplutilstringtosign0678856616265b8642451/javapathsasimplutilstringtosign168162b5fb9530acfa4?position=0&action=append", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.7 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "b01228c4-c7ca-4735-a00f-6aa40bef19b5", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "1f17731b-101f-002d-43c7-aecdba000000", + "Date" : "Mon, 09 Dec 2019 19:32:21 GMT", + "x-ms-client-request-id" : "b01228c4-c7ca-4735-a00f-6aa40bef19b5" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfssasimplutilstringtosign0678856616265b8642451/javapathsasimplutilstringtosign168162b5fb9530acfa4?position=7&retainUncommittedData=false&close=false&action=flush", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.7 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "1f3dbe5e-7f12-4b29-8fb8-0a7537b547dc" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D77CDE83A6BB4A", + "Last-Modified" : "Mon, 09 Dec 2019 19:32:22 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "1f17731c-101f-002d-44c7-aecdba000000", + "Date" : "Mon, 09 Dec 2019 19:32:21 GMT", + "x-ms-client-request-id" : "1f3dbe5e-7f12-4b29-8fb8-0a7537b547dc" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://gaprahns.blob.core.windows.net?prefix=jtfssasimplutilstringtosign&comp=list", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.2.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "f53e15f7-948c-4130-886b-3cf225e7d974" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "a37b2344-501e-00cf-2fc7-ae29c8000000", + "Body" : "jtfssasimplutilstringtosignjtfssasimplutilstringtosign0678856616265b8642451Mon, 09 Dec 2019 19:32:22 GMT\"0x8D77CDE837B2C74\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 09 Dec 2019 19:32:22 GMT", + "x-ms-client-request-id" : "f53e15f7-948c-4130-886b-3cf225e7d974", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfssasimplutilstringtosign0678856616265b8642451?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.2.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "7a85d4fe-6073-421e-aa38-ab0cbfcbcb03" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "a37b2366-501e-00cf-4ec7-ae29c8000000", + "Date" : "Mon, 09 Dec 2019 19:32:22 GMT", + "x-ms-client-request-id" : "7a85d4fe-6073-421e-aa38-ab0cbfcbcb03" + }, + "Exception" : null + } ], + "variables" : [ "jtfssasimplutilstringtosign0678856616265b8642451", "javapathsasimplutilstringtosign168162b5fb9530acfa4" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestsasimplutilstringtosign[7].json b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestsasimplutilstringtosign[7].json new file mode 100644 index 000000000000..eef3f9157284 --- /dev/null +++ b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestsasimplutilstringtosign[7].json @@ -0,0 +1,129 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfssasimplutilstringtosign08755261d7e298aceb45f?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.2.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "ca9d59b6-9249-41b9-aed8-08a33bd90d99" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D77CDE83C136C5", + "Last-Modified" : "Mon, 09 Dec 2019 19:32:23 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "a37b23a9-501e-00cf-09c7-ae29c8000000", + "Date" : "Mon, 09 Dec 2019 19:32:22 GMT", + "x-ms-client-request-id" : "ca9d59b6-9249-41b9-aed8-08a33bd90d99" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfssasimplutilstringtosign08755261d7e298aceb45f/javapathsasimplutilstringtosign1108600b6747f8944f4?resource=file", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.7 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "cc970f4c-e49b-45b1-bf93-757d108fc096" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D77CDE83D2D37C", + "Last-Modified" : "Mon, 09 Dec 2019 19:32:23 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "1f17731d-101f-002d-45c7-aecdba000000", + "Date" : "Mon, 09 Dec 2019 19:32:22 GMT", + "x-ms-client-request-id" : "cc970f4c-e49b-45b1-bf93-757d108fc096" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfssasimplutilstringtosign08755261d7e298aceb45f/javapathsasimplutilstringtosign1108600b6747f8944f4?position=0&action=append", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.7 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "fc72156c-7585-471d-a04a-7ba76a20e492", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "1f17731e-101f-002d-46c7-aecdba000000", + "Date" : "Mon, 09 Dec 2019 19:32:22 GMT", + "x-ms-client-request-id" : "fc72156c-7585-471d-a04a-7ba76a20e492" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfssasimplutilstringtosign08755261d7e298aceb45f/javapathsasimplutilstringtosign1108600b6747f8944f4?position=7&retainUncommittedData=false&close=false&action=flush", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.7 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "d1d5b757-672d-46db-88b0-0290382e4312" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D77CDE83E85BA1", + "Last-Modified" : "Mon, 09 Dec 2019 19:32:23 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "1f17731f-101f-002d-47c7-aecdba000000", + "Date" : "Mon, 09 Dec 2019 19:32:22 GMT", + "x-ms-client-request-id" : "d1d5b757-672d-46db-88b0-0290382e4312" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://gaprahns.blob.core.windows.net?prefix=jtfssasimplutilstringtosign&comp=list", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.2.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "eed2160c-d6b3-45ce-bf70-7e91c32220df" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "a37b2464-501e-00cf-31c7-ae29c8000000", + "Body" : "jtfssasimplutilstringtosignjtfssasimplutilstringtosign08755261d7e298aceb45fMon, 09 Dec 2019 19:32:23 GMT\"0x8D77CDE83C136C5\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 09 Dec 2019 19:32:23 GMT", + "x-ms-client-request-id" : "eed2160c-d6b3-45ce-bf70-7e91c32220df", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfssasimplutilstringtosign08755261d7e298aceb45f?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.2.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "dc0a364a-e9f5-4621-b4d7-ada53ec9f87c" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "a37b2482-501e-00cf-4ec7-ae29c8000000", + "Date" : "Mon, 09 Dec 2019 19:32:23 GMT", + "x-ms-client-request-id" : "dc0a364a-e9f5-4621-b4d7-ada53ec9f87c" + }, + "Exception" : null + } ], + "variables" : [ "jtfssasimplutilstringtosign08755261d7e298aceb45f", "javapathsasimplutilstringtosign1108600b6747f8944f4" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestsasimplutilstringtosign[8].json b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestsasimplutilstringtosign[8].json new file mode 100644 index 000000000000..f1c8ee15e86e --- /dev/null +++ b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestsasimplutilstringtosign[8].json @@ -0,0 +1,129 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfssasimplutilstringtosign026069e014eb0ec8804d7?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.2.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "8db4ee9f-5a9d-402b-b6d5-71890cda7eb5" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D77CDE840014F5", + "Last-Modified" : "Mon, 09 Dec 2019 19:32:23 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "a37b24a2-501e-00cf-6dc7-ae29c8000000", + "Date" : "Mon, 09 Dec 2019 19:32:23 GMT", + "x-ms-client-request-id" : "8db4ee9f-5a9d-402b-b6d5-71890cda7eb5" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfssasimplutilstringtosign026069e014eb0ec8804d7/javapathsasimplutilstringtosign140888ff77858054a84?resource=file", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.7 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "b03d858d-34dc-4e4c-aa84-372551917946" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D77CDE8409FC51", + "Last-Modified" : "Mon, 09 Dec 2019 19:32:23 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "1f177320-101f-002d-48c7-aecdba000000", + "Date" : "Mon, 09 Dec 2019 19:32:22 GMT", + "x-ms-client-request-id" : "b03d858d-34dc-4e4c-aa84-372551917946" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfssasimplutilstringtosign026069e014eb0ec8804d7/javapathsasimplutilstringtosign140888ff77858054a84?position=0&action=append", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.7 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "6fde1be1-eabb-4de8-8336-7b940568492c", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "1f177321-101f-002d-49c7-aecdba000000", + "Date" : "Mon, 09 Dec 2019 19:32:22 GMT", + "x-ms-client-request-id" : "6fde1be1-eabb-4de8-8336-7b940568492c" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfssasimplutilstringtosign026069e014eb0ec8804d7/javapathsasimplutilstringtosign140888ff77858054a84?position=7&retainUncommittedData=false&close=false&action=flush", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.7 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "eb1c595a-92fe-413b-90e9-5041d3ba22e6" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D77CDE841BF26D", + "Last-Modified" : "Mon, 09 Dec 2019 19:32:23 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "1f177322-101f-002d-4ac7-aecdba000000", + "Date" : "Mon, 09 Dec 2019 19:32:22 GMT", + "x-ms-client-request-id" : "eb1c595a-92fe-413b-90e9-5041d3ba22e6" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://gaprahns.blob.core.windows.net?prefix=jtfssasimplutilstringtosign&comp=list", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.2.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "8dd233d4-9805-4369-8090-8a6d5e235282" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "a37b2528-501e-00cf-63c7-ae29c8000000", + "Body" : "jtfssasimplutilstringtosignjtfssasimplutilstringtosign026069e014eb0ec8804d7Mon, 09 Dec 2019 19:32:23 GMT\"0x8D77CDE840014F5\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 09 Dec 2019 19:32:23 GMT", + "x-ms-client-request-id" : "8dd233d4-9805-4369-8090-8a6d5e235282", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfssasimplutilstringtosign026069e014eb0ec8804d7?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.2.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "a5ed1ed7-1cd1-4dd3-b4f0-b7e11c3770f3" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "a37b253d-501e-00cf-75c7-ae29c8000000", + "Date" : "Mon, 09 Dec 2019 19:32:23 GMT", + "x-ms-client-request-id" : "a5ed1ed7-1cd1-4dd3-b4f0-b7e11c3770f3" + }, + "Exception" : null + } ], + "variables" : [ "jtfssasimplutilstringtosign026069e014eb0ec8804d7", "javapathsasimplutilstringtosign140888ff77858054a84" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestsasimplutilstringtosignuserdelegationkey[0].json b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestsasimplutilstringtosignuserdelegationkey[0].json new file mode 100644 index 000000000000..cb43185fc8ae --- /dev/null +++ b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestsasimplutilstringtosignuserdelegationkey[0].json @@ -0,0 +1,129 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfssasimplutilstringtosignuserdelegationkey027666b7ad61?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.2.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "65289160-af12-4a7b-80f3-eb9a889ecc56" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D77CDE843E2FAD", + "Last-Modified" : "Mon, 09 Dec 2019 19:32:23 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "a37b2575-501e-00cf-29c7-ae29c8000000", + "Date" : "Mon, 09 Dec 2019 19:32:23 GMT", + "x-ms-client-request-id" : "65289160-af12-4a7b-80f3-eb9a889ecc56" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfssasimplutilstringtosignuserdelegationkey027666b7ad61/javapathsasimplutilstringtosignuserdelegationkey100112ca91?resource=file", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.7 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "f96ab73b-c3c5-4fe4-bdb1-b2c7ce7bb5df" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D77CDE844835CC", + "Last-Modified" : "Mon, 09 Dec 2019 19:32:24 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "1f177323-101f-002d-4bc7-aecdba000000", + "Date" : "Mon, 09 Dec 2019 19:32:23 GMT", + "x-ms-client-request-id" : "f96ab73b-c3c5-4fe4-bdb1-b2c7ce7bb5df" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfssasimplutilstringtosignuserdelegationkey027666b7ad61/javapathsasimplutilstringtosignuserdelegationkey100112ca91?position=0&action=append", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.7 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "8d932526-a687-40b5-8de6-bf8d0f56bdab", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "1f177324-101f-002d-4cc7-aecdba000000", + "Date" : "Mon, 09 Dec 2019 19:32:23 GMT", + "x-ms-client-request-id" : "8d932526-a687-40b5-8de6-bf8d0f56bdab" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfssasimplutilstringtosignuserdelegationkey027666b7ad61/javapathsasimplutilstringtosignuserdelegationkey100112ca91?position=7&retainUncommittedData=false&close=false&action=flush", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.7 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "d157aa28-eaac-40f9-81a5-073f30e2e47e" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D77CDE845C8438", + "Last-Modified" : "Mon, 09 Dec 2019 19:32:24 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "1f177325-101f-002d-4dc7-aecdba000000", + "Date" : "Mon, 09 Dec 2019 19:32:23 GMT", + "x-ms-client-request-id" : "d157aa28-eaac-40f9-81a5-073f30e2e47e" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://gaprahns.blob.core.windows.net?prefix=jtfssasimplutilstringtosignuserdelegationkey&comp=list", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.2.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "a9201de3-dfc7-4b0f-add4-9aa9b6a18899" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "a37b2605-501e-00cf-2ac7-ae29c8000000", + "Body" : "jtfssasimplutilstringtosignuserdelegationkeyjtfssasimplutilstringtosignuserdelegationkey027666b7ad61Mon, 09 Dec 2019 19:32:23 GMT\"0x8D77CDE843E2FAD\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 09 Dec 2019 19:32:23 GMT", + "x-ms-client-request-id" : "a9201de3-dfc7-4b0f-add4-9aa9b6a18899", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfssasimplutilstringtosignuserdelegationkey027666b7ad61?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.2.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "6762e64f-5630-40ad-8a0e-3faeff7d7134" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "a37b262a-501e-00cf-4cc7-ae29c8000000", + "Date" : "Mon, 09 Dec 2019 19:32:23 GMT", + "x-ms-client-request-id" : "6762e64f-5630-40ad-8a0e-3faeff7d7134" + }, + "Exception" : null + } ], + "variables" : [ "jtfssasimplutilstringtosignuserdelegationkey027666b7ad61", "javapathsasimplutilstringtosignuserdelegationkey100112ca91" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestsasimplutilstringtosignuserdelegationkey[10].json b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestsasimplutilstringtosignuserdelegationkey[10].json new file mode 100644 index 000000000000..513de7976b4e --- /dev/null +++ b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestsasimplutilstringtosignuserdelegationkey[10].json @@ -0,0 +1,129 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfssasimplutilstringtosignuserdelegationkey023406b6d13e?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.2.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "caeaf053-253d-4cea-ae24-7f6e91c5c094" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D77CDE86A10313", + "Last-Modified" : "Mon, 09 Dec 2019 19:32:27 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "a37b2d8c-501e-00cf-02c7-ae29c8000000", + "Date" : "Mon, 09 Dec 2019 19:32:27 GMT", + "x-ms-client-request-id" : "caeaf053-253d-4cea-ae24-7f6e91c5c094" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfssasimplutilstringtosignuserdelegationkey023406b6d13e/javapathsasimplutilstringtosignuserdelegationkey19229316b5?resource=file", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.7 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "ffb9e35b-048c-4bee-935a-3fcf49fb98d0" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D77CDE86AC2778", + "Last-Modified" : "Mon, 09 Dec 2019 19:32:28 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "1f17734e-101f-002d-74c7-aecdba000000", + "Date" : "Mon, 09 Dec 2019 19:32:27 GMT", + "x-ms-client-request-id" : "ffb9e35b-048c-4bee-935a-3fcf49fb98d0" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfssasimplutilstringtosignuserdelegationkey023406b6d13e/javapathsasimplutilstringtosignuserdelegationkey19229316b5?position=0&action=append", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.7 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "cc9f34ee-feb0-43b5-8424-0d9849aa0bdd", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "1f17734f-101f-002d-75c7-aecdba000000", + "Date" : "Mon, 09 Dec 2019 19:32:27 GMT", + "x-ms-client-request-id" : "cc9f34ee-feb0-43b5-8424-0d9849aa0bdd" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfssasimplutilstringtosignuserdelegationkey023406b6d13e/javapathsasimplutilstringtosignuserdelegationkey19229316b5?position=7&retainUncommittedData=false&close=false&action=flush", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.7 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "dac0d076-f3e5-4d35-8d26-a52125574c85" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D77CDE86C44D4A", + "Last-Modified" : "Mon, 09 Dec 2019 19:32:28 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "1f177352-101f-002d-78c7-aecdba000000", + "Date" : "Mon, 09 Dec 2019 19:32:27 GMT", + "x-ms-client-request-id" : "dac0d076-f3e5-4d35-8d26-a52125574c85" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://gaprahns.blob.core.windows.net?prefix=jtfssasimplutilstringtosignuserdelegationkey&comp=list", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.2.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "1d7b2052-8868-4b38-bf13-3a8a8102f6c6" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "a37b2e2e-501e-00cf-18c7-ae29c8000000", + "Body" : "jtfssasimplutilstringtosignuserdelegationkeyjtfssasimplutilstringtosignuserdelegationkey023406b6d13eMon, 09 Dec 2019 19:32:27 GMT\"0x8D77CDE86A10313\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 09 Dec 2019 19:32:27 GMT", + "x-ms-client-request-id" : "1d7b2052-8868-4b38-bf13-3a8a8102f6c6", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfssasimplutilstringtosignuserdelegationkey023406b6d13e?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.2.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "2f91391f-79f6-4e50-b2c5-cabadefaba30" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "a37b2e41-501e-00cf-28c7-ae29c8000000", + "Date" : "Mon, 09 Dec 2019 19:32:27 GMT", + "x-ms-client-request-id" : "2f91391f-79f6-4e50-b2c5-cabadefaba30" + }, + "Exception" : null + } ], + "variables" : [ "jtfssasimplutilstringtosignuserdelegationkey023406b6d13e", "javapathsasimplutilstringtosignuserdelegationkey19229316b5" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestsasimplutilstringtosignuserdelegationkey[11].json b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestsasimplutilstringtosignuserdelegationkey[11].json new file mode 100644 index 000000000000..50c36b4c73b3 --- /dev/null +++ b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestsasimplutilstringtosignuserdelegationkey[11].json @@ -0,0 +1,129 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfssasimplutilstringtosignuserdelegationkey002763e89d20?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.2.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "ea90af06-5a8b-44b3-9f8d-1afaed0edc10" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D77CDE86DBE97E", + "Last-Modified" : "Mon, 09 Dec 2019 19:32:28 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "a37b2e67-501e-00cf-4dc7-ae29c8000000", + "Date" : "Mon, 09 Dec 2019 19:32:28 GMT", + "x-ms-client-request-id" : "ea90af06-5a8b-44b3-9f8d-1afaed0edc10" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfssasimplutilstringtosignuserdelegationkey002763e89d20/javapathsasimplutilstringtosignuserdelegationkey1299055263?resource=file", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.7 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "604b0d97-ecc5-447c-92f3-dc7725b34fa3" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D77CDE86E62FC8", + "Last-Modified" : "Mon, 09 Dec 2019 19:32:28 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "1f177355-101f-002d-7bc7-aecdba000000", + "Date" : "Mon, 09 Dec 2019 19:32:27 GMT", + "x-ms-client-request-id" : "604b0d97-ecc5-447c-92f3-dc7725b34fa3" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfssasimplutilstringtosignuserdelegationkey002763e89d20/javapathsasimplutilstringtosignuserdelegationkey1299055263?position=0&action=append", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.7 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "a244512a-8747-48b3-953a-78f59caf3a98", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "1f177356-101f-002d-7cc7-aecdba000000", + "Date" : "Mon, 09 Dec 2019 19:32:27 GMT", + "x-ms-client-request-id" : "a244512a-8747-48b3-953a-78f59caf3a98" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfssasimplutilstringtosignuserdelegationkey002763e89d20/javapathsasimplutilstringtosignuserdelegationkey1299055263?position=7&retainUncommittedData=false&close=false&action=flush", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.7 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "90d09ce6-2735-4cd5-bf4d-b260ce660729" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D77CDE86F6BC56", + "Last-Modified" : "Mon, 09 Dec 2019 19:32:28 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "1f177359-101f-002d-7fc7-aecdba000000", + "Date" : "Mon, 09 Dec 2019 19:32:27 GMT", + "x-ms-client-request-id" : "90d09ce6-2735-4cd5-bf4d-b260ce660729" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://gaprahns.blob.core.windows.net?prefix=jtfssasimplutilstringtosignuserdelegationkey&comp=list", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.2.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "d565ba10-3204-4b84-81b1-a166cb6964c2" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "a37b2efe-501e-00cf-5dc7-ae29c8000000", + "Body" : "jtfssasimplutilstringtosignuserdelegationkeyjtfssasimplutilstringtosignuserdelegationkey002763e89d20Mon, 09 Dec 2019 19:32:28 GMT\"0x8D77CDE86DBE97E\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 09 Dec 2019 19:32:28 GMT", + "x-ms-client-request-id" : "d565ba10-3204-4b84-81b1-a166cb6964c2", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfssasimplutilstringtosignuserdelegationkey002763e89d20?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.2.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "ac0d0371-29cf-4c76-9eb1-fbda17045f3c" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "a37b2f19-501e-00cf-74c7-ae29c8000000", + "Date" : "Mon, 09 Dec 2019 19:32:28 GMT", + "x-ms-client-request-id" : "ac0d0371-29cf-4c76-9eb1-fbda17045f3c" + }, + "Exception" : null + } ], + "variables" : [ "jtfssasimplutilstringtosignuserdelegationkey002763e89d20", "javapathsasimplutilstringtosignuserdelegationkey1299055263" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestsasimplutilstringtosignuserdelegationkey[12].json b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestsasimplutilstringtosignuserdelegationkey[12].json new file mode 100644 index 000000000000..fa506aea0c4c --- /dev/null +++ b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestsasimplutilstringtosignuserdelegationkey[12].json @@ -0,0 +1,129 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfssasimplutilstringtosignuserdelegationkey00592227ea2a?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.2.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "6c796719-a0b9-4159-a258-1a83ea4d53dd" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D77CDE870FCAFD", + "Last-Modified" : "Mon, 09 Dec 2019 19:32:28 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "a37b2f2f-501e-00cf-09c7-ae29c8000000", + "Date" : "Mon, 09 Dec 2019 19:32:28 GMT", + "x-ms-client-request-id" : "6c796719-a0b9-4159-a258-1a83ea4d53dd" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfssasimplutilstringtosignuserdelegationkey00592227ea2a/javapathsasimplutilstringtosignuserdelegationkey163907d1e2?resource=file", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.7 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "1ba8deac-4788-4a63-86cd-ec459bd500e6" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D77CDE871C627F", + "Last-Modified" : "Mon, 09 Dec 2019 19:32:28 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "1f17735f-101f-002d-05c7-aecdba000000", + "Date" : "Mon, 09 Dec 2019 19:32:27 GMT", + "x-ms-client-request-id" : "1ba8deac-4788-4a63-86cd-ec459bd500e6" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfssasimplutilstringtosignuserdelegationkey00592227ea2a/javapathsasimplutilstringtosignuserdelegationkey163907d1e2?position=0&action=append", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.7 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "e5cc9ac7-af1c-45e2-b1b4-f30783575fd7", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "1f177362-101f-002d-08c7-aecdba000000", + "Date" : "Mon, 09 Dec 2019 19:32:27 GMT", + "x-ms-client-request-id" : "e5cc9ac7-af1c-45e2-b1b4-f30783575fd7" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfssasimplutilstringtosignuserdelegationkey00592227ea2a/javapathsasimplutilstringtosignuserdelegationkey163907d1e2?position=7&retainUncommittedData=false&close=false&action=flush", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.7 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "f453bf49-96d0-4db5-87b4-b45b3d7a27c5" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D77CDE873A7E9D", + "Last-Modified" : "Mon, 09 Dec 2019 19:32:28 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "1f177367-101f-002d-0dc7-aecdba000000", + "Date" : "Mon, 09 Dec 2019 19:32:27 GMT", + "x-ms-client-request-id" : "f453bf49-96d0-4db5-87b4-b45b3d7a27c5" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://gaprahns.blob.core.windows.net?prefix=jtfssasimplutilstringtosignuserdelegationkey&comp=list", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.2.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "62d2fa5d-80c2-47f8-a84f-5a98b939bb32" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "a37b2fcc-501e-00cf-14c7-ae29c8000000", + "Body" : "jtfssasimplutilstringtosignuserdelegationkeyjtfssasimplutilstringtosignuserdelegationkey00592227ea2aMon, 09 Dec 2019 19:32:28 GMT\"0x8D77CDE870FCAFD\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 09 Dec 2019 19:32:28 GMT", + "x-ms-client-request-id" : "62d2fa5d-80c2-47f8-a84f-5a98b939bb32", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfssasimplutilstringtosignuserdelegationkey00592227ea2a?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.2.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "659ca1d7-803b-4a2b-b993-b18922d552c4" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "a37b2fdb-501e-00cf-21c7-ae29c8000000", + "Date" : "Mon, 09 Dec 2019 19:32:28 GMT", + "x-ms-client-request-id" : "659ca1d7-803b-4a2b-b993-b18922d552c4" + }, + "Exception" : null + } ], + "variables" : [ "jtfssasimplutilstringtosignuserdelegationkey00592227ea2a", "javapathsasimplutilstringtosignuserdelegationkey163907d1e2" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestsasimplutilstringtosignuserdelegationkey[13].json b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestsasimplutilstringtosignuserdelegationkey[13].json new file mode 100644 index 000000000000..b32c3134148a --- /dev/null +++ b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestsasimplutilstringtosignuserdelegationkey[13].json @@ -0,0 +1,129 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfssasimplutilstringtosignuserdelegationkey019260c97253?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.2.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "0ac43557-da14-4e6f-a920-c0cc9baf8be0" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D77CDE8752C7EE", + "Last-Modified" : "Mon, 09 Dec 2019 19:32:29 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "a37b2ffb-501e-00cf-40c7-ae29c8000000", + "Date" : "Mon, 09 Dec 2019 19:32:28 GMT", + "x-ms-client-request-id" : "0ac43557-da14-4e6f-a920-c0cc9baf8be0" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfssasimplutilstringtosignuserdelegationkey019260c97253/javapathsasimplutilstringtosignuserdelegationkey1588850c48?resource=file", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.7 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "84e88f06-6178-457c-b6b7-bfa45f57775e" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D77CDE8761771F", + "Last-Modified" : "Mon, 09 Dec 2019 19:32:29 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "1f17736a-101f-002d-10c7-aecdba000000", + "Date" : "Mon, 09 Dec 2019 19:32:28 GMT", + "x-ms-client-request-id" : "84e88f06-6178-457c-b6b7-bfa45f57775e" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfssasimplutilstringtosignuserdelegationkey019260c97253/javapathsasimplutilstringtosignuserdelegationkey1588850c48?position=0&action=append", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.7 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "a7a29829-ea8d-4d23-9acd-135065765330", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "1f17736d-101f-002d-13c7-aecdba000000", + "Date" : "Mon, 09 Dec 2019 19:32:28 GMT", + "x-ms-client-request-id" : "a7a29829-ea8d-4d23-9acd-135065765330" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfssasimplutilstringtosignuserdelegationkey019260c97253/javapathsasimplutilstringtosignuserdelegationkey1588850c48?position=7&retainUncommittedData=false&close=false&action=flush", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.7 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "e0b1b230-aad3-4767-b052-175e913d0445" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D77CDE8779F31B", + "Last-Modified" : "Mon, 09 Dec 2019 19:32:29 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "1f177370-101f-002d-16c7-aecdba000000", + "Date" : "Mon, 09 Dec 2019 19:32:28 GMT", + "x-ms-client-request-id" : "e0b1b230-aad3-4767-b052-175e913d0445" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://gaprahns.blob.core.windows.net?prefix=jtfssasimplutilstringtosignuserdelegationkey&comp=list", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.2.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "b8a68c6e-ba04-4c6f-8218-19b3a7a3aeb7" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "a37b3080-501e-00cf-2ec7-ae29c8000000", + "Body" : "jtfssasimplutilstringtosignuserdelegationkeyjtfssasimplutilstringtosignuserdelegationkey019260c97253Mon, 09 Dec 2019 19:32:29 GMT\"0x8D77CDE8752C7EE\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 09 Dec 2019 19:32:29 GMT", + "x-ms-client-request-id" : "b8a68c6e-ba04-4c6f-8218-19b3a7a3aeb7", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfssasimplutilstringtosignuserdelegationkey019260c97253?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.2.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "b369e750-63d9-4ffd-9300-7f213d44e49d" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "a37b30a7-501e-00cf-50c7-ae29c8000000", + "Date" : "Mon, 09 Dec 2019 19:32:29 GMT", + "x-ms-client-request-id" : "b369e750-63d9-4ffd-9300-7f213d44e49d" + }, + "Exception" : null + } ], + "variables" : [ "jtfssasimplutilstringtosignuserdelegationkey019260c97253", "javapathsasimplutilstringtosignuserdelegationkey1588850c48" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestsasimplutilstringtosignuserdelegationkey[1].json b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestsasimplutilstringtosignuserdelegationkey[1].json new file mode 100644 index 000000000000..4e922f123528 --- /dev/null +++ b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestsasimplutilstringtosignuserdelegationkey[1].json @@ -0,0 +1,129 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfssasimplutilstringtosignuserdelegationkey000813265647?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.2.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "df6b852b-65c7-4eb3-bae7-629992093671" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D77CDE8475E1EC", + "Last-Modified" : "Mon, 09 Dec 2019 19:32:24 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "a37b265d-501e-00cf-7ec7-ae29c8000000", + "Date" : "Mon, 09 Dec 2019 19:32:24 GMT", + "x-ms-client-request-id" : "df6b852b-65c7-4eb3-bae7-629992093671" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfssasimplutilstringtosignuserdelegationkey000813265647/javapathsasimplutilstringtosignuserdelegationkey189497d5b6?resource=file", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.7 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "5f5160fd-6c46-4ea5-a28f-b9e8ed0aae37" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D77CDE8488570D", + "Last-Modified" : "Mon, 09 Dec 2019 19:32:24 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "1f177326-101f-002d-4ec7-aecdba000000", + "Date" : "Mon, 09 Dec 2019 19:32:23 GMT", + "x-ms-client-request-id" : "5f5160fd-6c46-4ea5-a28f-b9e8ed0aae37" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfssasimplutilstringtosignuserdelegationkey000813265647/javapathsasimplutilstringtosignuserdelegationkey189497d5b6?position=0&action=append", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.7 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "e78b0286-a39b-4e9b-b5b4-82220dd31c82", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "1f177327-101f-002d-4fc7-aecdba000000", + "Date" : "Mon, 09 Dec 2019 19:32:23 GMT", + "x-ms-client-request-id" : "e78b0286-a39b-4e9b-b5b4-82220dd31c82" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfssasimplutilstringtosignuserdelegationkey000813265647/javapathsasimplutilstringtosignuserdelegationkey189497d5b6?position=7&retainUncommittedData=false&close=false&action=flush", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.7 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "828fdf17-9046-48b5-92d9-ffe20c68471c" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D77CDE84A4412D", + "Last-Modified" : "Mon, 09 Dec 2019 19:32:24 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "1f177328-101f-002d-50c7-aecdba000000", + "Date" : "Mon, 09 Dec 2019 19:32:23 GMT", + "x-ms-client-request-id" : "828fdf17-9046-48b5-92d9-ffe20c68471c" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://gaprahns.blob.core.windows.net?prefix=jtfssasimplutilstringtosignuserdelegationkey&comp=list", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.2.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "3eee81ec-9717-4fc3-8b93-3f2d703a1c5d" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "a37b2733-501e-00cf-48c7-ae29c8000000", + "Body" : "jtfssasimplutilstringtosignuserdelegationkeyjtfssasimplutilstringtosignuserdelegationkey000813265647Mon, 09 Dec 2019 19:32:24 GMT\"0x8D77CDE8475E1EC\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 09 Dec 2019 19:32:24 GMT", + "x-ms-client-request-id" : "3eee81ec-9717-4fc3-8b93-3f2d703a1c5d", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfssasimplutilstringtosignuserdelegationkey000813265647?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.2.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "cb0fe14f-35bb-4ef5-8579-88807edac86f" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "a37b2745-501e-00cf-5ac7-ae29c8000000", + "Date" : "Mon, 09 Dec 2019 19:32:24 GMT", + "x-ms-client-request-id" : "cb0fe14f-35bb-4ef5-8579-88807edac86f" + }, + "Exception" : null + } ], + "variables" : [ "jtfssasimplutilstringtosignuserdelegationkey000813265647", "javapathsasimplutilstringtosignuserdelegationkey189497d5b6" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestsasimplutilstringtosignuserdelegationkey[2].json b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestsasimplutilstringtosignuserdelegationkey[2].json new file mode 100644 index 000000000000..4567e8357fe5 --- /dev/null +++ b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestsasimplutilstringtosignuserdelegationkey[2].json @@ -0,0 +1,129 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfssasimplutilstringtosignuserdelegationkey057444cd1ebe?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.2.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "a4969d23-cc5c-4bb2-a8a0-d26bba67d3fe" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D77CDE84BD4BA1", + "Last-Modified" : "Mon, 09 Dec 2019 19:32:24 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "a37b2760-501e-00cf-71c7-ae29c8000000", + "Date" : "Mon, 09 Dec 2019 19:32:24 GMT", + "x-ms-client-request-id" : "a4969d23-cc5c-4bb2-a8a0-d26bba67d3fe" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfssasimplutilstringtosignuserdelegationkey057444cd1ebe/javapathsasimplutilstringtosignuserdelegationkey1660943dce?resource=file", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.7 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "40c868e6-4951-4476-b834-824ebe34f7c6" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D77CDE84D42E7A", + "Last-Modified" : "Mon, 09 Dec 2019 19:32:24 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "1f177329-101f-002d-51c7-aecdba000000", + "Date" : "Mon, 09 Dec 2019 19:32:23 GMT", + "x-ms-client-request-id" : "40c868e6-4951-4476-b834-824ebe34f7c6" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfssasimplutilstringtosignuserdelegationkey057444cd1ebe/javapathsasimplutilstringtosignuserdelegationkey1660943dce?position=0&action=append", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.7 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "892e2ef8-43b4-42ac-9367-04c8b44f6503", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "1f17732a-101f-002d-52c7-aecdba000000", + "Date" : "Mon, 09 Dec 2019 19:32:24 GMT", + "x-ms-client-request-id" : "892e2ef8-43b4-42ac-9367-04c8b44f6503" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfssasimplutilstringtosignuserdelegationkey057444cd1ebe/javapathsasimplutilstringtosignuserdelegationkey1660943dce?position=7&retainUncommittedData=false&close=false&action=flush", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.7 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "baa0bd08-42fd-4996-acb0-11cbb1ba21b5" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D77CDE84E5C9C2", + "Last-Modified" : "Mon, 09 Dec 2019 19:32:25 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "1f17732b-101f-002d-53c7-aecdba000000", + "Date" : "Mon, 09 Dec 2019 19:32:24 GMT", + "x-ms-client-request-id" : "baa0bd08-42fd-4996-acb0-11cbb1ba21b5" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://gaprahns.blob.core.windows.net?prefix=jtfssasimplutilstringtosignuserdelegationkey&comp=list", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.2.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "74fbd6d7-bc14-4574-8432-dafd353b2b11" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "a37b27f4-501e-00cf-74c7-ae29c8000000", + "Body" : "jtfssasimplutilstringtosignuserdelegationkeyjtfssasimplutilstringtosignuserdelegationkey057444cd1ebeMon, 09 Dec 2019 19:32:24 GMT\"0x8D77CDE84BD4BA1\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 09 Dec 2019 19:32:24 GMT", + "x-ms-client-request-id" : "74fbd6d7-bc14-4574-8432-dafd353b2b11", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfssasimplutilstringtosignuserdelegationkey057444cd1ebe?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.2.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "5017b1b3-01a7-4824-9a32-0d534f46ab6d" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "a37b2812-501e-00cf-0cc7-ae29c8000000", + "Date" : "Mon, 09 Dec 2019 19:32:24 GMT", + "x-ms-client-request-id" : "5017b1b3-01a7-4824-9a32-0d534f46ab6d" + }, + "Exception" : null + } ], + "variables" : [ "jtfssasimplutilstringtosignuserdelegationkey057444cd1ebe", "javapathsasimplutilstringtosignuserdelegationkey1660943dce" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestsasimplutilstringtosignuserdelegationkey[3].json b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestsasimplutilstringtosignuserdelegationkey[3].json new file mode 100644 index 000000000000..0451fbadd0c1 --- /dev/null +++ b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestsasimplutilstringtosignuserdelegationkey[3].json @@ -0,0 +1,129 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfssasimplutilstringtosignuserdelegationkey093103c12524?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.2.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "b625cdc0-0719-4e3f-beec-a840a17cc1b9" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D77CDE85085F17", + "Last-Modified" : "Mon, 09 Dec 2019 19:32:25 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "a37b2850-501e-00cf-40c7-ae29c8000000", + "Date" : "Mon, 09 Dec 2019 19:32:24 GMT", + "x-ms-client-request-id" : "b625cdc0-0719-4e3f-beec-a840a17cc1b9" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfssasimplutilstringtosignuserdelegationkey093103c12524/javapathsasimplutilstringtosignuserdelegationkey103805fa6c?resource=file", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.7 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "8a4e0fab-68ef-415d-8d44-eff9b46f63ff" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D77CDE8514B3AE", + "Last-Modified" : "Mon, 09 Dec 2019 19:32:25 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "1f17732c-101f-002d-54c7-aecdba000000", + "Date" : "Mon, 09 Dec 2019 19:32:24 GMT", + "x-ms-client-request-id" : "8a4e0fab-68ef-415d-8d44-eff9b46f63ff" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfssasimplutilstringtosignuserdelegationkey093103c12524/javapathsasimplutilstringtosignuserdelegationkey103805fa6c?position=0&action=append", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.7 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "a68a4084-f184-4d68-a072-cc0f56954268", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "1f17732d-101f-002d-55c7-aecdba000000", + "Date" : "Mon, 09 Dec 2019 19:32:24 GMT", + "x-ms-client-request-id" : "a68a4084-f184-4d68-a072-cc0f56954268" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfssasimplutilstringtosignuserdelegationkey093103c12524/javapathsasimplutilstringtosignuserdelegationkey103805fa6c?position=7&retainUncommittedData=false&close=false&action=flush", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.7 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "a6cef289-60df-4fef-9934-665144c4000a" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D77CDE852D2BC1", + "Last-Modified" : "Mon, 09 Dec 2019 19:32:25 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "1f17732e-101f-002d-56c7-aecdba000000", + "Date" : "Mon, 09 Dec 2019 19:32:24 GMT", + "x-ms-client-request-id" : "a6cef289-60df-4fef-9934-665144c4000a" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://gaprahns.blob.core.windows.net?prefix=jtfssasimplutilstringtosignuserdelegationkey&comp=list", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.2.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "a7aded6e-f697-4c5a-a125-e7523aa309a8" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "a37b28e4-501e-00cf-49c7-ae29c8000000", + "Body" : "jtfssasimplutilstringtosignuserdelegationkeyjtfssasimplutilstringtosignuserdelegationkey093103c12524Mon, 09 Dec 2019 19:32:25 GMT\"0x8D77CDE85085F17\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 09 Dec 2019 19:32:25 GMT", + "x-ms-client-request-id" : "a7aded6e-f697-4c5a-a125-e7523aa309a8", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfssasimplutilstringtosignuserdelegationkey093103c12524?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.2.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "0f77e294-7c0c-4c5c-872a-001d4f398794" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "a37b28fc-501e-00cf-5dc7-ae29c8000000", + "Date" : "Mon, 09 Dec 2019 19:32:25 GMT", + "x-ms-client-request-id" : "0f77e294-7c0c-4c5c-872a-001d4f398794" + }, + "Exception" : null + } ], + "variables" : [ "jtfssasimplutilstringtosignuserdelegationkey093103c12524", "javapathsasimplutilstringtosignuserdelegationkey103805fa6c" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestsasimplutilstringtosignuserdelegationkey[4].json b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestsasimplutilstringtosignuserdelegationkey[4].json new file mode 100644 index 000000000000..6fc05f6d61f2 --- /dev/null +++ b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestsasimplutilstringtosignuserdelegationkey[4].json @@ -0,0 +1,129 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfssasimplutilstringtosignuserdelegationkey039266d53907?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.2.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "f6f44abe-c06c-48e9-94c1-1d967c033300" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D77CDE8546A0AE", + "Last-Modified" : "Mon, 09 Dec 2019 19:32:25 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "a37b2919-501e-00cf-78c7-ae29c8000000", + "Date" : "Mon, 09 Dec 2019 19:32:25 GMT", + "x-ms-client-request-id" : "f6f44abe-c06c-48e9-94c1-1d967c033300" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfssasimplutilstringtosignuserdelegationkey039266d53907/javapathsasimplutilstringtosignuserdelegationkey1447705779?resource=file", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.7 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "c3bf8774-133b-403c-b53d-0abb08eac820" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D77CDE855101BF", + "Last-Modified" : "Mon, 09 Dec 2019 19:32:25 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "1f177330-101f-002d-57c7-aecdba000000", + "Date" : "Mon, 09 Dec 2019 19:32:24 GMT", + "x-ms-client-request-id" : "c3bf8774-133b-403c-b53d-0abb08eac820" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfssasimplutilstringtosignuserdelegationkey039266d53907/javapathsasimplutilstringtosignuserdelegationkey1447705779?position=0&action=append", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.7 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "368b8428-bd80-43e2-a5dd-cd9c0e5984d8", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "1f177331-101f-002d-58c7-aecdba000000", + "Date" : "Mon, 09 Dec 2019 19:32:24 GMT", + "x-ms-client-request-id" : "368b8428-bd80-43e2-a5dd-cd9c0e5984d8" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfssasimplutilstringtosignuserdelegationkey039266d53907/javapathsasimplutilstringtosignuserdelegationkey1447705779?position=7&retainUncommittedData=false&close=false&action=flush", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.7 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "b38572ef-e5d6-4cd7-a1bd-b712e0489f52" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D77CDE856210B8", + "Last-Modified" : "Mon, 09 Dec 2019 19:32:25 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "1f177332-101f-002d-59c7-aecdba000000", + "Date" : "Mon, 09 Dec 2019 19:32:24 GMT", + "x-ms-client-request-id" : "b38572ef-e5d6-4cd7-a1bd-b712e0489f52" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://gaprahns.blob.core.windows.net?prefix=jtfssasimplutilstringtosignuserdelegationkey&comp=list", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.2.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "2eaf1d63-4024-4c52-87c9-8c38fd8c3270" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "a37b2970-501e-00cf-4ac7-ae29c8000000", + "Body" : "jtfssasimplutilstringtosignuserdelegationkeyjtfssasimplutilstringtosignuserdelegationkey039266d53907Mon, 09 Dec 2019 19:32:25 GMT\"0x8D77CDE8546A0AE\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 09 Dec 2019 19:32:25 GMT", + "x-ms-client-request-id" : "2eaf1d63-4024-4c52-87c9-8c38fd8c3270", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfssasimplutilstringtosignuserdelegationkey039266d53907?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.2.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "2979ac2e-7cf6-4658-8079-5aecf48d20ba" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "a37b2983-501e-00cf-5dc7-ae29c8000000", + "Date" : "Mon, 09 Dec 2019 19:32:25 GMT", + "x-ms-client-request-id" : "2979ac2e-7cf6-4658-8079-5aecf48d20ba" + }, + "Exception" : null + } ], + "variables" : [ "jtfssasimplutilstringtosignuserdelegationkey039266d53907", "javapathsasimplutilstringtosignuserdelegationkey1447705779" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestsasimplutilstringtosignuserdelegationkey[5].json b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestsasimplutilstringtosignuserdelegationkey[5].json new file mode 100644 index 000000000000..88dd679a031b --- /dev/null +++ b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestsasimplutilstringtosignuserdelegationkey[5].json @@ -0,0 +1,129 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfssasimplutilstringtosignuserdelegationkey0414625c08a6?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.2.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "46725365-bb2a-4a19-970f-bcfaa311411c" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D77CDE857CF35B", + "Last-Modified" : "Mon, 09 Dec 2019 19:32:26 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "a37b29b3-501e-00cf-08c7-ae29c8000000", + "Date" : "Mon, 09 Dec 2019 19:32:25 GMT", + "x-ms-client-request-id" : "46725365-bb2a-4a19-970f-bcfaa311411c" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfssasimplutilstringtosignuserdelegationkey0414625c08a6/javapathsasimplutilstringtosignuserdelegationkey1004752d77?resource=file", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.7 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "676cf927-9add-4ac5-9cfa-c71ca5e3e50e" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D77CDE8588E6AD", + "Last-Modified" : "Mon, 09 Dec 2019 19:32:26 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "1f177334-101f-002d-5ac7-aecdba000000", + "Date" : "Mon, 09 Dec 2019 19:32:25 GMT", + "x-ms-client-request-id" : "676cf927-9add-4ac5-9cfa-c71ca5e3e50e" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfssasimplutilstringtosignuserdelegationkey0414625c08a6/javapathsasimplutilstringtosignuserdelegationkey1004752d77?position=0&action=append", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.7 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "ed7c48df-3803-4684-a3ca-a6f6192f37b0", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "1f177335-101f-002d-5bc7-aecdba000000", + "Date" : "Mon, 09 Dec 2019 19:32:25 GMT", + "x-ms-client-request-id" : "ed7c48df-3803-4684-a3ca-a6f6192f37b0" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfssasimplutilstringtosignuserdelegationkey0414625c08a6/javapathsasimplutilstringtosignuserdelegationkey1004752d77?position=7&retainUncommittedData=false&close=false&action=flush", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.7 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "9d4bf9c3-eb68-413d-a1f4-607d454cc56d" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D77CDE85998C7E", + "Last-Modified" : "Mon, 09 Dec 2019 19:32:26 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "1f177336-101f-002d-5cc7-aecdba000000", + "Date" : "Mon, 09 Dec 2019 19:32:25 GMT", + "x-ms-client-request-id" : "9d4bf9c3-eb68-413d-a1f4-607d454cc56d" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://gaprahns.blob.core.windows.net?prefix=jtfssasimplutilstringtosignuserdelegationkey&comp=list", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.2.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "b9f039ee-7551-412d-8593-8206047a01de" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "a37b2a70-501e-00cf-37c7-ae29c8000000", + "Body" : "jtfssasimplutilstringtosignuserdelegationkeyjtfssasimplutilstringtosignuserdelegationkey0414625c08a6Mon, 09 Dec 2019 19:32:26 GMT\"0x8D77CDE857CF35B\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 09 Dec 2019 19:32:25 GMT", + "x-ms-client-request-id" : "b9f039ee-7551-412d-8593-8206047a01de", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfssasimplutilstringtosignuserdelegationkey0414625c08a6?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.2.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "56cc4bd0-04f2-4dbb-a1fb-535bceae4245" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "a37b2a8b-501e-00cf-4fc7-ae29c8000000", + "Date" : "Mon, 09 Dec 2019 19:32:26 GMT", + "x-ms-client-request-id" : "56cc4bd0-04f2-4dbb-a1fb-535bceae4245" + }, + "Exception" : null + } ], + "variables" : [ "jtfssasimplutilstringtosignuserdelegationkey0414625c08a6", "javapathsasimplutilstringtosignuserdelegationkey1004752d77" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestsasimplutilstringtosignuserdelegationkey[6].json b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestsasimplutilstringtosignuserdelegationkey[6].json new file mode 100644 index 000000000000..eba169b7e9bd --- /dev/null +++ b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestsasimplutilstringtosignuserdelegationkey[6].json @@ -0,0 +1,129 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfssasimplutilstringtosignuserdelegationkey099554c9a26a?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.2.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "112ec9d0-98ea-4ca8-8463-a290087c4283" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D77CDE85B62C1E", + "Last-Modified" : "Mon, 09 Dec 2019 19:32:26 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "a37b2ab4-501e-00cf-73c7-ae29c8000000", + "Date" : "Mon, 09 Dec 2019 19:32:26 GMT", + "x-ms-client-request-id" : "112ec9d0-98ea-4ca8-8463-a290087c4283" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfssasimplutilstringtosignuserdelegationkey099554c9a26a/javapathsasimplutilstringtosignuserdelegationkey158315d159?resource=file", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.7 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "9f466fdb-a887-48c2-8e20-61d0d78570eb" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D77CDE85C038A4", + "Last-Modified" : "Mon, 09 Dec 2019 19:32:26 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "1f177338-101f-002d-5ec7-aecdba000000", + "Date" : "Mon, 09 Dec 2019 19:32:25 GMT", + "x-ms-client-request-id" : "9f466fdb-a887-48c2-8e20-61d0d78570eb" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfssasimplutilstringtosignuserdelegationkey099554c9a26a/javapathsasimplutilstringtosignuserdelegationkey158315d159?position=0&action=append", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.7 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "5afb1089-8fd4-4786-897e-cf8fee31086f", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "1f177339-101f-002d-5fc7-aecdba000000", + "Date" : "Mon, 09 Dec 2019 19:32:25 GMT", + "x-ms-client-request-id" : "5afb1089-8fd4-4786-897e-cf8fee31086f" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfssasimplutilstringtosignuserdelegationkey099554c9a26a/javapathsasimplutilstringtosignuserdelegationkey158315d159?position=7&retainUncommittedData=false&close=false&action=flush", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.7 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "ccc9e9a0-ba7a-4714-a9cf-b43bf784161d" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D77CDE85D0609D", + "Last-Modified" : "Mon, 09 Dec 2019 19:32:26 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "1f17733a-101f-002d-60c7-aecdba000000", + "Date" : "Mon, 09 Dec 2019 19:32:25 GMT", + "x-ms-client-request-id" : "ccc9e9a0-ba7a-4714-a9cf-b43bf784161d" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://gaprahns.blob.core.windows.net?prefix=jtfssasimplutilstringtosignuserdelegationkey&comp=list", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.2.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "67a37187-3c6c-4915-a47e-8cd13ae548c6" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "a37b2af9-501e-00cf-31c7-ae29c8000000", + "Body" : "jtfssasimplutilstringtosignuserdelegationkeyjtfssasimplutilstringtosignuserdelegationkey099554c9a26aMon, 09 Dec 2019 19:32:26 GMT\"0x8D77CDE85B62C1E\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 09 Dec 2019 19:32:26 GMT", + "x-ms-client-request-id" : "67a37187-3c6c-4915-a47e-8cd13ae548c6", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfssasimplutilstringtosignuserdelegationkey099554c9a26a?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.2.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "3df377d8-6660-4f05-9e25-02d7e763affd" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "a37b2b05-501e-00cf-3dc7-ae29c8000000", + "Date" : "Mon, 09 Dec 2019 19:32:26 GMT", + "x-ms-client-request-id" : "3df377d8-6660-4f05-9e25-02d7e763affd" + }, + "Exception" : null + } ], + "variables" : [ "jtfssasimplutilstringtosignuserdelegationkey099554c9a26a", "javapathsasimplutilstringtosignuserdelegationkey158315d159" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestsasimplutilstringtosignuserdelegationkey[7].json b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestsasimplutilstringtosignuserdelegationkey[7].json new file mode 100644 index 000000000000..0d39eef25832 --- /dev/null +++ b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestsasimplutilstringtosignuserdelegationkey[7].json @@ -0,0 +1,129 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfssasimplutilstringtosignuserdelegationkey048296f9bcde?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.2.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "72238fc7-67ca-4467-9dc9-d4fff48a86c3" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D77CDE85ECF401", + "Last-Modified" : "Mon, 09 Dec 2019 19:32:26 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "a37b2b21-501e-00cf-57c7-ae29c8000000", + "Date" : "Mon, 09 Dec 2019 19:32:26 GMT", + "x-ms-client-request-id" : "72238fc7-67ca-4467-9dc9-d4fff48a86c3" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfssasimplutilstringtosignuserdelegationkey048296f9bcde/javapathsasimplutilstringtosignuserdelegationkey1888397be2?resource=file", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.7 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "b998e1e1-4a90-4ead-934a-7604a40ba379" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D77CDE85FE923F", + "Last-Modified" : "Mon, 09 Dec 2019 19:32:26 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "1f17733b-101f-002d-61c7-aecdba000000", + "Date" : "Mon, 09 Dec 2019 19:32:25 GMT", + "x-ms-client-request-id" : "b998e1e1-4a90-4ead-934a-7604a40ba379" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfssasimplutilstringtosignuserdelegationkey048296f9bcde/javapathsasimplutilstringtosignuserdelegationkey1888397be2?position=0&action=append", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.7 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "3115f601-f805-4a93-81b7-6128944e0c91", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "1f17733c-101f-002d-62c7-aecdba000000", + "Date" : "Mon, 09 Dec 2019 19:32:25 GMT", + "x-ms-client-request-id" : "3115f601-f805-4a93-81b7-6128944e0c91" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfssasimplutilstringtosignuserdelegationkey048296f9bcde/javapathsasimplutilstringtosignuserdelegationkey1888397be2?position=7&retainUncommittedData=false&close=false&action=flush", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.7 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "24bc4083-8c3e-4caa-8b88-cc55d116e51c" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D77CDE860F7925", + "Last-Modified" : "Mon, 09 Dec 2019 19:32:26 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "1f17733d-101f-002d-63c7-aecdba000000", + "Date" : "Mon, 09 Dec 2019 19:32:26 GMT", + "x-ms-client-request-id" : "24bc4083-8c3e-4caa-8b88-cc55d116e51c" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://gaprahns.blob.core.windows.net?prefix=jtfssasimplutilstringtosignuserdelegationkey&comp=list", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.2.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "619f75f4-490a-4a39-ae18-bdc13fa45b78" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "a37b2bae-501e-00cf-53c7-ae29c8000000", + "Body" : "jtfssasimplutilstringtosignuserdelegationkeyjtfssasimplutilstringtosignuserdelegationkey048296f9bcdeMon, 09 Dec 2019 19:32:26 GMT\"0x8D77CDE85ECF401\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 09 Dec 2019 19:32:26 GMT", + "x-ms-client-request-id" : "619f75f4-490a-4a39-ae18-bdc13fa45b78", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfssasimplutilstringtosignuserdelegationkey048296f9bcde?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.2.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "1b476d74-714c-4045-8e9e-be0f7b397d98" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "a37b2bd1-501e-00cf-71c7-ae29c8000000", + "Date" : "Mon, 09 Dec 2019 19:32:26 GMT", + "x-ms-client-request-id" : "1b476d74-714c-4045-8e9e-be0f7b397d98" + }, + "Exception" : null + } ], + "variables" : [ "jtfssasimplutilstringtosignuserdelegationkey048296f9bcde", "javapathsasimplutilstringtosignuserdelegationkey1888397be2" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestsasimplutilstringtosignuserdelegationkey[8].json b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestsasimplutilstringtosignuserdelegationkey[8].json new file mode 100644 index 000000000000..b24e830927fa --- /dev/null +++ b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestsasimplutilstringtosignuserdelegationkey[8].json @@ -0,0 +1,129 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfssasimplutilstringtosignuserdelegationkey08893643eb1e?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.2.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "c7a5ecf9-3e02-4b49-ad94-8150e598c0ec" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D77CDE862A2463", + "Last-Modified" : "Mon, 09 Dec 2019 19:32:27 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "a37b2be9-501e-00cf-08c7-ae29c8000000", + "Date" : "Mon, 09 Dec 2019 19:32:26 GMT", + "x-ms-client-request-id" : "c7a5ecf9-3e02-4b49-ad94-8150e598c0ec" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfssasimplutilstringtosignuserdelegationkey08893643eb1e/javapathsasimplutilstringtosignuserdelegationkey18467688ab?resource=file", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.7 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "af9dd51c-b157-4407-8595-7fbb86d694a7" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D77CDE86365A5D", + "Last-Modified" : "Mon, 09 Dec 2019 19:32:27 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "1f17733e-101f-002d-64c7-aecdba000000", + "Date" : "Mon, 09 Dec 2019 19:32:26 GMT", + "x-ms-client-request-id" : "af9dd51c-b157-4407-8595-7fbb86d694a7" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfssasimplutilstringtosignuserdelegationkey08893643eb1e/javapathsasimplutilstringtosignuserdelegationkey18467688ab?position=0&action=append", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.7 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "f138f342-3b97-4847-a0b9-ea7fbb713ee6", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "1f17733f-101f-002d-65c7-aecdba000000", + "Date" : "Mon, 09 Dec 2019 19:32:26 GMT", + "x-ms-client-request-id" : "f138f342-3b97-4847-a0b9-ea7fbb713ee6" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfssasimplutilstringtosignuserdelegationkey08893643eb1e/javapathsasimplutilstringtosignuserdelegationkey18467688ab?position=7&retainUncommittedData=false&close=false&action=flush", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.7 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "88daf7b7-7e9e-4501-8711-e9e500e0a4c1" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D77CDE86495AB2", + "Last-Modified" : "Mon, 09 Dec 2019 19:32:27 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "1f177340-101f-002d-66c7-aecdba000000", + "Date" : "Mon, 09 Dec 2019 19:32:26 GMT", + "x-ms-client-request-id" : "88daf7b7-7e9e-4501-8711-e9e500e0a4c1" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://gaprahns.blob.core.windows.net?prefix=jtfssasimplutilstringtosignuserdelegationkey&comp=list", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.2.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "90257725-01ae-42e3-9a79-66ac51c8f7f7" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "a37b2c93-501e-00cf-22c7-ae29c8000000", + "Body" : "jtfssasimplutilstringtosignuserdelegationkeyjtfssasimplutilstringtosignuserdelegationkey08893643eb1eMon, 09 Dec 2019 19:32:27 GMT\"0x8D77CDE862A2463\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 09 Dec 2019 19:32:27 GMT", + "x-ms-client-request-id" : "90257725-01ae-42e3-9a79-66ac51c8f7f7", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfssasimplutilstringtosignuserdelegationkey08893643eb1e?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.2.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "e6484993-d51e-4ac7-ab69-ffe4f1262d7c" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "a37b2cb9-501e-00cf-44c7-ae29c8000000", + "Date" : "Mon, 09 Dec 2019 19:32:27 GMT", + "x-ms-client-request-id" : "e6484993-d51e-4ac7-ab69-ffe4f1262d7c" + }, + "Exception" : null + } ], + "variables" : [ "jtfssasimplutilstringtosignuserdelegationkey08893643eb1e", "javapathsasimplutilstringtosignuserdelegationkey18467688ab" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestsasimplutilstringtosignuserdelegationkey[9].json b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestsasimplutilstringtosignuserdelegationkey[9].json new file mode 100644 index 000000000000..3c5fbb93bb6a --- /dev/null +++ b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestsasimplutilstringtosignuserdelegationkey[9].json @@ -0,0 +1,129 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfssasimplutilstringtosignuserdelegationkey070163165d11?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.2.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "c25f20f8-b3f0-413f-ac58-6d27e354a1d1" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D77CDE8661D696", + "Last-Modified" : "Mon, 09 Dec 2019 19:32:27 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "a37b2cdb-501e-00cf-64c7-ae29c8000000", + "Date" : "Mon, 09 Dec 2019 19:32:27 GMT", + "x-ms-client-request-id" : "c25f20f8-b3f0-413f-ac58-6d27e354a1d1" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfssasimplutilstringtosignuserdelegationkey070163165d11/javapathsasimplutilstringtosignuserdelegationkey160877c200?resource=file", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.7 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "b131f167-efa5-447e-b431-a830647cd989" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D77CDE86713570", + "Last-Modified" : "Mon, 09 Dec 2019 19:32:27 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "1f177344-101f-002d-6ac7-aecdba000000", + "Date" : "Mon, 09 Dec 2019 19:32:26 GMT", + "x-ms-client-request-id" : "b131f167-efa5-447e-b431-a830647cd989" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfssasimplutilstringtosignuserdelegationkey070163165d11/javapathsasimplutilstringtosignuserdelegationkey160877c200?position=0&action=append", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.7 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "86b40324-86d8-4051-8def-9cfc2de6c9d8", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "1f177346-101f-002d-6cc7-aecdba000000", + "Date" : "Mon, 09 Dec 2019 19:32:26 GMT", + "x-ms-client-request-id" : "86b40324-86d8-4051-8def-9cfc2de6c9d8" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfssasimplutilstringtosignuserdelegationkey070163165d11/javapathsasimplutilstringtosignuserdelegationkey160877c200?position=7&retainUncommittedData=false&close=false&action=flush", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.7 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "bf203466-4497-475f-a3c5-c0ec4aa2e30d" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D77CDE8683D72C", + "Last-Modified" : "Mon, 09 Dec 2019 19:32:27 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "1f17734a-101f-002d-70c7-aecdba000000", + "Date" : "Mon, 09 Dec 2019 19:32:26 GMT", + "x-ms-client-request-id" : "bf203466-4497-475f-a3c5-c0ec4aa2e30d" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://gaprahns.blob.core.windows.net?prefix=jtfssasimplutilstringtosignuserdelegationkey&comp=list", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.2.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "bcc5e967-1291-4de0-a394-f741424c618e" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "a37b2d5a-501e-00cf-53c7-ae29c8000000", + "Body" : "jtfssasimplutilstringtosignuserdelegationkeyjtfssasimplutilstringtosignuserdelegationkey070163165d11Mon, 09 Dec 2019 19:32:27 GMT\"0x8D77CDE8661D696\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Mon, 09 Dec 2019 19:32:27 GMT", + "x-ms-client-request-id" : "bcc5e967-1291-4de0-a394-f741424c618e", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfssasimplutilstringtosignuserdelegationkey070163165d11?restype=container", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-blob/12.2.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "48d20e91-fd54-4b44-9042-05011a1f67ab" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "a37b2d6c-501e-00cf-63c7-ae29c8000000", + "Date" : "Mon, 09 Dec 2019 19:32:27 GMT", + "x-ms-client-request-id" : "48d20e91-fd54-4b44-9042-05011a1f67ab" + }, + "Exception" : null + } ], + "variables" : [ "jtfssasimplutilstringtosignuserdelegationkey070163165d11", "javapathsasimplutilstringtosignuserdelegationkey160877c200" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestservicesassignaturesstringtosign[0].json b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestservicesassignaturesstringtosign[0].json index 08887ce172fa..6ca15c393f0a 100644 --- a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestservicesassignaturesstringtosign[0].json +++ b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestservicesassignaturesstringtosign[0].json @@ -1,23 +1,87 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfsservicesassignaturesstringtosign037827c6ad873202?restype=container", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfsservicesassignaturesstringtosign0588771b3c61cd71?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "9a766442-4605-4ef5-9030-263c0d4d6567" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "1f138979-2c51-4f19-a21d-95d20c9929a2" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D75EEA200E5399", - "Last-Modified" : "Fri, 01 Nov 2019 16:39:54 GMT", + "ETag" : "0x8D77826463DFD99", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:27 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "b520fbda-701e-0097-60d2-902db3000000", - "Date" : "Fri, 01 Nov 2019 16:39:54 GMT", - "x-ms-client-request-id" : "9a766442-4605-4ef5-9030-263c0d4d6567" + "x-ms-request-id" : "1d9a47ee-e01e-0092-400f-aad9cc000000", + "Date" : "Tue, 03 Dec 2019 19:23:27 GMT", + "x-ms-client-request-id" : "1f138979-2c51-4f19-a21d-95d20c9929a2" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsservicesassignaturesstringtosign0588771b3c61cd71/javapathservicesassignaturesstringtosign13912755752bc6?resource=file", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "403fbacd-fa0c-477d-b3d6-d76a744faa49" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D7782646544D5D", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:28 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "053c9ba3-101f-004b-6e0f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:27 GMT", + "x-ms-client-request-id" : "403fbacd-fa0c-477d-b3d6-d76a744faa49" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsservicesassignaturesstringtosign0588771b3c61cd71/javapathservicesassignaturesstringtosign13912755752bc6?position=0&action=append", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "0b31115a-f245-424e-a3a5-c0f5cabb36c9", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "053c9bac-101f-004b-770f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:27 GMT", + "x-ms-client-request-id" : "0b31115a-f245-424e-a3a5-c0f5cabb36c9" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsservicesassignaturesstringtosign0588771b3c61cd71/javapathservicesassignaturesstringtosign13912755752bc6?position=7&retainUncommittedData=false&close=false&action=flush", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "f699a5a3-57cc-41a1-a1eb-3036d7cb31d2" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D778264665BC24", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:28 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "053c9bb3-101f-004b-7e0f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:27 GMT", + "x-ms-client-request-id" : "f699a5a3-57cc-41a1-a1eb-3036d7cb31d2" }, "Exception" : null }, { @@ -25,8 +89,8 @@ "Uri" : "https://gaprahns.blob.core.windows.net?prefix=jtfsservicesassignaturesstringtosign&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "df6f23dc-8871-4595-8764-f60edea986ba" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "dfd53c54-d260-4876-8e19-d5154a9d99f0" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -34,20 +98,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "b520fbf4-701e-0097-78d2-902db3000000", - "Body" : "jtfsservicesassignaturesstringtosignjtfsservicesassignaturesstringtosign037827c6ad873202Fri, 01 Nov 2019 16:39:54 GMT\"0x8D75EEA200E5399\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Fri, 01 Nov 2019 16:39:54 GMT", - "x-ms-client-request-id" : "df6f23dc-8871-4595-8764-f60edea986ba", + "x-ms-request-id" : "1d9a4877-e01e-0092-3a0f-aad9cc000000", + "Body" : "jtfsservicesassignaturesstringtosignjtfsservicesassignaturesstringtosign0588771b3c61cd71Tue, 03 Dec 2019 19:23:27 GMT\"0x8D77826463DFD99\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Tue, 03 Dec 2019 19:23:28 GMT", + "x-ms-client-request-id" : "dfd53c54-d260-4876-8e19-d5154a9d99f0", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfsservicesassignaturesstringtosign037827c6ad873202?restype=container", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfsservicesassignaturesstringtosign0588771b3c61cd71?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "ae53a5ce-c049-4e2a-9684-a3c87ad8ac0c" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "4e2cbfa1-aa21-4db2-8725-9284c4bffde1" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -55,11 +119,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "b520fc02-701e-0097-06d2-902db3000000", - "Date" : "Fri, 01 Nov 2019 16:39:54 GMT", - "x-ms-client-request-id" : "ae53a5ce-c049-4e2a-9684-a3c87ad8ac0c" + "x-ms-request-id" : "1d9a488f-e01e-0092-4c0f-aad9cc000000", + "Date" : "Tue, 03 Dec 2019 19:23:28 GMT", + "x-ms-client-request-id" : "4e2cbfa1-aa21-4db2-8725-9284c4bffde1" }, "Exception" : null } ], - "variables" : [ "jtfsservicesassignaturesstringtosign037827c6ad873202" ] + "variables" : [ "jtfsservicesassignaturesstringtosign0588771b3c61cd71", "javapathservicesassignaturesstringtosign13912755752bc6" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestservicesassignaturesstringtosign[1].json b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestservicesassignaturesstringtosign[1].json index 901634d77390..0f0cf103ff43 100644 --- a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestservicesassignaturesstringtosign[1].json +++ b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestservicesassignaturesstringtosign[1].json @@ -1,23 +1,87 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfsservicesassignaturesstringtosign082440a169003a2c?restype=container", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfsservicesassignaturesstringtosign0958063b844bf635?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "89cd8bad-1663-4694-87e4-a2fd1ad5b421" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "9cd570a8-7019-4811-aeda-0ddd2d50ebe2" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D75EEA2027D3A1", - "Last-Modified" : "Fri, 01 Nov 2019 16:39:55 GMT", + "ETag" : "0x8D7782646B9AC54", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:28 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "b520fc34-701e-0097-31d2-902db3000000", - "Date" : "Fri, 01 Nov 2019 16:39:54 GMT", - "x-ms-client-request-id" : "89cd8bad-1663-4694-87e4-a2fd1ad5b421" + "x-ms-request-id" : "1d9a48a7-e01e-0092-600f-aad9cc000000", + "Date" : "Tue, 03 Dec 2019 19:23:28 GMT", + "x-ms-client-request-id" : "9cd570a8-7019-4811-aeda-0ddd2d50ebe2" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsservicesassignaturesstringtosign0958063b844bf635/javapathservicesassignaturesstringtosign1289571552ea9c?resource=file", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "871b236a-9efb-4345-b486-a180bdd8f806" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D7782646C582CC", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:28 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "053c9c06-101f-004b-510f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:27 GMT", + "x-ms-client-request-id" : "871b236a-9efb-4345-b486-a180bdd8f806" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsservicesassignaturesstringtosign0958063b844bf635/javapathservicesassignaturesstringtosign1289571552ea9c?position=0&action=append", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "973f54b9-1f42-4a93-bb9c-fef10dadad2f", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "053c9c0a-101f-004b-550f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:27 GMT", + "x-ms-client-request-id" : "973f54b9-1f42-4a93-bb9c-fef10dadad2f" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsservicesassignaturesstringtosign0958063b844bf635/javapathservicesassignaturesstringtosign1289571552ea9c?position=7&retainUncommittedData=false&close=false&action=flush", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "f1d0b53c-98ed-466c-bf26-d882bebb26c0" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D7782646D6EC07", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:28 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "053c9c0f-101f-004b-5a0f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:27 GMT", + "x-ms-client-request-id" : "f1d0b53c-98ed-466c-bf26-d882bebb26c0" }, "Exception" : null }, { @@ -25,8 +89,8 @@ "Uri" : "https://gaprahns.blob.core.windows.net?prefix=jtfsservicesassignaturesstringtosign&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "edbe4d1e-6fd8-48bc-9233-0d5b4b0a9d66" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "d60a95db-d09b-4ee6-8a2b-be451fca14ea" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -34,20 +98,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "b520fc66-701e-0097-5fd2-902db3000000", - "Body" : "jtfsservicesassignaturesstringtosignjtfsservicesassignaturesstringtosign082440a169003a2cFri, 01 Nov 2019 16:39:55 GMT\"0x8D75EEA2027D3A1\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Fri, 01 Nov 2019 16:39:54 GMT", - "x-ms-client-request-id" : "edbe4d1e-6fd8-48bc-9233-0d5b4b0a9d66", + "x-ms-request-id" : "1d9a48ea-e01e-0092-1f0f-aad9cc000000", + "Body" : "jtfsservicesassignaturesstringtosignjtfsservicesassignaturesstringtosign0958063b844bf635Tue, 03 Dec 2019 19:23:28 GMT\"0x8D7782646B9AC54\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Tue, 03 Dec 2019 19:23:28 GMT", + "x-ms-client-request-id" : "d60a95db-d09b-4ee6-8a2b-be451fca14ea", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfsservicesassignaturesstringtosign082440a169003a2c?restype=container", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfsservicesassignaturesstringtosign0958063b844bf635?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "08e20b6d-240b-45bc-ae79-dfce1c2a8be3" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "0fe94568-103e-4e5f-a170-888449fa2ba1" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -55,11 +119,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "b520fc82-701e-0097-78d2-902db3000000", - "Date" : "Fri, 01 Nov 2019 16:39:54 GMT", - "x-ms-client-request-id" : "08e20b6d-240b-45bc-ae79-dfce1c2a8be3" + "x-ms-request-id" : "1d9a48f8-e01e-0092-2b0f-aad9cc000000", + "Date" : "Tue, 03 Dec 2019 19:23:28 GMT", + "x-ms-client-request-id" : "0fe94568-103e-4e5f-a170-888449fa2ba1" }, "Exception" : null } ], - "variables" : [ "jtfsservicesassignaturesstringtosign082440a169003a2c" ] + "variables" : [ "jtfsservicesassignaturesstringtosign0958063b844bf635", "javapathservicesassignaturesstringtosign1289571552ea9c" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestservicesassignaturesstringtosign[2].json b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestservicesassignaturesstringtosign[2].json index 4434fe2c164b..b884cff9c648 100644 --- a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestservicesassignaturesstringtosign[2].json +++ b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestservicesassignaturesstringtosign[2].json @@ -1,23 +1,87 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfsservicesassignaturesstringtosign09857879a90d749a?restype=container", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfsservicesassignaturesstringtosign04431678dd2a59f6?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "02eca14f-9bb1-4cb7-9c16-e0f3fed81ddf" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "3ae6cfbe-07cb-4ac4-8e43-4ba96a02de85" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D75EEA2041A1D6", - "Last-Modified" : "Fri, 01 Nov 2019 16:39:55 GMT", + "ETag" : "0x8D7782646F1410A", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:29 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "b520fc9f-701e-0097-0fd2-902db3000000", - "Date" : "Fri, 01 Nov 2019 16:39:54 GMT", - "x-ms-client-request-id" : "02eca14f-9bb1-4cb7-9c16-e0f3fed81ddf" + "x-ms-request-id" : "1d9a490b-e01e-0092-3e0f-aad9cc000000", + "Date" : "Tue, 03 Dec 2019 19:23:28 GMT", + "x-ms-client-request-id" : "3ae6cfbe-07cb-4ac4-8e43-4ba96a02de85" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsservicesassignaturesstringtosign04431678dd2a59f6/javapathservicesassignaturesstringtosign149840800ddcf3?resource=file", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "91ee8998-2c50-4f40-bade-0f51fca86d56" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D7782646FBA1AC", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:29 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "053c9c2e-101f-004b-790f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:28 GMT", + "x-ms-client-request-id" : "91ee8998-2c50-4f40-bade-0f51fca86d56" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsservicesassignaturesstringtosign04431678dd2a59f6/javapathservicesassignaturesstringtosign149840800ddcf3?position=0&action=append", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "fa798198-8ef6-4703-ab54-9214c83b9541", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "053c9c32-101f-004b-7d0f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:28 GMT", + "x-ms-client-request-id" : "fa798198-8ef6-4703-ab54-9214c83b9541" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsservicesassignaturesstringtosign04431678dd2a59f6/javapathservicesassignaturesstringtosign149840800ddcf3?position=7&retainUncommittedData=false&close=false&action=flush", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "9c5be924-a2f4-4b31-abcf-dc5f67e46aa1" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D778264735D9C1", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:29 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "053c9c3c-101f-004b-070f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:28 GMT", + "x-ms-client-request-id" : "9c5be924-a2f4-4b31-abcf-dc5f67e46aa1" }, "Exception" : null }, { @@ -25,8 +89,8 @@ "Uri" : "https://gaprahns.blob.core.windows.net?prefix=jtfsservicesassignaturesstringtosign&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "6278b47a-33a2-41b5-8c11-68d318d5ab8b" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "2dc60a4c-2a4b-473b-9c9d-4a8a11a501b2" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -34,20 +98,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "b520fcbf-701e-0097-27d2-902db3000000", - "Body" : "jtfsservicesassignaturesstringtosignjtfsservicesassignaturesstringtosign09857879a90d749aFri, 01 Nov 2019 16:39:55 GMT\"0x8D75EEA2041A1D6\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Fri, 01 Nov 2019 16:39:54 GMT", - "x-ms-client-request-id" : "6278b47a-33a2-41b5-8c11-68d318d5ab8b", + "x-ms-request-id" : "1d9a498f-e01e-0092-3a0f-aad9cc000000", + "Body" : "jtfsservicesassignaturesstringtosignjtfsservicesassignaturesstringtosign04431678dd2a59f6Tue, 03 Dec 2019 19:23:29 GMT\"0x8D7782646F1410A\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Tue, 03 Dec 2019 19:23:29 GMT", + "x-ms-client-request-id" : "2dc60a4c-2a4b-473b-9c9d-4a8a11a501b2", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfsservicesassignaturesstringtosign09857879a90d749a?restype=container", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfsservicesassignaturesstringtosign04431678dd2a59f6?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "06405352-7221-49f5-8d56-8087de3a40ae" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "f82ea92f-c357-4c12-99e9-03c517fc9ecc" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -55,11 +119,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "b520fcd5-701e-0097-3bd2-902db3000000", - "Date" : "Fri, 01 Nov 2019 16:39:54 GMT", - "x-ms-client-request-id" : "06405352-7221-49f5-8d56-8087de3a40ae" + "x-ms-request-id" : "1d9a499f-e01e-0092-460f-aad9cc000000", + "Date" : "Tue, 03 Dec 2019 19:23:29 GMT", + "x-ms-client-request-id" : "f82ea92f-c357-4c12-99e9-03c517fc9ecc" }, "Exception" : null } ], - "variables" : [ "jtfsservicesassignaturesstringtosign09857879a90d749a" ] + "variables" : [ "jtfsservicesassignaturesstringtosign04431678dd2a59f6", "javapathservicesassignaturesstringtosign149840800ddcf3" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestservicesassignaturesstringtosign[3].json b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestservicesassignaturesstringtosign[3].json index 931988cbf641..4981d800b1a9 100644 --- a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestservicesassignaturesstringtosign[3].json +++ b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestservicesassignaturesstringtosign[3].json @@ -1,23 +1,87 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfsservicesassignaturesstringtosign0551741c282e4814?restype=container", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfsservicesassignaturesstringtosign0594510984d1e6b0?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "77d4b315-4118-4ebc-b442-3a1e1fee8666" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "e56ccb06-4405-4ae0-a52f-623a4bfacaa0" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D75EEA205DBA66", - "Last-Modified" : "Fri, 01 Nov 2019 16:39:55 GMT", + "ETag" : "0x8D77826475DD1E5", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:29 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "b520fcf3-701e-0097-58d2-902db3000000", - "Date" : "Fri, 01 Nov 2019 16:39:55 GMT", - "x-ms-client-request-id" : "77d4b315-4118-4ebc-b442-3a1e1fee8666" + "x-ms-request-id" : "1d9a49cc-e01e-0092-6f0f-aad9cc000000", + "Date" : "Tue, 03 Dec 2019 19:23:29 GMT", + "x-ms-client-request-id" : "e56ccb06-4405-4ae0-a52f-623a4bfacaa0" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsservicesassignaturesstringtosign0594510984d1e6b0/javapathservicesassignaturesstringtosign1952241a7c9ac3?resource=file", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "47c37a8a-510a-4fc2-9b24-f3d3026c9fe8" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D77826477D87F6", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:29 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "053c9c48-101f-004b-130f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:28 GMT", + "x-ms-client-request-id" : "47c37a8a-510a-4fc2-9b24-f3d3026c9fe8" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsservicesassignaturesstringtosign0594510984d1e6b0/javapathservicesassignaturesstringtosign1952241a7c9ac3?position=0&action=append", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "f305b3fe-b020-4b69-83ad-97ed0037255c", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "053c9c4a-101f-004b-150f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:29 GMT", + "x-ms-client-request-id" : "f305b3fe-b020-4b69-83ad-97ed0037255c" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsservicesassignaturesstringtosign0594510984d1e6b0/javapathservicesassignaturesstringtosign1952241a7c9ac3?position=7&retainUncommittedData=false&close=false&action=flush", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "0b786422-053f-49a4-bc38-8f9d29a6cf38" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D77826478F2145", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:30 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "053c9c51-101f-004b-1c0f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:29 GMT", + "x-ms-client-request-id" : "0b786422-053f-49a4-bc38-8f9d29a6cf38" }, "Exception" : null }, { @@ -25,8 +89,8 @@ "Uri" : "https://gaprahns.blob.core.windows.net?prefix=jtfsservicesassignaturesstringtosign&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "323687bb-1bd8-41de-95c3-35ac18c23702" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "d5e71df9-1569-4ce6-975a-57a59bbda54f" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -34,20 +98,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "b520fd07-701e-0097-6bd2-902db3000000", - "Body" : "jtfsservicesassignaturesstringtosignjtfsservicesassignaturesstringtosign0551741c282e4814Fri, 01 Nov 2019 16:39:55 GMT\"0x8D75EEA205DBA66\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Fri, 01 Nov 2019 16:39:55 GMT", - "x-ms-client-request-id" : "323687bb-1bd8-41de-95c3-35ac18c23702", + "x-ms-request-id" : "1d9a4a35-e01e-0092-450f-aad9cc000000", + "Body" : "jtfsservicesassignaturesstringtosignjtfsservicesassignaturesstringtosign0594510984d1e6b0Tue, 03 Dec 2019 19:23:29 GMT\"0x8D77826475DD1E5\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Tue, 03 Dec 2019 19:23:30 GMT", + "x-ms-client-request-id" : "d5e71df9-1569-4ce6-975a-57a59bbda54f", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfsservicesassignaturesstringtosign0551741c282e4814?restype=container", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfsservicesassignaturesstringtosign0594510984d1e6b0?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "04fbb16e-a655-427b-be64-ff54d80e5d09" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "d5ebd3e9-982a-449d-aea6-7de571680c8f" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -55,11 +119,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "b520fd23-701e-0097-03d2-902db3000000", - "Date" : "Fri, 01 Nov 2019 16:39:55 GMT", - "x-ms-client-request-id" : "04fbb16e-a655-427b-be64-ff54d80e5d09" + "x-ms-request-id" : "1d9a4a40-e01e-0092-4e0f-aad9cc000000", + "Date" : "Tue, 03 Dec 2019 19:23:30 GMT", + "x-ms-client-request-id" : "d5ebd3e9-982a-449d-aea6-7de571680c8f" }, "Exception" : null } ], - "variables" : [ "jtfsservicesassignaturesstringtosign0551741c282e4814" ] + "variables" : [ "jtfsservicesassignaturesstringtosign0594510984d1e6b0", "javapathservicesassignaturesstringtosign1952241a7c9ac3" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestservicesassignaturesstringtosign[4].json b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestservicesassignaturesstringtosign[4].json index d42a5190d3d6..4884619497d6 100644 --- a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestservicesassignaturesstringtosign[4].json +++ b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestservicesassignaturesstringtosign[4].json @@ -1,23 +1,87 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfsservicesassignaturesstringtosign09623930ff539c88?restype=container", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfsservicesassignaturesstringtosign01135422653d8494?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "a8e7d5af-4d65-4104-a891-a1e520643906" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "8eb87ce4-e69c-4293-92bc-97641f4ab261" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D75EEA2076EC43", - "Last-Modified" : "Fri, 01 Nov 2019 16:39:55 GMT", + "ETag" : "0x8D7782647AB638A", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:30 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "b520fd51-701e-0097-2ed2-902db3000000", - "Date" : "Fri, 01 Nov 2019 16:39:55 GMT", - "x-ms-client-request-id" : "a8e7d5af-4d65-4104-a891-a1e520643906" + "x-ms-request-id" : "1d9a4a5b-e01e-0092-610f-aad9cc000000", + "Date" : "Tue, 03 Dec 2019 19:23:30 GMT", + "x-ms-client-request-id" : "8eb87ce4-e69c-4293-92bc-97641f4ab261" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsservicesassignaturesstringtosign01135422653d8494/javapathservicesassignaturesstringtosign105005048ac777?resource=file", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "740fbad9-96a6-4a98-93ec-0a8dba4145e6" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D7782647C20437", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:30 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "053c9c52-101f-004b-1d0f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:29 GMT", + "x-ms-client-request-id" : "740fbad9-96a6-4a98-93ec-0a8dba4145e6" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsservicesassignaturesstringtosign01135422653d8494/javapathservicesassignaturesstringtosign105005048ac777?position=0&action=append", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "af8d7351-f284-4677-b498-5034bad3c559", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "053c9c53-101f-004b-1e0f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:29 GMT", + "x-ms-client-request-id" : "af8d7351-f284-4677-b498-5034bad3c559" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsservicesassignaturesstringtosign01135422653d8494/javapathservicesassignaturesstringtosign105005048ac777?position=7&retainUncommittedData=false&close=false&action=flush", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "b9976704-1da6-4385-a363-a15fcebb6398" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D7782647D99EC4", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:30 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "053c9c54-101f-004b-1f0f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:29 GMT", + "x-ms-client-request-id" : "b9976704-1da6-4385-a363-a15fcebb6398" }, "Exception" : null }, { @@ -25,8 +89,8 @@ "Uri" : "https://gaprahns.blob.core.windows.net?prefix=jtfsservicesassignaturesstringtosign&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "7af41148-77fa-4667-868f-e3401b457c1e" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "e6e29944-9059-43c6-ad0e-94ad61ec5af3" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -34,20 +98,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "b520fd6c-701e-0097-45d2-902db3000000", - "Body" : "jtfsservicesassignaturesstringtosignjtfsservicesassignaturesstringtosign09623930ff539c88Fri, 01 Nov 2019 16:39:55 GMT\"0x8D75EEA2076EC43\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Fri, 01 Nov 2019 16:39:55 GMT", - "x-ms-client-request-id" : "7af41148-77fa-4667-868f-e3401b457c1e", + "x-ms-request-id" : "1d9a4aa5-e01e-0092-250f-aad9cc000000", + "Body" : "jtfsservicesassignaturesstringtosignjtfsservicesassignaturesstringtosign01135422653d8494Tue, 03 Dec 2019 19:23:30 GMT\"0x8D7782647AB638A\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Tue, 03 Dec 2019 19:23:30 GMT", + "x-ms-client-request-id" : "e6e29944-9059-43c6-ad0e-94ad61ec5af3", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfsservicesassignaturesstringtosign09623930ff539c88?restype=container", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfsservicesassignaturesstringtosign01135422653d8494?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "3c84bbd3-1723-45cd-96e8-eed7ef1bcec3" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "3ed4714b-dea1-42e5-9088-361278b4d9e7" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -55,11 +119,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "b520fd7d-701e-0097-55d2-902db3000000", - "Date" : "Fri, 01 Nov 2019 16:39:55 GMT", - "x-ms-client-request-id" : "3c84bbd3-1723-45cd-96e8-eed7ef1bcec3" + "x-ms-request-id" : "1d9a4ab3-e01e-0092-310f-aad9cc000000", + "Date" : "Tue, 03 Dec 2019 19:23:30 GMT", + "x-ms-client-request-id" : "3ed4714b-dea1-42e5-9088-361278b4d9e7" }, "Exception" : null } ], - "variables" : [ "jtfsservicesassignaturesstringtosign09623930ff539c88" ] + "variables" : [ "jtfsservicesassignaturesstringtosign01135422653d8494", "javapathservicesassignaturesstringtosign105005048ac777" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestservicesassignaturesstringtosign[5].json b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestservicesassignaturesstringtosign[5].json index c68c51c68a6d..76146a32d2b6 100644 --- a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestservicesassignaturesstringtosign[5].json +++ b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestservicesassignaturesstringtosign[5].json @@ -1,23 +1,87 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfsservicesassignaturesstringtosign05255514cb7566bc?restype=container", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfsservicesassignaturesstringtosign097730b17d74dfb3?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "23f561bf-87c1-4ff7-b597-659ea16087d8" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "4ff087b0-3a1c-4cd5-8f3d-07af3a03f8e3" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D75EEA2092415B", - "Last-Modified" : "Fri, 01 Nov 2019 16:39:55 GMT", + "ETag" : "0x8D7782647F4AECD", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:30 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "b520fd9b-701e-0097-72d2-902db3000000", - "Date" : "Fri, 01 Nov 2019 16:39:55 GMT", - "x-ms-client-request-id" : "23f561bf-87c1-4ff7-b597-659ea16087d8" + "x-ms-request-id" : "1d9a4ac1-e01e-0092-3e0f-aad9cc000000", + "Date" : "Tue, 03 Dec 2019 19:23:30 GMT", + "x-ms-client-request-id" : "4ff087b0-3a1c-4cd5-8f3d-07af3a03f8e3" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsservicesassignaturesstringtosign097730b17d74dfb3/javapathservicesassignaturesstringtosign16164029ded58d?resource=file", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "8f2e3cf9-68ef-478d-b60e-8fdc4e87b44b" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D7782648030079", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:30 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "053c9c5d-101f-004b-280f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:29 GMT", + "x-ms-client-request-id" : "8f2e3cf9-68ef-478d-b60e-8fdc4e87b44b" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsservicesassignaturesstringtosign097730b17d74dfb3/javapathservicesassignaturesstringtosign16164029ded58d?position=0&action=append", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "bc7eabf7-c145-4154-9b88-55c3ea325950", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "053c9c67-101f-004b-320f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:29 GMT", + "x-ms-client-request-id" : "bc7eabf7-c145-4154-9b88-55c3ea325950" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsservicesassignaturesstringtosign097730b17d74dfb3/javapathservicesassignaturesstringtosign16164029ded58d?position=7&retainUncommittedData=false&close=false&action=flush", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "b614e415-9a7a-478a-b68f-471bb24373bf" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D7782648153CF6", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:30 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "053c9c6a-101f-004b-350f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:29 GMT", + "x-ms-client-request-id" : "b614e415-9a7a-478a-b68f-471bb24373bf" }, "Exception" : null }, { @@ -25,8 +89,8 @@ "Uri" : "https://gaprahns.blob.core.windows.net?prefix=jtfsservicesassignaturesstringtosign&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "9d8b6be2-9399-40ce-afa5-f83e1ddcfeb9" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "4f7845ad-b112-4047-bea9-9b27bf8e49e8" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -34,20 +98,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "b520fdac-701e-0097-02d2-902db3000000", - "Body" : "jtfsservicesassignaturesstringtosignjtfsservicesassignaturesstringtosign05255514cb7566bcFri, 01 Nov 2019 16:39:55 GMT\"0x8D75EEA2092415B\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Fri, 01 Nov 2019 16:39:55 GMT", - "x-ms-client-request-id" : "9d8b6be2-9399-40ce-afa5-f83e1ddcfeb9", + "x-ms-request-id" : "1d9a4aff-e01e-0092-750f-aad9cc000000", + "Body" : "jtfsservicesassignaturesstringtosignjtfsservicesassignaturesstringtosign097730b17d74dfb3Tue, 03 Dec 2019 19:23:30 GMT\"0x8D7782647F4AECD\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Tue, 03 Dec 2019 19:23:30 GMT", + "x-ms-client-request-id" : "4f7845ad-b112-4047-bea9-9b27bf8e49e8", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfsservicesassignaturesstringtosign05255514cb7566bc?restype=container", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfsservicesassignaturesstringtosign097730b17d74dfb3?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "86f0f087-2ac5-4a2c-80d2-7358f0259e6b" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "1557575d-8ecf-4492-9571-e6afc35bd6b2" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -55,11 +119,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "b520fdbd-701e-0097-13d2-902db3000000", - "Date" : "Fri, 01 Nov 2019 16:39:55 GMT", - "x-ms-client-request-id" : "86f0f087-2ac5-4a2c-80d2-7358f0259e6b" + "x-ms-request-id" : "1d9a4b0f-e01e-0092-030f-aad9cc000000", + "Date" : "Tue, 03 Dec 2019 19:23:31 GMT", + "x-ms-client-request-id" : "1557575d-8ecf-4492-9571-e6afc35bd6b2" }, "Exception" : null } ], - "variables" : [ "jtfsservicesassignaturesstringtosign05255514cb7566bc" ] + "variables" : [ "jtfsservicesassignaturesstringtosign097730b17d74dfb3", "javapathservicesassignaturesstringtosign16164029ded58d" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestservicesassignaturesstringtosign[6].json b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestservicesassignaturesstringtosign[6].json index a69f00697b29..32ef24bd93c0 100644 --- a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestservicesassignaturesstringtosign[6].json +++ b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestservicesassignaturesstringtosign[6].json @@ -1,23 +1,87 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfsservicesassignaturesstringtosign0739494315cea834?restype=container", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfsservicesassignaturesstringtosign06507288fdce5236?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "30660ec8-5f34-46da-8a98-b92f38452d46" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "fcefe24b-2137-4ea6-85b8-ed46c7d91ea6" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D75EEA20AC5DBF", - "Last-Modified" : "Fri, 01 Nov 2019 16:39:55 GMT", + "ETag" : "0x8D77826484463C8", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:31 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "b520fde3-701e-0097-39d2-902db3000000", - "Date" : "Fri, 01 Nov 2019 16:39:55 GMT", - "x-ms-client-request-id" : "30660ec8-5f34-46da-8a98-b92f38452d46" + "x-ms-request-id" : "1d9a4b59-e01e-0092-400f-aad9cc000000", + "Date" : "Tue, 03 Dec 2019 19:23:31 GMT", + "x-ms-client-request-id" : "fcefe24b-2137-4ea6-85b8-ed46c7d91ea6" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsservicesassignaturesstringtosign06507288fdce5236/javapathservicesassignaturesstringtosign10581120b7f330?resource=file", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "aad10fe5-5c99-469d-bd55-13eaafca0520" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D77826484FB330", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:31 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "053c9c79-101f-004b-440f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:30 GMT", + "x-ms-client-request-id" : "aad10fe5-5c99-469d-bd55-13eaafca0520" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsservicesassignaturesstringtosign06507288fdce5236/javapathservicesassignaturesstringtosign10581120b7f330?position=0&action=append", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "75a3c162-5c3e-497e-9185-e95367d0d38a", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "053c9c7f-101f-004b-4a0f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:30 GMT", + "x-ms-client-request-id" : "75a3c162-5c3e-497e-9185-e95367d0d38a" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsservicesassignaturesstringtosign06507288fdce5236/javapathservicesassignaturesstringtosign10581120b7f330?position=7&retainUncommittedData=false&close=false&action=flush", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "8a046f8c-9aa0-46c3-988c-92836bdbdad6" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D7782648628E2F", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:31 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "053c9c8c-101f-004b-570f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:30 GMT", + "x-ms-client-request-id" : "8a046f8c-9aa0-46c3-988c-92836bdbdad6" }, "Exception" : null }, { @@ -25,8 +89,8 @@ "Uri" : "https://gaprahns.blob.core.windows.net?prefix=jtfsservicesassignaturesstringtosign&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "f1de7970-cd25-4d75-9d14-43df2c3e6ea8" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "d4306d14-ba7d-4060-859d-96c24b165c5b" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -34,20 +98,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "b520fe12-701e-0097-60d2-902db3000000", - "Body" : "jtfsservicesassignaturesstringtosignjtfsservicesassignaturesstringtosign0739494315cea834Fri, 01 Nov 2019 16:39:55 GMT\"0x8D75EEA20AC5DBF\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Fri, 01 Nov 2019 16:39:55 GMT", - "x-ms-client-request-id" : "f1de7970-cd25-4d75-9d14-43df2c3e6ea8", + "x-ms-request-id" : "1d9a4bb2-e01e-0092-0b0f-aad9cc000000", + "Body" : "jtfsservicesassignaturesstringtosignjtfsservicesassignaturesstringtosign06507288fdce5236Tue, 03 Dec 2019 19:23:31 GMT\"0x8D77826484463C8\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Tue, 03 Dec 2019 19:23:31 GMT", + "x-ms-client-request-id" : "d4306d14-ba7d-4060-859d-96c24b165c5b", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfsservicesassignaturesstringtosign0739494315cea834?restype=container", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfsservicesassignaturesstringtosign06507288fdce5236?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "580294c8-4e19-4478-bbfb-92981ea381ae" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "9f97eb66-ce4a-49a7-901b-ba30de7511bd" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -55,11 +119,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "b520fe3d-701e-0097-04d2-902db3000000", - "Date" : "Fri, 01 Nov 2019 16:39:55 GMT", - "x-ms-client-request-id" : "580294c8-4e19-4478-bbfb-92981ea381ae" + "x-ms-request-id" : "1d9a4bbf-e01e-0092-180f-aad9cc000000", + "Date" : "Tue, 03 Dec 2019 19:23:31 GMT", + "x-ms-client-request-id" : "9f97eb66-ce4a-49a7-901b-ba30de7511bd" }, "Exception" : null } ], - "variables" : [ "jtfsservicesassignaturesstringtosign0739494315cea834" ] + "variables" : [ "jtfsservicesassignaturesstringtosign06507288fdce5236", "javapathservicesassignaturesstringtosign10581120b7f330" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestservicesassignaturesstringtosign[7].json b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestservicesassignaturesstringtosign[7].json index 56ae4ee2dd34..520077b3e917 100644 --- a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestservicesassignaturesstringtosign[7].json +++ b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestservicesassignaturesstringtosign[7].json @@ -1,23 +1,87 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfsservicesassignaturesstringtosign0106942e32d3ba0e?restype=container", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfsservicesassignaturesstringtosign086003bb57aafc5c?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "debf5991-420c-49ad-81a6-b72cced7ab0a" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "454979ba-f041-4fa6-86bd-5d65e9a311f6" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D75EEA20C5B6AF", - "Last-Modified" : "Fri, 01 Nov 2019 16:39:56 GMT", + "ETag" : "0x8D77826487BF874", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:31 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "b520fe63-701e-0097-28d2-902db3000000", - "Date" : "Fri, 01 Nov 2019 16:39:55 GMT", - "x-ms-client-request-id" : "debf5991-420c-49ad-81a6-b72cced7ab0a" + "x-ms-request-id" : "1d9a4bd6-e01e-0092-2d0f-aad9cc000000", + "Date" : "Tue, 03 Dec 2019 19:23:31 GMT", + "x-ms-client-request-id" : "454979ba-f041-4fa6-86bd-5d65e9a311f6" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsservicesassignaturesstringtosign086003bb57aafc5c/javapathservicesassignaturesstringtosign1997503f4a09ba?resource=file", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "a16a2c6b-522f-4b16-99d2-314d5d95cac2" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D7782648862A14", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:31 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "053c9cae-101f-004b-790f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:30 GMT", + "x-ms-client-request-id" : "a16a2c6b-522f-4b16-99d2-314d5d95cac2" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsservicesassignaturesstringtosign086003bb57aafc5c/javapathservicesassignaturesstringtosign1997503f4a09ba?position=0&action=append", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "e3d9e78d-2916-4f05-b28d-acdd86deb7c2", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "053c9cb5-101f-004b-800f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:30 GMT", + "x-ms-client-request-id" : "e3d9e78d-2916-4f05-b28d-acdd86deb7c2" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsservicesassignaturesstringtosign086003bb57aafc5c/javapathservicesassignaturesstringtosign1997503f4a09ba?position=7&retainUncommittedData=false&close=false&action=flush", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "08a81a6e-d8ff-4b0c-b296-a1c6c56f2f96" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D77826489850CB", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:31 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "053c9cb6-101f-004b-010f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:30 GMT", + "x-ms-client-request-id" : "08a81a6e-d8ff-4b0c-b296-a1c6c56f2f96" }, "Exception" : null }, { @@ -25,8 +89,8 @@ "Uri" : "https://gaprahns.blob.core.windows.net?prefix=jtfsservicesassignaturesstringtosign&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "58db76de-0dea-4725-bf42-47eb63287fb9" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "f9106c45-2d7b-4bd2-a486-d90688e16611" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -34,20 +98,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "b520fe79-701e-0097-3cd2-902db3000000", - "Body" : "jtfsservicesassignaturesstringtosignjtfsservicesassignaturesstringtosign0106942e32d3ba0eFri, 01 Nov 2019 16:39:56 GMT\"0x8D75EEA20C5B6AF\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Fri, 01 Nov 2019 16:39:55 GMT", - "x-ms-client-request-id" : "58db76de-0dea-4725-bf42-47eb63287fb9", + "x-ms-request-id" : "1d9a4c1d-e01e-0092-6c0f-aad9cc000000", + "Body" : "jtfsservicesassignaturesstringtosignjtfsservicesassignaturesstringtosign086003bb57aafc5cTue, 03 Dec 2019 19:23:31 GMT\"0x8D77826487BF874\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Tue, 03 Dec 2019 19:23:31 GMT", + "x-ms-client-request-id" : "f9106c45-2d7b-4bd2-a486-d90688e16611", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfsservicesassignaturesstringtosign0106942e32d3ba0e?restype=container", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfsservicesassignaturesstringtosign086003bb57aafc5c?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "ec5a45e1-3f91-46c0-871b-1c23c8608953" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "692808d7-0e85-4ddb-9c76-d573618d889e" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -55,11 +119,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "b520fe8c-701e-0097-4fd2-902db3000000", - "Date" : "Fri, 01 Nov 2019 16:39:55 GMT", - "x-ms-client-request-id" : "ec5a45e1-3f91-46c0-871b-1c23c8608953" + "x-ms-request-id" : "1d9a4c26-e01e-0092-750f-aad9cc000000", + "Date" : "Tue, 03 Dec 2019 19:23:31 GMT", + "x-ms-client-request-id" : "692808d7-0e85-4ddb-9c76-d573618d889e" }, "Exception" : null } ], - "variables" : [ "jtfsservicesassignaturesstringtosign0106942e32d3ba0e" ] + "variables" : [ "jtfsservicesassignaturesstringtosign086003bb57aafc5c", "javapathservicesassignaturesstringtosign1997503f4a09ba" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestservicesassignaturesstringtosign[8].json b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestservicesassignaturesstringtosign[8].json index 9f78ab96e98d..2114c2af925a 100644 --- a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestservicesassignaturesstringtosign[8].json +++ b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestservicesassignaturesstringtosign[8].json @@ -1,23 +1,87 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfsservicesassignaturesstringtosign059246da2544bb45?restype=container", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfsservicesassignaturesstringtosign065278d41c609812?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "16635aac-5980-4bf0-a6e9-2200899e37fc" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "474f3d92-0cc0-4071-ac61-c81a50cf3182" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D75EEA20F29B25", - "Last-Modified" : "Fri, 01 Nov 2019 16:39:56 GMT", + "ETag" : "0x8D7782648B317E5", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:32 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "b520feef-701e-0097-2ad2-902db3000000", - "Date" : "Fri, 01 Nov 2019 16:39:56 GMT", - "x-ms-client-request-id" : "16635aac-5980-4bf0-a6e9-2200899e37fc" + "x-ms-request-id" : "1d9a4c2f-e01e-0092-7d0f-aad9cc000000", + "Date" : "Tue, 03 Dec 2019 19:23:31 GMT", + "x-ms-client-request-id" : "474f3d92-0cc0-4071-ac61-c81a50cf3182" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsservicesassignaturesstringtosign065278d41c609812/javapathservicesassignaturesstringtosign1461651a76e152?resource=file", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "4b17877a-48b5-4ae5-b6e1-ea0dd4893c32" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D7782648BF2ECA", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:32 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "053c9cbe-101f-004b-090f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:31 GMT", + "x-ms-client-request-id" : "4b17877a-48b5-4ae5-b6e1-ea0dd4893c32" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsservicesassignaturesstringtosign065278d41c609812/javapathservicesassignaturesstringtosign1461651a76e152?position=0&action=append", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "d81195e4-88d1-47ac-89a4-73fae0041c45", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "053c9cbf-101f-004b-0a0f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:31 GMT", + "x-ms-client-request-id" : "d81195e4-88d1-47ac-89a4-73fae0041c45" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsservicesassignaturesstringtosign065278d41c609812/javapathservicesassignaturesstringtosign1461651a76e152?position=7&retainUncommittedData=false&close=false&action=flush", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "fb9548b5-8640-439b-9c5a-0aca19f64ba0" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D7782648D14C05", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:32 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "053c9cc0-101f-004b-0b0f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:31 GMT", + "x-ms-client-request-id" : "fb9548b5-8640-439b-9c5a-0aca19f64ba0" }, "Exception" : null }, { @@ -25,8 +89,8 @@ "Uri" : "https://gaprahns.blob.core.windows.net?prefix=jtfsservicesassignaturesstringtosign&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "88c92d0c-fea1-4bb4-a899-37e4e6fe002d" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "634ba2e3-7478-4b00-adf4-8c4ebe480d6b" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -34,20 +98,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "b520ff05-701e-0097-3fd2-902db3000000", - "Body" : "jtfsservicesassignaturesstringtosignjtfsservicesassignaturesstringtosign059246da2544bb45Fri, 01 Nov 2019 16:39:56 GMT\"0x8D75EEA20F29B25\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Fri, 01 Nov 2019 16:39:56 GMT", - "x-ms-client-request-id" : "88c92d0c-fea1-4bb4-a899-37e4e6fe002d", + "x-ms-request-id" : "1d9a4c6a-e01e-0092-2f0f-aad9cc000000", + "Body" : "jtfsservicesassignaturesstringtosignjtfsservicesassignaturesstringtosign065278d41c609812Tue, 03 Dec 2019 19:23:32 GMT\"0x8D7782648B317E5\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Tue, 03 Dec 2019 19:23:32 GMT", + "x-ms-client-request-id" : "634ba2e3-7478-4b00-adf4-8c4ebe480d6b", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfsservicesassignaturesstringtosign059246da2544bb45?restype=container", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfsservicesassignaturesstringtosign065278d41c609812?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "926acf50-e8db-4f17-b263-7b97c8d9d0e5" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "03aadf6a-0a63-4e4e-ab92-98fc44203a1e" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -55,11 +119,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "b520ff1b-701e-0097-50d2-902db3000000", - "Date" : "Fri, 01 Nov 2019 16:39:56 GMT", - "x-ms-client-request-id" : "926acf50-e8db-4f17-b263-7b97c8d9d0e5" + "x-ms-request-id" : "1d9a4c75-e01e-0092-370f-aad9cc000000", + "Date" : "Tue, 03 Dec 2019 19:23:32 GMT", + "x-ms-client-request-id" : "03aadf6a-0a63-4e4e-ab92-98fc44203a1e" }, "Exception" : null } ], - "variables" : [ "jtfsservicesassignaturesstringtosign059246da2544bb45" ] + "variables" : [ "jtfsservicesassignaturesstringtosign065278d41c609812", "javapathservicesassignaturesstringtosign1461651a76e152" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestservicesassignaturesstringtosignuserdelegationkey[0].json b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestservicesassignaturesstringtosignuserdelegationkey[0].json index 70ace10d68ad..f14c346cc854 100644 --- a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestservicesassignaturesstringtosignuserdelegationkey[0].json +++ b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestservicesassignaturesstringtosignuserdelegationkey[0].json @@ -1,23 +1,87 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfsservicesassignaturesstringtosignuserdelegationkey03058237?restype=container", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfsservicesassignaturesstringtosignuserdelegationkey08931032?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "aabe99bf-02d8-42d3-9544-fab59a95886b" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "b1ab48da-9ce3-4b24-87df-a31884ebdfa9" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D75EEA210D7AFC", - "Last-Modified" : "Fri, 01 Nov 2019 16:39:56 GMT", + "ETag" : "0x8D7782648EAFAC0", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:32 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "b520ff36-701e-0097-6ad2-902db3000000", - "Date" : "Fri, 01 Nov 2019 16:39:56 GMT", - "x-ms-client-request-id" : "aabe99bf-02d8-42d3-9544-fab59a95886b" + "x-ms-request-id" : "1d9a4c82-e01e-0092-410f-aad9cc000000", + "Date" : "Tue, 03 Dec 2019 19:23:32 GMT", + "x-ms-client-request-id" : "b1ab48da-9ce3-4b24-87df-a31884ebdfa9" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsservicesassignaturesstringtosignuserdelegationkey08931032/javapathservicesassignaturesstringtosignuserdelegationkey130646?resource=file", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "b1af4bab-9c3d-437c-99e1-7067f06332cd" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D7782648F5A8D2", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:32 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "053c9cc1-101f-004b-0c0f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:31 GMT", + "x-ms-client-request-id" : "b1af4bab-9c3d-437c-99e1-7067f06332cd" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsservicesassignaturesstringtosignuserdelegationkey08931032/javapathservicesassignaturesstringtosignuserdelegationkey130646?position=0&action=append", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "f77e57d3-3eb0-4799-982f-51db36e8519c", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "053c9cc2-101f-004b-0d0f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:31 GMT", + "x-ms-client-request-id" : "f77e57d3-3eb0-4799-982f-51db36e8519c" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsservicesassignaturesstringtosignuserdelegationkey08931032/javapathservicesassignaturesstringtosignuserdelegationkey130646?position=7&retainUncommittedData=false&close=false&action=flush", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "03288fdd-02c0-4cf0-9244-414361c63c26" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D778264905CC3C", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:32 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "053c9cc3-101f-004b-0e0f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:31 GMT", + "x-ms-client-request-id" : "03288fdd-02c0-4cf0-9244-414361c63c26" }, "Exception" : null }, { @@ -25,8 +89,8 @@ "Uri" : "https://gaprahns.blob.core.windows.net?prefix=jtfsservicesassignaturesstringtosignuserdelegationkey&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "29531ff2-17ed-4b2f-a2f0-064dba062683" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "1c779ec4-3bf3-4e95-a11c-5162182a3b5d" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -34,20 +98,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "b520ff4f-701e-0097-02d2-902db3000000", - "Body" : "jtfsservicesassignaturesstringtosignuserdelegationkeyjtfsservicesassignaturesstringtosignuserdelegationkey03058237Fri, 01 Nov 2019 16:39:56 GMT\"0x8D75EEA210D7AFC\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Fri, 01 Nov 2019 16:39:56 GMT", - "x-ms-client-request-id" : "29531ff2-17ed-4b2f-a2f0-064dba062683", + "x-ms-request-id" : "1d9a4ca8-e01e-0092-610f-aad9cc000000", + "Body" : "jtfsservicesassignaturesstringtosignuserdelegationkeyjtfsservicesassignaturesstringtosignuserdelegationkey08931032Tue, 03 Dec 2019 19:23:32 GMT\"0x8D7782648EAFAC0\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Tue, 03 Dec 2019 19:23:32 GMT", + "x-ms-client-request-id" : "1c779ec4-3bf3-4e95-a11c-5162182a3b5d", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfsservicesassignaturesstringtosignuserdelegationkey03058237?restype=container", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfsservicesassignaturesstringtosignuserdelegationkey08931032?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "effd2074-d6b1-47af-8af0-90f5b7eeb764" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "608c1b06-92c1-494e-99c3-bd00a3b88170" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -55,11 +119,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "b520ff69-701e-0097-17d2-902db3000000", - "Date" : "Fri, 01 Nov 2019 16:39:56 GMT", - "x-ms-client-request-id" : "effd2074-d6b1-47af-8af0-90f5b7eeb764" + "x-ms-request-id" : "1d9a4cb3-e01e-0092-6c0f-aad9cc000000", + "Date" : "Tue, 03 Dec 2019 19:23:32 GMT", + "x-ms-client-request-id" : "608c1b06-92c1-494e-99c3-bd00a3b88170" }, "Exception" : null } ], - "variables" : [ "jtfsservicesassignaturesstringtosignuserdelegationkey03058237" ] + "variables" : [ "jtfsservicesassignaturesstringtosignuserdelegationkey08931032", "javapathservicesassignaturesstringtosignuserdelegationkey130646" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestservicesassignaturesstringtosignuserdelegationkey[10].json b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestservicesassignaturesstringtosignuserdelegationkey[10].json index 5abb042cbfd4..d11b8af94552 100644 --- a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestservicesassignaturesstringtosignuserdelegationkey[10].json +++ b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestservicesassignaturesstringtosignuserdelegationkey[10].json @@ -1,23 +1,87 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfsservicesassignaturesstringtosignuserdelegationkey04743298?restype=container", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfsservicesassignaturesstringtosignuserdelegationkey033146f0?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "2c0085fa-171b-4a9a-bd6a-fb0347d9922f" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "5f7593df-a07e-40dd-aa1b-b38ec86466b8" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D75EEA223BF884", - "Last-Modified" : "Fri, 01 Nov 2019 16:39:58 GMT", + "ETag" : "0x8D778264B35EFFD", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:36 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "b5210304-701e-0097-63d2-902db3000000", - "Date" : "Fri, 01 Nov 2019 16:39:58 GMT", - "x-ms-client-request-id" : "2c0085fa-171b-4a9a-bd6a-fb0347d9922f" + "x-ms-request-id" : "1d9a4fff-e01e-0092-270f-aad9cc000000", + "Date" : "Tue, 03 Dec 2019 19:23:36 GMT", + "x-ms-client-request-id" : "5f7593df-a07e-40dd-aa1b-b38ec86466b8" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsservicesassignaturesstringtosignuserdelegationkey033146f0/javapathservicesassignaturesstringtosignuserdelegationkey152577?resource=file", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "567b9891-9261-4779-8438-ab4e863bd67c" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D778264B42CE56", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:36 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "053c9d11-101f-004b-540f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:36 GMT", + "x-ms-client-request-id" : "567b9891-9261-4779-8438-ab4e863bd67c" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsservicesassignaturesstringtosignuserdelegationkey033146f0/javapathservicesassignaturesstringtosignuserdelegationkey152577?position=0&action=append", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "da30ac24-3441-4fb7-afec-a8a43288fdb5", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "053c9d12-101f-004b-550f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:36 GMT", + "x-ms-client-request-id" : "da30ac24-3441-4fb7-afec-a8a43288fdb5" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsservicesassignaturesstringtosignuserdelegationkey033146f0/javapathservicesassignaturesstringtosignuserdelegationkey152577?position=7&retainUncommittedData=false&close=false&action=flush", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "eff399be-380e-42cc-8583-591deff97e94" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D778264B56245A", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:36 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "053c9d13-101f-004b-560f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:36 GMT", + "x-ms-client-request-id" : "eff399be-380e-42cc-8583-591deff97e94" }, "Exception" : null }, { @@ -25,8 +89,8 @@ "Uri" : "https://gaprahns.blob.core.windows.net?prefix=jtfsservicesassignaturesstringtosignuserdelegationkey&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "03bc5842-5231-413a-a69c-bd497bc2bd0c" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "6625d4b2-6b9e-4526-99ce-662ae80a126c" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -34,20 +98,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "b5210315-701e-0097-71d2-902db3000000", - "Body" : "jtfsservicesassignaturesstringtosignuserdelegationkeyjtfsservicesassignaturesstringtosignuserdelegationkey04743298Fri, 01 Nov 2019 16:39:58 GMT\"0x8D75EEA223BF884\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Fri, 01 Nov 2019 16:39:58 GMT", - "x-ms-client-request-id" : "03bc5842-5231-413a-a69c-bd497bc2bd0c", + "x-ms-request-id" : "1d9a5035-e01e-0092-570f-aad9cc000000", + "Body" : "jtfsservicesassignaturesstringtosignuserdelegationkeyjtfsservicesassignaturesstringtosignuserdelegationkey033146f0Tue, 03 Dec 2019 19:23:36 GMT\"0x8D778264B35EFFD\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Tue, 03 Dec 2019 19:23:36 GMT", + "x-ms-client-request-id" : "6625d4b2-6b9e-4526-99ce-662ae80a126c", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfsservicesassignaturesstringtosignuserdelegationkey04743298?restype=container", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfsservicesassignaturesstringtosignuserdelegationkey033146f0?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "29e60840-6b16-43ad-9c97-2fcefdd46574" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "fb58d69a-be38-4ea3-b23e-e7b772182f16" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -55,11 +119,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "b5210323-701e-0097-7fd2-902db3000000", - "Date" : "Fri, 01 Nov 2019 16:39:58 GMT", - "x-ms-client-request-id" : "29e60840-6b16-43ad-9c97-2fcefdd46574" + "x-ms-request-id" : "1d9a503f-e01e-0092-600f-aad9cc000000", + "Date" : "Tue, 03 Dec 2019 19:23:36 GMT", + "x-ms-client-request-id" : "fb58d69a-be38-4ea3-b23e-e7b772182f16" }, "Exception" : null } ], - "variables" : [ "jtfsservicesassignaturesstringtosignuserdelegationkey04743298" ] + "variables" : [ "jtfsservicesassignaturesstringtosignuserdelegationkey033146f0", "javapathservicesassignaturesstringtosignuserdelegationkey152577" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestservicesassignaturesstringtosignuserdelegationkey[11].json b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestservicesassignaturesstringtosignuserdelegationkey[11].json index d148cc88bc96..f395e0561573 100644 --- a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestservicesassignaturesstringtosignuserdelegationkey[11].json +++ b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestservicesassignaturesstringtosignuserdelegationkey[11].json @@ -1,23 +1,87 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfsservicesassignaturesstringtosignuserdelegationkey02427323?restype=container", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfsservicesassignaturesstringtosignuserdelegationkey093266ca?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "7e03fc96-b463-4cbb-bccf-21faf6877373" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "8dba6bc3-4b72-4d15-a818-0d9d4ef85d07" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D75EEA2256D85B", - "Last-Modified" : "Fri, 01 Nov 2019 16:39:58 GMT", + "ETag" : "0x8D778264B701D35", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:36 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "b521033c-701e-0097-15d2-902db3000000", - "Date" : "Fri, 01 Nov 2019 16:39:58 GMT", - "x-ms-client-request-id" : "7e03fc96-b463-4cbb-bccf-21faf6877373" + "x-ms-request-id" : "1d9a504a-e01e-0092-6a0f-aad9cc000000", + "Date" : "Tue, 03 Dec 2019 19:23:36 GMT", + "x-ms-client-request-id" : "8dba6bc3-4b72-4d15-a818-0d9d4ef85d07" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsservicesassignaturesstringtosignuserdelegationkey093266ca/javapathservicesassignaturesstringtosignuserdelegationkey130481?resource=file", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "41055947-4515-4e0d-9e00-2ac6bb10d22e" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D778264B79F88F", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:36 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "053c9d15-101f-004b-570f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:36 GMT", + "x-ms-client-request-id" : "41055947-4515-4e0d-9e00-2ac6bb10d22e" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsservicesassignaturesstringtosignuserdelegationkey093266ca/javapathservicesassignaturesstringtosignuserdelegationkey130481?position=0&action=append", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "bc852cfa-90b7-4901-9738-a1df0e28a448", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "053c9d16-101f-004b-580f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:36 GMT", + "x-ms-client-request-id" : "bc852cfa-90b7-4901-9738-a1df0e28a448" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsservicesassignaturesstringtosignuserdelegationkey093266ca/javapathservicesassignaturesstringtosignuserdelegationkey130481?position=7&retainUncommittedData=false&close=false&action=flush", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "f70539f3-4568-424e-8398-48c66c5c0cc5" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D778264B8BAE4C", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:36 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "053c9d17-101f-004b-590f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:36 GMT", + "x-ms-client-request-id" : "f70539f3-4568-424e-8398-48c66c5c0cc5" }, "Exception" : null }, { @@ -25,8 +89,8 @@ "Uri" : "https://gaprahns.blob.core.windows.net?prefix=jtfsservicesassignaturesstringtosignuserdelegationkey&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "484258fb-1dd4-4adc-9e77-95c9ceafee0d" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "d643b563-68f9-4b97-b596-6e40fd53e710" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -34,20 +98,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "b5210378-701e-0097-4dd2-902db3000000", - "Body" : "jtfsservicesassignaturesstringtosignuserdelegationkeyjtfsservicesassignaturesstringtosignuserdelegationkey02427323Fri, 01 Nov 2019 16:39:58 GMT\"0x8D75EEA2256D85B\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Fri, 01 Nov 2019 16:39:58 GMT", - "x-ms-client-request-id" : "484258fb-1dd4-4adc-9e77-95c9ceafee0d", + "x-ms-request-id" : "1d9a507e-e01e-0092-160f-aad9cc000000", + "Body" : "jtfsservicesassignaturesstringtosignuserdelegationkeyjtfsservicesassignaturesstringtosignuserdelegationkey093266caTue, 03 Dec 2019 19:23:36 GMT\"0x8D778264B701D35\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Tue, 03 Dec 2019 19:23:36 GMT", + "x-ms-client-request-id" : "d643b563-68f9-4b97-b596-6e40fd53e710", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfsservicesassignaturesstringtosignuserdelegationkey02427323?restype=container", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfsservicesassignaturesstringtosignuserdelegationkey093266ca?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "d440b203-3551-4d52-9f72-dc27602859bc" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "0c8b3df7-fa60-455a-af1e-3b67721b8724" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -55,11 +119,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "b5210397-701e-0097-67d2-902db3000000", - "Date" : "Fri, 01 Nov 2019 16:39:58 GMT", - "x-ms-client-request-id" : "d440b203-3551-4d52-9f72-dc27602859bc" + "x-ms-request-id" : "1d9a5086-e01e-0092-1e0f-aad9cc000000", + "Date" : "Tue, 03 Dec 2019 19:23:36 GMT", + "x-ms-client-request-id" : "0c8b3df7-fa60-455a-af1e-3b67721b8724" }, "Exception" : null } ], - "variables" : [ "jtfsservicesassignaturesstringtosignuserdelegationkey02427323" ] + "variables" : [ "jtfsservicesassignaturesstringtosignuserdelegationkey093266ca", "javapathservicesassignaturesstringtosignuserdelegationkey130481" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestservicesassignaturesstringtosignuserdelegationkey[12].json b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestservicesassignaturesstringtosignuserdelegationkey[12].json index 527b6651a2d1..e3b86c813c15 100644 --- a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestservicesassignaturesstringtosignuserdelegationkey[12].json +++ b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestservicesassignaturesstringtosignuserdelegationkey[12].json @@ -1,23 +1,87 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfsservicesassignaturesstringtosignuserdelegationkey092375b1?restype=container", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfsservicesassignaturesstringtosignuserdelegationkey006194e3?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "83dbaaa6-7fdf-4ffb-b8a6-13b8190c984a" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "5ee5e06e-ca4a-4061-85ae-2aa659491fdf" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D75EEA22812445", - "Last-Modified" : "Fri, 01 Nov 2019 16:39:59 GMT", + "ETag" : "0x8D778264BA9FC43", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:36 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "b52103b7-701e-0097-06d3-902db3000000", - "Date" : "Fri, 01 Nov 2019 16:39:58 GMT", - "x-ms-client-request-id" : "83dbaaa6-7fdf-4ffb-b8a6-13b8190c984a" + "x-ms-request-id" : "1d9a50a1-e01e-0092-370f-aad9cc000000", + "Date" : "Tue, 03 Dec 2019 19:23:36 GMT", + "x-ms-client-request-id" : "5ee5e06e-ca4a-4061-85ae-2aa659491fdf" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsservicesassignaturesstringtosignuserdelegationkey006194e3/javapathservicesassignaturesstringtosignuserdelegationkey106114?resource=file", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "64a98348-5efc-4008-a349-079e165c1330" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D778264BB4C33C", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:37 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "053c9d18-101f-004b-5a0f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:37 GMT", + "x-ms-client-request-id" : "64a98348-5efc-4008-a349-079e165c1330" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsservicesassignaturesstringtosignuserdelegationkey006194e3/javapathservicesassignaturesstringtosignuserdelegationkey106114?position=0&action=append", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "3968ea51-c297-4df7-983f-4d1ff757bd8a", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "053c9d19-101f-004b-5b0f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:37 GMT", + "x-ms-client-request-id" : "3968ea51-c297-4df7-983f-4d1ff757bd8a" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsservicesassignaturesstringtosignuserdelegationkey006194e3/javapathservicesassignaturesstringtosignuserdelegationkey106114?position=7&retainUncommittedData=false&close=false&action=flush", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "506b2323-5b6e-446e-b3f2-fd552f4b9f5b" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D778264BC765E3", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:37 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "053c9d1a-101f-004b-5c0f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:37 GMT", + "x-ms-client-request-id" : "506b2323-5b6e-446e-b3f2-fd552f4b9f5b" }, "Exception" : null }, { @@ -25,8 +89,8 @@ "Uri" : "https://gaprahns.blob.core.windows.net?prefix=jtfsservicesassignaturesstringtosignuserdelegationkey&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "27d8b707-14a1-460a-87e3-a887199f69c8" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "c74e3741-61ef-4c43-b4dd-db140a8c0416" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -34,20 +98,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "b52103d6-701e-0097-23d3-902db3000000", - "Body" : "jtfsservicesassignaturesstringtosignuserdelegationkeyjtfsservicesassignaturesstringtosignuserdelegationkey092375b1Fri, 01 Nov 2019 16:39:59 GMT\"0x8D75EEA22812445\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Fri, 01 Nov 2019 16:39:58 GMT", - "x-ms-client-request-id" : "27d8b707-14a1-460a-87e3-a887199f69c8", + "x-ms-request-id" : "1d9a50e6-e01e-0092-6e0f-aad9cc000000", + "Body" : "jtfsservicesassignaturesstringtosignuserdelegationkeyjtfsservicesassignaturesstringtosignuserdelegationkey006194e3Tue, 03 Dec 2019 19:23:36 GMT\"0x8D778264BA9FC43\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Tue, 03 Dec 2019 19:23:37 GMT", + "x-ms-client-request-id" : "c74e3741-61ef-4c43-b4dd-db140a8c0416", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfsservicesassignaturesstringtosignuserdelegationkey092375b1?restype=container", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfsservicesassignaturesstringtosignuserdelegationkey006194e3?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "01511972-5a08-48de-8d89-20f2b26d2140" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "955255f8-022b-4f1c-a252-a2278f74997f" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -55,11 +119,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "b52103ef-701e-0097-3ad3-902db3000000", - "Date" : "Fri, 01 Nov 2019 16:39:58 GMT", - "x-ms-client-request-id" : "01511972-5a08-48de-8d89-20f2b26d2140" + "x-ms-request-id" : "1d9a50f2-e01e-0092-7a0f-aad9cc000000", + "Date" : "Tue, 03 Dec 2019 19:23:37 GMT", + "x-ms-client-request-id" : "955255f8-022b-4f1c-a252-a2278f74997f" }, "Exception" : null } ], - "variables" : [ "jtfsservicesassignaturesstringtosignuserdelegationkey092375b1" ] + "variables" : [ "jtfsservicesassignaturesstringtosignuserdelegationkey006194e3", "javapathservicesassignaturesstringtosignuserdelegationkey106114" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestservicesassignaturesstringtosignuserdelegationkey[13].json b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestservicesassignaturesstringtosignuserdelegationkey[13].json index fc45ae6d1bff..393adc634a13 100644 --- a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestservicesassignaturesstringtosignuserdelegationkey[13].json +++ b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestservicesassignaturesstringtosignuserdelegationkey[13].json @@ -1,23 +1,87 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfsservicesassignaturesstringtosignuserdelegationkey0301678d?restype=container", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfsservicesassignaturesstringtosignuserdelegationkey08973417?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "1872d782-76fd-4a75-9c69-8468784afdf4" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "a537fbdc-134a-435f-a4fe-a17706438cff" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D75EEA229EC3BA", - "Last-Modified" : "Fri, 01 Nov 2019 16:39:59 GMT", + "ETag" : "0x8D778264BE25463", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:37 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "b5210416-701e-0097-5ed3-902db3000000", - "Date" : "Fri, 01 Nov 2019 16:39:58 GMT", - "x-ms-client-request-id" : "1872d782-76fd-4a75-9c69-8468784afdf4" + "x-ms-request-id" : "1d9a5108-e01e-0092-0c0f-aad9cc000000", + "Date" : "Tue, 03 Dec 2019 19:23:37 GMT", + "x-ms-client-request-id" : "a537fbdc-134a-435f-a4fe-a17706438cff" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsservicesassignaturesstringtosignuserdelegationkey08973417/javapathservicesassignaturesstringtosignuserdelegationkey106421?resource=file", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "d654ed08-3e49-4445-bef2-4cc953c37b01" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D778264BEF951B", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:37 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "053c9d1b-101f-004b-5d0f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:37 GMT", + "x-ms-client-request-id" : "d654ed08-3e49-4445-bef2-4cc953c37b01" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsservicesassignaturesstringtosignuserdelegationkey08973417/javapathservicesassignaturesstringtosignuserdelegationkey106421?position=0&action=append", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "088d3bc2-eef4-49d5-987d-686d0f43aa5e", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "053c9d1c-101f-004b-5e0f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:37 GMT", + "x-ms-client-request-id" : "088d3bc2-eef4-49d5-987d-686d0f43aa5e" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsservicesassignaturesstringtosignuserdelegationkey08973417/javapathservicesassignaturesstringtosignuserdelegationkey106421?position=7&retainUncommittedData=false&close=false&action=flush", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "d20dd4a2-2e32-4d63-b538-2b6e45b6d10b" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D778264C0531FF", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:37 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "053c9d1d-101f-004b-5f0f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:37 GMT", + "x-ms-client-request-id" : "d20dd4a2-2e32-4d63-b538-2b6e45b6d10b" }, "Exception" : null }, { @@ -25,8 +89,8 @@ "Uri" : "https://gaprahns.blob.core.windows.net?prefix=jtfsservicesassignaturesstringtosignuserdelegationkey&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "c6a0ce7c-19f4-44e0-96ee-b9d9b071a058" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "22b085c3-9dff-4f62-a175-f12dfd321127" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -34,20 +98,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "b5210434-701e-0097-78d3-902db3000000", - "Body" : "jtfsservicesassignaturesstringtosignuserdelegationkeyjtfsservicesassignaturesstringtosignuserdelegationkey0301678dFri, 01 Nov 2019 16:39:59 GMT\"0x8D75EEA229EC3BA\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Fri, 01 Nov 2019 16:39:58 GMT", - "x-ms-client-request-id" : "c6a0ce7c-19f4-44e0-96ee-b9d9b071a058", + "x-ms-request-id" : "1d9a5148-e01e-0092-3e0f-aad9cc000000", + "Body" : "jtfsservicesassignaturesstringtosignuserdelegationkeyjtfsservicesassignaturesstringtosignuserdelegationkey08973417Tue, 03 Dec 2019 19:23:37 GMT\"0x8D778264BE25463\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Tue, 03 Dec 2019 19:23:37 GMT", + "x-ms-client-request-id" : "22b085c3-9dff-4f62-a175-f12dfd321127", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfsservicesassignaturesstringtosignuserdelegationkey0301678d?restype=container", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfsservicesassignaturesstringtosignuserdelegationkey08973417?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "f3f09262-2a9d-4c54-a7eb-afe350c099f7" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "804c2e7b-fd61-4fd1-add4-44ddefd52287" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -55,11 +119,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "b521044f-701e-0097-10d3-902db3000000", - "Date" : "Fri, 01 Nov 2019 16:39:58 GMT", - "x-ms-client-request-id" : "f3f09262-2a9d-4c54-a7eb-afe350c099f7" + "x-ms-request-id" : "1d9a5158-e01e-0092-4b0f-aad9cc000000", + "Date" : "Tue, 03 Dec 2019 19:23:37 GMT", + "x-ms-client-request-id" : "804c2e7b-fd61-4fd1-add4-44ddefd52287" }, "Exception" : null } ], - "variables" : [ "jtfsservicesassignaturesstringtosignuserdelegationkey0301678d" ] + "variables" : [ "jtfsservicesassignaturesstringtosignuserdelegationkey08973417", "javapathservicesassignaturesstringtosignuserdelegationkey106421" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestservicesassignaturesstringtosignuserdelegationkey[1].json b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestservicesassignaturesstringtosignuserdelegationkey[1].json index 307e7d40f158..933e829e6a68 100644 --- a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestservicesassignaturesstringtosignuserdelegationkey[1].json +++ b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestservicesassignaturesstringtosignuserdelegationkey[1].json @@ -1,23 +1,87 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfsservicesassignaturesstringtosignuserdelegationkey0093742d?restype=container", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfsservicesassignaturesstringtosignuserdelegationkey02660634?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "71f4be9a-c637-4de6-b598-b138e5f27c4f" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "a44e597c-231d-41b8-8c82-a75f34c59ed8" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D75EEA2129455D", - "Last-Modified" : "Fri, 01 Nov 2019 16:39:56 GMT", + "ETag" : "0x8D77826491FF6EA", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:32 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "b520ff7e-701e-0097-2ad2-902db3000000", - "Date" : "Fri, 01 Nov 2019 16:39:56 GMT", - "x-ms-client-request-id" : "71f4be9a-c637-4de6-b598-b138e5f27c4f" + "x-ms-request-id" : "1d9a4cbd-e01e-0092-730f-aad9cc000000", + "Date" : "Tue, 03 Dec 2019 19:23:32 GMT", + "x-ms-client-request-id" : "a44e597c-231d-41b8-8c82-a75f34c59ed8" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsservicesassignaturesstringtosignuserdelegationkey02660634/javapathservicesassignaturesstringtosignuserdelegationkey103948?resource=file", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "0a171d88-d686-4fc1-b43c-abe56c037b12" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D77826492D4D0E", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:32 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "053c9cc5-101f-004b-100f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:31 GMT", + "x-ms-client-request-id" : "0a171d88-d686-4fc1-b43c-abe56c037b12" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsservicesassignaturesstringtosignuserdelegationkey02660634/javapathservicesassignaturesstringtosignuserdelegationkey103948?position=0&action=append", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "f8bce9d0-5766-4594-b118-842e74e947ce", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "053c9cc6-101f-004b-110f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:31 GMT", + "x-ms-client-request-id" : "f8bce9d0-5766-4594-b118-842e74e947ce" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsservicesassignaturesstringtosignuserdelegationkey02660634/javapathservicesassignaturesstringtosignuserdelegationkey103948?position=7&retainUncommittedData=false&close=false&action=flush", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "8b2db010-4bc5-4ec8-8cb1-cf0181af8731" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D77826493CD13C", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:32 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "053c9cc8-101f-004b-130f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:31 GMT", + "x-ms-client-request-id" : "8b2db010-4bc5-4ec8-8cb1-cf0181af8731" }, "Exception" : null }, { @@ -25,8 +89,8 @@ "Uri" : "https://gaprahns.blob.core.windows.net?prefix=jtfsservicesassignaturesstringtosignuserdelegationkey&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "f71248fe-a78a-44df-88c0-0ec1734b7374" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "d0c509d3-e8f9-4310-a355-a16959516a15" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -34,20 +98,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "b520ff90-701e-0097-39d2-902db3000000", - "Body" : "jtfsservicesassignaturesstringtosignuserdelegationkeyjtfsservicesassignaturesstringtosignuserdelegationkey0093742dFri, 01 Nov 2019 16:39:56 GMT\"0x8D75EEA2129455D\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Fri, 01 Nov 2019 16:39:56 GMT", - "x-ms-client-request-id" : "f71248fe-a78a-44df-88c0-0ec1734b7374", + "x-ms-request-id" : "1d9a4d05-e01e-0092-290f-aad9cc000000", + "Body" : "jtfsservicesassignaturesstringtosignuserdelegationkeyjtfsservicesassignaturesstringtosignuserdelegationkey02660634Tue, 03 Dec 2019 19:23:32 GMT\"0x8D77826491FF6EA\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Tue, 03 Dec 2019 19:23:32 GMT", + "x-ms-client-request-id" : "d0c509d3-e8f9-4310-a355-a16959516a15", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfsservicesassignaturesstringtosignuserdelegationkey0093742d?restype=container", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfsservicesassignaturesstringtosignuserdelegationkey02660634?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "f66a556f-88d8-42e0-b221-710d928ce46f" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "a8af774f-ba85-402e-8c2a-47f08c1606b1" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -55,11 +119,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "b520ffa2-701e-0097-48d2-902db3000000", - "Date" : "Fri, 01 Nov 2019 16:39:56 GMT", - "x-ms-client-request-id" : "f66a556f-88d8-42e0-b221-710d928ce46f" + "x-ms-request-id" : "1d9a4d0f-e01e-0092-330f-aad9cc000000", + "Date" : "Tue, 03 Dec 2019 19:23:32 GMT", + "x-ms-client-request-id" : "a8af774f-ba85-402e-8c2a-47f08c1606b1" }, "Exception" : null } ], - "variables" : [ "jtfsservicesassignaturesstringtosignuserdelegationkey0093742d" ] + "variables" : [ "jtfsservicesassignaturesstringtosignuserdelegationkey02660634", "javapathservicesassignaturesstringtosignuserdelegationkey103948" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestservicesassignaturesstringtosignuserdelegationkey[2].json b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestservicesassignaturesstringtosignuserdelegationkey[2].json index eab3e68e4430..75f309345209 100644 --- a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestservicesassignaturesstringtosignuserdelegationkey[2].json +++ b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestservicesassignaturesstringtosignuserdelegationkey[2].json @@ -1,23 +1,87 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfsservicesassignaturesstringtosignuserdelegationkey030490ac?restype=container", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfsservicesassignaturesstringtosignuserdelegationkey08808937?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "458c6a4b-c81b-4df1-a992-af43fa6edfba" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "38798b36-ff59-43f4-8219-23d08ff50bfb" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D75EEA2144253D", - "Last-Modified" : "Fri, 01 Nov 2019 16:39:56 GMT", + "ETag" : "0x8D77826495CBCA9", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:33 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "b520ffb9-701e-0097-5cd2-902db3000000", - "Date" : "Fri, 01 Nov 2019 16:39:56 GMT", - "x-ms-client-request-id" : "458c6a4b-c81b-4df1-a992-af43fa6edfba" + "x-ms-request-id" : "1d9a4d29-e01e-0092-4a0f-aad9cc000000", + "Date" : "Tue, 03 Dec 2019 19:23:33 GMT", + "x-ms-client-request-id" : "38798b36-ff59-43f4-8219-23d08ff50bfb" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsservicesassignaturesstringtosignuserdelegationkey08808937/javapathservicesassignaturesstringtosignuserdelegationkey140657?resource=file", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "ae54d864-53c3-4deb-b193-492e4bd28db0" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D77826496E53C5", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:33 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "053c9cc9-101f-004b-140f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:33 GMT", + "x-ms-client-request-id" : "ae54d864-53c3-4deb-b193-492e4bd28db0" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsservicesassignaturesstringtosignuserdelegationkey08808937/javapathservicesassignaturesstringtosignuserdelegationkey140657?position=0&action=append", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "62d6731b-1670-4c14-9eae-084865f9aae2", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "053c9ccb-101f-004b-150f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:33 GMT", + "x-ms-client-request-id" : "62d6731b-1670-4c14-9eae-084865f9aae2" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsservicesassignaturesstringtosignuserdelegationkey08808937/javapathservicesassignaturesstringtosignuserdelegationkey140657?position=7&retainUncommittedData=false&close=false&action=flush", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "026d86a1-dedf-4bf5-878b-24630632c3b8" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D77826497E2152", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:33 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "053c9ccc-101f-004b-160f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:33 GMT", + "x-ms-client-request-id" : "026d86a1-dedf-4bf5-878b-24630632c3b8" }, "Exception" : null }, { @@ -25,8 +89,8 @@ "Uri" : "https://gaprahns.blob.core.windows.net?prefix=jtfsservicesassignaturesstringtosignuserdelegationkey&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "82169e7a-24dd-4c88-ad27-aa1466ab62b0" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "ef5db85c-c08c-4eb0-9c1b-29eeab01d2e2" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -34,20 +98,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "b520ffde-701e-0097-7fd2-902db3000000", - "Body" : "jtfsservicesassignaturesstringtosignuserdelegationkeyjtfsservicesassignaturesstringtosignuserdelegationkey030490acFri, 01 Nov 2019 16:39:56 GMT\"0x8D75EEA2144253D\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Fri, 01 Nov 2019 16:39:56 GMT", - "x-ms-client-request-id" : "82169e7a-24dd-4c88-ad27-aa1466ab62b0", + "x-ms-request-id" : "1d9a4d65-e01e-0092-7d0f-aad9cc000000", + "Body" : "jtfsservicesassignaturesstringtosignuserdelegationkeyjtfsservicesassignaturesstringtosignuserdelegationkey08808937Tue, 03 Dec 2019 19:23:33 GMT\"0x8D77826495CBCA9\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Tue, 03 Dec 2019 19:23:33 GMT", + "x-ms-client-request-id" : "ef5db85c-c08c-4eb0-9c1b-29eeab01d2e2", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfsservicesassignaturesstringtosignuserdelegationkey030490ac?restype=container", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfsservicesassignaturesstringtosignuserdelegationkey08808937?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "743ff75f-41c9-4746-a822-08b8132792a2" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "1706c115-b309-4e19-976d-cc2212764371" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -55,11 +119,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "b5210003-701e-0097-21d2-902db3000000", - "Date" : "Fri, 01 Nov 2019 16:39:56 GMT", - "x-ms-client-request-id" : "743ff75f-41c9-4746-a822-08b8132792a2" + "x-ms-request-id" : "1d9a4d6a-e01e-0092-010f-aad9cc000000", + "Date" : "Tue, 03 Dec 2019 19:23:33 GMT", + "x-ms-client-request-id" : "1706c115-b309-4e19-976d-cc2212764371" }, "Exception" : null } ], - "variables" : [ "jtfsservicesassignaturesstringtosignuserdelegationkey030490ac" ] + "variables" : [ "jtfsservicesassignaturesstringtosignuserdelegationkey08808937", "javapathservicesassignaturesstringtosignuserdelegationkey140657" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestservicesassignaturesstringtosignuserdelegationkey[3].json b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestservicesassignaturesstringtosignuserdelegationkey[3].json index 508d783a8a93..07e3be7213d7 100644 --- a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestservicesassignaturesstringtosignuserdelegationkey[3].json +++ b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestservicesassignaturesstringtosignuserdelegationkey[3].json @@ -1,23 +1,87 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfsservicesassignaturesstringtosignuserdelegationkey080840c4?restype=container", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfsservicesassignaturesstringtosignuserdelegationkey018512c4?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "db26c589-be46-4367-a53f-21066e1dc753" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "8d87d44b-356c-44bc-a6e2-9c94cbb8ed93" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D75EEA2168559F", - "Last-Modified" : "Fri, 01 Nov 2019 16:39:57 GMT", + "ETag" : "0x8D778264999343A", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:33 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "b521004f-701e-0097-62d2-902db3000000", - "Date" : "Fri, 01 Nov 2019 16:39:56 GMT", - "x-ms-client-request-id" : "db26c589-be46-4367-a53f-21066e1dc753" + "x-ms-request-id" : "1d9a4d73-e01e-0092-090f-aad9cc000000", + "Date" : "Tue, 03 Dec 2019 19:23:33 GMT", + "x-ms-client-request-id" : "8d87d44b-356c-44bc-a6e2-9c94cbb8ed93" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsservicesassignaturesstringtosignuserdelegationkey018512c4/javapathservicesassignaturesstringtosignuserdelegationkey143978?resource=file", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "f32eb789-614b-4ebd-91f0-427d7c1453b6" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D7782649A5AF16", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:33 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "053c9ccd-101f-004b-170f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:33 GMT", + "x-ms-client-request-id" : "f32eb789-614b-4ebd-91f0-427d7c1453b6" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsservicesassignaturesstringtosignuserdelegationkey018512c4/javapathservicesassignaturesstringtosignuserdelegationkey143978?position=0&action=append", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "b7fd87f2-fc31-478d-8cbc-6bf2a2c81b3e", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "053c9cce-101f-004b-180f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:33 GMT", + "x-ms-client-request-id" : "b7fd87f2-fc31-478d-8cbc-6bf2a2c81b3e" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsservicesassignaturesstringtosignuserdelegationkey018512c4/javapathservicesassignaturesstringtosignuserdelegationkey143978?position=7&retainUncommittedData=false&close=false&action=flush", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "8c16a939-686b-4eb8-a666-37cc9d82a15d" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D7782649B84BE5", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:33 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "053c9ccf-101f-004b-190f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:33 GMT", + "x-ms-client-request-id" : "8c16a939-686b-4eb8-a666-37cc9d82a15d" }, "Exception" : null }, { @@ -25,8 +89,8 @@ "Uri" : "https://gaprahns.blob.core.windows.net?prefix=jtfsservicesassignaturesstringtosignuserdelegationkey&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "8a8f366f-3472-4b0a-b78e-3744abc93133" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "037a50d7-215a-4e74-8a07-3878508619a0" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -34,20 +98,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "b521005c-701e-0097-6ed2-902db3000000", - "Body" : "jtfsservicesassignaturesstringtosignuserdelegationkeyjtfsservicesassignaturesstringtosignuserdelegationkey080840c4Fri, 01 Nov 2019 16:39:57 GMT\"0x8D75EEA2168559F\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Fri, 01 Nov 2019 16:39:56 GMT", - "x-ms-client-request-id" : "8a8f366f-3472-4b0a-b78e-3744abc93133", + "x-ms-request-id" : "1d9a4db0-e01e-0092-3b0f-aad9cc000000", + "Body" : "jtfsservicesassignaturesstringtosignuserdelegationkeyjtfsservicesassignaturesstringtosignuserdelegationkey018512c4Tue, 03 Dec 2019 19:23:33 GMT\"0x8D778264999343A\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Tue, 03 Dec 2019 19:23:33 GMT", + "x-ms-client-request-id" : "037a50d7-215a-4e74-8a07-3878508619a0", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfsservicesassignaturesstringtosignuserdelegationkey080840c4?restype=container", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfsservicesassignaturesstringtosignuserdelegationkey018512c4?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "a01b7245-1803-409d-b933-be06715f5985" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "32089abc-c244-468e-ba35-2ca9799e2127" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -55,11 +119,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "b521006f-701e-0097-80d2-902db3000000", - "Date" : "Fri, 01 Nov 2019 16:39:56 GMT", - "x-ms-client-request-id" : "a01b7245-1803-409d-b933-be06715f5985" + "x-ms-request-id" : "1d9a4dc4-e01e-0092-4b0f-aad9cc000000", + "Date" : "Tue, 03 Dec 2019 19:23:33 GMT", + "x-ms-client-request-id" : "32089abc-c244-468e-ba35-2ca9799e2127" }, "Exception" : null } ], - "variables" : [ "jtfsservicesassignaturesstringtosignuserdelegationkey080840c4" ] + "variables" : [ "jtfsservicesassignaturesstringtosignuserdelegationkey018512c4", "javapathservicesassignaturesstringtosignuserdelegationkey143978" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestservicesassignaturesstringtosignuserdelegationkey[4].json b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestservicesassignaturesstringtosignuserdelegationkey[4].json index 72045789696e..c8cce99b33d3 100644 --- a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestservicesassignaturesstringtosignuserdelegationkey[4].json +++ b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestservicesassignaturesstringtosignuserdelegationkey[4].json @@ -1,23 +1,87 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfsservicesassignaturesstringtosignuserdelegationkey0269077e?restype=container", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfsservicesassignaturesstringtosignuserdelegationkey03151996?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "3e579c60-c8c6-42d3-9b66-b5c6d12e1809" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "be535585-0a95-45dc-9f76-50a25629db15" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D75EEA2181AE99", - "Last-Modified" : "Fri, 01 Nov 2019 16:39:57 GMT", + "ETag" : "0x8D7782649D228BA", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:33 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "b5210091-701e-0097-1ed2-902db3000000", - "Date" : "Fri, 01 Nov 2019 16:39:56 GMT", - "x-ms-client-request-id" : "3e579c60-c8c6-42d3-9b66-b5c6d12e1809" + "x-ms-request-id" : "1d9a4ddd-e01e-0092-5c0f-aad9cc000000", + "Date" : "Tue, 03 Dec 2019 19:23:33 GMT", + "x-ms-client-request-id" : "be535585-0a95-45dc-9f76-50a25629db15" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsservicesassignaturesstringtosignuserdelegationkey03151996/javapathservicesassignaturesstringtosignuserdelegationkey182156?resource=file", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "2492e77e-d34f-4d2a-ac9f-dbb3e1408f7f" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D7782649DE4E14", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:33 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "053c9cd0-101f-004b-1a0f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:33 GMT", + "x-ms-client-request-id" : "2492e77e-d34f-4d2a-ac9f-dbb3e1408f7f" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsservicesassignaturesstringtosignuserdelegationkey03151996/javapathservicesassignaturesstringtosignuserdelegationkey182156?position=0&action=append", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "c138387a-c8d8-4789-808d-f7defc89ca92", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "053c9cd1-101f-004b-1b0f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:34 GMT", + "x-ms-client-request-id" : "c138387a-c8d8-4789-808d-f7defc89ca92" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsservicesassignaturesstringtosignuserdelegationkey03151996/javapathservicesassignaturesstringtosignuserdelegationkey182156?position=7&retainUncommittedData=false&close=false&action=flush", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "d537e1b2-c24b-4eb9-9f09-37f9af79cd49" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D7782649EED5C6", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:34 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "053c9cd4-101f-004b-1e0f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:34 GMT", + "x-ms-client-request-id" : "d537e1b2-c24b-4eb9-9f09-37f9af79cd49" }, "Exception" : null }, { @@ -25,8 +89,8 @@ "Uri" : "https://gaprahns.blob.core.windows.net?prefix=jtfsservicesassignaturesstringtosignuserdelegationkey&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "15fd55e0-4a05-4f4f-825b-af4f04f29500" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "eaa98f9c-35a0-4fd0-a3f4-483d6d4113bd" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -34,20 +98,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "b52100b4-701e-0097-3ed2-902db3000000", - "Body" : "jtfsservicesassignaturesstringtosignuserdelegationkeyjtfsservicesassignaturesstringtosignuserdelegationkey0269077eFri, 01 Nov 2019 16:39:57 GMT\"0x8D75EEA2181AE99\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Fri, 01 Nov 2019 16:39:57 GMT", - "x-ms-client-request-id" : "15fd55e0-4a05-4f4f-825b-af4f04f29500", + "x-ms-request-id" : "1d9a4e17-e01e-0092-090f-aad9cc000000", + "Body" : "jtfsservicesassignaturesstringtosignuserdelegationkeyjtfsservicesassignaturesstringtosignuserdelegationkey03151996Tue, 03 Dec 2019 19:23:33 GMT\"0x8D7782649D228BA\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Tue, 03 Dec 2019 19:23:34 GMT", + "x-ms-client-request-id" : "eaa98f9c-35a0-4fd0-a3f4-483d6d4113bd", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfsservicesassignaturesstringtosignuserdelegationkey0269077e?restype=container", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfsservicesassignaturesstringtosignuserdelegationkey03151996?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "77e67166-e96d-4000-b7b7-634841e28442" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "4080882a-d9ca-4375-a5d9-3cf081372bf9" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -55,11 +119,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "b52100cc-701e-0097-54d2-902db3000000", - "Date" : "Fri, 01 Nov 2019 16:39:57 GMT", - "x-ms-client-request-id" : "77e67166-e96d-4000-b7b7-634841e28442" + "x-ms-request-id" : "1d9a4e2c-e01e-0092-1d0f-aad9cc000000", + "Date" : "Tue, 03 Dec 2019 19:23:34 GMT", + "x-ms-client-request-id" : "4080882a-d9ca-4375-a5d9-3cf081372bf9" }, "Exception" : null } ], - "variables" : [ "jtfsservicesassignaturesstringtosignuserdelegationkey0269077e" ] + "variables" : [ "jtfsservicesassignaturesstringtosignuserdelegationkey03151996", "javapathservicesassignaturesstringtosignuserdelegationkey182156" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestservicesassignaturesstringtosignuserdelegationkey[5].json b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestservicesassignaturesstringtosignuserdelegationkey[5].json index aa8ca26bf94c..4eb3676fddba 100644 --- a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestservicesassignaturesstringtosignuserdelegationkey[5].json +++ b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestservicesassignaturesstringtosignuserdelegationkey[5].json @@ -1,23 +1,87 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfsservicesassignaturesstringtosignuserdelegationkey0292857f?restype=container", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfsservicesassignaturesstringtosignuserdelegationkey02342330?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "6668b1bc-c759-4da3-a066-11349cfe0a97" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "32ec25cd-dba3-4c23-8746-01d184f9a675" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D75EEA21A19875", - "Last-Modified" : "Fri, 01 Nov 2019 16:39:57 GMT", + "ETag" : "0x8D778264A083689", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:34 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "b521010a-701e-0097-0ed2-902db3000000", - "Date" : "Fri, 01 Nov 2019 16:39:57 GMT", - "x-ms-client-request-id" : "6668b1bc-c759-4da3-a066-11349cfe0a97" + "x-ms-request-id" : "1d9a4e3b-e01e-0092-2b0f-aad9cc000000", + "Date" : "Tue, 03 Dec 2019 19:23:34 GMT", + "x-ms-client-request-id" : "32ec25cd-dba3-4c23-8746-01d184f9a675" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsservicesassignaturesstringtosignuserdelegationkey02342330/javapathservicesassignaturesstringtosignuserdelegationkey163694?resource=file", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "8f13dd75-bba5-40bc-8af3-a52eb36b7a6f" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D778264A12497D", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:34 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "053c9ce0-101f-004b-2a0f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:34 GMT", + "x-ms-client-request-id" : "8f13dd75-bba5-40bc-8af3-a52eb36b7a6f" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsservicesassignaturesstringtosignuserdelegationkey02342330/javapathservicesassignaturesstringtosignuserdelegationkey163694?position=0&action=append", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "9a2eb162-28d9-4683-bc5b-e3b50f0e1736", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "053c9ce4-101f-004b-2e0f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:34 GMT", + "x-ms-client-request-id" : "9a2eb162-28d9-4683-bc5b-e3b50f0e1736" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsservicesassignaturesstringtosignuserdelegationkey02342330/javapathservicesassignaturesstringtosignuserdelegationkey163694?position=7&retainUncommittedData=false&close=false&action=flush", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "f7d88997-5ee4-4d95-b876-55504d8e0f2f" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D778264A237A46", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:34 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "053c9cee-101f-004b-320f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:34 GMT", + "x-ms-client-request-id" : "f7d88997-5ee4-4d95-b876-55504d8e0f2f" }, "Exception" : null }, { @@ -25,8 +89,8 @@ "Uri" : "https://gaprahns.blob.core.windows.net?prefix=jtfsservicesassignaturesstringtosignuserdelegationkey&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "9fb3a8ed-61a9-4363-81e9-d66735b0588e" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "daa7139c-d4a1-4541-97f8-2224f000b405" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -34,20 +98,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "b5210122-701e-0097-23d2-902db3000000", - "Body" : "jtfsservicesassignaturesstringtosignuserdelegationkeyjtfsservicesassignaturesstringtosignuserdelegationkey0292857fFri, 01 Nov 2019 16:39:57 GMT\"0x8D75EEA21A19875\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Fri, 01 Nov 2019 16:39:57 GMT", - "x-ms-client-request-id" : "9fb3a8ed-61a9-4363-81e9-d66735b0588e", + "x-ms-request-id" : "1d9a4e73-e01e-0092-580f-aad9cc000000", + "Body" : "jtfsservicesassignaturesstringtosignuserdelegationkeyjtfsservicesassignaturesstringtosignuserdelegationkey02342330Tue, 03 Dec 2019 19:23:34 GMT\"0x8D778264A083689\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Tue, 03 Dec 2019 19:23:34 GMT", + "x-ms-client-request-id" : "daa7139c-d4a1-4541-97f8-2224f000b405", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfsservicesassignaturesstringtosignuserdelegationkey0292857f?restype=container", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfsservicesassignaturesstringtosignuserdelegationkey02342330?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "c708d08e-af0c-40b0-bc18-9ed6195abc81" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "c8537f61-bd58-490b-8354-5cfd8985139b" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -55,11 +119,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "b5210139-701e-0097-36d2-902db3000000", - "Date" : "Fri, 01 Nov 2019 16:39:57 GMT", - "x-ms-client-request-id" : "c708d08e-af0c-40b0-bc18-9ed6195abc81" + "x-ms-request-id" : "1d9a4e8d-e01e-0092-6c0f-aad9cc000000", + "Date" : "Tue, 03 Dec 2019 19:23:34 GMT", + "x-ms-client-request-id" : "c8537f61-bd58-490b-8354-5cfd8985139b" }, "Exception" : null } ], - "variables" : [ "jtfsservicesassignaturesstringtosignuserdelegationkey0292857f" ] + "variables" : [ "jtfsservicesassignaturesstringtosignuserdelegationkey02342330", "javapathservicesassignaturesstringtosignuserdelegationkey163694" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestservicesassignaturesstringtosignuserdelegationkey[6].json b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestservicesassignaturesstringtosignuserdelegationkey[6].json index c9c494e1114c..41595b391142 100644 --- a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestservicesassignaturesstringtosignuserdelegationkey[6].json +++ b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestservicesassignaturesstringtosignuserdelegationkey[6].json @@ -1,23 +1,87 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfsservicesassignaturesstringtosignuserdelegationkey09190835?restype=container", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfsservicesassignaturesstringtosignuserdelegationkey08934706?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "a9a7f64a-76ee-46d4-a102-27d6f2f2fd65" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "2a740d4c-a4ac-415b-aeeb-0c0f175d7d44" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D75EEA21BB66BD", - "Last-Modified" : "Fri, 01 Nov 2019 16:39:57 GMT", + "ETag" : "0x8D778264A3D0BA1", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:34 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "b5210154-701e-0097-4fd2-902db3000000", - "Date" : "Fri, 01 Nov 2019 16:39:57 GMT", - "x-ms-client-request-id" : "a9a7f64a-76ee-46d4-a102-27d6f2f2fd65" + "x-ms-request-id" : "1d9a4e9e-e01e-0092-7a0f-aad9cc000000", + "Date" : "Tue, 03 Dec 2019 19:23:34 GMT", + "x-ms-client-request-id" : "2a740d4c-a4ac-415b-aeeb-0c0f175d7d44" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsservicesassignaturesstringtosignuserdelegationkey08934706/javapathservicesassignaturesstringtosignuserdelegationkey110795?resource=file", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "be07c027-b04c-4ab4-8e5c-33994d50eb1c" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D778264A4C82AA", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:34 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "053c9d03-101f-004b-470f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:34 GMT", + "x-ms-client-request-id" : "be07c027-b04c-4ab4-8e5c-33994d50eb1c" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsservicesassignaturesstringtosignuserdelegationkey08934706/javapathservicesassignaturesstringtosignuserdelegationkey110795?position=0&action=append", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "e4ab2246-7e7b-4881-94ec-f4f459d51fe7", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "053c9d05-101f-004b-490f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:34 GMT", + "x-ms-client-request-id" : "e4ab2246-7e7b-4881-94ec-f4f459d51fe7" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsservicesassignaturesstringtosignuserdelegationkey08934706/javapathservicesassignaturesstringtosignuserdelegationkey110795?position=7&retainUncommittedData=false&close=false&action=flush", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "1a6cd1fa-79b2-4f77-8586-f10318c3c66e" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D778264A5ECCA5", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:34 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "053c9d07-101f-004b-4a0f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:34 GMT", + "x-ms-client-request-id" : "1a6cd1fa-79b2-4f77-8586-f10318c3c66e" }, "Exception" : null }, { @@ -25,8 +89,8 @@ "Uri" : "https://gaprahns.blob.core.windows.net?prefix=jtfsservicesassignaturesstringtosignuserdelegationkey&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "e25e7b93-6fa6-40b6-9fbc-2464f55dcdeb" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "27f51835-c091-46e6-945b-67e746eb731a" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -34,20 +98,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "b521017c-701e-0097-72d2-902db3000000", - "Body" : "jtfsservicesassignaturesstringtosignuserdelegationkeyjtfsservicesassignaturesstringtosignuserdelegationkey09190835Fri, 01 Nov 2019 16:39:57 GMT\"0x8D75EEA21BB66BD\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Fri, 01 Nov 2019 16:39:57 GMT", - "x-ms-client-request-id" : "e25e7b93-6fa6-40b6-9fbc-2464f55dcdeb", + "x-ms-request-id" : "1d9a4ed0-e01e-0092-280f-aad9cc000000", + "Body" : "jtfsservicesassignaturesstringtosignuserdelegationkeyjtfsservicesassignaturesstringtosignuserdelegationkey08934706Tue, 03 Dec 2019 19:23:34 GMT\"0x8D778264A3D0BA1\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Tue, 03 Dec 2019 19:23:34 GMT", + "x-ms-client-request-id" : "27f51835-c091-46e6-945b-67e746eb731a", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfsservicesassignaturesstringtosignuserdelegationkey09190835?restype=container", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfsservicesassignaturesstringtosignuserdelegationkey08934706?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "5e00717e-4366-470c-b86d-9fd1181d0e4c" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "36deafd4-dff9-4978-ad28-a4bd6cfec580" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -55,11 +119,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "b5210192-701e-0097-06d2-902db3000000", - "Date" : "Fri, 01 Nov 2019 16:39:57 GMT", - "x-ms-client-request-id" : "5e00717e-4366-470c-b86d-9fd1181d0e4c" + "x-ms-request-id" : "1d9a4edc-e01e-0092-310f-aad9cc000000", + "Date" : "Tue, 03 Dec 2019 19:23:34 GMT", + "x-ms-client-request-id" : "36deafd4-dff9-4978-ad28-a4bd6cfec580" }, "Exception" : null } ], - "variables" : [ "jtfsservicesassignaturesstringtosignuserdelegationkey09190835" ] + "variables" : [ "jtfsservicesassignaturesstringtosignuserdelegationkey08934706", "javapathservicesassignaturesstringtosignuserdelegationkey110795" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestservicesassignaturesstringtosignuserdelegationkey[7].json b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestservicesassignaturesstringtosignuserdelegationkey[7].json index 1d5f1b924693..6af8d536c5bb 100644 --- a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestservicesassignaturesstringtosignuserdelegationkey[7].json +++ b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestservicesassignaturesstringtosignuserdelegationkey[7].json @@ -1,23 +1,87 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfsservicesassignaturesstringtosignuserdelegationkey06530999?restype=container", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfsservicesassignaturesstringtosignuserdelegationkey0511040d?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "4bbe526b-9a74-4efd-895d-1ac362ec9c95" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "72b87b69-d659-47cb-95da-23995c06c5c0" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D75EEA21D55C06", - "Last-Modified" : "Fri, 01 Nov 2019 16:39:57 GMT", + "ETag" : "0x8D778264A79832D", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:34 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "b52101aa-701e-0097-1dd2-902db3000000", - "Date" : "Fri, 01 Nov 2019 16:39:57 GMT", - "x-ms-client-request-id" : "4bbe526b-9a74-4efd-895d-1ac362ec9c95" + "x-ms-request-id" : "1d9a4ef0-e01e-0092-420f-aad9cc000000", + "Date" : "Tue, 03 Dec 2019 19:23:34 GMT", + "x-ms-client-request-id" : "72b87b69-d659-47cb-95da-23995c06c5c0" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsservicesassignaturesstringtosignuserdelegationkey0511040d/javapathservicesassignaturesstringtosignuserdelegationkey117182?resource=file", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "62c81edb-a0fb-4d00-afe5-bf9f1e9298bb" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D778264A88A116", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:35 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "053c9d08-101f-004b-4b0f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:35 GMT", + "x-ms-client-request-id" : "62c81edb-a0fb-4d00-afe5-bf9f1e9298bb" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsservicesassignaturesstringtosignuserdelegationkey0511040d/javapathservicesassignaturesstringtosignuserdelegationkey117182?position=0&action=append", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "e2a4a93e-9f85-4ca5-9c0c-8ce3733eb81d", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "053c9d09-101f-004b-4c0f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:35 GMT", + "x-ms-client-request-id" : "e2a4a93e-9f85-4ca5-9c0c-8ce3733eb81d" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsservicesassignaturesstringtosignuserdelegationkey0511040d/javapathservicesassignaturesstringtosignuserdelegationkey117182?position=7&retainUncommittedData=false&close=false&action=flush", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "ad1ce030-83d7-437f-a211-0a48c13ea7d2" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D778264A9A2E55", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:35 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "053c9d0a-101f-004b-4d0f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:35 GMT", + "x-ms-client-request-id" : "ad1ce030-83d7-437f-a211-0a48c13ea7d2" }, "Exception" : null }, { @@ -25,8 +89,8 @@ "Uri" : "https://gaprahns.blob.core.windows.net?prefix=jtfsservicesassignaturesstringtosignuserdelegationkey&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "36bf71e5-f15c-411a-a96d-bc96c398bf50" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "0a16b529-39e2-4d10-ada7-d39aa508212c" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -34,20 +98,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "b52101c8-701e-0097-35d2-902db3000000", - "Body" : "jtfsservicesassignaturesstringtosignuserdelegationkeyjtfsservicesassignaturesstringtosignuserdelegationkey06530999Fri, 01 Nov 2019 16:39:57 GMT\"0x8D75EEA21D55C06\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Fri, 01 Nov 2019 16:39:57 GMT", - "x-ms-client-request-id" : "36bf71e5-f15c-411a-a96d-bc96c398bf50", + "x-ms-request-id" : "1d9a4f2e-e01e-0092-750f-aad9cc000000", + "Body" : "jtfsservicesassignaturesstringtosignuserdelegationkeyjtfsservicesassignaturesstringtosignuserdelegationkey0511040dTue, 03 Dec 2019 19:23:34 GMT\"0x8D778264A79832D\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Tue, 03 Dec 2019 19:23:35 GMT", + "x-ms-client-request-id" : "0a16b529-39e2-4d10-ada7-d39aa508212c", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfsservicesassignaturesstringtosignuserdelegationkey06530999?restype=container", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfsservicesassignaturesstringtosignuserdelegationkey0511040d?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "cd9f6377-2d63-46bc-8f5d-2165a097b491" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "d8436080-d5b4-4579-b771-f26520367a7f" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -55,11 +119,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "b52101e3-701e-0097-4dd2-902db3000000", - "Date" : "Fri, 01 Nov 2019 16:39:57 GMT", - "x-ms-client-request-id" : "cd9f6377-2d63-46bc-8f5d-2165a097b491" + "x-ms-request-id" : "1d9a4f35-e01e-0092-7c0f-aad9cc000000", + "Date" : "Tue, 03 Dec 2019 19:23:35 GMT", + "x-ms-client-request-id" : "d8436080-d5b4-4579-b771-f26520367a7f" }, "Exception" : null } ], - "variables" : [ "jtfsservicesassignaturesstringtosignuserdelegationkey06530999" ] + "variables" : [ "jtfsservicesassignaturesstringtosignuserdelegationkey0511040d", "javapathservicesassignaturesstringtosignuserdelegationkey117182" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestservicesassignaturesstringtosignuserdelegationkey[8].json b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestservicesassignaturesstringtosignuserdelegationkey[8].json index bb67fa7d60c2..f2142cc45aea 100644 --- a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestservicesassignaturesstringtosignuserdelegationkey[8].json +++ b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestservicesassignaturesstringtosignuserdelegationkey[8].json @@ -1,23 +1,87 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfsservicesassignaturesstringtosignuserdelegationkey05299874?restype=container", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfsservicesassignaturesstringtosignuserdelegationkey021288d2?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "90d524b9-9957-41bd-82f4-9e06efd09495" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "e7cc97f9-24f8-477a-bebe-181a4f4d6987" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D75EEA21F0B122", - "Last-Modified" : "Fri, 01 Nov 2019 16:39:58 GMT", + "ETag" : "0x8D778264ABD27F2", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:35 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "b5210210-701e-0097-78d2-902db3000000", - "Date" : "Fri, 01 Nov 2019 16:39:57 GMT", - "x-ms-client-request-id" : "90d524b9-9957-41bd-82f4-9e06efd09495" + "x-ms-request-id" : "1d9a4f4c-e01e-0092-100f-aad9cc000000", + "Date" : "Tue, 03 Dec 2019 19:23:35 GMT", + "x-ms-client-request-id" : "e7cc97f9-24f8-477a-bebe-181a4f4d6987" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsservicesassignaturesstringtosignuserdelegationkey021288d2/javapathservicesassignaturesstringtosignuserdelegationkey112959?resource=file", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "e4bd7a5f-880f-4a35-a08b-ee444ed37818" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D778264AD2C687", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:35 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "053c9d0b-101f-004b-4e0f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:35 GMT", + "x-ms-client-request-id" : "e4bd7a5f-880f-4a35-a08b-ee444ed37818" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsservicesassignaturesstringtosignuserdelegationkey021288d2/javapathservicesassignaturesstringtosignuserdelegationkey112959?position=0&action=append", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "7dcffda9-adaa-4b91-9ac8-179c937418c0", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "053c9d0c-101f-004b-4f0f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:35 GMT", + "x-ms-client-request-id" : "7dcffda9-adaa-4b91-9ac8-179c937418c0" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsservicesassignaturesstringtosignuserdelegationkey021288d2/javapathservicesassignaturesstringtosignuserdelegationkey112959?position=7&retainUncommittedData=false&close=false&action=flush", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "a1c70fb9-0c73-4b2d-a785-a303c88f4c49" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D778264AE30A77", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:35 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "053c9d0d-101f-004b-500f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:35 GMT", + "x-ms-client-request-id" : "a1c70fb9-0c73-4b2d-a785-a303c88f4c49" }, "Exception" : null }, { @@ -25,8 +89,8 @@ "Uri" : "https://gaprahns.blob.core.windows.net?prefix=jtfsservicesassignaturesstringtosignuserdelegationkey&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "70cb5493-8c45-4715-9911-4a3f3ce2443c" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "37a9ce58-a1b7-4187-bf94-f4c2b34d5a09" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -34,20 +98,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "b5210235-701e-0097-1bd2-902db3000000", - "Body" : "jtfsservicesassignaturesstringtosignuserdelegationkeyjtfsservicesassignaturesstringtosignuserdelegationkey05299874Fri, 01 Nov 2019 16:39:58 GMT\"0x8D75EEA21F0B122\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Fri, 01 Nov 2019 16:39:57 GMT", - "x-ms-client-request-id" : "70cb5493-8c45-4715-9911-4a3f3ce2443c", + "x-ms-request-id" : "1d9a4f87-e01e-0092-440f-aad9cc000000", + "Body" : "jtfsservicesassignaturesstringtosignuserdelegationkeyjtfsservicesassignaturesstringtosignuserdelegationkey021288d2Tue, 03 Dec 2019 19:23:35 GMT\"0x8D778264ABD27F2\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Tue, 03 Dec 2019 19:23:35 GMT", + "x-ms-client-request-id" : "37a9ce58-a1b7-4187-bf94-f4c2b34d5a09", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfsservicesassignaturesstringtosignuserdelegationkey05299874?restype=container", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfsservicesassignaturesstringtosignuserdelegationkey021288d2?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "e7891ec0-83c2-4390-8113-a3b58b56147c" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "30f76a3a-e195-4bbc-936a-e83d8b124f60" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -55,11 +119,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "b5210258-701e-0097-3dd2-902db3000000", - "Date" : "Fri, 01 Nov 2019 16:39:57 GMT", - "x-ms-client-request-id" : "e7891ec0-83c2-4390-8113-a3b58b56147c" + "x-ms-request-id" : "1d9a4f94-e01e-0092-510f-aad9cc000000", + "Date" : "Tue, 03 Dec 2019 19:23:35 GMT", + "x-ms-client-request-id" : "30f76a3a-e195-4bbc-936a-e83d8b124f60" }, "Exception" : null } ], - "variables" : [ "jtfsservicesassignaturesstringtosignuserdelegationkey05299874" ] + "variables" : [ "jtfsservicesassignaturesstringtosignuserdelegationkey021288d2", "javapathservicesassignaturesstringtosignuserdelegationkey112959" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestservicesassignaturesstringtosignuserdelegationkey[9].json b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestservicesassignaturesstringtosignuserdelegationkey[9].json index 6d042f9560b1..cad6d646678b 100644 --- a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestservicesassignaturesstringtosignuserdelegationkey[9].json +++ b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestservicesassignaturesstringtosignuserdelegationkey[9].json @@ -1,23 +1,87 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfsservicesassignaturesstringtosignuserdelegationkey0200015d?restype=container", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfsservicesassignaturesstringtosignuserdelegationkey03514718?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "b79ce52a-920e-4682-a87b-a63871acf7f4" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "bb208c37-4232-408d-833b-c6d3fc9de1ad" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D75EEA220C5470", - "Last-Modified" : "Fri, 01 Nov 2019 16:39:58 GMT", + "ETag" : "0x8D778264AFCFB7D", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:35 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "b521027b-701e-0097-5fd2-902db3000000", - "Date" : "Fri, 01 Nov 2019 16:39:57 GMT", - "x-ms-client-request-id" : "b79ce52a-920e-4682-a87b-a63871acf7f4" + "x-ms-request-id" : "1d9a4fa1-e01e-0092-5c0f-aad9cc000000", + "Date" : "Tue, 03 Dec 2019 19:23:35 GMT", + "x-ms-client-request-id" : "bb208c37-4232-408d-833b-c6d3fc9de1ad" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsservicesassignaturesstringtosignuserdelegationkey03514718/javapathservicesassignaturesstringtosignuserdelegationkey178838?resource=file", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "2e0fe4ba-9967-4aa6-843e-c6c4c292ee4b" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D778264B0B1D6C", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:35 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "053c9d0e-101f-004b-510f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:35 GMT", + "x-ms-client-request-id" : "2e0fe4ba-9967-4aa6-843e-c6c4c292ee4b" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsservicesassignaturesstringtosignuserdelegationkey03514718/javapathservicesassignaturesstringtosignuserdelegationkey178838?position=0&action=append", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "a2afdd21-fe1b-46eb-9da8-2deab8c721be", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "053c9d0f-101f-004b-520f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:35 GMT", + "x-ms-client-request-id" : "a2afdd21-fe1b-46eb-9da8-2deab8c721be" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsservicesassignaturesstringtosignuserdelegationkey03514718/javapathservicesassignaturesstringtosignuserdelegationkey178838?position=7&retainUncommittedData=false&close=false&action=flush", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "ae44658d-a379-41ff-88dd-0fd0d208ab89" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D778264B1BCC71", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:36 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "053c9d10-101f-004b-530f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:36 GMT", + "x-ms-client-request-id" : "ae44658d-a379-41ff-88dd-0fd0d208ab89" }, "Exception" : null }, { @@ -25,8 +89,8 @@ "Uri" : "https://gaprahns.blob.core.windows.net?prefix=jtfsservicesassignaturesstringtosignuserdelegationkey&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "440d4072-c439-4a5b-8002-b32027a0979a" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "ce7bcbb2-68d5-4d05-8f3e-5e8cc67a2746" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -34,20 +98,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "b52102d3-701e-0097-34d2-902db3000000", - "Body" : "jtfsservicesassignaturesstringtosignuserdelegationkeyjtfsservicesassignaturesstringtosignuserdelegationkey0200015dFri, 01 Nov 2019 16:39:58 GMT\"0x8D75EEA220C5470\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Fri, 01 Nov 2019 16:39:58 GMT", - "x-ms-client-request-id" : "440d4072-c439-4a5b-8002-b32027a0979a", + "x-ms-request-id" : "1d9a4fe8-e01e-0092-110f-aad9cc000000", + "Body" : "jtfsservicesassignaturesstringtosignuserdelegationkeyjtfsservicesassignaturesstringtosignuserdelegationkey03514718Tue, 03 Dec 2019 19:23:35 GMT\"0x8D778264AFCFB7D\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Tue, 03 Dec 2019 19:23:36 GMT", + "x-ms-client-request-id" : "ce7bcbb2-68d5-4d05-8f3e-5e8cc67a2746", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfsservicesassignaturesstringtosignuserdelegationkey0200015d?restype=container", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfsservicesassignaturesstringtosignuserdelegationkey03514718?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "84ea51d9-be7e-4009-8252-77fa6645230b" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "3fee3908-a952-4c90-af63-2f5d450b5676" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -55,11 +119,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "b52102dd-701e-0097-3dd2-902db3000000", - "Date" : "Fri, 01 Nov 2019 16:39:58 GMT", - "x-ms-client-request-id" : "84ea51d9-be7e-4009-8252-77fa6645230b" + "x-ms-request-id" : "1d9a4ff7-e01e-0092-1f0f-aad9cc000000", + "Date" : "Tue, 03 Dec 2019 19:23:36 GMT", + "x-ms-client-request-id" : "3fee3908-a952-4c90-af63-2f5d450b5676" }, "Exception" : null } ], - "variables" : [ "jtfsservicesassignaturesstringtosignuserdelegationkey0200015d" ] + "variables" : [ "jtfsservicesassignaturesstringtosignuserdelegationkey03514718", "javapathservicesassignaturesstringtosignuserdelegationkey178838" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestservicesassignaturevaluesnetworktestfile.json b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestservicesassignaturevaluesnetworktestfile.json index 63e678c3a6bc..475abe44b2ef 100644 --- a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestservicesassignaturevaluesnetworktestfile.json +++ b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestservicesassignaturevaluesnetworktestfile.json @@ -1,53 +1,53 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfsservicesassignaturevaluesnetworktestfile024021889c44?restype=container", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfsservicesassignaturevaluesnetworktestfile021998aa053d?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "d4bcf863-ed62-46c5-8c89-57176218f63b" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "b7e6098a-486c-464f-a6fc-b7777d70be83" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D75EEA1D179568", - "Last-Modified" : "Fri, 01 Nov 2019 16:39:49 GMT", + "ETag" : "0x8D7782642C1A4C0", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:22 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "b520f175-701e-0097-65d2-902db3000000", - "Date" : "Fri, 01 Nov 2019 16:39:49 GMT", - "x-ms-client-request-id" : "d4bcf863-ed62-46c5-8c89-57176218f63b" + "x-ms-request-id" : "1d9a41d0-e01e-0092-720f-aad9cc000000", + "Date" : "Tue, 03 Dec 2019 19:23:21 GMT", + "x-ms-client-request-id" : "b7e6098a-486c-464f-a6fc-b7777d70be83" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsservicesassignaturevaluesnetworktestfile024021889c44/javapathservicesassignaturevaluesnetworktestfile1970373304?resource=file", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsservicesassignaturevaluesnetworktestfile021998aa053d/javapathservicesassignaturevaluesnetworktestfile1763995f2b?resource=file", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "4dc4eef2-7408-4822-9de6-ba68e936a20b" + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "c704263c-aafa-4699-b669-abdf609db83b" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D75EEA1D5B1C5B", - "Last-Modified" : "Fri, 01 Nov 2019 16:39:50 GMT", + "ETag" : "0x8D7782642CE0251", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:22 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "3074d948-a01f-003f-32d2-90f9a6000000", - "Date" : "Fri, 01 Nov 2019 16:39:50 GMT", - "x-ms-client-request-id" : "4dc4eef2-7408-4822-9de6-ba68e936a20b" + "x-ms-request-id" : "053c9ad8-101f-004b-250f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:21 GMT", + "x-ms-client-request-id" : "c704263c-aafa-4699-b669-abdf609db83b" }, "Exception" : null }, { "Method" : "PATCH", - "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsservicesassignaturevaluesnetworktestfile024021889c44/javapathservicesassignaturevaluesnetworktestfile1970373304?position=0&action=append", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsservicesassignaturevaluesnetworktestfile021998aa053d/javapathservicesassignaturevaluesnetworktestfile1763995f2b?position=0&action=append", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "3d35332b-5506-40e6-b655-436d17d3d85a", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "0a567b23-799d-4264-be25-205950a08240", "Content-Type" : "application/octet-stream" }, "Response" : { @@ -57,95 +57,95 @@ "Content-Length" : "0", "StatusCode" : "202", "x-ms-request-server-encrypted" : "true", - "x-ms-request-id" : "3074d94b-a01f-003f-35d2-90f9a6000000", - "Date" : "Fri, 01 Nov 2019 16:39:50 GMT", - "x-ms-client-request-id" : "3d35332b-5506-40e6-b655-436d17d3d85a" + "x-ms-request-id" : "053c9ad9-101f-004b-260f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:21 GMT", + "x-ms-client-request-id" : "0a567b23-799d-4264-be25-205950a08240" }, "Exception" : null }, { "Method" : "PATCH", - "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsservicesassignaturevaluesnetworktestfile024021889c44/javapathservicesassignaturevaluesnetworktestfile1970373304?position=7&retainUncommittedData=false&close=false&action=flush", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsservicesassignaturevaluesnetworktestfile021998aa053d/javapathservicesassignaturevaluesnetworktestfile1763995f2b?position=7&retainUncommittedData=false&close=false&action=flush", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "1494821a-4fc1-48f6-ae60-0c9d86faa595" + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "b66c3f80-a6c1-41e1-994f-8edd81940d39" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D75EEA1D70569F", - "Last-Modified" : "Fri, 01 Nov 2019 16:39:50 GMT", + "ETag" : "0x8D7782642E19125", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:22 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "200", "x-ms-request-server-encrypted" : "true", - "x-ms-request-id" : "3074d94c-a01f-003f-36d2-90f9a6000000", - "Date" : "Fri, 01 Nov 2019 16:39:50 GMT", - "x-ms-client-request-id" : "1494821a-4fc1-48f6-ae60-0c9d86faa595" + "x-ms-request-id" : "053c9ada-101f-004b-270f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:21 GMT", + "x-ms-client-request-id" : "b66c3f80-a6c1-41e1-994f-8edd81940d39" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfsservicesassignaturevaluesnetworktestfile024021889c44/javapathservicesassignaturevaluesnetworktestfile1970373304?sv=2019-02-02&spr=https%2Chttp&st=2019-10-31T16%3A39%3A50Z&se=2019-11-02T16%3A39%3A50Z&sip=0.0.0.0-255.255.255.255&sr=b&sp=racwd&sig=REDACTED&rscc=cache&rscd=disposition&rsce=encoding&rscl=language&rsct=type", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfsservicesassignaturevaluesnetworktestfile021998aa053d/javapathservicesassignaturevaluesnetworktestfile1763995f2b?sv=2019-02-02&spr=https%2Chttp&st=2019-12-02T19%3A23%3A22Z&se=2019-12-04T19%3A23%3A22Z&sip=0.0.0.0-255.255.255.255&sr=b&sp=racwd&sig=REDACTED&rscc=cache&rscd=disposition&rsce=encoding&rscl=language&rsct=type", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "0569f2ae-428d-4f41-85ed-f6102b915141" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "f1e66d04-698b-4834-b800-b179fbe3b17d" }, "Response" : { "x-ms-version" : "2019-02-02", "x-ms-lease-status" : "unlocked", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-lease-state" : "available", - "Last-Modified" : "Fri, 01 Nov 2019 16:39:50 GMT", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:22 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Fri, 01 Nov 2019 16:39:50 GMT", + "Date" : "Tue, 03 Dec 2019 19:23:22 GMT", "x-ms-blob-type" : "BlockBlob", "Accept-Ranges" : "bytes", "x-ms-server-encrypted" : "true", "Cache-Control" : "cache", - "ETag" : "0x8D75EEA1D70569F", + "ETag" : "0x8D7782642E19125", "Content-Disposition" : "disposition", - "x-ms-creation-time" : "Fri, 01 Nov 2019 16:39:50 GMT", + "x-ms-creation-time" : "Tue, 03 Dec 2019 19:23:22 GMT", "Content-Length" : "7", - "x-ms-request-id" : "b520f337-701e-0097-03d2-902db3000000", + "x-ms-request-id" : "1d9a421a-e01e-0092-370f-aad9cc000000", "Body" : "default", - "x-ms-client-request-id" : "0569f2ae-428d-4f41-85ed-f6102b915141", + "x-ms-client-request-id" : "f1e66d04-698b-4834-b800-b179fbe3b17d", "Content-Language" : "language", "Content-Type" : "type" }, "Exception" : null }, { "Method" : "HEAD", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfsservicesassignaturevaluesnetworktestfile024021889c44/javapathservicesassignaturevaluesnetworktestfile1970373304?sv=2019-02-02&spr=https%2Chttp&st=2019-10-31T16%3A39%3A50Z&se=2019-11-02T16%3A39%3A50Z&sip=0.0.0.0-255.255.255.255&sr=b&sp=racwd&sig=REDACTED&rscc=cache&rscd=disposition&rsce=encoding&rscl=language&rsct=type", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfsservicesassignaturevaluesnetworktestfile021998aa053d/javapathservicesassignaturevaluesnetworktestfile1763995f2b?sv=2019-02-02&spr=https%2Chttp&st=2019-12-02T19%3A23%3A22Z&se=2019-12-04T19%3A23%3A22Z&sip=0.0.0.0-255.255.255.255&sr=b&sp=racwd&sig=REDACTED&rscc=cache&rscd=disposition&rsce=encoding&rscl=language&rsct=type", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "c6a01276-697d-4249-980a-891287b259d3" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "5899b073-da08-4624-b135-5e93232df44a" }, "Response" : { "x-ms-version" : "2019-02-02", "x-ms-lease-status" : "unlocked", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-lease-state" : "available", - "Last-Modified" : "Fri, 01 Nov 2019 16:39:50 GMT", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:22 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Fri, 01 Nov 2019 16:39:50 GMT", + "Date" : "Tue, 03 Dec 2019 19:23:22 GMT", "x-ms-blob-type" : "BlockBlob", "Accept-Ranges" : "bytes", "x-ms-server-encrypted" : "true", "x-ms-access-tier-inferred" : "true", "x-ms-access-tier" : "Hot", "Cache-Control" : "cache", - "ETag" : "0x8D75EEA1D70569F", + "ETag" : "0x8D7782642E19125", "Content-Disposition" : "disposition", "Content-Encoding" : "encoding", - "x-ms-creation-time" : "Fri, 01 Nov 2019 16:39:50 GMT", + "x-ms-creation-time" : "Tue, 03 Dec 2019 19:23:22 GMT", "Content-Length" : "7", - "x-ms-request-id" : "b520f380-701e-0097-45d2-902db3000000", - "x-ms-client-request-id" : "c6a01276-697d-4249-980a-891287b259d3", + "x-ms-request-id" : "1d9a4234-e01e-0092-4f0f-aad9cc000000", + "x-ms-client-request-id" : "5899b073-da08-4624-b135-5e93232df44a", "Content-Language" : "language", "Content-Type" : "type" }, @@ -155,8 +155,8 @@ "Uri" : "https://gaprahns.blob.core.windows.net?prefix=jtfsservicesassignaturevaluesnetworktestfile&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "47bea717-d97b-4ded-b7e4-f2c7db7db0b8" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "ce8331f7-f19d-40f2-b259-5bd981914982" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -164,20 +164,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "b520f3ab-701e-0097-6cd2-902db3000000", - "Body" : "jtfsservicesassignaturevaluesnetworktestfilejtfsservicesassignaturevaluesnetworktestfile024021889c44Fri, 01 Nov 2019 16:39:49 GMT\"0x8D75EEA1D179568\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Fri, 01 Nov 2019 16:39:50 GMT", - "x-ms-client-request-id" : "47bea717-d97b-4ded-b7e4-f2c7db7db0b8", + "x-ms-request-id" : "1d9a424c-e01e-0092-620f-aad9cc000000", + "Body" : "jtfsservicesassignaturevaluesnetworktestfilejtfsservicesassignaturevaluesnetworktestfile021998aa053dTue, 03 Dec 2019 19:23:22 GMT\"0x8D7782642C1A4C0\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Tue, 03 Dec 2019 19:23:22 GMT", + "x-ms-client-request-id" : "ce8331f7-f19d-40f2-b259-5bd981914982", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfsservicesassignaturevaluesnetworktestfile024021889c44?restype=container", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfsservicesassignaturevaluesnetworktestfile021998aa053d?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "adf18002-7db1-4bcd-bf4c-5527be73b588" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "636d8d50-2f35-4f34-a48e-40410085d58a" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -185,11 +185,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "b520f3c9-701e-0097-09d2-902db3000000", - "Date" : "Fri, 01 Nov 2019 16:39:50 GMT", - "x-ms-client-request-id" : "adf18002-7db1-4bcd-bf4c-5527be73b588" + "x-ms-request-id" : "1d9a4259-e01e-0092-6e0f-aad9cc000000", + "Date" : "Tue, 03 Dec 2019 19:23:22 GMT", + "x-ms-client-request-id" : "636d8d50-2f35-4f34-a48e-40410085d58a" }, "Exception" : null } ], - "variables" : [ "jtfsservicesassignaturevaluesnetworktestfile024021889c44", "javapathservicesassignaturevaluesnetworktestfile1970373304", "2019-11-01T16:39:50.562Z", "2019-11-01T16:39:50.562Z" ] + "variables" : [ "jtfsservicesassignaturevaluesnetworktestfile021998aa053d", "javapathservicesassignaturevaluesnetworktestfile1763995f2b", "2019-12-03T19:23:22.218798900Z", "2019-12-03T19:23:22.221828700Z" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestservicesassignaturevaluesnetworktestfilesystem.json b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestservicesassignaturevaluesnetworktestfilesystem.json index 81edb7aa4043..a50b4ec97422 100644 --- a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestservicesassignaturevaluesnetworktestfilesystem.json +++ b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestservicesassignaturevaluesnetworktestfilesystem.json @@ -1,54 +1,118 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "http://gaprahns.blob.core.windows.net/jtfsservicesassignaturevaluesnetworktestfilesystem028360d64?restype=container", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfsservicesassignaturevaluesnetworktestfilesystem033843783?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "26bd9f1c-40b0-41ea-8ab0-d45be570b6bd" + "x-ms-client-request-id" : "b5f3268c-1ef5-4755-bd70-33a92bcd713b" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D76D5388999057", - "Last-Modified" : "Wed, 20 Nov 2019 00:49:43 GMT", + "ETag" : "0x8D77826ACDA2711", + "Last-Modified" : "Tue, 03 Dec 2019 19:26:20 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "69f9ff27-201e-006a-733c-9f12d1000000", - "Date" : "Wed, 20 Nov 2019 00:49:43 GMT", - "x-ms-client-request-id" : "26bd9f1c-40b0-41ea-8ab0-d45be570b6bd" + "x-ms-request-id" : "6f6c6137-201e-0061-560f-aa0aa5000000", + "Date" : "Tue, 03 Dec 2019 19:26:19 GMT", + "x-ms-client-request-id" : "b5f3268c-1ef5-4755-bd70-33a92bcd713b" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "http://gaprahns.blob.core.windows.net/jtfsservicesassignaturevaluesnetworktestfilesystem028360d64?restype=container&comp=acl", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsservicesassignaturevaluesnetworktestfilesystem033843783/javapathservicesassignaturevaluesnetworktestfilesystem1617487?resource=file", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "59afa8b2-d63f-4b6b-a1d8-399b6fe12df6" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D77826AD43E3F3", + "Last-Modified" : "Tue, 03 Dec 2019 19:26:20 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "9a73b01a-501f-0080-1c0f-aaedd0000000", + "Date" : "Tue, 03 Dec 2019 19:26:19 GMT", + "x-ms-client-request-id" : "59afa8b2-d63f-4b6b-a1d8-399b6fe12df6" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsservicesassignaturevaluesnetworktestfilesystem033843783/javapathservicesassignaturevaluesnetworktestfilesystem1617487?position=0&action=append", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "6f914881-0a66-43f9-9ca3-a38231374bf9", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "9a73b034-501f-0080-360f-aaedd0000000", + "Date" : "Tue, 03 Dec 2019 19:26:20 GMT", + "x-ms-client-request-id" : "6f914881-0a66-43f9-9ca3-a38231374bf9" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsservicesassignaturevaluesnetworktestfilesystem033843783/javapathservicesassignaturevaluesnetworktestfilesystem1617487?position=7&retainUncommittedData=false&close=false&action=flush", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "50186e3f-c85c-4dd1-82be-efbdd221f349" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D77826AD5F799A", + "Last-Modified" : "Tue, 03 Dec 2019 19:26:20 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "9a73b040-501f-0080-420f-aaedd0000000", + "Date" : "Tue, 03 Dec 2019 19:26:20 GMT", + "x-ms-client-request-id" : "50186e3f-c85c-4dd1-82be-efbdd221f349" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfsservicesassignaturevaluesnetworktestfilesystem033843783?restype=container&comp=acl", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "a9fe98aa-c9c3-438b-ad56-70fedd14d3f0", + "x-ms-client-request-id" : "f440e63e-395f-4aab-98c2-46e9f05cc63b", "Content-Type" : "application/xml; charset=utf-8" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D76D5388C983D6", - "Last-Modified" : "Wed, 20 Nov 2019 00:49:44 GMT", + "ETag" : "0x8D77826AD705C76", + "Last-Modified" : "Tue, 03 Dec 2019 19:26:21 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "200", - "x-ms-request-id" : "69f9ffb2-201e-006a-763c-9f12d1000000", - "Date" : "Wed, 20 Nov 2019 00:49:43 GMT", - "x-ms-client-request-id" : "a9fe98aa-c9c3-438b-ad56-70fedd14d3f0" + "x-ms-request-id" : "6f6c6343-201e-0061-2d0f-aa0aa5000000", + "Date" : "Tue, 03 Dec 2019 19:26:20 GMT", + "x-ms-client-request-id" : "f440e63e-395f-4aab-98c2-46e9f05cc63b" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "http://gaprahns.dfs.core.windows.net/jtfsservicesassignaturevaluesnetworktestfilesystem028360d64?recursive=false&upn=false&resource=filesystem&sv=2019-02-02&si=0000&sr=c&sig=REDACTED", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsservicesassignaturevaluesnetworktestfilesystem033843783?recursive=false&upn=false&resource=filesystem&sv=2019-02-02&si=0000&sr=c&sig=REDACTED", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "4db3d36e-eb47-4e5c-925c-e0600b384c18" + "x-ms-client-request-id" : "096ded8a-9525-4f02-9098-6930b6a95879" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -56,20 +120,20 @@ "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "f11ca5a0-701f-001f-5d3c-9f956a000000", - "Body" : "{\"paths\":[]}\n", - "Date" : "Wed, 20 Nov 2019 00:49:44 GMT", - "x-ms-client-request-id" : "4db3d36e-eb47-4e5c-925c-e0600b384c18", + "x-ms-request-id" : "9a73b832-501f-0080-270f-aaedd0000000", + "Body" : "{\"paths\":[{\"contentLength\":\"7\",\"etag\":\"0x8D77826AD5F799A\",\"group\":\"$superuser\",\"lastModified\":\"Tue, 03 Dec 2019 19:26:20 GMT\",\"name\":\"javapathservicesassignaturevaluesnetworktestfilesystem1617487\",\"owner\":\"$superuser\",\"permissions\":\"rw-r-----\"}]}\n", + "Date" : "Tue, 03 Dec 2019 19:26:50 GMT", + "x-ms-client-request-id" : "096ded8a-9525-4f02-9098-6930b6a95879", "Content-Type" : "application/json;charset=utf-8" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "http://gaprahns.dfs.core.windows.net/jtfsservicesassignaturevaluesnetworktestfilesystem028360d64?recursive=false&upn=false&resource=filesystem&sv=2019-02-02&se=2019-11-21T00%3A49%3A44Z&sr=c&sp=racwdl&sig=REDACTED", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsservicesassignaturevaluesnetworktestfilesystem033843783?recursive=false&upn=false&resource=filesystem&sv=2019-02-02&se=2019-12-04T19%3A26%3A20Z&sr=c&sp=racwdl&sig=REDACTED", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "77a02632-c354-48d0-a028-324a0431134f" + "x-ms-client-request-id" : "da4c12a4-c49f-4879-8d28-d97af7ebff23" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -77,20 +141,20 @@ "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "f11ca5a1-701f-001f-5e3c-9f956a000000", - "Body" : "{\"paths\":[]}\n", - "Date" : "Wed, 20 Nov 2019 00:49:44 GMT", - "x-ms-client-request-id" : "77a02632-c354-48d0-a028-324a0431134f", + "x-ms-request-id" : "9a73b835-501f-0080-2a0f-aaedd0000000", + "Body" : "{\"paths\":[{\"contentLength\":\"7\",\"etag\":\"0x8D77826AD5F799A\",\"group\":\"$superuser\",\"lastModified\":\"Tue, 03 Dec 2019 19:26:20 GMT\",\"name\":\"javapathservicesassignaturevaluesnetworktestfilesystem1617487\",\"owner\":\"$superuser\",\"permissions\":\"rw-r-----\"}]}\n", + "Date" : "Tue, 03 Dec 2019 19:26:50 GMT", + "x-ms-client-request-id" : "da4c12a4-c49f-4879-8d28-d97af7ebff23", "Content-Type" : "application/json;charset=utf-8" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "http://gaprahns.blob.core.windows.net?prefix=jtfsservicesassignaturevaluesnetworktestfilesystem&comp=list", + "Uri" : "https://gaprahns.blob.core.windows.net?prefix=jtfsservicesassignaturevaluesnetworktestfilesystem&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "1db89c5f-e2a2-4568-a59a-e8dc5df72374" + "x-ms-client-request-id" : "14351dfb-1ff1-4628-99e7-aeb20f1b26d0" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -98,20 +162,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "69f9fffe-201e-006a-343c-9f12d1000000", - "Body" : "jtfsservicesassignaturevaluesnetworktestfilesystemjtfsservicesassignaturevaluesnetworktestfilesystem028360d64Wed, 20 Nov 2019 00:49:44 GMT\"0x8D76D5388C983D6\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Wed, 20 Nov 2019 00:49:43 GMT", - "x-ms-client-request-id" : "1db89c5f-e2a2-4568-a59a-e8dc5df72374", + "x-ms-request-id" : "6f6cae68-201e-0061-6e0f-aa0aa5000000", + "Body" : "jtfsservicesassignaturevaluesnetworktestfilesystemjtfsservicesassignaturevaluesnetworktestfilesystem033843783Tue, 03 Dec 2019 19:26:21 GMT\"0x8D77826AD705C76\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Tue, 03 Dec 2019 19:26:50 GMT", + "x-ms-client-request-id" : "14351dfb-1ff1-4628-99e7-aeb20f1b26d0", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "http://gaprahns.blob.core.windows.net/jtfsservicesassignaturevaluesnetworktestfilesystem028360d64?restype=container", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfsservicesassignaturevaluesnetworktestfilesystem033843783?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", - "x-ms-client-request-id" : "1f189368-00d0-4cac-bd65-f5e9fdd1bf26" + "x-ms-client-request-id" : "f7ad5e8d-2d73-441e-8cf0-9a9f9610b7ef" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -119,11 +183,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "69fa0021-201e-006a-543c-9f12d1000000", - "Date" : "Wed, 20 Nov 2019 00:49:44 GMT", - "x-ms-client-request-id" : "1f189368-00d0-4cac-bd65-f5e9fdd1bf26" + "x-ms-request-id" : "6f6caee3-201e-0061-5e0f-aa0aa5000000", + "Date" : "Tue, 03 Dec 2019 19:26:50 GMT", + "x-ms-client-request-id" : "f7ad5e8d-2d73-441e-8cf0-9a9f9610b7ef" }, "Exception" : null } ], - "variables" : [ "jtfsservicesassignaturevaluesnetworktestfilesystem028360d64", "2019-11-20T00:49:43.982492900Z", "2019-11-20T00:49:44.108466700Z" ] + "variables" : [ "jtfsservicesassignaturevaluesnetworktestfilesystem033843783", "javapathservicesassignaturevaluesnetworktestfilesystem1617487", "2019-12-03T19:26:20.889589900Z", "2019-12-03T19:26:20.998616900Z" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestservicesassignaturevaluesnetworktestfilesystemuserdelegation.json b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestservicesassignaturevaluesnetworktestfilesystemuserdelegation.json index 3794e8d41a1f..8577fe74cec0 100644 --- a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestservicesassignaturevaluesnetworktestfilesystemuserdelegation.json +++ b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestservicesassignaturevaluesnetworktestfilesystemuserdelegation.json @@ -1,23 +1,87 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfsservicesassignaturevaluesnetworktestfilesystemuser0097440?restype=container", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfsservicesassignaturevaluesnetworktestfilesystemuser0761174?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "e7d5b361-8089-44b3-9b72-bb64645985ec" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "2bcee51e-3f99-4747-a754-dcb157cc9e6e" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D75EEA1EEA5F86", - "Last-Modified" : "Fri, 01 Nov 2019 16:39:53 GMT", + "ETag" : "0x8D77826444380B0", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:24 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "b520f7bf-701e-0097-24d2-902db3000000", - "Date" : "Fri, 01 Nov 2019 16:39:52 GMT", - "x-ms-client-request-id" : "e7d5b361-8089-44b3-9b72-bb64645985ec" + "x-ms-request-id" : "1d9a4494-e01e-0092-5b0f-aad9cc000000", + "Date" : "Tue, 03 Dec 2019 19:23:24 GMT", + "x-ms-client-request-id" : "2bcee51e-3f99-4747-a754-dcb157cc9e6e" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsservicesassignaturevaluesnetworktestfilesystemuser0761174/c4f0a02beeff415796baeafc9f590785e9b2c22ac8854f0890fa769ef1799ccf?resource=file", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "e197a164-9466-46f7-87c7-5ef546a48f44" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D778264458A7C5", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:24 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "053c9ae5-101f-004b-310f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:23 GMT", + "x-ms-client-request-id" : "e197a164-9466-46f7-87c7-5ef546a48f44" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsservicesassignaturevaluesnetworktestfilesystemuser0761174/c4f0a02beeff415796baeafc9f590785e9b2c22ac8854f0890fa769ef1799ccf?position=0&action=append", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "8add85a4-b693-4876-bb9e-7b3638affe26", + "Content-Type" : "application/octet-stream" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "202", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "053c9ae6-101f-004b-320f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:23 GMT", + "x-ms-client-request-id" : "8add85a4-b693-4876-bb9e-7b3638affe26" + }, + "Exception" : null + }, { + "Method" : "PATCH", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsservicesassignaturevaluesnetworktestfilesystemuser0761174/c4f0a02beeff415796baeafc9f590785e9b2c22ac8854f0890fa769ef1799ccf?position=7&retainUncommittedData=false&close=false&action=flush", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "ae6a947b-00a8-44a7-8616-ff1e936f60b9" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "ETag" : "0x8D778264469DB36", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:24 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "200", + "x-ms-request-server-encrypted" : "true", + "x-ms-request-id" : "053c9ae7-101f-004b-330f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:23 GMT", + "x-ms-client-request-id" : "ae6a947b-00a8-44a7-8616-ff1e936f60b9" }, "Exception" : null }, { @@ -25,8 +89,8 @@ "Uri" : "https://gaprahns.blob.core.windows.net?restype=service&comp=userdelegationkey", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "c89c7f64-1702-4755-86ab-7bae38bac7a7", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "930a8cf4-cbcf-4552-9e10-b01dcb3b5b7e", "Content-Type" : "application/xml; charset=utf-8" }, "Response" : { @@ -35,20 +99,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "b520f897-701e-0097-5dd2-902db3000000", - "Body" : "cbe88567-c3b6-4a94-a669-62c90822fa1aac4e70b2-f708-4d63-9fa5-2a554304e4f92019-11-01T16:39:53Z2019-11-02T16:39:53Zb2019-02-02UkVEQUNURUQ=", - "Date" : "Fri, 01 Nov 2019 16:39:52 GMT", - "x-ms-client-request-id" : "c89c7f64-1702-4755-86ab-7bae38bac7a7", + "x-ms-request-id" : "1d9a4545-e01e-0092-780f-aad9cc000000", + "Body" : "34c50fef-75aa-445a-a7ce-e54bf63ce32a54af99f2-990c-4b5f-a372-f1a5bd487fd72019-12-03T19:23:25Z2019-12-04T19:23:24Zb2019-02-02UkVEQUNURUQ=", + "Date" : "Tue, 03 Dec 2019 19:23:25 GMT", + "x-ms-client-request-id" : "930a8cf4-cbcf-4552-9e10-b01dcb3b5b7e", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsservicesassignaturevaluesnetworktestfilesystemuser0097440?recursive=false&upn=false&resource=filesystem&sv=2019-02-02&se=2019-11-02T16%3A39%3A53Z&skoid=c4f48289-bb84-4086-b250-6f94a8f64cee&sktid=72f988bf-86f1-41af-91ab-2d7cd011db47&skt=2019-11-01T16%3A39%3A53Z&ske=2019-11-02T16%3A39%3A53Z&sks=b&skv=2019-02-02&sr=c&sp=racwdl&sig=REDACTED", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsservicesassignaturevaluesnetworktestfilesystemuser0761174?recursive=false&upn=false&resource=filesystem&sv=2019-02-02&se=2019-12-04T19%3A23%3A24Z&skoid=c4f48289-bb84-4086-b250-6f94a8f64cee&sktid=72f988bf-86f1-41af-91ab-2d7cd011db47&skt=2019-12-03T19%3A23%3A25Z&ske=2019-12-04T19%3A23%3A24Z&sks=b&skv=2019-02-02&sr=c&sp=racwdl&sig=REDACTED", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "4dfb7e82-fb00-4c36-9813-756dd84cf5dd" + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "bbba05b5-f2cb-4577-8b4f-817177f9ca11" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -56,10 +120,10 @@ "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "3074d957-a01f-003f-3bd2-90f9a6000000", - "Body" : "{\"paths\":[]}\n", - "Date" : "Fri, 01 Nov 2019 16:39:53 GMT", - "x-ms-client-request-id" : "4dfb7e82-fb00-4c36-9813-756dd84cf5dd", + "x-ms-request-id" : "053c9ae8-101f-004b-340f-aa7fe0000000", + "Body" : "{\"paths\":[{\"contentLength\":\"7\",\"etag\":\"0x8D778264469DB36\",\"group\":\"$superuser\",\"lastModified\":\"Tue, 03 Dec 2019 19:23:24 GMT\",\"name\":\"c4f0a02beeff415796baeafc9f590785e9b2c22ac8854f0890fa769ef1799ccf\",\"owner\":\"$superuser\",\"permissions\":\"rw-r-----\"}]}\n", + "Date" : "Tue, 03 Dec 2019 19:23:24 GMT", + "x-ms-client-request-id" : "bbba05b5-f2cb-4577-8b4f-817177f9ca11", "Content-Type" : "application/json;charset=utf-8" }, "Exception" : null @@ -68,8 +132,8 @@ "Uri" : "https://gaprahns.blob.core.windows.net?prefix=jtfsservicesassignaturevaluesnetworktestfilesystemuser&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "8df2b709-b293-4698-845e-0ba197dbf581" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "aff0a4cc-d183-42c1-a4cc-e58fe43d93c8" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -77,20 +141,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "b520f8d4-701e-0097-13d2-902db3000000", - "Body" : "jtfsservicesassignaturevaluesnetworktestfilesystemuserjtfsservicesassignaturevaluesnetworktestfilesystemuser0097440Fri, 01 Nov 2019 16:39:53 GMT\"0x8D75EEA1EEA5F86\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Fri, 01 Nov 2019 16:39:53 GMT", - "x-ms-client-request-id" : "8df2b709-b293-4698-845e-0ba197dbf581", + "x-ms-request-id" : "1d9a456a-e01e-0092-180f-aad9cc000000", + "Body" : "jtfsservicesassignaturevaluesnetworktestfilesystemuserjtfsservicesassignaturevaluesnetworktestfilesystemuser0761174Tue, 03 Dec 2019 19:23:24 GMT\"0x8D77826444380B0\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Tue, 03 Dec 2019 19:23:25 GMT", + "x-ms-client-request-id" : "aff0a4cc-d183-42c1-a4cc-e58fe43d93c8", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfsservicesassignaturevaluesnetworktestfilesystemuser0097440?restype=container", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfsservicesassignaturevaluesnetworktestfilesystemuser0761174?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "2981f2be-13da-4afd-9c8f-bd3e8977ef4b" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "29943565-e845-4f7d-9329-015681090756" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -98,11 +162,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "b520f8fe-701e-0097-38d2-902db3000000", - "Date" : "Fri, 01 Nov 2019 16:39:53 GMT", - "x-ms-client-request-id" : "2981f2be-13da-4afd-9c8f-bd3e8977ef4b" + "x-ms-request-id" : "1d9a4571-e01e-0092-1d0f-aad9cc000000", + "Date" : "Tue, 03 Dec 2019 19:23:25 GMT", + "x-ms-client-request-id" : "29943565-e845-4f7d-9329-015681090756" }, "Exception" : null } ], - "variables" : [ "jtfsservicesassignaturevaluesnetworktestfilesystemuser0097440", "2019-11-01T16:39:53.049Z", "c4f48289-bb84-4086-b250-6f94a8f64cee", "72f988bf-86f1-41af-91ab-2d7cd011db47" ] + "variables" : [ "jtfsservicesassignaturevaluesnetworktestfilesystemuser0761174", "c4f0a02beeff415796baeafc9f590785e9b2c22ac8854f0890fa769ef1799ccf", "2019-12-03T19:23:24.786994200Z", "c4f48289-bb84-4086-b250-6f94a8f64cee", "72f988bf-86f1-41af-91ab-2d7cd011db47" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestservicesassignaturevaluesnetworktestfileuserdelegation.json b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestservicesassignaturevaluesnetworktestfileuserdelegation.json index eb6c292c3bee..c6e4bdf587b9 100644 --- a/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestservicesassignaturevaluesnetworktestfileuserdelegation.json +++ b/sdk/storage/azure-storage-file-datalake/src/test/resources/session-records/SASTestservicesassignaturevaluesnetworktestfileuserdelegation.json @@ -1,53 +1,53 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfsservicesassignaturevaluesnetworktestfileuserdelega0127843?restype=container", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfsservicesassignaturevaluesnetworktestfileuserdelega0282514?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "dca4b0f0-0c0a-4767-86d0-783fbef9017e" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "4a19f662-7f9e-4d85-bf5b-a0c15a71a228" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D75EEA1DB2DFF3", - "Last-Modified" : "Fri, 01 Nov 2019 16:39:50 GMT", + "ETag" : "0x8D77826437F715F", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:23 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "b520f3ed-701e-0097-2bd2-902db3000000", - "Date" : "Fri, 01 Nov 2019 16:39:50 GMT", - "x-ms-client-request-id" : "dca4b0f0-0c0a-4767-86d0-783fbef9017e" + "x-ms-request-id" : "1d9a4349-e01e-0092-3f0f-aad9cc000000", + "Date" : "Tue, 03 Dec 2019 19:23:23 GMT", + "x-ms-client-request-id" : "4a19f662-7f9e-4d85-bf5b-a0c15a71a228" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsservicesassignaturevaluesnetworktestfileuserdelega0127843/5d11840843384c74aaf643899d78f43fc2dcc7d5044b400e8be80a7e2cce14de?resource=file", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsservicesassignaturevaluesnetworktestfileuserdelega0282514/fd751437b8cb4b1d95049e2526d45ca124fd02ae23eb4e6a9bb6bb6718d51e3a?resource=file", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "0022df75-b5dc-490e-b128-22e27380e3ee" + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "80483912-f8c2-4ff3-a83e-f6ff65cbbdb2" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D75EEA1DBD4830", - "Last-Modified" : "Fri, 01 Nov 2019 16:39:51 GMT", + "ETag" : "0x8D77826438CA200", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:23 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "3074d94d-a01f-003f-37d2-90f9a6000000", - "Date" : "Fri, 01 Nov 2019 16:39:50 GMT", - "x-ms-client-request-id" : "0022df75-b5dc-490e-b128-22e27380e3ee" + "x-ms-request-id" : "053c9adf-101f-004b-2c0f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:22 GMT", + "x-ms-client-request-id" : "80483912-f8c2-4ff3-a83e-f6ff65cbbdb2" }, "Exception" : null }, { "Method" : "PATCH", - "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsservicesassignaturevaluesnetworktestfileuserdelega0127843/5d11840843384c74aaf643899d78f43fc2dcc7d5044b400e8be80a7e2cce14de?position=0&action=append", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsservicesassignaturevaluesnetworktestfileuserdelega0282514/fd751437b8cb4b1d95049e2526d45ca124fd02ae23eb4e6a9bb6bb6718d51e3a?position=0&action=append", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "afefc817-b80f-45e9-9053-f5b36f669e91", + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "be399746-7a5a-49f5-9fa5-5d071b190916", "Content-Type" : "application/octet-stream" }, "Response" : { @@ -57,31 +57,31 @@ "Content-Length" : "0", "StatusCode" : "202", "x-ms-request-server-encrypted" : "true", - "x-ms-request-id" : "3074d94e-a01f-003f-38d2-90f9a6000000", - "Date" : "Fri, 01 Nov 2019 16:39:50 GMT", - "x-ms-client-request-id" : "afefc817-b80f-45e9-9053-f5b36f669e91" + "x-ms-request-id" : "053c9ae0-101f-004b-2d0f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:22 GMT", + "x-ms-client-request-id" : "be399746-7a5a-49f5-9fa5-5d071b190916" }, "Exception" : null }, { "Method" : "PATCH", - "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsservicesassignaturevaluesnetworktestfileuserdelega0127843/5d11840843384c74aaf643899d78f43fc2dcc7d5044b400e8be80a7e2cce14de?position=7&retainUncommittedData=false&close=false&action=flush", + "Uri" : "https://gaprahns.dfs.core.windows.net/jtfsservicesassignaturevaluesnetworktestfileuserdelega0282514/fd751437b8cb4b1d95049e2526d45ca124fd02ae23eb4e6a9bb6bb6718d51e3a?position=7&retainUncommittedData=false&close=false&action=flush", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "3718df04-ae29-43f2-98d6-e181e5c8e80c" + "User-Agent" : "azsdk-java-azure-storage-file-datalake/12.0.0-preview.5 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "43a08d43-0ca7-478f-8ea3-e2ddfbcb5d87" }, "Response" : { "x-ms-version" : "2019-02-02", "Server" : "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", - "ETag" : "0x8D75EEA1DD0E7AC", - "Last-Modified" : "Fri, 01 Nov 2019 16:39:51 GMT", + "ETag" : "0x8D7782643A05526", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:23 GMT", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "200", "x-ms-request-server-encrypted" : "true", - "x-ms-request-id" : "3074d94f-a01f-003f-39d2-90f9a6000000", - "Date" : "Fri, 01 Nov 2019 16:39:50 GMT", - "x-ms-client-request-id" : "3718df04-ae29-43f2-98d6-e181e5c8e80c" + "x-ms-request-id" : "053c9ae1-101f-004b-2e0f-aa7fe0000000", + "Date" : "Tue, 03 Dec 2019 19:23:22 GMT", + "x-ms-client-request-id" : "43a08d43-0ca7-478f-8ea3-e2ddfbcb5d87" }, "Exception" : null }, { @@ -89,8 +89,8 @@ "Uri" : "https://gaprahns.blob.core.windows.net?restype=service&comp=userdelegationkey", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "d3cf6ebd-51e9-43b3-862f-9ee11c310b90", + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "f9d28ece-45cc-45bd-9a78-5235e1d80581", "Content-Type" : "application/xml; charset=utf-8" }, "Response" : { @@ -99,75 +99,75 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "b520f5b3-701e-0097-4bd2-902db3000000", - "Body" : "5f6750ec-3ec9-4f51-8675-2a1d587ff4f53070fecf-c88e-4679-b74b-b01fc4480c842019-11-01T16:39:52Z2019-11-02T16:39:51Zb2019-02-02UkVEQUNURUQ=", - "Date" : "Fri, 01 Nov 2019 16:39:52 GMT", - "x-ms-client-request-id" : "d3cf6ebd-51e9-43b3-862f-9ee11c310b90", + "x-ms-request-id" : "1d9a4451-e01e-0092-240f-aad9cc000000", + "Body" : "1904bd24-0950-4e2d-aa0f-cb251becccbb6205002a-2dc3-499f-9d7f-74c99eac30a62019-12-02T19:23:23Z2019-12-04T19:23:23Zb2019-02-02UkVEQUNURUQ=", + "Date" : "Tue, 03 Dec 2019 19:23:24 GMT", + "x-ms-client-request-id" : "f9d28ece-45cc-45bd-9a78-5235e1d80581", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfsservicesassignaturevaluesnetworktestfileuserdelega0127843/5d11840843384c74aaf643899d78f43fc2dcc7d5044b400e8be80a7e2cce14de?sv=2019-02-02&spr=https%2Chttp&st=2019-10-31T16%3A39%3A51Z&se=2019-11-02T16%3A39%3A51Z&sip=0.0.0.0-255.255.255.255&skoid=c4f48289-bb84-4086-b250-6f94a8f64cee&sktid=72f988bf-86f1-41af-91ab-2d7cd011db47&skt=2019-11-01T16%3A39%3A52Z&ske=2019-11-02T16%3A39%3A51Z&sks=b&skv=2019-02-02&sr=b&sp=racwd&sig=REDACTED&rscc=cache&rscd=disposition&rsce=encoding&rscl=language&rsct=type", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfsservicesassignaturevaluesnetworktestfileuserdelega0282514/fd751437b8cb4b1d95049e2526d45ca124fd02ae23eb4e6a9bb6bb6718d51e3a?sv=2019-02-02&spr=https%2Chttp&st=2019-12-02T19%3A23%3A23Z&se=2019-12-04T19%3A23%3A23Z&sip=0.0.0.0-255.255.255.255&skoid=c4f48289-bb84-4086-b250-6f94a8f64cee&sktid=72f988bf-86f1-41af-91ab-2d7cd011db47&skt=2019-12-02T19%3A23%3A23Z&ske=2019-12-04T19%3A23%3A23Z&sks=b&skv=2019-02-02&sr=b&sp=racwd&sig=REDACTED&rscc=cache&rscd=disposition&rsce=encoding&rscl=language&rsct=type", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "6d195edd-fee5-4abb-bb32-45d68ae5cf0c" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "d6a88775-39b7-4203-8dce-3565e919f4e4" }, "Response" : { "x-ms-version" : "2019-02-02", "x-ms-lease-status" : "unlocked", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-lease-state" : "available", - "Last-Modified" : "Fri, 01 Nov 2019 16:39:51 GMT", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:23 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Fri, 01 Nov 2019 16:39:52 GMT", + "Date" : "Tue, 03 Dec 2019 19:23:24 GMT", "x-ms-blob-type" : "BlockBlob", "Accept-Ranges" : "bytes", "x-ms-server-encrypted" : "true", "Cache-Control" : "cache", - "ETag" : "0x8D75EEA1DD0E7AC", + "ETag" : "0x8D7782643A05526", "Content-Disposition" : "disposition", - "x-ms-creation-time" : "Fri, 01 Nov 2019 16:39:51 GMT", + "x-ms-creation-time" : "Tue, 03 Dec 2019 19:23:23 GMT", "Content-Length" : "7", - "x-ms-request-id" : "b520f6f7-701e-0097-6ed2-902db3000000", + "x-ms-request-id" : "1d9a4462-e01e-0092-350f-aad9cc000000", "Body" : "default", - "x-ms-client-request-id" : "6d195edd-fee5-4abb-bb32-45d68ae5cf0c", + "x-ms-client-request-id" : "d6a88775-39b7-4203-8dce-3565e919f4e4", "Content-Language" : "language", "Content-Type" : "type" }, "Exception" : null }, { "Method" : "HEAD", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfsservicesassignaturevaluesnetworktestfileuserdelega0127843/5d11840843384c74aaf643899d78f43fc2dcc7d5044b400e8be80a7e2cce14de?sv=2019-02-02&spr=https%2Chttp&st=2019-10-31T16%3A39%3A51Z&se=2019-11-02T16%3A39%3A51Z&sip=0.0.0.0-255.255.255.255&skoid=c4f48289-bb84-4086-b250-6f94a8f64cee&sktid=72f988bf-86f1-41af-91ab-2d7cd011db47&skt=2019-11-01T16%3A39%3A52Z&ske=2019-11-02T16%3A39%3A51Z&sks=b&skv=2019-02-02&sr=b&sp=racwd&sig=REDACTED&rscc=cache&rscd=disposition&rsce=encoding&rscl=language&rsct=type", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfsservicesassignaturevaluesnetworktestfileuserdelega0282514/fd751437b8cb4b1d95049e2526d45ca124fd02ae23eb4e6a9bb6bb6718d51e3a?sv=2019-02-02&spr=https%2Chttp&st=2019-12-02T19%3A23%3A23Z&se=2019-12-04T19%3A23%3A23Z&sip=0.0.0.0-255.255.255.255&skoid=c4f48289-bb84-4086-b250-6f94a8f64cee&sktid=72f988bf-86f1-41af-91ab-2d7cd011db47&skt=2019-12-02T19%3A23%3A23Z&ske=2019-12-04T19%3A23%3A23Z&sks=b&skv=2019-02-02&sr=b&sp=racwd&sig=REDACTED&rscc=cache&rscd=disposition&rsce=encoding&rscl=language&rsct=type", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "4619e89a-4652-4085-a67b-cfd8cb97b20d" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "456a53df-6767-478a-b2c8-44abe801ebde" }, "Response" : { "x-ms-version" : "2019-02-02", "x-ms-lease-status" : "unlocked", "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-lease-state" : "available", - "Last-Modified" : "Fri, 01 Nov 2019 16:39:51 GMT", + "Last-Modified" : "Tue, 03 Dec 2019 19:23:23 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Fri, 01 Nov 2019 16:39:52 GMT", + "Date" : "Tue, 03 Dec 2019 19:23:24 GMT", "x-ms-blob-type" : "BlockBlob", "Accept-Ranges" : "bytes", "x-ms-server-encrypted" : "true", "x-ms-access-tier-inferred" : "true", "x-ms-access-tier" : "Hot", "Cache-Control" : "cache", - "ETag" : "0x8D75EEA1DD0E7AC", + "ETag" : "0x8D7782643A05526", "Content-Disposition" : "disposition", "Content-Encoding" : "encoding", - "x-ms-creation-time" : "Fri, 01 Nov 2019 16:39:51 GMT", + "x-ms-creation-time" : "Tue, 03 Dec 2019 19:23:23 GMT", "Content-Length" : "7", - "x-ms-request-id" : "b520f78c-701e-0097-74d2-902db3000000", - "x-ms-client-request-id" : "4619e89a-4652-4085-a67b-cfd8cb97b20d", + "x-ms-request-id" : "1d9a4472-e01e-0092-3f0f-aad9cc000000", + "x-ms-client-request-id" : "456a53df-6767-478a-b2c8-44abe801ebde", "Content-Language" : "language", "Content-Type" : "type" }, @@ -177,8 +177,8 @@ "Uri" : "https://gaprahns.blob.core.windows.net?prefix=jtfsservicesassignaturevaluesnetworktestfileuserdelega&comp=list", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "529ccd9c-ce5d-4633-82a4-c404b8c3c9a3" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "7eb34ed5-0cb9-428c-97d8-3b8354440f28" }, "Response" : { "Transfer-Encoding" : "chunked", @@ -186,20 +186,20 @@ "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "b520f79b-701e-0097-03d2-902db3000000", - "Body" : "jtfsservicesassignaturevaluesnetworktestfileuserdelegajtfsservicesassignaturevaluesnetworktestfileuserdelega0127843Fri, 01 Nov 2019 16:39:50 GMT\"0x8D75EEA1DB2DFF3\"unlockedavailable$account-encryption-keyfalsefalsefalse", - "Date" : "Fri, 01 Nov 2019 16:39:52 GMT", - "x-ms-client-request-id" : "529ccd9c-ce5d-4633-82a4-c404b8c3c9a3", + "x-ms-request-id" : "1d9a447e-e01e-0092-490f-aad9cc000000", + "Body" : "jtfsservicesassignaturevaluesnetworktestfileuserdelegajtfsservicesassignaturevaluesnetworktestfileuserdelega0282514Tue, 03 Dec 2019 19:23:23 GMT\"0x8D77826437F715F\"unlockedavailable$account-encryption-keyfalsefalsefalse", + "Date" : "Tue, 03 Dec 2019 19:23:24 GMT", + "x-ms-client-request-id" : "7eb34ed5-0cb9-428c-97d8-3b8354440f28", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://gaprahns.blob.core.windows.net/jtfsservicesassignaturevaluesnetworktestfileuserdelega0127843?restype=container", + "Uri" : "https://gaprahns.blob.core.windows.net/jtfsservicesassignaturevaluesnetworktestfileuserdelega0282514?restype=container", "Headers" : { "x-ms-version" : "2019-02-02", - "User-Agent" : "azsdk-java-azure-storage-blob/12.0.0 1.8.0_221; Windows 10 10.0", - "x-ms-client-request-id" : "c835a82f-af50-4477-8f47-fcda8a4500d4" + "User-Agent" : "azsdk-java-azure-storage-blob/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "51326d8b-390b-454b-a9b6-523be580e443" }, "Response" : { "x-ms-version" : "2019-02-02", @@ -207,11 +207,11 @@ "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "202", - "x-ms-request-id" : "b520f7a7-701e-0097-0fd2-902db3000000", - "Date" : "Fri, 01 Nov 2019 16:39:52 GMT", - "x-ms-client-request-id" : "c835a82f-af50-4477-8f47-fcda8a4500d4" + "x-ms-request-id" : "1d9a4485-e01e-0092-4e0f-aad9cc000000", + "Date" : "Tue, 03 Dec 2019 19:23:24 GMT", + "x-ms-client-request-id" : "51326d8b-390b-454b-a9b6-523be580e443" }, "Exception" : null } ], - "variables" : [ "jtfsservicesassignaturevaluesnetworktestfileuserdelega0127843", "5d11840843384c74aaf643899d78f43fc2dcc7d5044b400e8be80a7e2cce14de", "2019-11-01T16:39:51.192Z", "2019-11-01T16:39:51.192Z", "c4f48289-bb84-4086-b250-6f94a8f64cee", "72f988bf-86f1-41af-91ab-2d7cd011db47" ] + "variables" : [ "jtfsservicesassignaturevaluesnetworktestfileuserdelega0282514", "fd751437b8cb4b1d95049e2526d45ca124fd02ae23eb4e6a9bb6bb6718d51e3a", "2019-12-03T19:23:23.467726200Z", "2019-12-03T19:23:23.467726200Z", "2019-12-03T19:23:23.483729200Z", "2019-12-03T19:23:23.483729200Z", "c4f48289-bb84-4086-b250-6f94a8f64cee", "72f988bf-86f1-41af-91ab-2d7cd011db47" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-datalake/swagger/README.md b/sdk/storage/azure-storage-file-datalake/swagger/README.md index c1f451445d85..123efeb117d2 100644 --- a/sdk/storage/azure-storage-file-datalake/swagger/README.md +++ b/sdk/storage/azure-storage-file-datalake/swagger/README.md @@ -148,6 +148,14 @@ directive: $.TransactionalContentMD5["x-ms-parameter-grouping"].name = "path-http-headers"; ``` +### Make eTag in Path JsonProperty to etag +``` yaml +directive: +- from: Path.java + where: $ + transform: > + return $.replace('@JsonProperty(value = "eTag")\n private String eTag;', '@JsonProperty(value = "etag")\n private String eTag;'); +``` ![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-java%2Fsdk%2Fstorage%2Fazure-storage-file-datalake%2Fswagger%2FREADME.png) diff --git a/sdk/storage/azure-storage-file-share/CHANGELOG.md b/sdk/storage/azure-storage-file-share/CHANGELOG.md index 0341b9e2713f..b0b6251bc8fa 100644 --- a/sdk/storage/azure-storage-file-share/CHANGELOG.md +++ b/sdk/storage/azure-storage-file-share/CHANGELOG.md @@ -1,4 +1,6 @@ # Release History +## Version X.X.X (XXXX-XX-XX) +- Added SAS generation methods on clients to improve discoverability and convenience of sas. Deprecated setFilePath, setShareName generateSasQueryParameters methods on ShareServiceSasSignatureValues to direct users to using the methods added on clients. ## Version 12.0.0 (2019-12-04) This package's diff --git a/sdk/storage/azure-storage-file-share/pom.xml b/sdk/storage/azure-storage-file-share/pom.xml index 0fd5641da6a3..00a3b7ed3ab9 100644 --- a/sdk/storage/azure-storage-file-share/pom.xml +++ b/sdk/storage/azure-storage-file-share/pom.xml @@ -13,7 +13,7 @@ com.azure azure-storage-file-share - 12.0.0 + 12.1.0-beta.1 Microsoft Azure client library for File Share Storage This module contains client library for Microsoft Azure File Share Storage. @@ -45,7 +45,7 @@ com.azure azure-storage-common - 12.1.0 + 12.2.0-beta.1 - ../../../pom.client.xml - - - 4.0.0 - - com.azure - azure-storage-queue-cryptography - 12.0.0-beta.6 - - Microsoft Azure client library for Queue Storage cryptography - This module contains client library for Microsoft Azure Queue Storage cryptography. - https://github.com/Azure/azure-sdk-for-java - - - - azure-java-build-docs - ${site.url}/site/${project.artifactId} - - - - - scm:git:https://github.com/Azure/azure-sdk-for-java - scm:git:git@github.com:Azure/azure-sdk-for-java.git - HEAD - - - - - com.azure - azure-storage-queue - 12.1.0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - java8 - - [1.8,9) - - - - - org.apache.maven.plugins - maven-compiler-plugin - 3.8.1 - - 1.8 - 1.8 - true - true - - -Xlint:all - -Xlint:-serial - -Xlint:-deprecation - -Xlint:-processing - - - module-info.java - - - - - - test-compile - process-test-sources - - testCompile - - - groovy-eclipse-compiler - - - - default-testCompile - process-test-sources - - testCompile - - - groovy-eclipse-compiler - - - - - - org.codehaus.groovy - groovy-eclipse-compiler - 3.4.0-01 - - - org.codehaus.groovy - groovy-eclipse-batch - 2.5.8-01 - - - - - org.apache.maven.plugins - maven-surefire-plugin - 3.0.0-M3 - - - - - - - java9plus - - [9,) - - - - - - org.apache.maven.plugins - maven-compiler-plugin - 3.8.1 - - 9 - 9 - - - - test-compile - process-test-sources - - testCompile - - - groovy-eclipse-compiler - 8 - - - - default-testCompile - process-test-sources - - testCompile - - - groovy-eclipse-compiler - 8 - - - - - - org.codehaus.groovy - groovy-eclipse-compiler - 3.4.0-01 - - - org.codehaus.groovy - groovy-eclipse-batch - 2.5.8-01 - - - - - - org.apache.maven.plugins - maven-surefire-plugin - 3.0.0-M3 - - - - - - - - - - diff --git a/sdk/storage/azure-storage-queue/CHANGELOG.md b/sdk/storage/azure-storage-queue/CHANGELOG.md index f6aaf326c706..a1bc15e50951 100644 --- a/sdk/storage/azure-storage-queue/CHANGELOG.md +++ b/sdk/storage/azure-storage-queue/CHANGELOG.md @@ -1,5 +1,8 @@ # Release History +## Version X.X.X (XXXX-XX-XX) +- Added SAS generation methods on clients to improve discoverability and convenience of sas. Deprecated setQueueName, generateSasQueryParameters methods on QueueServiceSasSignatureValues to direct users to using the methods added on clients. + ## Version 12.1.0 (2019-12-04) This package's [documentation](https://github.com/Azure/azure-sdk-for-java/blob/azure-storage-queue_12.0.0/sdk/storage/azure-storage-queue/README.md) diff --git a/sdk/storage/azure-storage-queue/pom.xml b/sdk/storage/azure-storage-queue/pom.xml index e290e32add1f..407ac0686d18 100644 --- a/sdk/storage/azure-storage-queue/pom.xml +++ b/sdk/storage/azure-storage-queue/pom.xml @@ -13,7 +13,7 @@ com.azure azure-storage-queue - 12.1.0 + 12.2.0-beta.1 Microsoft Azure client library for Queue Storage This module contains client library for Microsoft Azure Queue Storage. @@ -41,7 +41,7 @@ com.azure azure-storage-common - 12.1.0 + 12.2.0-beta.1 com.azure diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueAsyncClient.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueAsyncClient.java index 4f584ad25693..40d2a6bc4881 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueAsyncClient.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueAsyncClient.java @@ -13,6 +13,7 @@ import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; import com.azure.storage.common.StorageSharedKeyCredential; +import com.azure.storage.common.implementation.SasImplUtils; import com.azure.storage.common.implementation.StorageImplUtils; import com.azure.storage.queue.implementation.AzureQueueStorageImpl; import com.azure.storage.queue.implementation.models.MessageIdUpdateHeaders; @@ -20,6 +21,7 @@ import com.azure.storage.queue.implementation.models.QueueGetPropertiesHeaders; import com.azure.storage.queue.implementation.models.QueueMessage; import com.azure.storage.queue.implementation.models.QueuesGetPropertiesResponse; +import com.azure.storage.queue.implementation.util.QueueSasImplUtil; import com.azure.storage.queue.models.PeekedMessageItem; import com.azure.storage.queue.models.QueueMessageItem; import com.azure.storage.queue.models.QueueProperties; @@ -27,6 +29,7 @@ import com.azure.storage.queue.models.QueueStorageException; import com.azure.storage.queue.models.SendMessageResult; import com.azure.storage.queue.models.UpdateMessageResult; +import com.azure.storage.queue.sas.QueueServiceSasSignatureValues; import reactor.core.publisher.Mono; import java.time.Duration; @@ -99,6 +102,15 @@ public QueueServiceVersion getServiceVersion() { return serviceVersion; } + /** + * Gets the {@link HttpPipeline} powering this client. + * + * @return The pipeline. + */ + public HttpPipeline getHttpPipeline() { + return client.getHttpPipeline(); + } + /** * Creates a new queue. * @@ -890,6 +902,24 @@ public String getAccountName() { return this.accountName; } + /** + * Generates a service sas for the queue using the specified {@link QueueServiceSasSignatureValues} + * Note : The client must be authenticated via {@link StorageSharedKeyCredential} + *

See {@link QueueServiceSasSignatureValues} for more information on how to construct a service SAS.

+ * + *

Code Samples

+ * + * {@codesnippet com.azure.storage.queue.QueueAsyncClient.generateSas#QueueServiceSasSignatureValues} + * + * @param queueServiceSasSignatureValues {@link QueueServiceSasSignatureValues} + * + * @return A {@code String} representing all SAS query parameters. + */ + public String generateSas(QueueServiceSasSignatureValues queueServiceSasSignatureValues) { + return new QueueSasImplUtil(queueServiceSasSignatureValues, getQueueName()) + .generateSas(SasImplUtils.extractSharedKeyCredential(getHttpPipeline())); + } + /* * Maps the HTTP headers returned from the service to the expected response type * @param response Service response diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueClient.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueClient.java index d513e812f548..fc98c2fb8386 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueClient.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueClient.java @@ -3,6 +3,7 @@ package com.azure.storage.queue; import com.azure.core.annotation.ServiceClient; +import com.azure.core.http.HttpPipeline; import com.azure.core.http.rest.PagedIterable; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; @@ -15,6 +16,7 @@ import com.azure.storage.queue.models.QueueStorageException; import com.azure.storage.queue.models.SendMessageResult; import com.azure.storage.queue.models.UpdateMessageResult; +import com.azure.storage.queue.sas.QueueServiceSasSignatureValues; import reactor.core.publisher.Mono; import java.time.Duration; @@ -65,6 +67,15 @@ public QueueServiceVersion getServiceVersion() { return client.getServiceVersion(); } + /** + * Gets the {@link HttpPipeline} powering this client. + * + * @return The pipeline. + */ + public HttpPipeline getHttpPipeline() { + return client.getHttpPipeline(); + } + /** * Creates a new queue. * @@ -690,4 +701,21 @@ public String getQueueName() { public String getAccountName() { return this.client.getAccountName(); } + + /** + * Generates a service sas for the queue using the specified {@link QueueServiceSasSignatureValues} + * Note : The client must be authenticated via {@link StorageSharedKeyCredential} + *

See {@link QueueServiceSasSignatureValues} for more information on how to construct a service SAS.

+ * + *

Code Samples

+ * + * {@codesnippet com.azure.storage.queue.QueueClient.generateSas#QueueServiceSasSignatureValues} + * + * @param queueServiceSasSignatureValues {@link QueueServiceSasSignatureValues} + * + * @return A {@code String} representing all SAS query parameters. + */ + public String generateSas(QueueServiceSasSignatureValues queueServiceSasSignatureValues) { + return this.client.generateSas(queueServiceSasSignatureValues); + } } diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueConfiguration.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueConfiguration.java deleted file mode 100644 index 983e7f833b3b..000000000000 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueConfiguration.java +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.storage.queue; - -/* - * Gets the SDK information for this library component. - */ -class QueueConfiguration { - //TODO: Eventually remove these hardcoded strings with https://github.com/Azure/azure-sdk-for-java/issues/3141 - static final String NAME = "azure-storage-queue"; - // {x-version-update-start;com.azure:azure-storage-queue;current} - static final String VERSION = "12.1.0"; - // {x-version-update-end} -} diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueServiceAsyncClient.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueServiceAsyncClient.java index 94feb3fc6139..009c68e4b67e 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueServiceAsyncClient.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueServiceAsyncClient.java @@ -3,6 +3,7 @@ package com.azure.storage.queue; import com.azure.core.annotation.ServiceClient; +import com.azure.core.http.HttpPipeline; import com.azure.core.http.rest.PagedFlux; import com.azure.core.http.rest.PagedResponse; import com.azure.core.http.rest.Response; @@ -12,7 +13,10 @@ import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; import com.azure.storage.common.StorageSharedKeyCredential; +import com.azure.storage.common.implementation.AccountSasImplUtil; +import com.azure.storage.common.implementation.SasImplUtils; import com.azure.storage.common.implementation.StorageImplUtils; +import com.azure.storage.common.sas.AccountSasSignatureValues; import com.azure.storage.queue.implementation.AzureQueueStorageImpl; import com.azure.storage.queue.implementation.models.ListQueuesIncludeType; import com.azure.storage.queue.models.QueueCorsRule; @@ -489,4 +493,31 @@ Mono> getStatisticsWithResponse(Context context public String getAccountName() { return this.accountName; } + + /** + * Gets the {@link HttpPipeline} powering this client. + * + * @return The pipeline. + */ + public HttpPipeline getHttpPipeline() { + return this.client.getHttpPipeline(); + } + + /** + * Generates an account SAS for the Azure Storage account using the specified {@link AccountSasSignatureValues}. + * Note : The client must be authenticated via {@link StorageSharedKeyCredential} + *

See {@link AccountSasSignatureValues} for more information on how to construct an account SAS.

+ * + *

The snippet below generates a SAS that lasts for two days and gives the user read and list access to + * queues and file shares.

+ * {@codesnippet com.azure.storage.queue.QueueServiceAsyncClient.generateAccountSas#AccountSasSignatureValues} + * + * @param accountSasSignatureValues {@link AccountSasSignatureValues} + * + * @return A {@code String} representing all SAS query parameters. + */ + public String generateAccountSas(AccountSasSignatureValues accountSasSignatureValues) { + return new AccountSasImplUtil(accountSasSignatureValues) + .generateSas(SasImplUtils.extractSharedKeyCredential(getHttpPipeline())); + } } diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueServiceClient.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueServiceClient.java index 79c2e09d2826..7c3e2c9bf876 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueServiceClient.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueServiceClient.java @@ -3,12 +3,14 @@ package com.azure.storage.queue; import com.azure.core.annotation.ServiceClient; +import com.azure.core.http.HttpPipeline; import com.azure.core.http.rest.PagedIterable; import com.azure.core.http.rest.Response; import com.azure.core.http.rest.SimpleResponse; import com.azure.core.util.Context; import com.azure.storage.common.StorageSharedKeyCredential; import com.azure.storage.common.implementation.StorageImplUtils; +import com.azure.storage.common.sas.AccountSasSignatureValues; import com.azure.storage.queue.models.QueueCorsRule; import com.azure.storage.queue.models.QueueItem; import com.azure.storage.queue.models.QueueServiceProperties; @@ -404,4 +406,32 @@ public Response getStatisticsWithResponse(Duration timeo public String getAccountName() { return this.client.getAccountName(); } + + + /** + * Gets the {@link HttpPipeline} powering this client. + * + * @return The pipeline. + */ + public HttpPipeline getHttpPipeline() { + return this.client.getHttpPipeline(); + } + + /** + * Generates an account SAS for the Azure Storage account using the specified {@link AccountSasSignatureValues}. + * Note : The client must be authenticated via {@link StorageSharedKeyCredential} + *

See {@link AccountSasSignatureValues} for more information on how to construct an account SAS.

+ * + *

Generating an account SAS

+ *

The snippet below generates an AccountSasSignatureValues object that lasts for two days and gives the user + * read and list access to queue and file shares.

+ * {@codesnippet com.azure.storage.queue.QueueServiceClient.generateAccountSas#AccountSasSignatureValues} + * + * @param accountSasSignatureValues {@link AccountSasSignatureValues} + * + * @return A {@code String} representing all SAS query parameters. + */ + public String generateAccountSas(AccountSasSignatureValues accountSasSignatureValues) { + return this.client.generateAccountSas(accountSasSignatureValues); + } } diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/util/BuilderHelper.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/util/BuilderHelper.java index 2a14ca7f402c..9838e4dd8b93 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/util/BuilderHelper.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/util/BuilderHelper.java @@ -34,6 +34,7 @@ import java.net.URL; import java.util.ArrayList; import java.util.List; +import java.util.Map; import java.util.Objects; import java.util.regex.Pattern; @@ -41,10 +42,10 @@ * This class provides helper methods for common builder patterns. */ public final class BuilderHelper { - private static final String DEFAULT_USER_AGENT_NAME = "azure-storage-queue"; - // {x-version-update-start;com.azure:azure-storage-queue;current} - private static final String DEFAULT_USER_AGENT_VERSION = "12.1.0"; - // {x-version-update-end} + private static final Map PROPERTIES = + CoreUtils.getProperties("azure-storage-queue.properties"); + private static final String SDK_NAME = "name"; + private static final String SDK_VERSION = "version"; private static final Pattern IP_URL_PATTERN = Pattern .compile("(?:\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3})|(?:localhost)"); @@ -202,7 +203,7 @@ private static UserAgentPolicy getUserAgentPolicy(Configuration configuration) { configuration = (configuration == null) ? Configuration.NONE : configuration; return new UserAgentPolicy(getDefaultHttpLogOptions().getApplicationId(), - DEFAULT_USER_AGENT_NAME, DEFAULT_USER_AGENT_VERSION, configuration); + PROPERTIES.get(SDK_NAME), PROPERTIES.get(SDK_VERSION), configuration); } /* diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/util/QueueSasImplUtil.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/util/QueueSasImplUtil.java new file mode 100644 index 000000000000..844fa0cb425f --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/util/QueueSasImplUtil.java @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.storage.queue.implementation.util; + +import com.azure.core.util.logging.ClientLogger; +import com.azure.storage.common.StorageSharedKeyCredential; +import com.azure.storage.common.implementation.Constants; +import com.azure.storage.common.implementation.StorageImplUtils; +import com.azure.storage.common.sas.SasIpRange; +import com.azure.storage.common.sas.SasProtocol; +import com.azure.storage.queue.QueueServiceVersion; +import com.azure.storage.queue.sas.QueueSasPermission; +import com.azure.storage.queue.sas.QueueServiceSasSignatureValues; + +import java.time.OffsetDateTime; +import java.util.Objects; + +import static com.azure.storage.common.implementation.SasImplUtils.formatQueryParameterDate; +import static com.azure.storage.common.implementation.SasImplUtils.tryAppendQueryParameter; + +/** + * This class provides helper methods for common queue service sas patterns. + * + * RESERVED FOR INTERNAL USE. + */ +public class QueueSasImplUtil { + + private final ClientLogger logger = new ClientLogger(QueueSasImplUtil.class); + + private String version; + + private SasProtocol protocol; + + private OffsetDateTime startTime; + + private OffsetDateTime expiryTime; + + private String permissions; + + private SasIpRange sasIpRange; + + private String queueName; + + private String identifier; + + /** + * Creates a new {@link QueueSasImplUtil} with the specified parameters + * + * @param sasValues {@link QueueServiceSasSignatureValues} + * @param queueName The queue name + */ + public QueueSasImplUtil(QueueServiceSasSignatureValues sasValues, String queueName) { + Objects.requireNonNull(sasValues); + this.version = sasValues.getVersion(); + this.protocol = sasValues.getProtocol(); + this.startTime = sasValues.getStartTime(); + this.expiryTime = sasValues.getExpiryTime(); + this.permissions = sasValues.getPermissions(); + this.sasIpRange = sasValues.getSasIpRange(); + this.queueName = queueName; + this.identifier = sasValues.getIdentifier(); + } + + /** + * Generates a Sas signed with a {@link StorageSharedKeyCredential} + * + * @param storageSharedKeyCredentials {@link StorageSharedKeyCredential} + * @return A String representing the Sas + */ + public String generateSas(StorageSharedKeyCredential storageSharedKeyCredentials) { + StorageImplUtils.assertNotNull("storageSharedKeyCredentials", storageSharedKeyCredentials); + + ensureState(); + + // Signature is generated on the un-url-encoded values. + String canonicalName = getCanonicalName(storageSharedKeyCredentials.getAccountName()); + String stringToSign = stringToSign(canonicalName); + String signature = storageSharedKeyCredentials.computeHmac256(stringToSign); + + return encode(signature); + } + + private String encode(String signature) { + /* + We should be url-encoding each key and each value, but because we know all the keys and values will encode to + themselves, we cheat except for the signature value. + */ + StringBuilder sb = new StringBuilder(); + + tryAppendQueryParameter(sb, Constants.UrlConstants.SAS_SERVICE_VERSION, this.version); + tryAppendQueryParameter(sb, Constants.UrlConstants.SAS_PROTOCOL, this.protocol); + tryAppendQueryParameter(sb, Constants.UrlConstants.SAS_START_TIME, formatQueryParameterDate(this.startTime)); + tryAppendQueryParameter(sb, Constants.UrlConstants.SAS_EXPIRY_TIME, formatQueryParameterDate(this.expiryTime)); + tryAppendQueryParameter(sb, Constants.UrlConstants.SAS_IP_RANGE, this.sasIpRange); + tryAppendQueryParameter(sb, Constants.UrlConstants.SAS_SIGNED_IDENTIFIER, this.identifier); + tryAppendQueryParameter(sb, Constants.UrlConstants.SAS_SIGNED_PERMISSIONS, this.permissions); + tryAppendQueryParameter(sb, Constants.UrlConstants.SAS_SIGNATURE, signature); + + return sb.toString(); + } + + /** + * Ensures that the builder's properties are in a consistent state. + + * 1. If there is no version, use latest. + * 2. If there is no identifier set, ensure expiryTime and permissions are set. + * 4. Reparse permissions depending on what the resource is. If it is an unrecognised resource, do nothing. + */ + private void ensureState() { + if (version == null) { + version = QueueServiceVersion.getLatest().getVersion(); + } + + if (identifier == null) { + if (expiryTime == null || permissions == null) { + throw logger.logExceptionAsError(new IllegalStateException("If identifier is not set, expiry time " + + "and permissions must be set")); + } + } + + if (permissions != null) { + if (queueName != null) { + permissions = QueueSasPermission.parse(permissions).toString(); + } else { + // We won't reparse the permissions if we don't know the type. + logger.info("Not re-parsing permissions. Resource type is not queue."); + } + } + } + + /** + * Computes the canonical name for a queue resource for SAS signing. + * @param account Account of the storage account. + * @return Canonical name as a string. + */ + private String getCanonicalName(String account) { + // Queue: "/queue/account/queuename" + return String.join("", new String[] { "/queue/", account, "/", queueName }); + } + + private String stringToSign(String canonicalName) { + return String.join("\n", + this.permissions == null ? "" : this.permissions, + this.startTime == null ? "" : Constants.ISO_8601_UTC_DATE_FORMATTER.format(this.startTime), + this.expiryTime == null ? "" : Constants.ISO_8601_UTC_DATE_FORMATTER.format(this.expiryTime), + canonicalName, + this.identifier == null ? "" : this.identifier, + this.sasIpRange == null ? "" : this.sasIpRange.toString(), + this.protocol == null ? "" : protocol.toString(), + this.version == null ? "" : this.version + ); + } + +} diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/sas/QueueServiceSasQueryParameters.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/sas/QueueServiceSasQueryParameters.java index d3e12835ef43..8df9add46078 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/sas/QueueServiceSasQueryParameters.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/sas/QueueServiceSasQueryParameters.java @@ -19,7 +19,10 @@ * and appended to a URL directly (though caution should be taken here in case there are existing query parameters, * which might affect the appropriate means of appending these query parameters). NOTE: Instances of this class are * immutable to ensure thread safety. + * @deprecated Please use the generateSas method on the desired queue client after initializing + * {@link QueueServiceSasSignatureValues}. */ +@Deprecated public final class QueueServiceSasQueryParameters extends BaseSasQueryParameters { private final String identifier; @@ -30,7 +33,9 @@ public final class QueueServiceSasQueryParameters extends BaseSasQueryParameters * @param queryParametersMap All query parameters for the request as key-value pairs * @param removeSasParametersFromMap When {@code true}, the SAS query parameters will be removed from * {@code queryParametersMap} + * @deprecated Please use {@link QueueServiceSasSignatureValues} */ + @Deprecated public QueueServiceSasQueryParameters(Map queryParametersMap, boolean removeSasParametersFromMap) { super(queryParametersMap, removeSasParametersFromMap); @@ -53,7 +58,9 @@ public QueueServiceSasQueryParameters(Map queryParametersMap, * @param identifier A {@code String} representing the signed identifier (only for Service SAS) or {@code null}. * @param permissions A {@code String} representing the storage permissions or {@code null}. * @param signature A {@code String} representing the signature for the SAS token. + * @deprecated Please use {@link QueueServiceSasSignatureValues} */ + @Deprecated QueueServiceSasQueryParameters(String version, SasProtocol protocol, OffsetDateTime startTime, OffsetDateTime expiryTime, SasIpRange sasIpRange, String identifier, String permissions, String signature) { super(version, protocol, startTime, expiryTime, sasIpRange, permissions, signature); @@ -65,7 +72,9 @@ public QueueServiceSasQueryParameters(Map queryParametersMap, * @return The signed identifier (only for {@link QueueServiceSasSignatureValues}) or {@code null}. Please see * here * for more information. + * @deprecated Please use {@link QueueServiceSasSignatureValues} */ + @Deprecated public String getIdentifier() { return identifier; } @@ -74,7 +83,10 @@ public String getIdentifier() { * Encodes all SAS query parameters into a string that can be appended to a URL. * * @return A {@code String} representing all SAS query parameters. + * @deprecated Please use the generateSas method on the desired queue client after initializing + * {@link QueueServiceSasSignatureValues}. */ + @Deprecated public String encode() { /* We should be url-encoding each key and each value, but because we know all the keys and values will encode to diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/sas/QueueServiceSasSignatureValues.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/sas/QueueServiceSasSignatureValues.java index 150a42272eb3..2699e76959e7 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/sas/QueueServiceSasSignatureValues.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/sas/QueueServiceSasSignatureValues.java @@ -14,24 +14,11 @@ import java.time.OffsetDateTime; /** - * Used to generate a Shared Access Signature (SAS) for Azure Storage Queues service. Once all the values here are set, - * call {@link - * #generateSasQueryParameters(StorageSharedKeyCredential) generateSasQueryParameters(StorageSharedKeyCredential)} - * to obtain a representation of the SAS which can be applied to queue urls. + * Used to initialize parameters for a Shared Access Signature (SAS) for an Azure Queue Storage service. Once all the + * values here are set, use the appropriate SAS generation method on the desired queue client to obtain a + * representation of the SAS which can then be applied to a new client using the .sasToken(String) method on the + * desired client builder. * - *

Generating a queue SAS with expiryTime and permissions

- *

The snippet below generates a queue SAS that lasts for two days and gives the user read, add, and update - * permissions to the queue. - * - * {@codesnippet com.azure.storage.queue.queueServiceSasSignatureValues.generateSasQueryParameters#StorageSharedKeyCredential} - * - *

Generating a queue SAS with stored access policy identifier

- *

The snippet below generates a queue SAS that has the same duration and permissions specified by the - * {@link #setIdentifier(String) stored access policy}. - * - * {@codesnippet com.azure.storage.queue.queueServiceSasSignatureValues.generateSasQueryParameters.identifier#StorageSharedKeyCredential} - * - * @see QueueServiceSasQueryParameters * @see Storage SAS overview * @see Constructing a Service * SAS @@ -55,10 +42,36 @@ public final class QueueServiceSasSignatureValues { /** * Creates an object with empty values for all fields. + * @deprecated Please use {@link #QueueServiceSasSignatureValues(String)}, or + * {@link #QueueServiceSasSignatureValues(OffsetDateTime, QueueSasPermission)} */ + @Deprecated public QueueServiceSasSignatureValues() { } + /** + * Creates an object with the specified expiry time and permissions + * + * @param expiryTime The time after which the SAS will no longer work. + * @param permissions {@link QueueSasPermission} allowed by the SAS. + */ + public QueueServiceSasSignatureValues(OffsetDateTime expiryTime, QueueSasPermission permissions) { + StorageImplUtils.assertNotNull("expiryTime", expiryTime); + StorageImplUtils.assertNotNull("permissions", permissions); + this.expiryTime = expiryTime; + this.permissions = permissions.toString(); + } + + /** + * Creates an object with the specified identifier. + * + * @param identifier Name of the access policy. + */ + public QueueServiceSasSignatureValues(String identifier) { + StorageImplUtils.assertNotNull("identifier", identifier); + this.identifier = identifier; + } + /** * @return the version of the service this SAS will target. If not specified, it will default to the version * targeted by the library. @@ -177,7 +190,9 @@ public QueueServiceSasSignatureValues setSasIpRange(SasIpRange sasIpRange) { * Gets the name of the queue this SAS may access. * * @return The name of the queue the SAS user may access. + * @deprecated Queue name is now auto-populated by the SAS generation methods provided on the desired queue client. */ + @Deprecated public String getQueueName() { return queueName; } @@ -187,7 +202,10 @@ public String getQueueName() { * * @param queueName Canonical name of the object the SAS grants access * @return the updated QueueServiceSasSignatureValues object + * @deprecated Please use the generateSas methods provided on the desired queue client that will + * auto-populate the queue name. */ + @Deprecated public QueueServiceSasSignatureValues setQueueName(String queueName) { this.queueName = queueName; return this; @@ -197,11 +215,22 @@ public QueueServiceSasSignatureValues setQueueName(String queueName) { * @return the name of the access policy on the queue this SAS references if any. Please see * here * for more information. + * @deprecated Please use {@link #getIdentifier()} */ + @Deprecated public String getId() { return identifier; } + /** + * @return the name of the access policy on the queue this SAS references if any. Please see + * here + * for more information. + */ + public String getIdentifier() { + return identifier; + } + /** * Sets the name of the access policy on the queue this SAS references if any. Please see * here @@ -237,7 +266,10 @@ public QueueServiceSasSignatureValues setIdentifier(String identifier) { * @throws IllegalStateException If the HMAC-SHA256 algorithm isn't supported, if the key isn't a valid Base64 * encoded string, or the UTF-8 charset isn't supported. * @throws NullPointerException If {@code storageSharedKeyCredentials} is null. + * @deprecated Please use the generateSas(QueueServiceSasSignatureValues) method on the desired queue client + * after initializing {@link QueueServiceSasSignatureValues}. */ + @Deprecated public QueueServiceSasQueryParameters generateSasQueryParameters( StorageSharedKeyCredential storageSharedKeyCredentials) { StorageImplUtils.assertNotNull("storageSharedKeyCredentials", storageSharedKeyCredentials); diff --git a/sdk/storage/azure-storage-queue/src/main/resources/azure-storage-queue.properties b/sdk/storage/azure-storage-queue/src/main/resources/azure-storage-queue.properties new file mode 100644 index 000000000000..ca812989b4f2 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/main/resources/azure-storage-queue.properties @@ -0,0 +1,2 @@ +name=${project.artifactId} +version=${project.version} diff --git a/sdk/storage/azure-storage-queue/src/samples/java/com/azure/storage/queue/QueueAsyncJavaDocCodeSamples.java b/sdk/storage/azure-storage-queue/src/samples/java/com/azure/storage/queue/QueueAsyncJavaDocCodeSamples.java index c51b049bec7c..270d12946371 100644 --- a/sdk/storage/azure-storage-queue/src/samples/java/com/azure/storage/queue/QueueAsyncJavaDocCodeSamples.java +++ b/sdk/storage/azure-storage-queue/src/samples/java/com/azure/storage/queue/QueueAsyncJavaDocCodeSamples.java @@ -7,6 +7,8 @@ import com.azure.storage.queue.models.QueueAccessPolicy; import com.azure.storage.queue.models.QueueProperties; import com.azure.storage.queue.models.QueueSignedIdentifier; +import com.azure.storage.queue.sas.QueueSasPermission; +import com.azure.storage.queue.sas.QueueServiceSasSignatureValues; import java.time.Duration; import java.time.OffsetDateTime; @@ -490,4 +492,19 @@ public void getNameAsync() { System.out.println("The name of the queue is " + queueName); // END: com.azure.storage.queue.queueAsyncClient.getQueueName } + + /** + * Code snippet for {@link QueueAsyncClient#generateSas(QueueServiceSasSignatureValues)} + */ + public void generateSas() { + // BEGIN: com.azure.storage.queue.QueueAsyncClient.generateSas#QueueServiceSasSignatureValues + OffsetDateTime expiryTime = OffsetDateTime.now().plusDays(1); + QueueSasPermission permission = new QueueSasPermission().setReadPermission(true); + + QueueServiceSasSignatureValues values = new QueueServiceSasSignatureValues(expiryTime, permission) + .setStartTime(OffsetDateTime.now()); + + client.generateSas(values); // Client must be authenticated via StorageSharedKeyCredential + // END: com.azure.storage.queue.QueueAsyncClient.generateSas#QueueServiceSasSignatureValues + } } diff --git a/sdk/storage/azure-storage-queue/src/samples/java/com/azure/storage/queue/QueueJavaDocCodeSamples.java b/sdk/storage/azure-storage-queue/src/samples/java/com/azure/storage/queue/QueueJavaDocCodeSamples.java index cbf1c64e253a..e40b2166a0e1 100644 --- a/sdk/storage/azure-storage-queue/src/samples/java/com/azure/storage/queue/QueueJavaDocCodeSamples.java +++ b/sdk/storage/azure-storage-queue/src/samples/java/com/azure/storage/queue/QueueJavaDocCodeSamples.java @@ -13,6 +13,8 @@ import com.azure.storage.queue.models.QueueSignedIdentifier; import com.azure.storage.queue.models.SendMessageResult; import com.azure.storage.queue.models.UpdateMessageResult; +import com.azure.storage.queue.sas.QueueSasPermission; +import com.azure.storage.queue.sas.QueueServiceSasSignatureValues; import java.time.Duration; import java.time.OffsetDateTime; @@ -431,4 +433,19 @@ public void getName() { System.out.println("The name of the queue is " + queueName); // END: com.azure.storage.queue.queueClient.getQueueName } + + /** + * Code snippet for {@link QueueClient#generateSas(QueueServiceSasSignatureValues)} + */ + public void generateSas() { + // BEGIN: com.azure.storage.queue.QueueClient.generateSas#QueueServiceSasSignatureValues + OffsetDateTime expiryTime = OffsetDateTime.now().plusDays(1); + QueueSasPermission permission = new QueueSasPermission().setReadPermission(true); + + QueueServiceSasSignatureValues values = new QueueServiceSasSignatureValues(expiryTime, permission) + .setStartTime(OffsetDateTime.now()); + + client.generateSas(values); // Client must be authenticated via StorageSharedKeyCredential + // END: com.azure.storage.queue.QueueClient.generateSas#QueueServiceSasSignatureValues + } } diff --git a/sdk/storage/azure-storage-queue/src/samples/java/com/azure/storage/queue/QueueServiceAsyncJavaDocCodeSamples.java b/sdk/storage/azure-storage-queue/src/samples/java/com/azure/storage/queue/QueueServiceAsyncJavaDocCodeSamples.java index f19a52c62f60..bbe244a5c44e 100644 --- a/sdk/storage/azure-storage-queue/src/samples/java/com/azure/storage/queue/QueueServiceAsyncJavaDocCodeSamples.java +++ b/sdk/storage/azure-storage-queue/src/samples/java/com/azure/storage/queue/QueueServiceAsyncJavaDocCodeSamples.java @@ -3,10 +3,16 @@ package com.azure.storage.queue; import com.azure.storage.common.StorageSharedKeyCredential; +import com.azure.storage.common.sas.AccountSasPermission; +import com.azure.storage.common.sas.AccountSasResourceType; +import com.azure.storage.common.sas.AccountSasService; +import com.azure.storage.common.sas.AccountSasSignatureValues; import com.azure.storage.queue.models.QueueServiceProperties; import com.azure.storage.queue.models.QueueServiceStatistics; import com.azure.storage.queue.models.QueuesSegmentOptions; +import java.time.Duration; +import java.time.OffsetDateTime; import java.util.Collections; import java.util.Map; @@ -260,4 +266,25 @@ public void getStatisticsWithResponse() { }); // END: com.azure.storage.queue.queueServiceAsyncClient.getStatisticsWithResponse } + + /** + * Code snippet for {@link QueueServiceAsyncClient#generateAccountSas(AccountSasSignatureValues)} + */ + public void generateAccountSas() { + QueueServiceAsyncClient queueServiceAsyncClient = createAsyncClientWithCredential(); + // BEGIN: com.azure.storage.queue.QueueServiceAsyncClient.generateAccountSas#AccountSasSignatureValues + AccountSasPermission permissions = new AccountSasPermission() + .setListPermission(true) + .setReadPermission(true); + AccountSasResourceType resourceTypes = new AccountSasResourceType().setContainer(true).setObject(true); + AccountSasService services = new AccountSasService().setQueueAccess(true).setFileAccess(true); + OffsetDateTime expiryTime = OffsetDateTime.now().plus(Duration.ofDays(2)); + + AccountSasSignatureValues sasValues = + new AccountSasSignatureValues(expiryTime, permissions, services, resourceTypes); + + // Client must be authenticated via StorageSharedKeyCredential + String sas = queueServiceAsyncClient.generateAccountSas(sasValues); + // END: com.azure.storage.queue.QueueServiceAsyncClient.generateAccountSas#AccountSasSignatureValues + } } diff --git a/sdk/storage/azure-storage-queue/src/samples/java/com/azure/storage/queue/QueueServiceJavaDocCodeSamples.java b/sdk/storage/azure-storage-queue/src/samples/java/com/azure/storage/queue/QueueServiceJavaDocCodeSamples.java index 5a147eaec2c2..0a34f6484734 100644 --- a/sdk/storage/azure-storage-queue/src/samples/java/com/azure/storage/queue/QueueServiceJavaDocCodeSamples.java +++ b/sdk/storage/azure-storage-queue/src/samples/java/com/azure/storage/queue/QueueServiceJavaDocCodeSamples.java @@ -5,11 +5,16 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; import com.azure.storage.common.StorageSharedKeyCredential; +import com.azure.storage.common.sas.AccountSasPermission; +import com.azure.storage.common.sas.AccountSasResourceType; +import com.azure.storage.common.sas.AccountSasService; +import com.azure.storage.common.sas.AccountSasSignatureValues; import com.azure.storage.queue.models.QueueServiceProperties; import com.azure.storage.queue.models.QueueServiceStatistics; import com.azure.storage.queue.models.QueuesSegmentOptions; import java.time.Duration; +import java.time.OffsetDateTime; import java.util.Collections; import java.util.Map; @@ -250,4 +255,25 @@ public void getStatisticsWithResponse() { stats.getGeoReplication().getStatus(), stats.getGeoReplication().getLastSyncTime()); // END: com.azure.storage.queue.queueServiceClient.getStatisticsWithResponse#duration-context } + + /** + * Code snippet for {@link QueueServiceClient#generateAccountSas(AccountSasSignatureValues)} + */ + public void generateAccountSas() { + QueueServiceClient queueServiceClient = createClientWithCredential(); + // BEGIN: com.azure.storage.queue.QueueServiceClient.generateAccountSas#AccountSasSignatureValues + AccountSasPermission permissions = new AccountSasPermission() + .setListPermission(true) + .setReadPermission(true); + AccountSasResourceType resourceTypes = new AccountSasResourceType().setContainer(true).setObject(true); + AccountSasService services = new AccountSasService().setQueueAccess(true).setFileAccess(true); + OffsetDateTime expiryTime = OffsetDateTime.now().plus(Duration.ofDays(2)); + + AccountSasSignatureValues sasValues = + new AccountSasSignatureValues(expiryTime, permissions, services, resourceTypes); + + // Client must be authenticated via StorageSharedKeyCredential + String sas = queueServiceClient.generateAccountSas(sasValues); + // END: com.azure.storage.queue.QueueServiceClient.generateAccountSas#AccountSasSignatureValues + } } diff --git a/sdk/storage/azure-storage-queue/src/samples/java/com/azure/storage/queue/QueueServiceSasSignatureValuesJavaDocCodeSnippets.java b/sdk/storage/azure-storage-queue/src/samples/java/com/azure/storage/queue/QueueServiceSasSignatureValuesJavaDocCodeSnippets.java deleted file mode 100644 index 09fc98425358..000000000000 --- a/sdk/storage/azure-storage-queue/src/samples/java/com/azure/storage/queue/QueueServiceSasSignatureValuesJavaDocCodeSnippets.java +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.storage.queue; - -import com.azure.storage.common.StorageSharedKeyCredential; -import com.azure.storage.common.sas.SasProtocol; -import com.azure.storage.queue.sas.QueueSasPermission; -import com.azure.storage.queue.sas.QueueServiceSasQueryParameters; -import com.azure.storage.queue.sas.QueueServiceSasSignatureValues; - -import java.time.Duration; -import java.time.OffsetDateTime; - -/** - * Code snippets for {@link QueueServiceSasSignatureValues}. - */ -public class QueueServiceSasSignatureValuesJavaDocCodeSnippets { - public void generateSasExpiryTime() { - // BEGIN: com.azure.storage.queue.queueServiceSasSignatureValues.generateSasQueryParameters#StorageSharedKeyCredential - StorageSharedKeyCredential credential = new StorageSharedKeyCredential("my-account", "my-key"); - - // The expiry time and permissions are required to create a valid SAS - // if a stored access policy identifier is not set. - QueueServiceSasQueryParameters sasQueryParameters = new QueueServiceSasSignatureValues() - .setPermissions(QueueSasPermission.parse("rau")) - .setProtocol(SasProtocol.HTTPS_ONLY) - .setExpiryTime(OffsetDateTime.now().plus(Duration.ofDays(2))) - .generateSasQueryParameters(credential); - // END: com.azure.storage.queue.queueServiceSasSignatureValues.generateSasQueryParameters#StorageSharedKeyCredential - } - - public void generateWithStoredAccessPolicy() { - // BEGIN: com.azure.storage.queue.queueServiceSasSignatureValues.generateSasQueryParameters.identifier#StorageSharedKeyCredential - StorageSharedKeyCredential credential = new StorageSharedKeyCredential("my-account", "my-key"); - - // The shared access policy, "read-write-user" exists in the storage account. The SAS generated from this has - // the same duration and permissions as the policy. - // The expiry and permissions should not be set explicitly. - QueueServiceSasQueryParameters sasQueryParameters = new QueueServiceSasSignatureValues() - .setIdentifier("read-write-user") - .setProtocol(SasProtocol.HTTPS_ONLY) - .generateSasQueryParameters(credential); - // END: com.azure.storage.queue.queueServiceSasSignatureValues.generateSasQueryParameters.identifier#StorageSharedKeyCredential - } -} diff --git a/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/APISpec.groovy b/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/APISpec.groovy index 1fc8d058c3f7..86dda7287003 100644 --- a/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/APISpec.groovy +++ b/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/APISpec.groovy @@ -4,12 +4,18 @@ package com.azure.storage.queue import com.azure.core.http.HttpClient +import com.azure.core.http.ProxyOptions +import com.azure.core.http.netty.NettyAsyncHttpClientBuilder +import com.azure.core.http.policy.HttpLogDetailLevel +import com.azure.core.http.policy.HttpLogOptions +import com.azure.core.http.policy.HttpPipelinePolicy import com.azure.core.test.InterceptorManager import com.azure.core.test.TestMode import com.azure.core.test.utils.TestResourceNamer import com.azure.core.util.Configuration import com.azure.core.util.Context import com.azure.core.util.logging.ClientLogger +import com.azure.storage.common.StorageSharedKeyCredential import com.azure.storage.queue.models.QueuesSegmentOptions import spock.lang.Specification @@ -28,6 +34,9 @@ class APISpec extends Specification { QueueServiceAsyncClient primaryQueueServiceAsyncClient + static def PRIMARY_STORAGE = "AZURE_STORAGE_QUEUE_" + protected static StorageSharedKeyCredential primaryCredential + // Test name for test method name. String methodName TestMode testMode = getTestMode() @@ -40,6 +49,7 @@ class APISpec extends Specification { * Setup the QueueServiceClient and QueueClient common used for the API tests. */ def setup() { + primaryCredential = getCredential(PRIMARY_STORAGE) String testName = refactorName(specificationContext.currentIteration.getName()) String className = specificationContext.getCurrentSpec().getName() methodName = className + testName @@ -95,6 +105,26 @@ class APISpec extends Specification { return TestMode.PLAYBACK } + private StorageSharedKeyCredential getCredential(String accountType) { + String accountName + String accountKey + + if (testMode == TestMode.RECORD) { + accountName = Configuration.getGlobalConfiguration().get(accountType + "ACCOUNT_NAME") + accountKey = Configuration.getGlobalConfiguration().get(accountType + "ACCOUNT_KEY") + } else { + accountName = "azstoragesdkaccount" + accountKey = "astorageaccountkey" + } + + if (accountName == null || accountKey == null) { + logger.warning("Account name or key for the {} account was null. Test's requiring these credentials will fail.", accountType) + return null + } + + return new StorageSharedKeyCredential(accountName, accountKey) + } + def queueServiceBuilderHelper(final InterceptorManager interceptorManager) { if (testMode == TestMode.RECORD) { return new QueueServiceClientBuilder() @@ -124,6 +154,42 @@ class APISpec extends Specification { } } + QueueServiceClientBuilder getServiceClientBuilder(StorageSharedKeyCredential credential, String endpoint, + HttpPipelinePolicy... policies) { + QueueServiceClientBuilder builder = new QueueServiceClientBuilder() + .endpoint(endpoint) + .httpClient(getHttpClient()) + .httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BODY_AND_HEADERS)) + + for (HttpPipelinePolicy policy : policies) { + builder.addPolicy(policy) + } + + if (testMode == TestMode.RECORD) { + builder.addPolicy(interceptorManager.getRecordPolicy()) + } + + if (credential != null) { + builder.credential(credential) + } + + return builder + } + + QueueClientBuilder getQueueClientBuilder(String endpoint) { + QueueClientBuilder builder = new QueueClientBuilder() + .endpoint(endpoint) + .httpClient(getHttpClient()) + .httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BODY_AND_HEADERS)) + + if (testMode == TestMode.RECORD) { + builder.addPolicy(interceptorManager.getRecordPolicy()) + } + + return builder + } + + private def refactorName(String text) { def fullName = text.split(" ").collect { it.capitalize() }.join("") def matcher = (fullName =~ /(.*)(\[)(.*)(\])/) @@ -138,8 +204,19 @@ class APISpec extends Specification { return testResourceName.now() } - static HttpClient getHttpClient() { - return HttpClient.createDefault() + HttpClient getHttpClient() { + NettyAsyncHttpClientBuilder builder = new NettyAsyncHttpClientBuilder() + if (testMode == TestMode.RECORD) { + builder.wiretap(true) + + if (Boolean.parseBoolean(Configuration.getGlobalConfiguration().get("AZURE_TEST_DEBUGGING"))) { + builder.proxy(new ProxyOptions(ProxyOptions.Type.HTTP, new InetSocketAddress("localhost", 8888))) + } + + return builder.build() + } else { + return interceptorManager.getPlaybackClient() + } } def sleepIfLive(long milliseconds) { diff --git a/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueSASTests.groovy b/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueSASTests.groovy index eec2fffda451..52f660f32132 100644 --- a/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueSASTests.groovy +++ b/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueSASTests.groovy @@ -314,4 +314,41 @@ class QueueSASTests extends APISpec { notThrown(QueueStorageException) } + def "accountSAS network account sas token on endpoint"() { + setup: + def service = new AccountSasService() + .setQueueAccess(true) + def resourceType = new AccountSasResourceType() + .setContainer(true) + .setService(true) + .setObject(true) + def permissions = new AccountSasPermission() + .setReadPermission(true) + .setCreatePermission(true) + .setWritePermission(true) + .setListPermission(true) + .setDeletePermission(true) + def expiryTime = getUTCNow().plusDays(1) + + def sas = new AccountSasSignatureValues() + .setServices(service.toString()) + .setResourceTypes(resourceType.toString()) + .setPermissions(permissions) + .setExpiryTime(expiryTime) + .generateSasQueryParameters(primaryCredential) + .encode() + + def queueName = testResourceName.randomName(methodName, 60) + + when: + def sc = getServiceClientBuilder(null, primaryQueueServiceClient.getQueueServiceUrl() + "?" + sas, null).buildClient() + sc.createQueue(queueName) + + def qc = getQueueClientBuilder(primaryQueueServiceClient.getQueueServiceUrl() + "/" + queueName + "?" + sas).buildClient() + qc.delete() + + then: + notThrown(Exception) + } + } diff --git a/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueSasClientTests.groovy b/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueSasClientTests.groovy new file mode 100644 index 000000000000..a15a24a358d0 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueSasClientTests.groovy @@ -0,0 +1,201 @@ +package com.azure.storage.queue + +import com.azure.storage.common.sas.AccountSasPermission +import com.azure.storage.common.sas.AccountSasResourceType +import com.azure.storage.common.sas.AccountSasService +import com.azure.storage.common.sas.AccountSasSignatureValues +import com.azure.storage.common.sas.SasIpRange +import com.azure.storage.common.sas.SasProtocol +import com.azure.storage.queue.models.QueueAccessPolicy +import com.azure.storage.queue.models.QueueSignedIdentifier +import com.azure.storage.queue.models.QueueStorageException +import com.azure.storage.queue.models.SendMessageResult +import com.azure.storage.queue.sas.QueueSasPermission +import com.azure.storage.queue.sas.QueueServiceSasSignatureValues + +import java.time.Duration +import java.time.temporal.ChronoUnit + +class QueueSasClientTests extends APISpec { + + QueueClient sasClient + def resp + + def setup() { + primaryQueueServiceClient = queueServiceBuilderHelper(interceptorManager).buildClient() + sasClient = primaryQueueServiceClient.getQueueClient(testResourceName.randomName(methodName, 10)) + sasClient.create() + resp = sasClient.sendMessage("test") + } + + QueueServiceSasSignatureValues generateValues(QueueSasPermission permission) { + return new QueueServiceSasSignatureValues(getUTCNow().plusDays(1), permission) + .setStartTime(getUTCNow().minusDays(1)) + .setProtocol(SasProtocol.HTTPS_HTTP) + .setSasIpRange(new SasIpRange() + .setIpMin("0.0.0.0") + .setIpMax("255.255.255.255")) + } + + def "Test QueueSAS enqueue dequeue with permissions"() { + setup: + def permissions = new QueueSasPermission() + .setReadPermission(true) + .setAddPermission(true) + .setProcessPermission(true) + def sasValues = generateValues(permissions) + + when: + def sasPermissions = sasClient.generateSas(sasValues) + + def clientPermissions = queueBuilderHelper(interceptorManager) + .endpoint(sasClient.getQueueUrl()) + .queueName(sasClient.getQueueName()) + .sasToken(sasPermissions) + .buildClient() + clientPermissions.sendMessage("sastest") + def dequeueMsgIterPermissions = clientPermissions.receiveMessages(2).iterator() + + then: + notThrown(QueueStorageException) + "test" == dequeueMsgIterPermissions.next().getMessageText() + "sastest" == dequeueMsgIterPermissions.next().getMessageText() + + when: + clientPermissions.updateMessage(resp.getMessageId(), resp.getPopReceipt(), "testing", Duration.ofHours(1)) + + then: + thrown(QueueStorageException) + } + + def "Test QueueSAS update delete with permissions"() { + setup: + def permissions = new QueueSasPermission() + .setReadPermission(true) + .setAddPermission(true) + .setProcessPermission(true) + .setUpdatePermission(true) + def sasValues = generateValues(permissions) + + when: + def sasPermissions = sasClient.generateSas(sasValues) + + def clientPermissions = queueBuilderHelper(interceptorManager) + .endpoint(sasClient.getQueueUrl()) + .queueName(sasClient.getQueueName()) + .sasToken(sasPermissions) + .buildClient() + clientPermissions.updateMessage(resp.getMessageId(), resp.getPopReceipt(), "testing", Duration.ZERO) + def dequeueMsgIterPermissions = clientPermissions.receiveMessages(1).iterator() + + then: + notThrown(QueueStorageException) + "testing" == dequeueMsgIterPermissions.next().getMessageText() + + when: + clientPermissions.delete() + + then: + thrown(QueueStorageException) + } + + // NOTE: Serializer for set access policy keeps milliseconds + def "Test QueueSAS enqueue dequeue with identifier"() { + setup: + + def permissions = new QueueSasPermission() + .setReadPermission(true) + .setAddPermission(true) + .setUpdatePermission(true) + .setProcessPermission(true) + def expiryTime = getUTCNow().plusDays(1).truncatedTo(ChronoUnit.SECONDS) + def startTime = getUTCNow().minusDays(1).truncatedTo(ChronoUnit.SECONDS) + + QueueSignedIdentifier identifier = new QueueSignedIdentifier() + .setId(testResourceName.randomUuid()) + .setAccessPolicy(new QueueAccessPolicy().setPermissions(permissions.toString()) + .setExpiresOn(expiryTime).setStartsOn(startTime)) + sasClient.setAccessPolicy(Arrays.asList(identifier)) + + // Wait 30 seconds as it may take time for the access policy to take effect. + sleepIfLive(30000) + + when: + def sasValues = new QueueServiceSasSignatureValues(identifier.getId()) + + def sasIdentifier = sasClient.generateSas(sasValues) + + def clientBuilder = queueBuilderHelper(interceptorManager) + def clientIdentifier = clientBuilder + .endpoint(sasClient.getQueueUrl()) + .queueName(sasClient.getQueueName()) + .sasToken(sasIdentifier) + .buildClient() + clientIdentifier.sendMessage("sastest") + def dequeueMsgIterIdentifier = clientIdentifier.receiveMessages(2).iterator() + + then: + notThrown(QueueStorageException) + "test" == dequeueMsgIterIdentifier.next().getMessageText() + "sastest" == dequeueMsgIterIdentifier.next().getMessageText() + } + + def "Test Account QueueServiceSAS create queue delete queue"() { + def service = new AccountSasService() + .setQueueAccess(true) + def resourceType = new AccountSasResourceType() + .setContainer(true) + .setService(true) + .setObject(true) + def permissions = new AccountSasPermission() + .setReadPermission(true) + .setCreatePermission(true) + .setDeletePermission(true) + def expiryTime = getUTCNow().plusDays(1) + + when: + def sasValues = new AccountSasSignatureValues(expiryTime, permissions, service, resourceType) + def sas = primaryQueueServiceClient.generateAccountSas(sasValues) + + def scBuilder = queueServiceBuilderHelper(interceptorManager) + scBuilder.endpoint(primaryQueueServiceClient.getQueueServiceUrl()) + .sasToken(sas) + def sc = scBuilder.buildClient() + sc.createQueue("queue") + + then: + notThrown(QueueStorageException) + + when: + sc.deleteQueue("queue") + + then: + notThrown(QueueStorageException) + } + + def "Test Account QueueServiceSAS list queues"() { + def service = new AccountSasService() + .setQueueAccess(true) + def resourceType = new AccountSasResourceType() + .setContainer(true) + .setService(true) + .setObject(true) + def permissions = new AccountSasPermission() + .setListPermission(true) + def expiryTime = getUTCNow().plusDays(1) + + when: + def sasValues = new AccountSasSignatureValues(expiryTime, permissions, service, resourceType) + def sas = primaryQueueServiceClient.generateAccountSas(sasValues) + + def scBuilder = queueServiceBuilderHelper(interceptorManager) + scBuilder.endpoint(primaryQueueServiceClient.getQueueServiceUrl()) + .sasToken(sas) + def sc = scBuilder.buildClient() + + sc.listQueues() + + then: + notThrown(QueueStorageException) + } +} diff --git a/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueUserAgentPropertiesTest.groovy b/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueUserAgentPropertiesTest.groovy new file mode 100644 index 000000000000..7608a7c6e564 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueUserAgentPropertiesTest.groovy @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.storage.queue; + +import com.azure.core.util.CoreUtils +import com.azure.core.util.UserAgentProperties +import spock.lang.Specification + +class QueueUserAgentPropertiesTest extends Specification { + + def "User agent properties not null"() { + given: + Map properties = CoreUtils.getProperties("azure-storage-queue.properties") + expect: + properties.get("name") == "azure-storage-queue" + properties.getVersion().matches("(\\d)+.(\\d)+.(\\d)+([-a-zA-Z0-9.])*") + } +} diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSASTestsAccountSASNetworkAccountSasTokenOnEndpoint.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSASTestsAccountSASNetworkAccountSasTokenOnEndpoint.json new file mode 100644 index 000000000000..ec3738e3b17e --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSASTestsAccountSASNetworkAccountSasTokenOnEndpoint.json @@ -0,0 +1,42 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "http://gapradev.queue.core.windows.net/queuesastestsaccountsasnetworkaccountsastokenonendpoint74601?sv=2019-02-02&se=2019-12-03T20%3A08%3A28Z&sp=rwdlc&sig=REDACTED&ss=q&srt=sco", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-queue/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "4624bfdb-eb31-44c1-a748-de49fa7389b2" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "ad8e3c79-b003-003c-384c-a9bbfc000000", + "Date" : "Mon, 02 Dec 2019 20:08:28 GMT", + "x-ms-client-request-id" : "4624bfdb-eb31-44c1-a748-de49fa7389b2" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "http://gapradev.queue.core.windows.net/queuesastestsaccountsasnetworkaccountsastokenonendpoint74601?sv=2019-02-02&se=2019-12-03T20%3A08%3A28Z&sp=rwdlc&sig=REDACTED&ss=q&srt=sco", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-queue/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "e52a1043-42af-49de-bed6-720dc1640250" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "ad8e3c7c-b003-003c-394c-a9bbfc000000", + "Date" : "Mon, 02 Dec 2019 20:08:28 GMT", + "x-ms-client-request-id" : "e52a1043-42af-49de-bed6-720dc1640250" + }, + "Exception" : null + } ], + "variables" : [ "queuesastestsaccountsasnetworkaccountsastokenonendpoint08725", "2019-12-02T20:08:28.197219200Z", "queuesastestsaccountsasnetworkaccountsastokenonendpoint74601" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSasClientTestsTestAccountQueueServiceSASCreateQueueDeleteQueue.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSasClientTestsTestAccountQueueServiceSASCreateQueueDeleteQueue.json new file mode 100644 index 000000000000..6567b039b714 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSasClientTestsTestAccountQueueServiceSASCreateQueueDeleteQueue.json @@ -0,0 +1,83 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "http://gapradev.queue.core.windows.net/e7bc4b6553", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-queue/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "b3f598b1-7d17-430b-bfc7-ea5e60b47477" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "c338fd06-9003-002b-78f6-a912f7000000", + "Date" : "Tue, 03 Dec 2019 16:30:05 GMT", + "x-ms-client-request-id" : "b3f598b1-7d17-430b-bfc7-ea5e60b47477" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "http://gapradev.queue.core.windows.net/e7bc4b6553/messages", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-queue/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "e27354b9-9d39-41a7-adda-77773d7c9868", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "c338fd08-9003-002b-79f6-a912f7000000", + "Body" : "6cd99460-8e47-49df-9c88-6f3caab797efTue, 03 Dec 2019 16:30:06 GMTTue, 10 Dec 2019 16:30:06 GMTAgAAAAMAAAAAAAAAs8ju6/ap1QE=Tue, 03 Dec 2019 16:30:06 GMT", + "Date" : "Tue, 03 Dec 2019 16:30:05 GMT", + "x-ms-client-request-id" : "e27354b9-9d39-41a7-adda-77773d7c9868", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://gapradev.queue.core.windows.net/queue?sv=2019-02-02&ss=q&srt=sco&se=2019-12-04T16%3A30%3A06Z&sp=rdc&sig=REDACTED", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-queue/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "0999f23b-661c-4666-aeec-12b7e94cbab0" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "c338fd09-9003-002b-7af6-a912f7000000", + "Date" : "Tue, 03 Dec 2019 16:30:05 GMT", + "x-ms-client-request-id" : "0999f23b-661c-4666-aeec-12b7e94cbab0" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "http://gapradev.queue.core.windows.net/queue?sv=2019-02-02&ss=q&srt=sco&se=2019-12-04T16%3A30%3A06Z&sp=rdc&sig=REDACTED", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-queue/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "c38db82f-aaa5-4849-9adb-297041d2920c" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "c338fd0b-9003-002b-7bf6-a912f7000000", + "Date" : "Tue, 03 Dec 2019 16:30:05 GMT", + "x-ms-client-request-id" : "c38db82f-aaa5-4849-9adb-297041d2920c" + }, + "Exception" : null + } ], + "variables" : [ "e7bc4b6553", "2019-12-03T16:30:06.281838600Z" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSasClientTestsTestAccountQueueServiceSASListQueues.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSasClientTestsTestAccountQueueServiceSASListQueues.json new file mode 100644 index 000000000000..a269308007f8 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSasClientTestsTestAccountQueueServiceSASListQueues.json @@ -0,0 +1,45 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "http://gapradev.queue.core.windows.net/6ea898ac58", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-queue/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "d02bd6a6-5b04-4326-8c2e-7c639c44b38b" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "c338fd0d-9003-002b-7df6-a912f7000000", + "Date" : "Tue, 03 Dec 2019 16:30:05 GMT", + "x-ms-client-request-id" : "d02bd6a6-5b04-4326-8c2e-7c639c44b38b" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "http://gapradev.queue.core.windows.net/6ea898ac58/messages", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-queue/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "96a0ffdf-c03c-4fd9-83e5-1da26c54e727", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "c338fd10-9003-002b-7ef6-a912f7000000", + "Body" : "9aab594c-812b-44f0-bbd0-c9fa53e868a1Tue, 03 Dec 2019 16:30:06 GMTTue, 10 Dec 2019 16:30:06 GMTAgAAAAMAAAAAAAAAf7lA7Pap1QE=Tue, 03 Dec 2019 16:30:06 GMT", + "Date" : "Tue, 03 Dec 2019 16:30:06 GMT", + "x-ms-client-request-id" : "96a0ffdf-c03c-4fd9-83e5-1da26c54e727", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "6ea898ac58", "2019-12-03T16:30:06.808736100Z" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSasClientTestsTestQueueSASEnqueueDequeueWithIdentifier.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSasClientTestsTestQueueSASEnqueueDequeueWithIdentifier.json new file mode 100644 index 000000000000..5d22d019566e --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSasClientTestsTestQueueSASEnqueueDequeueWithIdentifier.json @@ -0,0 +1,109 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "http://gapradev.queue.core.windows.net/45c06bcf11", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-queue/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "b64b22d4-5bb1-46ee-8024-39ffa45a8915" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "c338fcd8-9003-002b-66f6-a912f7000000", + "Date" : "Tue, 03 Dec 2019 16:29:35 GMT", + "x-ms-client-request-id" : "b64b22d4-5bb1-46ee-8024-39ffa45a8915" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "http://gapradev.queue.core.windows.net/45c06bcf11/messages", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-queue/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "8bb0557e-4455-4626-b85d-90f257f11544", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "c338fcda-9003-002b-67f6-a912f7000000", + "Body" : "a3f07532-82ed-45b6-88c5-f8c57027468cTue, 03 Dec 2019 16:29:35 GMTTue, 10 Dec 2019 16:29:35 GMTAgAAAAMAAAAAAAAAQMSk2fap1QE=Tue, 03 Dec 2019 16:29:35 GMT", + "Date" : "Tue, 03 Dec 2019 16:29:35 GMT", + "x-ms-client-request-id" : "8bb0557e-4455-4626-b85d-90f257f11544", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://gapradev.queue.core.windows.net/45c06bcf11?comp=acl", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-queue/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "427f7fb9-bef0-4154-a2c9-059411d0a536", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "c338fcdb-9003-002b-68f6-a912f7000000", + "Date" : "Tue, 03 Dec 2019 16:29:35 GMT", + "x-ms-client-request-id" : "427f7fb9-bef0-4154-a2c9-059411d0a536" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "http://gapradev.queue.core.windows.net/45c06bcf11/messages?sv=2019-02-02&si=03ab0fb6-ccea-48fe-b657-c72befb6acdf&sig=REDACTED", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-queue/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "6b7c67fe-666e-4238-beef-aca394fe1277", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "c338fd01-9003-002b-75f6-a912f7000000", + "Body" : "45b5544b-0328-4c5d-8857-295f0f858e49Tue, 03 Dec 2019 16:30:05 GMTTue, 10 Dec 2019 16:30:05 GMTAgAAAAMAAAAAAAAANJC16/ap1QE=Tue, 03 Dec 2019 16:30:05 GMT", + "Date" : "Tue, 03 Dec 2019 16:30:05 GMT", + "x-ms-client-request-id" : "6b7c67fe-666e-4238-beef-aca394fe1277", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://gapradev.queue.core.windows.net/45c06bcf11/messages?numofmessages=2&visibilitytimeout=30&sv=2019-02-02&si=03ab0fb6-ccea-48fe-b657-c72befb6acdf&sig=REDACTED", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-queue/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "7d64ef3b-1a95-4f0b-b307-5f07994cc07a" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "Cache-Control" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "c338fd04-9003-002b-76f6-a912f7000000", + "Body" : "a3f07532-82ed-45b6-88c5-f8c57027468cTue, 03 Dec 2019 16:29:35 GMTTue, 10 Dec 2019 16:29:35 GMTAgAAAAMAAAAAAAAAmCuk/fap1QE=Tue, 03 Dec 2019 16:30:35 GMT1test45b5544b-0328-4c5d-8857-295f0f858e49Tue, 03 Dec 2019 16:30:05 GMTTue, 10 Dec 2019 16:30:05 GMTAgAAAAMAAAAAAAAAmCuk/fap1QE=Tue, 03 Dec 2019 16:30:35 GMT1sastest", + "Date" : "Tue, 03 Dec 2019 16:30:05 GMT", + "x-ms-client-request-id" : "7d64ef3b-1a95-4f0b-b307-5f07994cc07a", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "45c06bcf11", "2019-12-03T16:29:35.586848400Z", "2019-12-03T16:29:35.588847600Z", "03ab0fb6-ccea-48fe-b657-c72befb6acdf", "queue3729950c" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSasClientTestsTestQueueSASEnqueueDequeueWithPermissions.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSasClientTestsTestQueueSASEnqueueDequeueWithPermissions.json new file mode 100644 index 000000000000..6942b59738f1 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSasClientTestsTestQueueSASEnqueueDequeueWithPermissions.json @@ -0,0 +1,112 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "http://gapradev.queue.core.windows.net/e54115704f", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-queue/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "69ef3973-80c3-42db-9f3a-e1724074d6fe" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "c338fcc6-9003-002b-59f6-a912f7000000", + "Date" : "Tue, 03 Dec 2019 16:29:33 GMT", + "x-ms-client-request-id" : "69ef3973-80c3-42db-9f3a-e1724074d6fe" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "http://gapradev.queue.core.windows.net/e54115704f/messages", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-queue/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "b6d13a64-2007-4497-901e-16d9b2a382a6", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "c338fcc9-9003-002b-5af6-a912f7000000", + "Body" : "2ed9f73f-18dc-416b-a8db-f740f06b0669Tue, 03 Dec 2019 16:29:34 GMTTue, 10 Dec 2019 16:29:34 GMTAgAAAAMAAAAAAAAAcse52Pap1QE=Tue, 03 Dec 2019 16:29:34 GMT", + "Date" : "Tue, 03 Dec 2019 16:29:33 GMT", + "x-ms-client-request-id" : "b6d13a64-2007-4497-901e-16d9b2a382a6", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "http://gapradev.queue.core.windows.net/e54115704f/messages?sv=2019-02-02&spr=https%2Chttp&st=2019-12-02T16%3A29%3A34Z&se=2019-12-04T16%3A29%3A34Z&sip=0.0.0.0-255.255.255.255&sp=rap&sig=REDACTED", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-queue/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "7e70c212-ffe8-45f0-a8e5-b817630b53ff", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "c338fccb-9003-002b-5cf6-a912f7000000", + "Body" : "bea69690-fb87-4100-a12a-67804eeb66f6Tue, 03 Dec 2019 16:29:34 GMTTue, 10 Dec 2019 16:29:34 GMTAgAAAAMAAAAAAAAAwyDa2Pap1QE=Tue, 03 Dec 2019 16:29:34 GMT", + "Date" : "Tue, 03 Dec 2019 16:29:34 GMT", + "x-ms-client-request-id" : "7e70c212-ffe8-45f0-a8e5-b817630b53ff", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://gapradev.queue.core.windows.net/e54115704f/messages?numofmessages=2&visibilitytimeout=30&sv=2019-02-02&spr=https%2Chttp&st=2019-12-02T16%3A29%3A34Z&se=2019-12-04T16%3A29%3A34Z&sip=0.0.0.0-255.255.255.255&sp=rap&sig=REDACTED", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-queue/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "9a9e09a3-0320-4587-8c8a-93cb50eab972" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "Cache-Control" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "c338fccc-9003-002b-5df6-a912f7000000", + "Body" : "2ed9f73f-18dc-416b-a8db-f740f06b0669Tue, 03 Dec 2019 16:29:34 GMTTue, 10 Dec 2019 16:29:34 GMTAgAAAAMAAAAAAAAAlT7M6vap1QE=Tue, 03 Dec 2019 16:30:04 GMT1testbea69690-fb87-4100-a12a-67804eeb66f6Tue, 03 Dec 2019 16:29:34 GMTTue, 10 Dec 2019 16:29:34 GMTAgAAAAMAAAAAAAAAlT7M6vap1QE=Tue, 03 Dec 2019 16:30:04 GMT1sastest", + "Date" : "Tue, 03 Dec 2019 16:29:34 GMT", + "x-ms-client-request-id" : "9a9e09a3-0320-4587-8c8a-93cb50eab972", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://gapradev.queue.core.windows.net/e54115704f/messages/2ed9f73f-18dc-416b-a8db-f740f06b0669?popreceipt=AgAAAAMAAAAAAAAAcse52Pap1QE%3d&visibilitytimeout=3600&sv=2019-02-02&spr=https%2Chttp&st=2019-12-02T16%3A29%3A34Z&se=2019-12-04T16%3A29%3A34Z&sip=0.0.0.0-255.255.255.255&sp=rap&sig=REDACTED", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-queue/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "2828dd7c-d9f0-49b3-8e1b-4da303dbbb96", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "AuthorizationPermissionMismatch", + "retry-after" : "0", + "Content-Length" : "279", + "StatusCode" : "403", + "x-ms-request-id" : "c338fcce-9003-002b-5ef6-a912f7000000", + "Body" : "AuthorizationPermissionMismatchThis request is not authorized to perform this operation using this permission.\nRequestId:c338fcce-9003-002b-5ef6-a912f7000000\nTime:2019-12-03T16:29:34.5534502Z", + "Date" : "Tue, 03 Dec 2019 16:29:34 GMT", + "x-ms-client-request-id" : "2828dd7c-d9f0-49b3-8e1b-4da303dbbb96", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "e54115704f", "2019-12-03T16:29:34.110942600Z", "2019-12-03T16:29:34.115970800Z", "queue41903203" ] +} \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSasClientTestsTestQueueSASUpdateDeleteWithPermissions.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSasClientTestsTestQueueSASUpdateDeleteWithPermissions.json new file mode 100644 index 000000000000..93370735cfed --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSasClientTestsTestQueueSASUpdateDeleteWithPermissions.json @@ -0,0 +1,111 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "http://gapradev.queue.core.windows.net/e3fd469c94", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-queue/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "6d5ba806-0aed-4952-a351-b18a0270f433" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "c338fcd0-9003-002b-60f6-a912f7000000", + "Date" : "Tue, 03 Dec 2019 16:29:34 GMT", + "x-ms-client-request-id" : "6d5ba806-0aed-4952-a351-b18a0270f433" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "http://gapradev.queue.core.windows.net/e3fd469c94/messages", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-queue/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "a5daf148-d0d1-4df4-b0d1-8d2a043548de", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "201", + "x-ms-request-id" : "c338fcd2-9003-002b-61f6-a912f7000000", + "Body" : "f71c058d-f67f-4b3b-8b97-51a38c0c2216Tue, 03 Dec 2019 16:29:34 GMTTue, 10 Dec 2019 16:29:34 GMTAgAAAAMAAAAAAAAAZwJG2fap1QE=Tue, 03 Dec 2019 16:29:34 GMT", + "Date" : "Tue, 03 Dec 2019 16:29:34 GMT", + "x-ms-client-request-id" : "a5daf148-d0d1-4df4-b0d1-8d2a043548de", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "http://gapradev.queue.core.windows.net/e3fd469c94/messages/f71c058d-f67f-4b3b-8b97-51a38c0c2216?popreceipt=AgAAAAMAAAAAAAAAZwJG2fap1QE%3d&visibilitytimeout=0&sv=2019-02-02&spr=https%2Chttp&st=2019-12-02T16%3A29%3A34Z&se=2019-12-04T16%3A29%3A34Z&sip=0.0.0.0-255.255.255.255&sp=raup&sig=REDACTED", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-queue/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "5e7a1ce6-46ab-44dc-b12d-240184df417c", + "Content-Type" : "application/xml; charset=utf-8" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-time-next-visible" : "Tue, 03 Dec 2019 16:29:35 GMT", + "retry-after" : "0", + "Content-Length" : "0", + "StatusCode" : "204", + "x-ms-request-id" : "c338fcd3-9003-002b-62f6-a912f7000000", + "x-ms-popreceipt" : "AwAAAAMAAAAAAAAAwy5W2fap1QEAAAAA", + "Date" : "Tue, 03 Dec 2019 16:29:34 GMT", + "x-ms-client-request-id" : "5e7a1ce6-46ab-44dc-b12d-240184df417c" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "http://gapradev.queue.core.windows.net/e3fd469c94/messages?numofmessages=1&visibilitytimeout=30&sv=2019-02-02&spr=https%2Chttp&st=2019-12-02T16%3A29%3A34Z&se=2019-12-04T16%3A29%3A34Z&sip=0.0.0.0-255.255.255.255&sp=raup&sig=REDACTED", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-queue/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "e09729d9-2816-47f1-91d4-a22b08361844" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "Cache-Control" : "no-cache", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "c338fcd5-9003-002b-63f6-a912f7000000", + "Body" : "f71c058d-f67f-4b3b-8b97-51a38c0c2216Tue, 03 Dec 2019 16:29:34 GMTTue, 10 Dec 2019 16:29:34 GMTAgAAAAMAAAAAAAAAOdNJ6/ap1QE=Tue, 03 Dec 2019 16:30:05 GMT1testing", + "Date" : "Tue, 03 Dec 2019 16:29:34 GMT", + "x-ms-client-request-id" : "e09729d9-2816-47f1-91d4-a22b08361844", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "http://gapradev.queue.core.windows.net/e3fd469c94?sv=2019-02-02&spr=https%2Chttp&st=2019-12-02T16%3A29%3A34Z&se=2019-12-04T16%3A29%3A34Z&sip=0.0.0.0-255.255.255.255&sp=raup&sig=REDACTED", + "Headers" : { + "x-ms-version" : "2019-02-02", + "User-Agent" : "azsdk-java-azure-storage-queue/12.1.0-beta.1 (11.0.4; Windows 10 10.0)", + "x-ms-client-request-id" : "7da0a6f6-bc2f-40b2-aa1f-b02c6c4a1f86" + }, + "Response" : { + "x-ms-version" : "2019-02-02", + "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-error-code" : "AuthorizationFailure", + "retry-after" : "0", + "Content-Length" : "246", + "StatusCode" : "403", + "x-ms-request-id" : "c338fcd6-9003-002b-64f6-a912f7000000", + "Body" : "AuthorizationFailureThis request is not authorized to perform this operation.\nRequestId:c338fcd6-9003-002b-64f6-a912f7000000\nTime:2019-12-03T16:29:35.3201722Z", + "Date" : "Tue, 03 Dec 2019 16:29:35 GMT", + "x-ms-client-request-id" : "7da0a6f6-bc2f-40b2-aa1f-b02c6c4a1f86", + "Content-Type" : "application/xml" + }, + "Exception" : null + } ], + "variables" : [ "e3fd469c94", "2019-12-03T16:29:34.971090100Z", "2019-12-03T16:29:34.971090100Z", "queue320848ee" ] +} \ No newline at end of file diff --git a/sdk/storage/ci.yml b/sdk/storage/ci.yml index 4f6746b870ee..bbaacdd55152 100644 --- a/sdk/storage/ci.yml +++ b/sdk/storage/ci.yml @@ -63,6 +63,3 @@ stages: - name: azure-storage-queue safeName: azurestoragequeue stagingProfileId: 88192f04117501 - # - name: azure-storage-queue-cryptography - # safeName: azurestoragequeuecryptography - # stagingProfileId: 88192f04117501 diff --git a/sdk/storage/mgmt-v2019_06_01/pom.xml b/sdk/storage/mgmt-v2019_06_01/pom.xml index bd48345d1206..2d88e668c503 100644 --- a/sdk/storage/mgmt-v2019_06_01/pom.xml +++ b/sdk/storage/mgmt-v2019_06_01/pom.xml @@ -15,7 +15,7 @@ ../../../pom.management.xml azure-mgmt-storage - 1.0.0-beta + 1.0.0-beta-1 jar Microsoft Azure SDK for Storage Management This package contains Microsoft Storage Management SDK. diff --git a/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/BlobServiceProperties.java b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/BlobServiceProperties.java index c202f7f71c7a..a17747a01972 100644 --- a/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/BlobServiceProperties.java +++ b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/BlobServiceProperties.java @@ -17,6 +17,7 @@ import com.microsoft.azure.arm.model.Creatable; import com.microsoft.azure.arm.resources.models.HasManager; import com.microsoft.azure.management.storage.v2019_06_01.implementation.StorageManager; +import com.microsoft.azure.management.storage.v2019_06_01.implementation.SkuInner; /** * Type representing BlobServiceProperties. @@ -57,6 +58,11 @@ public interface BlobServiceProperties extends HasInner { /** * The template for a FileServiceProperties update operation, containing all the settings that can be modified. */ - interface Update extends Appliable, UpdateStages.WithCors { + interface Update extends Appliable, UpdateStages.WithCors, UpdateStages.WithShareDeleteRetentionPolicy { } /** @@ -114,5 +137,17 @@ interface WithCors { Update withCors(CorsRules cors); } + /** + * The stage of the fileserviceproperties update allowing to specify ShareDeleteRetentionPolicy. + */ + interface WithShareDeleteRetentionPolicy { + /** + * Specifies shareDeleteRetentionPolicy. + * @param shareDeleteRetentionPolicy The file service properties for share soft delete + * @return the next update stage + */ + Update withShareDeleteRetentionPolicy(DeleteRetentionPolicy shareDeleteRetentionPolicy); + } + } } diff --git a/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/FileShare.java b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/FileShare.java index be94cfa0562a..2a8e133a9006 100644 --- a/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/FileShare.java +++ b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/FileShare.java @@ -105,7 +105,7 @@ interface WithMetadata { interface WithShareQuota { /** * Specifies shareQuota. - * @param shareQuota The maximum size of the share, in gigabytes. Must be greater than 0, and less than or equal to 5TB (5120) + * @param shareQuota The maximum size of the share, in gigabytes. Must be greater than 0, and less than or equal to 5TB (5120). For Large File Shares, the maximum size is 100000 * @return the next definition stage */ WithCreate withShareQuota(Integer shareQuota); @@ -147,7 +147,7 @@ interface WithMetadata { interface WithShareQuota { /** * Specifies shareQuota. - * @param shareQuota The maximum size of the share, in gigabytes. Must be greater than 0, and less than or equal to 5TB (5120) + * @param shareQuota The maximum size of the share, in gigabytes. Must be greater than 0, and less than or equal to 5TB (5120). For Large File Shares, the maximum size is 100000 * @return the next update stage */ Update withShareQuota(Integer shareQuota); diff --git a/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/RoutingChoice.java b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/RoutingChoice.java new file mode 100644 index 000000000000..4ed73ed0236d --- /dev/null +++ b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/RoutingChoice.java @@ -0,0 +1,41 @@ +/** + * 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_06_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for RoutingChoice. + */ +public final class RoutingChoice extends ExpandableStringEnum { + /** Static value MicrosoftRouting for RoutingChoice. */ + public static final RoutingChoice MICROSOFT_ROUTING = fromString("MicrosoftRouting"); + + /** Static value InternetRouting for RoutingChoice. */ + public static final RoutingChoice INTERNET_ROUTING = fromString("InternetRouting"); + + /** + * Creates or finds a RoutingChoice from its string representation. + * @param name a name to look for + * @return the corresponding RoutingChoice + */ + @JsonCreator + public static RoutingChoice fromString(String name) { + return fromString(name, RoutingChoice.class); + } + + /** + * @return known RoutingChoice values + */ + public static Collection values() { + return values(RoutingChoice.class); + } +} diff --git a/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/RoutingPreference.java b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/RoutingPreference.java new file mode 100644 index 000000000000..10be2d34b505 --- /dev/null +++ b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/RoutingPreference.java @@ -0,0 +1,100 @@ +/** + * 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_06_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Routing preference defines the type of network, either microsoft or internet + * routing to be used to deliver the user data, the default option is microsoft + * routing. + */ +public class RoutingPreference { + /** + * Routing Choice defines the kind of network routing opted by the user. + * Possible values include: 'MicrosoftRouting', 'InternetRouting'. + */ + @JsonProperty(value = "routingChoice") + private RoutingChoice routingChoice; + + /** + * A boolean flag which indicates whether microsoft routing storage + * endpoints are to be published. + */ + @JsonProperty(value = "publishMicrosoftEndpoints") + private Boolean publishMicrosoftEndpoints; + + /** + * A boolean flag which indicates whether internet routing storage + * endpoints are to be published. + */ + @JsonProperty(value = "publishInternetEndpoints") + private Boolean publishInternetEndpoints; + + /** + * Get routing Choice defines the kind of network routing opted by the user. Possible values include: 'MicrosoftRouting', 'InternetRouting'. + * + * @return the routingChoice value + */ + public RoutingChoice routingChoice() { + return this.routingChoice; + } + + /** + * Set routing Choice defines the kind of network routing opted by the user. Possible values include: 'MicrosoftRouting', 'InternetRouting'. + * + * @param routingChoice the routingChoice value to set + * @return the RoutingPreference object itself. + */ + public RoutingPreference withRoutingChoice(RoutingChoice routingChoice) { + this.routingChoice = routingChoice; + return this; + } + + /** + * Get a boolean flag which indicates whether microsoft routing storage endpoints are to be published. + * + * @return the publishMicrosoftEndpoints value + */ + public Boolean publishMicrosoftEndpoints() { + return this.publishMicrosoftEndpoints; + } + + /** + * Set a boolean flag which indicates whether microsoft routing storage endpoints are to be published. + * + * @param publishMicrosoftEndpoints the publishMicrosoftEndpoints value to set + * @return the RoutingPreference object itself. + */ + public RoutingPreference withPublishMicrosoftEndpoints(Boolean publishMicrosoftEndpoints) { + this.publishMicrosoftEndpoints = publishMicrosoftEndpoints; + return this; + } + + /** + * Get a boolean flag which indicates whether internet routing storage endpoints are to be published. + * + * @return the publishInternetEndpoints value + */ + public Boolean publishInternetEndpoints() { + return this.publishInternetEndpoints; + } + + /** + * Set a boolean flag which indicates whether internet routing storage endpoints are to be published. + * + * @param publishInternetEndpoints the publishInternetEndpoints value to set + * @return the RoutingPreference object itself. + */ + public RoutingPreference withPublishInternetEndpoints(Boolean publishInternetEndpoints) { + this.publishInternetEndpoints = publishInternetEndpoints; + return this; + } + +} diff --git a/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/Sku.java b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/SkuInformation.java similarity index 87% rename from sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/Sku.java rename to sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/SkuInformation.java index 51107bce4c90..38f3118d6cb3 100644 --- a/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/Sku.java +++ b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/SkuInformation.java @@ -9,15 +9,15 @@ package com.microsoft.azure.management.storage.v2019_06_01; import com.microsoft.azure.arm.model.HasInner; -import com.microsoft.azure.management.storage.v2019_06_01.implementation.SkuInner; +import com.microsoft.azure.management.storage.v2019_06_01.implementation.SkuInformationInner; import com.microsoft.azure.arm.resources.models.HasManager; import com.microsoft.azure.management.storage.v2019_06_01.implementation.StorageManager; import java.util.List; /** - * Type representing Sku. + * Type representing SkuInformation. */ -public interface Sku extends HasInner, HasManager { +public interface SkuInformation extends HasInner, HasManager { /** * @return the capabilities value. */ diff --git a/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/Skus.java b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/Skus.java index 87b163436bc5..743f792ce88d 100644 --- a/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/Skus.java +++ b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/Skus.java @@ -15,5 +15,5 @@ /** * Type representing Skus. */ -public interface Skus extends SupportsListing, HasInner { +public interface Skus extends SupportsListing, HasInner { } diff --git a/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/StorageAccount.java b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/StorageAccount.java index 2777882766f8..f267ead85fef 100644 --- a/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/StorageAccount.java +++ b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/StorageAccount.java @@ -117,6 +117,11 @@ public interface StorageAccount extends HasInner, Resource, */ ProvisioningState provisioningState(); + /** + * @return the routingPreference value. + */ + RoutingPreference routingPreference(); + /** * @return the secondaryEndpoints value. */ @@ -130,7 +135,7 @@ public interface StorageAccount extends HasInner, Resource, /** * @return the sku value. */ - Sku sku(); + SkuInner sku(); /** * @return the statusOfPrimary value. @@ -296,18 +301,30 @@ interface WithNetworkRuleSet { WithCreate withNetworkRuleSet(NetworkRuleSet networkRuleSet); } + /** + * The stage of the storageaccount definition allowing to specify RoutingPreference. + */ + interface WithRoutingPreference { + /** + * Specifies routingPreference. + * @param routingPreference Maintains information about the network routing choice opted by the user for data transfer + * @return the next definition stage + */ + WithCreate withRoutingPreference(RoutingPreference routingPreference); + } + /** * The stage of the definition which contains all the minimum required inputs for * 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.WithAzureFilesIdentityBasedAuthentication, DefinitionStages.WithCustomDomain, DefinitionStages.WithEnableHttpsTrafficOnly, DefinitionStages.WithEncryption, DefinitionStages.WithIdentity, DefinitionStages.WithIsHnsEnabled, DefinitionStages.WithLargeFileSharesState, DefinitionStages.WithNetworkRuleSet, DefinitionStages.WithRoutingPreference { } } /** * 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.WithAzureFilesIdentityBasedAuthentication, UpdateStages.WithCustomDomain, UpdateStages.WithEnableHttpsTrafficOnly, UpdateStages.WithEncryption, UpdateStages.WithIdentity, UpdateStages.WithKind, UpdateStages.WithLargeFileSharesState, UpdateStages.WithNetworkRuleSet, UpdateStages.WithRoutingPreference, UpdateStages.WithSku { } /** @@ -422,6 +439,18 @@ interface WithNetworkRuleSet { Update withNetworkRuleSet(NetworkRuleSet networkRuleSet); } + /** + * The stage of the storageaccount update allowing to specify RoutingPreference. + */ + interface WithRoutingPreference { + /** + * Specifies routingPreference. + * @param routingPreference Maintains information about the network routing choice opted by the user for data transfer + * @return the next update stage + */ + Update withRoutingPreference(RoutingPreference routingPreference); + } + /** * The stage of the storageaccount update allowing to specify Sku. */ diff --git a/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/StorageAccountCreateParameters.java b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/StorageAccountCreateParameters.java index 188f9f264127..18eca991e871 100644 --- a/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/StorageAccountCreateParameters.java +++ b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/StorageAccountCreateParameters.java @@ -113,6 +113,13 @@ public class StorageAccountCreateParameters { @JsonProperty(value = "properties.largeFileSharesState") private LargeFileSharesState largeFileSharesState; + /** + * Maintains information about the network routing choice opted by the user + * for data transfer. + */ + @JsonProperty(value = "properties.routingPreference") + private RoutingPreference routingPreference; + /** * Get required. Gets or sets the SKU name. * @@ -373,4 +380,24 @@ public StorageAccountCreateParameters withLargeFileSharesState(LargeFileSharesSt return this; } + /** + * Get maintains information about the network routing choice opted by the user for data transfer. + * + * @return the routingPreference value + */ + public RoutingPreference routingPreference() { + return this.routingPreference; + } + + /** + * Set maintains information about the network routing choice opted by the user for data transfer. + * + * @param routingPreference the routingPreference value to set + * @return the StorageAccountCreateParameters object itself. + */ + public StorageAccountCreateParameters withRoutingPreference(RoutingPreference routingPreference) { + this.routingPreference = routingPreference; + return this; + } + } diff --git a/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/StorageAccountInternetEndpoints.java b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/StorageAccountInternetEndpoints.java new file mode 100644 index 000000000000..a615a54f631f --- /dev/null +++ b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/StorageAccountInternetEndpoints.java @@ -0,0 +1,78 @@ +/** + * 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_06_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The URIs that are used to perform a retrieval of a public blob, file, web or + * dfs object via a internet routing endpoint. + */ +public class StorageAccountInternetEndpoints { + /** + * Gets the blob endpoint. + */ + @JsonProperty(value = "blob", access = JsonProperty.Access.WRITE_ONLY) + private String blob; + + /** + * Gets the file endpoint. + */ + @JsonProperty(value = "file", access = JsonProperty.Access.WRITE_ONLY) + private String file; + + /** + * Gets the web endpoint. + */ + @JsonProperty(value = "web", access = JsonProperty.Access.WRITE_ONLY) + private String web; + + /** + * Gets the dfs endpoint. + */ + @JsonProperty(value = "dfs", access = JsonProperty.Access.WRITE_ONLY) + private String dfs; + + /** + * Get gets the blob endpoint. + * + * @return the blob value + */ + public String blob() { + return this.blob; + } + + /** + * Get gets the file endpoint. + * + * @return the file value + */ + public String file() { + return this.file; + } + + /** + * Get gets the web endpoint. + * + * @return the web value + */ + public String web() { + return this.web; + } + + /** + * Get gets the dfs endpoint. + * + * @return the dfs value + */ + public String dfs() { + return this.dfs; + } + +} diff --git a/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/StorageAccountMicrosoftEndpoints.java b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/StorageAccountMicrosoftEndpoints.java new file mode 100644 index 000000000000..7037fab43fa1 --- /dev/null +++ b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/StorageAccountMicrosoftEndpoints.java @@ -0,0 +1,108 @@ +/** + * 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_06_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The URIs that are used to perform a retrieval of a public blob, queue, + * table, web or dfs object via a microsoft routing endpoint. + */ +public class StorageAccountMicrosoftEndpoints { + /** + * Gets the blob endpoint. + */ + @JsonProperty(value = "blob", access = JsonProperty.Access.WRITE_ONLY) + private String blob; + + /** + * Gets the queue endpoint. + */ + @JsonProperty(value = "queue", access = JsonProperty.Access.WRITE_ONLY) + private String queue; + + /** + * Gets the table endpoint. + */ + @JsonProperty(value = "table", access = JsonProperty.Access.WRITE_ONLY) + private String table; + + /** + * Gets the file endpoint. + */ + @JsonProperty(value = "file", access = JsonProperty.Access.WRITE_ONLY) + private String file; + + /** + * Gets the web endpoint. + */ + @JsonProperty(value = "web", access = JsonProperty.Access.WRITE_ONLY) + private String web; + + /** + * Gets the dfs endpoint. + */ + @JsonProperty(value = "dfs", access = JsonProperty.Access.WRITE_ONLY) + private String dfs; + + /** + * Get gets the blob endpoint. + * + * @return the blob value + */ + public String blob() { + return this.blob; + } + + /** + * Get gets the queue endpoint. + * + * @return the queue value + */ + public String queue() { + return this.queue; + } + + /** + * Get gets the table endpoint. + * + * @return the table value + */ + public String table() { + return this.table; + } + + /** + * Get gets the file endpoint. + * + * @return the file value + */ + public String file() { + return this.file; + } + + /** + * Get gets the web endpoint. + * + * @return the web value + */ + public String web() { + return this.web; + } + + /** + * Get gets the dfs endpoint. + * + * @return the dfs value + */ + public String dfs() { + return this.dfs; + } + +} diff --git a/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/StorageAccountUpdateParameters.java b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/StorageAccountUpdateParameters.java index b07420060af8..bd416a923f65 100644 --- a/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/StorageAccountUpdateParameters.java +++ b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/StorageAccountUpdateParameters.java @@ -91,6 +91,13 @@ public class StorageAccountUpdateParameters { @JsonProperty(value = "properties.largeFileSharesState") private LargeFileSharesState largeFileSharesState; + /** + * Maintains information about the network routing choice opted by the user + * for data transfer. + */ + @JsonProperty(value = "properties.routingPreference") + private RoutingPreference routingPreference; + /** * Optional. Indicates the type of storage account. Currently only * StorageV2 value supported by server. Possible values include: 'Storage', @@ -299,6 +306,26 @@ public StorageAccountUpdateParameters withLargeFileSharesState(LargeFileSharesSt return this; } + /** + * Get maintains information about the network routing choice opted by the user for data transfer. + * + * @return the routingPreference value + */ + public RoutingPreference routingPreference() { + return this.routingPreference; + } + + /** + * Set maintains information about the network routing choice opted by the user for data transfer. + * + * @param routingPreference the routingPreference value to set + * @return the StorageAccountUpdateParameters object itself. + */ + public StorageAccountUpdateParameters withRoutingPreference(RoutingPreference routingPreference) { + this.routingPreference = routingPreference; + 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_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/BlobServicePropertiesImpl.java b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/BlobServicePropertiesImpl.java index 39345d01013a..0526306ae443 100644 --- a/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/BlobServicePropertiesImpl.java +++ b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/BlobServicePropertiesImpl.java @@ -105,6 +105,11 @@ public String name() { return this.inner().name(); } + @Override + public SkuInner sku() { + return this.inner().sku(); + } + @Override public String type() { return this.inner().type(); diff --git a/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/BlobServicePropertiesInner.java b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/BlobServicePropertiesInner.java index b34a35e06266..44d7a9080569 100644 --- a/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/BlobServicePropertiesInner.java +++ b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/BlobServicePropertiesInner.java @@ -38,7 +38,7 @@ public class BlobServicePropertiesInner extends ProxyResource { private String defaultServiceVersion; /** - * The blob service properties for soft delete. + * The blob service properties for blob soft delete. */ @JsonProperty(value = "properties.deleteRetentionPolicy") private DeleteRetentionPolicy deleteRetentionPolicy; @@ -55,6 +55,12 @@ public class BlobServicePropertiesInner extends ProxyResource { @JsonProperty(value = "properties.changeFeed") private ChangeFeed changeFeed; + /** + * Sku name and tier. + */ + @JsonProperty(value = "sku", access = JsonProperty.Access.WRITE_ONLY) + private SkuInner sku; + /** * Get specifies CORS rules for the Blob service. You can include up to five CorsRule elements in the request. If no CorsRule elements are included in the request body, all CORS rules will be deleted, and CORS will be disabled for the Blob service. * @@ -96,7 +102,7 @@ public BlobServicePropertiesInner withDefaultServiceVersion(String defaultServic } /** - * Get the blob service properties for soft delete. + * Get the blob service properties for blob soft delete. * * @return the deleteRetentionPolicy value */ @@ -105,7 +111,7 @@ public DeleteRetentionPolicy deleteRetentionPolicy() { } /** - * Set the blob service properties for soft delete. + * Set the blob service properties for blob soft delete. * * @param deleteRetentionPolicy the deleteRetentionPolicy value to set * @return the BlobServicePropertiesInner object itself. @@ -155,4 +161,13 @@ public BlobServicePropertiesInner withChangeFeed(ChangeFeed changeFeed) { return this; } + /** + * Get sku name and tier. + * + * @return the sku value + */ + public SkuInner sku() { + return this.sku; + } + } diff --git a/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/FileServicePropertiesImpl.java b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/FileServicePropertiesImpl.java index 8ccf1f0b8ae3..c5d95c29ac64 100644 --- a/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/FileServicePropertiesImpl.java +++ b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/FileServicePropertiesImpl.java @@ -13,6 +13,7 @@ import rx.Observable; import com.microsoft.azure.management.storage.v2019_06_01.CorsRules; import java.util.List; +import com.microsoft.azure.management.storage.v2019_06_01.DeleteRetentionPolicy; import rx.functions.Func1; class FileServicePropertiesImpl extends CreatableUpdatableImpl implements FileServiceProperties, FileServiceProperties.Definition, FileServiceProperties.Update { @@ -20,7 +21,9 @@ class FileServicePropertiesImpl extends CreatableUpdatableImpl createResourceAsync() { FileServicesInner client = this.manager().inner().fileServices(); - return client.setServicePropertiesAsync(this.resourceGroupName, this.accountName, this.ccors) + return client.setServicePropertiesAsync(this.resourceGroupName, this.accountName, this.ccors, this.cshareDeleteRetentionPolicy) .map(new Func1() { @Override public FileServicePropertiesInner call(FileServicePropertiesInner resource) { @@ -67,7 +74,7 @@ public FileServicePropertiesInner call(FileServicePropertiesInner resource) { @Override public Observable updateResourceAsync() { FileServicesInner client = this.manager().inner().fileServices(); - return client.setServicePropertiesAsync(this.resourceGroupName, this.accountName, this.ucors) + return client.setServicePropertiesAsync(this.resourceGroupName, this.accountName, this.ucors, this.ushareDeleteRetentionPolicy) .map(new Func1() { @Override public FileServicePropertiesInner call(FileServicePropertiesInner resource) { @@ -91,7 +98,9 @@ public boolean isInCreateMode() { private void resetCreateUpdateParameters() { this.ccors = new CorsRules(); + this.cshareDeleteRetentionPolicy = new DeleteRetentionPolicy(); this.ucors = new CorsRules(); + this.ushareDeleteRetentionPolicy = new DeleteRetentionPolicy(); } @Override @@ -109,6 +118,16 @@ public String name() { return this.inner().name(); } + @Override + public DeleteRetentionPolicy shareDeleteRetentionPolicy() { + return this.inner().shareDeleteRetentionPolicy(); + } + + @Override + public SkuInner sku() { + return this.inner().sku(); + } + @Override public String type() { return this.inner().type(); @@ -131,4 +150,14 @@ public FileServicePropertiesImpl withCors(CorsRules cors) { return this; } + @Override + public FileServicePropertiesImpl withShareDeleteRetentionPolicy(DeleteRetentionPolicy shareDeleteRetentionPolicy) { + if (isInCreateMode()) { + this.cshareDeleteRetentionPolicy = shareDeleteRetentionPolicy; + } else { + this.ushareDeleteRetentionPolicy = shareDeleteRetentionPolicy; + } + return this; + } + } diff --git a/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/FileServicePropertiesInner.java b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/FileServicePropertiesInner.java index efeae6a6fc3c..4e00adae5061 100644 --- a/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/FileServicePropertiesInner.java +++ b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/FileServicePropertiesInner.java @@ -9,6 +9,7 @@ package com.microsoft.azure.management.storage.v2019_06_01.implementation; import com.microsoft.azure.management.storage.v2019_06_01.CorsRules; +import com.microsoft.azure.management.storage.v2019_06_01.DeleteRetentionPolicy; import com.fasterxml.jackson.annotation.JsonProperty; import com.microsoft.rest.serializer.JsonFlatten; import com.microsoft.azure.ProxyResource; @@ -27,6 +28,18 @@ public class FileServicePropertiesInner extends ProxyResource { @JsonProperty(value = "properties.cors") private CorsRules cors; + /** + * The file service properties for share soft delete. + */ + @JsonProperty(value = "properties.shareDeleteRetentionPolicy") + private DeleteRetentionPolicy shareDeleteRetentionPolicy; + + /** + * Sku name and tier. + */ + @JsonProperty(value = "sku", access = JsonProperty.Access.WRITE_ONLY) + private SkuInner sku; + /** * Get specifies CORS rules for the File service. You can include up to five CorsRule elements in the request. If no CorsRule elements are included in the request body, all CORS rules will be deleted, and CORS will be disabled for the File service. * @@ -47,4 +60,33 @@ public FileServicePropertiesInner withCors(CorsRules cors) { return this; } + /** + * Get the file service properties for share soft delete. + * + * @return the shareDeleteRetentionPolicy value + */ + public DeleteRetentionPolicy shareDeleteRetentionPolicy() { + return this.shareDeleteRetentionPolicy; + } + + /** + * Set the file service properties for share soft delete. + * + * @param shareDeleteRetentionPolicy the shareDeleteRetentionPolicy value to set + * @return the FileServicePropertiesInner object itself. + */ + public FileServicePropertiesInner withShareDeleteRetentionPolicy(DeleteRetentionPolicy shareDeleteRetentionPolicy) { + this.shareDeleteRetentionPolicy = shareDeleteRetentionPolicy; + return this; + } + + /** + * Get sku name and tier. + * + * @return the sku value + */ + public SkuInner sku() { + return this.sku; + } + } diff --git a/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/FileServicesInner.java b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/FileServicesInner.java index d498d05dfd43..0060a3540cdf 100644 --- a/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/FileServicesInner.java +++ b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/FileServicesInner.java @@ -12,6 +12,7 @@ import com.google.common.reflect.TypeToken; import com.microsoft.azure.CloudException; import com.microsoft.azure.management.storage.v2019_06_01.CorsRules; +import com.microsoft.azure.management.storage.v2019_06_01.DeleteRetentionPolicy; import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture; import com.microsoft.rest.ServiceResponse; @@ -222,8 +223,10 @@ public Observable> setServicePropert } final String fileServicesName = "default"; final CorsRules cors = null; + final DeleteRetentionPolicy shareDeleteRetentionPolicy = null; FileServicePropertiesInner parameters = new FileServicePropertiesInner(); parameters.withCors(null); + parameters.withShareDeleteRetentionPolicy(null); return service.setServiceProperties(resourceGroupName, accountName, this.client.subscriptionId(), fileServicesName, this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -244,13 +247,14 @@ public Observable> call(Response setServicePropertiesAsync(String resourceGroupName, String accountName, CorsRules cors, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(setServicePropertiesWithServiceResponseAsync(resourceGroupName, accountName, cors), serviceCallback); + public ServiceFuture setServicePropertiesAsync(String resourceGroupName, String accountName, CorsRules cors, DeleteRetentionPolicy shareDeleteRetentionPolicy, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(setServicePropertiesWithServiceResponseAsync(resourceGroupName, accountName, cors, shareDeleteRetentionPolicy), serviceCallback); } /** @@ -273,11 +278,12 @@ public ServiceFuture setServicePropertiesAsync(Strin * @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 cors Specifies CORS rules for the File service. You can include up to five CorsRule elements in the request. If no CorsRule elements are included in the request body, all CORS rules will be deleted, and CORS will be disabled for the File service. + * @param shareDeleteRetentionPolicy The file service properties for share soft delete. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the FileServicePropertiesInner object */ - public Observable setServicePropertiesAsync(String resourceGroupName, String accountName, CorsRules cors) { - return setServicePropertiesWithServiceResponseAsync(resourceGroupName, accountName, cors).map(new Func1, FileServicePropertiesInner>() { + public Observable setServicePropertiesAsync(String resourceGroupName, String accountName, CorsRules cors, DeleteRetentionPolicy shareDeleteRetentionPolicy) { + return setServicePropertiesWithServiceResponseAsync(resourceGroupName, accountName, cors, shareDeleteRetentionPolicy).map(new Func1, FileServicePropertiesInner>() { @Override public FileServicePropertiesInner call(ServiceResponse response) { return response.body(); @@ -291,10 +297,11 @@ public FileServicePropertiesInner call(ServiceResponse> setServicePropertiesWithServiceResponseAsync(String resourceGroupName, String accountName, CorsRules cors) { + public Observable> setServicePropertiesWithServiceResponseAsync(String resourceGroupName, String accountName, CorsRules cors, DeleteRetentionPolicy shareDeleteRetentionPolicy) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -308,9 +315,11 @@ public Observable> setServicePropert throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); } Validator.validate(cors); + Validator.validate(shareDeleteRetentionPolicy); final String fileServicesName = "default"; FileServicePropertiesInner parameters = new FileServicePropertiesInner(); parameters.withCors(cors); + parameters.withShareDeleteRetentionPolicy(shareDeleteRetentionPolicy); return service.setServiceProperties(resourceGroupName, accountName, this.client.subscriptionId(), fileServicesName, this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override diff --git a/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/FileShareInner.java b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/FileShareInner.java index 491cd8b548d4..da66c6178021 100644 --- a/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/FileShareInner.java +++ b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/FileShareInner.java @@ -34,7 +34,8 @@ public class FileShareInner extends AzureEntityResource { /** * The maximum size of the share, in gigabytes. Must be greater than 0, and - * less than or equal to 5TB (5120). + * less than or equal to 5TB (5120). For Large File Shares, the maximum + * size is 100000. */ @JsonProperty(value = "properties.shareQuota") private Integer shareQuota; @@ -69,7 +70,7 @@ public FileShareInner withMetadata(Map metadata) { } /** - * Get the maximum size of the share, in gigabytes. Must be greater than 0, and less than or equal to 5TB (5120). + * Get the maximum size of the share, in gigabytes. Must be greater than 0, and less than or equal to 5TB (5120). For Large File Shares, the maximum size is 100000. * * @return the shareQuota value */ @@ -78,7 +79,7 @@ public Integer shareQuota() { } /** - * Set the maximum size of the share, in gigabytes. Must be greater than 0, and less than or equal to 5TB (5120). + * Set the maximum size of the share, in gigabytes. Must be greater than 0, and less than or equal to 5TB (5120). For Large File Shares, the maximum size is 100000. * * @param shareQuota the shareQuota value to set * @return the FileShareInner object itself. diff --git a/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/FileShareItemInner.java b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/FileShareItemInner.java index 4db854637865..786d60581fc9 100644 --- a/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/FileShareItemInner.java +++ b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/FileShareItemInner.java @@ -33,7 +33,8 @@ public class FileShareItemInner extends AzureEntityResource { /** * The maximum size of the share, in gigabytes. Must be greater than 0, and - * less than or equal to 5TB (5120). + * less than or equal to 5TB (5120). For Large File Shares, the maximum + * size is 100000. */ @JsonProperty(value = "properties.shareQuota") private Integer shareQuota; @@ -68,7 +69,7 @@ public FileShareItemInner withMetadata(Map metadata) { } /** - * Get the maximum size of the share, in gigabytes. Must be greater than 0, and less than or equal to 5TB (5120). + * Get the maximum size of the share, in gigabytes. Must be greater than 0, and less than or equal to 5TB (5120). For Large File Shares, the maximum size is 100000. * * @return the shareQuota value */ @@ -77,7 +78,7 @@ public Integer shareQuota() { } /** - * Set the maximum size of the share, in gigabytes. Must be greater than 0, and less than or equal to 5TB (5120). + * Set the maximum size of the share, in gigabytes. Must be greater than 0, and less than or equal to 5TB (5120). For Large File Shares, the maximum size is 100000. * * @param shareQuota the shareQuota value to set * @return the FileShareItemInner object itself. diff --git a/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/FileSharesInner.java b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/FileSharesInner.java index 8dc17d834450..1be570e1fd5b 100644 --- a/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/FileSharesInner.java +++ b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/FileSharesInner.java @@ -438,7 +438,7 @@ public Observable> call(Response r * @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 shareName The name of the file share within the specified storage account. File share names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. * @param metadata A name-value pair to associate with the share as metadata. - * @param shareQuota The maximum size of the share, in gigabytes. Must be greater than 0, and less than or equal to 5TB (5120). + * @param shareQuota The maximum size of the share, in gigabytes. Must be greater than 0, and less than or equal to 5TB (5120). For Large File Shares, the maximum size is 100000. * @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 @@ -455,7 +455,7 @@ public FileShareInner create(String resourceGroupName, String accountName, Strin * @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 shareName The name of the file share within the specified storage account. File share names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. * @param metadata A name-value pair to associate with the share as metadata. - * @param shareQuota The maximum size of the share, in gigabytes. Must be greater than 0, and less than or equal to 5TB (5120). + * @param shareQuota The maximum size of the share, in gigabytes. Must be greater than 0, and less than or equal to 5TB (5120). For Large File Shares, the maximum size is 100000. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object @@ -471,7 +471,7 @@ public ServiceFuture createAsync(String resourceGroupName, Strin * @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 shareName The name of the file share within the specified storage account. File share names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. * @param metadata A name-value pair to associate with the share as metadata. - * @param shareQuota The maximum size of the share, in gigabytes. Must be greater than 0, and less than or equal to 5TB (5120). + * @param shareQuota The maximum size of the share, in gigabytes. Must be greater than 0, and less than or equal to 5TB (5120). For Large File Shares, the maximum size is 100000. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the FileShareInner object */ @@ -491,7 +491,7 @@ public FileShareInner call(ServiceResponse response) { * @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 shareName The name of the file share within the specified storage account. File share names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. * @param metadata A name-value pair to associate with the share as metadata. - * @param shareQuota The maximum size of the share, in gigabytes. Must be greater than 0, and less than or equal to 5TB (5120). + * @param shareQuota The maximum size of the share, in gigabytes. Must be greater than 0, and less than or equal to 5TB (5120). For Large File Shares, the maximum size is 100000. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the FileShareInner object */ @@ -635,7 +635,7 @@ public Observable> call(Response r * @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 shareName The name of the file share within the specified storage account. File share names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. * @param metadata A name-value pair to associate with the share as metadata. - * @param shareQuota The maximum size of the share, in gigabytes. Must be greater than 0, and less than or equal to 5TB (5120). + * @param shareQuota The maximum size of the share, in gigabytes. Must be greater than 0, and less than or equal to 5TB (5120). For Large File Shares, the maximum size is 100000. * @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 @@ -652,7 +652,7 @@ public FileShareInner update(String resourceGroupName, String accountName, Strin * @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 shareName The name of the file share within the specified storage account. File share names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. * @param metadata A name-value pair to associate with the share as metadata. - * @param shareQuota The maximum size of the share, in gigabytes. Must be greater than 0, and less than or equal to 5TB (5120). + * @param shareQuota The maximum size of the share, in gigabytes. Must be greater than 0, and less than or equal to 5TB (5120). For Large File Shares, the maximum size is 100000. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object @@ -668,7 +668,7 @@ public ServiceFuture updateAsync(String resourceGroupName, Strin * @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 shareName The name of the file share within the specified storage account. File share names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. * @param metadata A name-value pair to associate with the share as metadata. - * @param shareQuota The maximum size of the share, in gigabytes. Must be greater than 0, and less than or equal to 5TB (5120). + * @param shareQuota The maximum size of the share, in gigabytes. Must be greater than 0, and less than or equal to 5TB (5120). For Large File Shares, the maximum size is 100000. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the FileShareInner object */ @@ -688,7 +688,7 @@ public FileShareInner call(ServiceResponse response) { * @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 shareName The name of the file share within the specified storage account. File share names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. * @param metadata A name-value pair to associate with the share as metadata. - * @param shareQuota The maximum size of the share, in gigabytes. Must be greater than 0, and less than or equal to 5TB (5120). + * @param shareQuota The maximum size of the share, in gigabytes. Must be greater than 0, and less than or equal to 5TB (5120). For Large File Shares, the maximum size is 100000. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the FileShareInner object */ diff --git a/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/SkuImpl.java b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/SkuInformationImpl.java similarity index 86% rename from sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/SkuImpl.java rename to sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/SkuInformationImpl.java index 2c4610786d2e..91b7df2f317b 100644 --- a/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/SkuImpl.java +++ b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/SkuInformationImpl.java @@ -9,7 +9,7 @@ package com.microsoft.azure.management.storage.v2019_06_01.implementation; -import com.microsoft.azure.management.storage.v2019_06_01.Sku; +import com.microsoft.azure.management.storage.v2019_06_01.SkuInformation; import com.microsoft.azure.arm.model.implementation.WrapperImpl; import rx.Observable; import java.util.List; @@ -19,10 +19,10 @@ import com.microsoft.azure.management.storage.v2019_06_01.Restriction; import com.microsoft.azure.management.storage.v2019_06_01.SkuTier; -class SkuImpl extends WrapperImpl implements Sku { +class SkuInformationImpl extends WrapperImpl implements SkuInformation { private final StorageManager manager; - SkuImpl(SkuInner inner, StorageManager manager) { + SkuInformationImpl(SkuInformationInner inner, StorageManager manager) { super(inner); this.manager = manager; } diff --git a/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/SkuInformationInner.java b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/SkuInformationInner.java new file mode 100644 index 000000000000..54db5f4c852d --- /dev/null +++ b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/SkuInformationInner.java @@ -0,0 +1,169 @@ +/** + * 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_06_01.implementation; + +import com.microsoft.azure.management.storage.v2019_06_01.SkuName; +import com.microsoft.azure.management.storage.v2019_06_01.SkuTier; +import com.microsoft.azure.management.storage.v2019_06_01.Kind; +import java.util.List; +import com.microsoft.azure.management.storage.v2019_06_01.SKUCapability; +import com.microsoft.azure.management.storage.v2019_06_01.Restriction; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Storage SKU and its properties. + */ +public class SkuInformationInner { + /** + * Possible values include: 'Standard_LRS', 'Standard_GRS', + * 'Standard_RAGRS', 'Standard_ZRS', 'Premium_LRS', 'Premium_ZRS', + * 'Standard_GZRS', 'Standard_RAGZRS'. + */ + @JsonProperty(value = "name", required = true) + private SkuName name; + + /** + * Possible values include: 'Standard', 'Premium'. + */ + @JsonProperty(value = "tier") + private SkuTier tier; + + /** + * The type of the resource, usually it is 'storageAccounts'. + */ + @JsonProperty(value = "resourceType", access = JsonProperty.Access.WRITE_ONLY) + private String resourceType; + + /** + * Indicates the type of storage account. Possible values include: + * 'Storage', 'StorageV2', 'BlobStorage', 'FileStorage', + * 'BlockBlobStorage'. + */ + @JsonProperty(value = "kind", access = JsonProperty.Access.WRITE_ONLY) + private Kind kind; + + /** + * The set of locations that the SKU is available. This will be supported + * and registered Azure Geo Regions (e.g. West US, East US, Southeast Asia, + * etc.). + */ + @JsonProperty(value = "locations", access = JsonProperty.Access.WRITE_ONLY) + private List locations; + + /** + * The capability information in the specified SKU, including file + * encryption, network ACLs, change notification, etc. + */ + @JsonProperty(value = "capabilities", access = JsonProperty.Access.WRITE_ONLY) + private List capabilities; + + /** + * The restrictions because of which SKU cannot be used. This is empty if + * there are no restrictions. + */ + @JsonProperty(value = "restrictions") + private List restrictions; + + /** + * Get possible values include: 'Standard_LRS', 'Standard_GRS', 'Standard_RAGRS', 'Standard_ZRS', 'Premium_LRS', 'Premium_ZRS', 'Standard_GZRS', 'Standard_RAGZRS'. + * + * @return the name value + */ + public SkuName name() { + return this.name; + } + + /** + * Set possible values include: 'Standard_LRS', 'Standard_GRS', 'Standard_RAGRS', 'Standard_ZRS', 'Premium_LRS', 'Premium_ZRS', 'Standard_GZRS', 'Standard_RAGZRS'. + * + * @param name the name value to set + * @return the SkuInformationInner object itself. + */ + public SkuInformationInner withName(SkuName name) { + this.name = name; + return this; + } + + /** + * Get possible values include: 'Standard', 'Premium'. + * + * @return the tier value + */ + public SkuTier tier() { + return this.tier; + } + + /** + * Set possible values include: 'Standard', 'Premium'. + * + * @param tier the tier value to set + * @return the SkuInformationInner object itself. + */ + public SkuInformationInner withTier(SkuTier tier) { + this.tier = tier; + return this; + } + + /** + * Get the type of the resource, usually it is 'storageAccounts'. + * + * @return the resourceType value + */ + public String resourceType() { + return this.resourceType; + } + + /** + * Get indicates the type of storage account. Possible values include: 'Storage', 'StorageV2', 'BlobStorage', 'FileStorage', 'BlockBlobStorage'. + * + * @return the kind value + */ + public Kind kind() { + return this.kind; + } + + /** + * Get the set of locations that the SKU is available. This will be supported and registered Azure Geo Regions (e.g. West US, East US, Southeast Asia, etc.). + * + * @return the locations value + */ + public List locations() { + return this.locations; + } + + /** + * Get the capability information in the specified SKU, including file encryption, network ACLs, change notification, etc. + * + * @return the capabilities value + */ + public List capabilities() { + return this.capabilities; + } + + /** + * Get the restrictions because of which SKU cannot be used. This is empty if there are no restrictions. + * + * @return the restrictions value + */ + public List restrictions() { + return this.restrictions; + } + + /** + * Set the restrictions because of which SKU cannot be used. This is empty if there are no restrictions. + * + * @param restrictions the restrictions value to set + * @return the SkuInformationInner object itself. + */ + public SkuInformationInner withRestrictions(List restrictions) { + this.restrictions = restrictions; + return this; + } + +} diff --git a/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/SkuInner.java b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/SkuInner.java index 16b3eb6451c2..3067bff27300 100644 --- a/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/SkuInner.java +++ b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/SkuInner.java @@ -10,10 +10,6 @@ import com.microsoft.azure.management.storage.v2019_06_01.SkuName; import com.microsoft.azure.management.storage.v2019_06_01.SkuTier; -import com.microsoft.azure.management.storage.v2019_06_01.Kind; -import java.util.List; -import com.microsoft.azure.management.storage.v2019_06_01.SKUCapability; -import com.microsoft.azure.management.storage.v2019_06_01.Restriction; import com.fasterxml.jackson.annotation.JsonProperty; /** @@ -21,8 +17,6 @@ */ public class SkuInner { /** - * Gets or sets the SKU name. Required for account creation; optional for - * update. Note that in older versions, SKU name was called accountType. * Possible values include: 'Standard_LRS', 'Standard_GRS', * 'Standard_RAGRS', 'Standard_ZRS', 'Premium_LRS', 'Premium_ZRS', * 'Standard_GZRS', 'Standard_RAGZRS'. @@ -31,50 +25,13 @@ public class SkuInner { private SkuName name; /** - * Gets the SKU tier. This is based on the SKU name. Possible values - * include: 'Standard', 'Premium'. + * Possible values include: 'Standard', 'Premium'. */ - @JsonProperty(value = "tier", access = JsonProperty.Access.WRITE_ONLY) + @JsonProperty(value = "tier") private SkuTier tier; /** - * The type of the resource, usually it is 'storageAccounts'. - */ - @JsonProperty(value = "resourceType", access = JsonProperty.Access.WRITE_ONLY) - private String resourceType; - - /** - * Indicates the type of storage account. Possible values include: - * 'Storage', 'StorageV2', 'BlobStorage', 'FileStorage', - * 'BlockBlobStorage'. - */ - @JsonProperty(value = "kind", access = JsonProperty.Access.WRITE_ONLY) - private Kind kind; - - /** - * The set of locations that the SKU is available. This will be supported - * and registered Azure Geo Regions (e.g. West US, East US, Southeast Asia, - * etc.). - */ - @JsonProperty(value = "locations", access = JsonProperty.Access.WRITE_ONLY) - private List locations; - - /** - * The capability information in the specified SKU, including file - * encryption, network ACLs, change notification, etc. - */ - @JsonProperty(value = "capabilities", access = JsonProperty.Access.WRITE_ONLY) - private List capabilities; - - /** - * The restrictions because of which SKU cannot be used. This is empty if - * there are no restrictions. - */ - @JsonProperty(value = "restrictions") - private List restrictions; - - /** - * Get gets or sets the SKU name. Required for account creation; optional for update. Note that in older versions, SKU name was called accountType. Possible values include: 'Standard_LRS', 'Standard_GRS', 'Standard_RAGRS', 'Standard_ZRS', 'Premium_LRS', 'Premium_ZRS', 'Standard_GZRS', 'Standard_RAGZRS'. + * Get possible values include: 'Standard_LRS', 'Standard_GRS', 'Standard_RAGRS', 'Standard_ZRS', 'Premium_LRS', 'Premium_ZRS', 'Standard_GZRS', 'Standard_RAGZRS'. * * @return the name value */ @@ -83,7 +40,7 @@ public SkuName name() { } /** - * Set gets or sets the SKU name. Required for account creation; optional for update. Note that in older versions, SKU name was called accountType. Possible values include: 'Standard_LRS', 'Standard_GRS', 'Standard_RAGRS', 'Standard_ZRS', 'Premium_LRS', 'Premium_ZRS', 'Standard_GZRS', 'Standard_RAGZRS'. + * Set possible values include: 'Standard_LRS', 'Standard_GRS', 'Standard_RAGRS', 'Standard_ZRS', 'Premium_LRS', 'Premium_ZRS', 'Standard_GZRS', 'Standard_RAGZRS'. * * @param name the name value to set * @return the SkuInner object itself. @@ -94,7 +51,7 @@ public SkuInner withName(SkuName name) { } /** - * Get gets the SKU tier. This is based on the SKU name. Possible values include: 'Standard', 'Premium'. + * Get possible values include: 'Standard', 'Premium'. * * @return the tier value */ @@ -103,58 +60,13 @@ public SkuTier tier() { } /** - * Get the type of the resource, usually it is 'storageAccounts'. - * - * @return the resourceType value - */ - public String resourceType() { - return this.resourceType; - } - - /** - * Get indicates the type of storage account. Possible values include: 'Storage', 'StorageV2', 'BlobStorage', 'FileStorage', 'BlockBlobStorage'. - * - * @return the kind value - */ - public Kind kind() { - return this.kind; - } - - /** - * Get the set of locations that the SKU is available. This will be supported and registered Azure Geo Regions (e.g. West US, East US, Southeast Asia, etc.). - * - * @return the locations value - */ - public List locations() { - return this.locations; - } - - /** - * Get the capability information in the specified SKU, including file encryption, network ACLs, change notification, etc. - * - * @return the capabilities value - */ - public List capabilities() { - return this.capabilities; - } - - /** - * Get the restrictions because of which SKU cannot be used. This is empty if there are no restrictions. - * - * @return the restrictions value - */ - public List restrictions() { - return this.restrictions; - } - - /** - * Set the restrictions because of which SKU cannot be used. This is empty if there are no restrictions. + * Set possible values include: 'Standard', 'Premium'. * - * @param restrictions the restrictions value to set + * @param tier the tier value to set * @return the SkuInner object itself. */ - public SkuInner withRestrictions(List restrictions) { - this.restrictions = restrictions; + public SkuInner withTier(SkuTier tier) { + this.tier = tier; return this; } diff --git a/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/SkusImpl.java b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/SkusImpl.java index 8d6e0b896c08..826c870a0760 100644 --- a/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/SkusImpl.java +++ b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/SkusImpl.java @@ -16,19 +16,19 @@ import com.microsoft.azure.PagedList; import com.microsoft.azure.Page; import com.microsoft.azure.arm.utils.PagedListConverter; -import com.microsoft.azure.management.storage.v2019_06_01.Sku; +import com.microsoft.azure.management.storage.v2019_06_01.SkuInformation; class SkusImpl extends WrapperImpl implements Skus { - private PagedListConverter converter; + private PagedListConverter converter; private final StorageManager manager; SkusImpl(StorageManager manager) { super(manager.inner().skus()); this.manager = manager; - this.converter = new PagedListConverter() { + this.converter = new PagedListConverter() { @Override - public Observable typeConvertAsync(SkuInner inner) { - return Observable.just((Sku) wrapModel(inner)); + public Observable typeConvertAsync(SkuInformationInner inner) { + return Observable.just((SkuInformation) wrapModel(inner)); } }; } @@ -37,29 +37,29 @@ public StorageManager manager() { return this.manager; } - private SkuImpl wrapModel(SkuInner inner) { - return new SkuImpl(inner, manager()); + private SkuInformationImpl wrapModel(SkuInformationInner inner) { + return new SkuInformationImpl(inner, manager()); } @Override - public PagedList list() { + public PagedList list() { SkusInner client = this.inner(); return converter.convert(client.list()); } @Override - public Observable listAsync() { + public Observable listAsync() { SkusInner client = this.inner(); return client.listAsync() - .flatMap(new Func1, Observable>() { + .flatMap(new Func1, Observable>() { @Override - public Observable call(Page innerPage) { + public Observable call(Page innerPage) { return Observable.from(innerPage.items()); } }) - .map(new Func1() { + .map(new Func1() { @Override - public Sku call(SkuInner inner) { + public SkuInformation call(SkuInformationInner inner) { return wrapModel(inner); } }); diff --git a/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/SkusInner.java b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/SkusInner.java index bc9477e3e88a..99423df6e98d 100644 --- a/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/SkusInner.java +++ b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/SkusInner.java @@ -63,15 +63,15 @@ interface SkusService { /** * Lists the available SKUs supported by Microsoft.Storage for given subscription. * - * @return the PagedList object if successful. + * @return the PagedList object if successful. */ - public PagedList list() { - PageImpl page = new PageImpl<>(); + public PagedList list() { + PageImpl page = new PageImpl<>(); page.setItems(listWithServiceResponseAsync().toBlocking().single().body()); page.setNextPageLink(null); - return new PagedList(page) { + return new PagedList(page) { @Override - public Page nextPage(String nextPageLink) { + public Page nextPage(String nextPageLink) { return null; } }; @@ -83,20 +83,20 @@ public Page nextPage(String nextPageLink) { * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceFuture} object */ - public ServiceFuture> listAsync(final ServiceCallback> serviceCallback) { + public ServiceFuture> listAsync(final ServiceCallback> serviceCallback) { return ServiceFuture.fromResponse(listWithServiceResponseAsync(), serviceCallback); } /** * Lists the available SKUs supported by Microsoft.Storage for given subscription. * - * @return the observable to the List<SkuInner> object + * @return the observable to the List<SkuInformationInner> object */ - public Observable> listAsync() { - return listWithServiceResponseAsync().map(new Func1>, Page>() { + public Observable> listAsync() { + return listWithServiceResponseAsync().map(new Func1>, Page>() { @Override - public Page call(ServiceResponse> response) { - PageImpl page = new PageImpl<>(); + public Page call(ServiceResponse> response) { + PageImpl page = new PageImpl<>(); page.setItems(response.body()); return page; } @@ -106,9 +106,9 @@ public Page call(ServiceResponse> response) { /** * Lists the available SKUs supported by Microsoft.Storage for given subscription. * - * @return the observable to the List<SkuInner> object + * @return the observable to the List<SkuInformationInner> object */ - public Observable>> listWithServiceResponseAsync() { + public Observable>> listWithServiceResponseAsync() { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } @@ -116,16 +116,16 @@ public Observable>> listWithServiceResponseAsync( throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); } return service.list(this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { + .flatMap(new Func1, Observable>>>() { @Override - public Observable>> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse> result = listDelegate(response); - List items = null; + ServiceResponse> result = listDelegate(response); + List items = null; if (result.body() != null) { items = result.body().items(); } - ServiceResponse> clientResponse = new ServiceResponse>(items, result.response()); + ServiceResponse> clientResponse = new ServiceResponse>(items, result.response()); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -134,9 +134,9 @@ public Observable>> call(Response r }); } - private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) + private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); } diff --git a/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/StorageAccountImpl.java b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/StorageAccountImpl.java index 046f15699868..00dd985713b2 100644 --- a/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/StorageAccountImpl.java +++ b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/StorageAccountImpl.java @@ -28,7 +28,7 @@ import com.microsoft.azure.management.storage.v2019_06_01.PrivateEndpointConnection; import java.util.List; import com.microsoft.azure.management.storage.v2019_06_01.ProvisioningState; -import com.microsoft.azure.management.storage.v2019_06_01.Sku; +import com.microsoft.azure.management.storage.v2019_06_01.RoutingPreference; import com.microsoft.azure.management.storage.v2019_06_01.AccountStatus; import rx.functions.Func1; @@ -183,6 +183,11 @@ public ProvisioningState provisioningState() { return this.inner().provisioningState(); } + @Override + public RoutingPreference routingPreference() { + return this.inner().routingPreference(); + } + @Override public Endpoints secondaryEndpoints() { return this.inner().secondaryEndpoints(); @@ -194,13 +199,8 @@ public String secondaryLocation() { } @Override - public Sku sku() { - SkuInner inner = this.inner().sku(); - if (inner != null) { - return new SkuImpl(inner, manager()); - } else { - return null; - } + public SkuInner sku() { + return this.inner().sku(); } @Override @@ -319,4 +319,14 @@ public StorageAccountImpl withNetworkRuleSet(NetworkRuleSet networkRuleSet) { return this; } + @Override + public StorageAccountImpl withRoutingPreference(RoutingPreference routingPreference) { + if (isInCreateMode()) { + this.createParameter.withRoutingPreference(routingPreference); + } else { + this.updateParameter.withRoutingPreference(routingPreference); + } + return this; + } + } diff --git a/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/StorageAccountInner.java b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/StorageAccountInner.java index 0f222411d879..d043744a2032 100644 --- a/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/StorageAccountInner.java +++ b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/StorageAccountInner.java @@ -22,6 +22,7 @@ import com.microsoft.azure.management.storage.v2019_06_01.GeoReplicationStats; import com.microsoft.azure.management.storage.v2019_06_01.LargeFileSharesState; import java.util.List; +import com.microsoft.azure.management.storage.v2019_06_01.RoutingPreference; import com.fasterxml.jackson.annotation.JsonProperty; import com.microsoft.rest.serializer.JsonFlatten; import com.microsoft.azure.Resource; @@ -191,6 +192,13 @@ public class StorageAccountInner extends Resource { @JsonProperty(value = "properties.privateEndpointConnections", access = JsonProperty.Access.WRITE_ONLY) private List privateEndpointConnections; + /** + * Maintains information about the network routing choice opted by the user + * for data transfer. + */ + @JsonProperty(value = "properties.routingPreference") + private RoutingPreference routingPreference; + /** * Get gets the SKU. * @@ -453,4 +461,24 @@ public List privateEndpointConnections() { return this.privateEndpointConnections; } + /** + * Get maintains information about the network routing choice opted by the user for data transfer. + * + * @return the routingPreference value + */ + public RoutingPreference routingPreference() { + return this.routingPreference; + } + + /** + * Set maintains information about the network routing choice opted by the user for data transfer. + * + * @param routingPreference the routingPreference value to set + * @return the StorageAccountInner object itself. + */ + public StorageAccountInner withRoutingPreference(RoutingPreference routingPreference) { + this.routingPreference = routingPreference; + return this; + } + } diff --git a/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/StorageAccountsInner.java b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/StorageAccountsInner.java index cd3a89468746..0d7fc6552572 100644 --- a/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/StorageAccountsInner.java +++ b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/StorageAccountsInner.java @@ -49,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 diff --git a/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/StorageManagementClientImpl.java b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/StorageManagementClientImpl.java index 6792784a62ec..f325588fdd1e 100644 --- a/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/StorageManagementClientImpl.java +++ b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/StorageManagementClientImpl.java @@ -10,6 +10,8 @@ import com.microsoft.azure.AzureClient; import com.microsoft.azure.AzureServiceClient; +import com.microsoft.azure.LongRunningFinalState; +import com.microsoft.azure.LongRunningOperationOptions; import com.microsoft.rest.credentials.ServiceClientCredentials; import com.microsoft.rest.RestClient; diff --git a/sdk/storage/pom.service.xml b/sdk/storage/pom.service.xml index 5046a2e08097..96b5ed8a399d 100644 --- a/sdk/storage/pom.service.xml +++ b/sdk/storage/pom.service.xml @@ -23,6 +23,5 @@ azure-storage-file-share azure-storage-file-datalake azure-storage-queue - azure-storage-queue-cryptography diff --git a/sdk/storage/tests.yml b/sdk/storage/tests.yml index d607ad27b2e8..5c6bc6a1db77 100644 --- a/sdk/storage/tests.yml +++ b/sdk/storage/tests.yml @@ -25,4 +25,8 @@ jobs: AZURE_STORAGE_BLOB_CONNECTION_STRING: $(java-storage-test-blob-connection-string) STORAGE_DATA_LAKE_ACCOUNT_NAME: $(java-storage-data-lake-account-name) STORAGE_DATA_LAKE_ACCOUNT_KEY: $(java-storage-data-lake-account-key) + AZURE_STORAGE_FILE_ACCOUNT_NAME: $(java-storage-account-name) + AZURE_STORAGE_FILE_ACCOUNT_KEY: $(java-storage-account-key) + AZURE_STORAGE_QUEUE_ACCOUNT_NAME: $(java-storage-account-name) + AZURE_STORAGE_QUEUE_ACCOUNT_KEY: $(java-storage-account-key) TimeoutInMinutes: 120 From 6400b45438639199e71ca6b535e5b27aaa45639d Mon Sep 17 00:00:00 2001 From: Sima Zhu Date: Mon, 9 Dec 2019 21:09:28 -0800 Subject: [PATCH 2/8] Fixed tests failure --- .../src/main/java/com/azure/core/util/CoreUtils.java | 8 ++------ .../secrets/KeyVaultSecretsUserAgentPropertiesTest.java | 2 +- .../BlobCryptographyUserAgentPropertiesTest.groovy | 2 +- .../storage/queue/QueueUserAgentPropertiesTest.groovy | 2 +- 4 files changed, 5 insertions(+), 9 deletions(-) diff --git a/sdk/core/azure-core/src/main/java/com/azure/core/util/CoreUtils.java b/sdk/core/azure-core/src/main/java/com/azure/core/util/CoreUtils.java index 377e49bbfcbc..b9b34cdd8be9 100644 --- a/sdk/core/azure-core/src/main/java/com/azure/core/util/CoreUtils.java +++ b/sdk/core/azure-core/src/main/java/com/azure/core/util/CoreUtils.java @@ -24,10 +24,6 @@ */ public final class CoreUtils { private static final String COMMA = ","; - private static final String NAME = "name"; - private static final String VERSION = "version"; - private static final String UNKNOWN_NAME = "UnknownName"; - private static final String UNKNOWN_VERSION = "UnknownVersion"; private CoreUtils() { // Exists only to defeat instantiation. @@ -166,10 +162,10 @@ public static Publisher extractAndFetch(PagedResponse page, Context co /** - * Helper method that returns {@link UserAgentProperties} from properties defined in {@code propertiesFileName}. + * Helper method that returns an immutable {@link Map} of properties defined in {@code propertiesFileName}. * * @param propertiesFileName The file name defining the properties. - * @return {@link UserAgentProperties}. + * @return an immutable {@link Map}. */ public static Map getProperties(String propertiesFileName) { ClientLogger logger = new ClientLogger(CoreUtils.class); diff --git a/sdk/keyvault/azure-security-keyvault-secrets/src/test/java/com/azure/security/keyvault/secrets/KeyVaultSecretsUserAgentPropertiesTest.java b/sdk/keyvault/azure-security-keyvault-secrets/src/test/java/com/azure/security/keyvault/secrets/KeyVaultSecretsUserAgentPropertiesTest.java index 9d38ed5dc5a2..95aaac5b8de1 100644 --- a/sdk/keyvault/azure-security-keyvault-secrets/src/test/java/com/azure/security/keyvault/secrets/KeyVaultSecretsUserAgentPropertiesTest.java +++ b/sdk/keyvault/azure-security-keyvault-secrets/src/test/java/com/azure/security/keyvault/secrets/KeyVaultSecretsUserAgentPropertiesTest.java @@ -14,7 +14,7 @@ public class KeyVaultSecretsUserAgentPropertiesTest { @Test public void testAzureConfiguration() { Map properties = CoreUtils.getProperties("azure-key-vault-secrets.properties"); - assertTrue(properties.get("name").matches("azure-key-vault-secrets")); + assertTrue(properties.get("name").matches("azure-security-keyvault-secrets")); assertTrue(properties.get("version").matches("(\\d)+.(\\d)+.(\\d)+([-a-zA-Z0-9.])*")); } } diff --git a/sdk/storage/azure-storage-blob-cryptography/src/test/java/com/azure/storage/blob/specialized/cryptography/BlobCryptographyUserAgentPropertiesTest.groovy b/sdk/storage/azure-storage-blob-cryptography/src/test/java/com/azure/storage/blob/specialized/cryptography/BlobCryptographyUserAgentPropertiesTest.groovy index 683616f9d57a..83429a1a2b74 100644 --- a/sdk/storage/azure-storage-blob-cryptography/src/test/java/com/azure/storage/blob/specialized/cryptography/BlobCryptographyUserAgentPropertiesTest.groovy +++ b/sdk/storage/azure-storage-blob-cryptography/src/test/java/com/azure/storage/blob/specialized/cryptography/BlobCryptographyUserAgentPropertiesTest.groovy @@ -12,7 +12,7 @@ class BlobCryptographyUserAgentPropertiesTest extends Specification { given: Map properties = CoreUtils.getProperties("azure-storage-blob-cyptography.properties") expect: - properties.get("name") == "azure-storage-blob-cyptography" + properties.get("name") == "azure-storage-blob-cryptography" properties.get("version").matches("(\\d)+.(\\d)+.(\\d)+([-a-zA-Z0-9.])*") } } diff --git a/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueUserAgentPropertiesTest.groovy b/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueUserAgentPropertiesTest.groovy index 7608a7c6e564..57c874d79253 100644 --- a/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueUserAgentPropertiesTest.groovy +++ b/sdk/storage/azure-storage-queue/src/test/java/com/azure/storage/queue/QueueUserAgentPropertiesTest.groovy @@ -14,6 +14,6 @@ class QueueUserAgentPropertiesTest extends Specification { Map properties = CoreUtils.getProperties("azure-storage-queue.properties") expect: properties.get("name") == "azure-storage-queue" - properties.getVersion().matches("(\\d)+.(\\d)+.(\\d)+([-a-zA-Z0-9.])*") + properties.get("version").matches("(\\d)+.(\\d)+.(\\d)+([-a-zA-Z0-9.])*") } } From 770cbadf281d8a98be56bb8322b099e39024bd6c Mon Sep 17 00:00:00 2001 From: Sima Zhu Date: Mon, 9 Dec 2019 21:14:08 -0800 Subject: [PATCH 3/8] Revert sas changes --- .../storage/queue/implementation/util/BuilderHelper.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/util/BuilderHelper.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/util/BuilderHelper.java index 9838e4dd8b93..71da9bb55d0e 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/util/BuilderHelper.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/util/BuilderHelper.java @@ -28,6 +28,7 @@ import com.azure.storage.common.policy.ResponseValidationPolicyBuilder; import com.azure.storage.common.policy.ScrubEtagPolicy; import com.azure.storage.common.policy.StorageSharedKeyCredentialPolicy; +import com.azure.storage.common.sas.CommonSasQueryParameters; import com.azure.storage.queue.sas.QueueServiceSasQueryParameters; import java.net.MalformedURLException; @@ -105,10 +106,10 @@ public static QueueUrlParts parseEndpoint(String endpoint, ClientLogger logger) } // Attempt to get the SAS token from the URL passed - String sasToken = new QueueServiceSasQueryParameters( + String sasToken = new CommonSasQueryParameters( StorageImplUtils.parseQueryStringSplitValues(url.getQuery()), false).encode(); if (!CoreUtils.isNullOrEmpty(sasToken)) { - parts.setQueueName(sasToken); + parts.setSasToken(sasToken); } return parts; From c9fbba32c3fe65576596e16bfc1bfb2ed541c3bb Mon Sep 17 00:00:00 2001 From: Sima Zhu Date: Mon, 9 Dec 2019 21:30:45 -0800 Subject: [PATCH 4/8] Remove unused imports --- .../azure/storage/queue/implementation/util/BuilderHelper.java | 1 - 1 file changed, 1 deletion(-) diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/util/BuilderHelper.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/util/BuilderHelper.java index 71da9bb55d0e..f0391e11790d 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/util/BuilderHelper.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/util/BuilderHelper.java @@ -29,7 +29,6 @@ import com.azure.storage.common.policy.ScrubEtagPolicy; import com.azure.storage.common.policy.StorageSharedKeyCredentialPolicy; import com.azure.storage.common.sas.CommonSasQueryParameters; -import com.azure.storage.queue.sas.QueueServiceSasQueryParameters; import java.net.MalformedURLException; import java.net.URL; From 0ff10b1c8c1f08b52efde70a63e03fecf2fd8472 Mon Sep 17 00:00:00 2001 From: Sima Zhu Date: Mon, 9 Dec 2019 21:53:15 -0800 Subject: [PATCH 5/8] More tests fixed --- .../src/main/resources/azure-messaging-eventhubs.properties | 2 -- .../cryptography/BlobCryptographyUserAgentPropertiesTest.groovy | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) delete mode 100644 sdk/eventhubs/azure-messaging-eventhubs/src/main/resources/azure-messaging-eventhubs.properties diff --git a/sdk/eventhubs/azure-messaging-eventhubs/src/main/resources/azure-messaging-eventhubs.properties b/sdk/eventhubs/azure-messaging-eventhubs/src/main/resources/azure-messaging-eventhubs.properties deleted file mode 100644 index ca812989b4f2..000000000000 --- a/sdk/eventhubs/azure-messaging-eventhubs/src/main/resources/azure-messaging-eventhubs.properties +++ /dev/null @@ -1,2 +0,0 @@ -name=${project.artifactId} -version=${project.version} diff --git a/sdk/storage/azure-storage-blob-cryptography/src/test/java/com/azure/storage/blob/specialized/cryptography/BlobCryptographyUserAgentPropertiesTest.groovy b/sdk/storage/azure-storage-blob-cryptography/src/test/java/com/azure/storage/blob/specialized/cryptography/BlobCryptographyUserAgentPropertiesTest.groovy index 83429a1a2b74..eb3a60059ac9 100644 --- a/sdk/storage/azure-storage-blob-cryptography/src/test/java/com/azure/storage/blob/specialized/cryptography/BlobCryptographyUserAgentPropertiesTest.groovy +++ b/sdk/storage/azure-storage-blob-cryptography/src/test/java/com/azure/storage/blob/specialized/cryptography/BlobCryptographyUserAgentPropertiesTest.groovy @@ -10,7 +10,7 @@ class BlobCryptographyUserAgentPropertiesTest extends Specification { def "User agent properties not null"() { given: - Map properties = CoreUtils.getProperties("azure-storage-blob-cyptography.properties") + Map properties = CoreUtils.getProperties("azure-storage-blob-cryptography.properties") expect: properties.get("name") == "azure-storage-blob-cryptography" properties.get("version").matches("(\\d)+.(\\d)+.(\\d)+([-a-zA-Z0-9.])*") From f57f6e7f97dbf87da93494ec4a9bd1d05b3887d4 Mon Sep 17 00:00:00 2001 From: Sima Zhu Date: Mon, 9 Dec 2019 22:12:48 -0800 Subject: [PATCH 6/8] Keyvault test fixed --- .../keyvault/keys/KeyVaultKeysUserAgentPropertiesTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/test/java/com/azure/security/keyvault/keys/KeyVaultKeysUserAgentPropertiesTest.java b/sdk/keyvault/azure-security-keyvault-keys/src/test/java/com/azure/security/keyvault/keys/KeyVaultKeysUserAgentPropertiesTest.java index 6ae8d698e11e..b4c5c0c88f07 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/src/test/java/com/azure/security/keyvault/keys/KeyVaultKeysUserAgentPropertiesTest.java +++ b/sdk/keyvault/azure-security-keyvault-keys/src/test/java/com/azure/security/keyvault/keys/KeyVaultKeysUserAgentPropertiesTest.java @@ -14,7 +14,7 @@ public class KeyVaultKeysUserAgentPropertiesTest { @Test public void testAzureConfiguration() { Map properties = CoreUtils.getProperties("azure-key-vault-keys.properties"); - assertTrue(properties.get("name").matches("azure-key-vault-keys")); + assertTrue(properties.get("name").matches("azure-security-keyvault-keys")); assertTrue(properties.get("version").matches("(\\d)+.(\\d)+.(\\d)+([-a-zA-Z0-9.])*")); } } From 86798976c2c6014d16896e42480ec78185f87c0c Mon Sep 17 00:00:00 2001 From: Sima Zhu Date: Tue, 10 Dec 2019 10:18:47 -0800 Subject: [PATCH 7/8] Addressed several feedback --- .../appconfiguration/ConfigurationClientBuilder.java | 7 +++++-- .../certificates/CertificateClientBuilder.java | 12 ++++++++---- .../security/keyvault/keys/KeyClientBuilder.java | 7 +++++-- .../keys/cryptography/CryptographyClientBuilder.java | 7 +++++-- .../keyvault/secrets/SecretClientBuilder.java | 7 +++++-- .../cryptography/CryptographyConstants.java | 5 +---- .../cryptography/EncryptedBlobClientBuilder.java | 6 ++++-- .../blob/implementation/util/BuilderHelper.java | 6 ++++-- .../datalake/implementation/util/BuilderHelper.java | 6 ++++-- .../share/implementation/util/BuilderHelper.java | 6 ++++-- .../queue/implementation/util/BuilderHelper.java | 6 ++++-- 11 files changed, 49 insertions(+), 26 deletions(-) diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/ConfigurationClientBuilder.java b/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/ConfigurationClientBuilder.java index 72bbfd03bdfe..d4f2533c0a85 100644 --- a/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/ConfigurationClientBuilder.java +++ b/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/ConfigurationClientBuilder.java @@ -173,8 +173,11 @@ public ConfigurationAsyncClient buildAsyncClient() { // Closest to API goes first, closest to wire goes last. final List policies = new ArrayList<>(); - policies.add(new UserAgentPolicy(httpLogOptions.getApplicationId(), properties.get(SDK_NAME), - properties.get(SDK_VERSION), buildConfiguration)); + String clientName = properties.getOrDefault(SDK_NAME, "UnknownName"); + String clientVersion = properties.getOrDefault(SDK_VERSION, "UnknownVersion"); + + policies.add(new UserAgentPolicy(httpLogOptions.getApplicationId(), clientName, clientVersion, + buildConfiguration)); policies.add(new RequestIdPolicy()); policies.add(new AddHeadersPolicy(headers)); policies.add(new AddDatePolicy()); diff --git a/sdk/keyvault/azure-security-keyvault-certificates/src/main/java/com/azure/security/keyvault/certificates/CertificateClientBuilder.java b/sdk/keyvault/azure-security-keyvault-certificates/src/main/java/com/azure/security/keyvault/certificates/CertificateClientBuilder.java index 1469e6cfcec0..fb9b8a5a1897 100644 --- a/sdk/keyvault/azure-security-keyvault-certificates/src/main/java/com/azure/security/keyvault/certificates/CertificateClientBuilder.java +++ b/sdk/keyvault/azure-security-keyvault-certificates/src/main/java/com/azure/security/keyvault/certificates/CertificateClientBuilder.java @@ -116,8 +116,8 @@ public CertificateClient buildClient() { * {@link CertificateClientBuilder#vaultUrl(String)} have not been set. */ public CertificateAsyncClient buildAsyncClient() { - Configuration buildConfiguration = (configuration == null) ? Configuration.getGlobalConfiguration().clone() - : configuration; + Configuration buildConfiguration = (configuration != null) ? configuration: + Configuration.getGlobalConfiguration().clone(); URL buildEndpoint = getBuildEndpoint(buildConfiguration); if (buildEndpoint == null) { @@ -137,8 +137,12 @@ public CertificateAsyncClient buildAsyncClient() { // Closest to API goes first, closest to wire goes last. final List policies = new ArrayList<>(); - policies.add(new UserAgentPolicy(httpLogOptions.getApplicationId(), properties.get(SDK_NAME), - properties.get(SDK_VERSION), buildConfiguration)); + + 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); policies.add(new KeyVaultCredentialPolicy(credential)); diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/KeyClientBuilder.java b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/KeyClientBuilder.java index 1d07ee2b1b7a..fd9a05b45977 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/KeyClientBuilder.java +++ b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/KeyClientBuilder.java @@ -141,8 +141,11 @@ public KeyAsyncClient buildAsyncClient() { // Closest to API goes first, closest to wire goes last. final List policies = new ArrayList<>(); - policies.add(new UserAgentPolicy(httpLogOptions.getApplicationId(), properties.get(SDK_NAME), - properties.get(SDK_VERSION), buildConfiguration)); + + 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); policies.add(new KeyVaultCredentialPolicy(credential)); diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/CryptographyClientBuilder.java b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/CryptographyClientBuilder.java index f153b2b82c9d..09d3a75b6d28 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/CryptographyClientBuilder.java +++ b/sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/CryptographyClientBuilder.java @@ -160,8 +160,11 @@ HttpPipeline setupPipeline() { // Closest to API goes first, closest to wire goes last. final List policies = new ArrayList<>(); - policies.add(new UserAgentPolicy(httpLogOptions.getApplicationId(), properties.get(SDK_NAME), - properties.get(SDK_VERSION), buildConfiguration)); + + 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); policies.add(new KeyVaultCredentialPolicy(credential)); diff --git a/sdk/keyvault/azure-security-keyvault-secrets/src/main/java/com/azure/security/keyvault/secrets/SecretClientBuilder.java b/sdk/keyvault/azure-security-keyvault-secrets/src/main/java/com/azure/security/keyvault/secrets/SecretClientBuilder.java index fefeec281e95..c790625ea190 100644 --- a/sdk/keyvault/azure-security-keyvault-secrets/src/main/java/com/azure/security/keyvault/secrets/SecretClientBuilder.java +++ b/sdk/keyvault/azure-security-keyvault-secrets/src/main/java/com/azure/security/keyvault/secrets/SecretClientBuilder.java @@ -144,8 +144,11 @@ public SecretAsyncClient buildAsyncClient() { // Closest to API goes first, closest to wire goes last. final List policies = new ArrayList<>(); - policies.add(new UserAgentPolicy(httpLogOptions.getApplicationId(), properties.get(SDK_NAME), - properties.get(SDK_VERSION), buildConfiguration)); + + 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); policies.add(new KeyVaultCredentialPolicy(credential)); diff --git a/sdk/storage/azure-storage-blob-cryptography/src/main/java/com/azure/storage/blob/specialized/cryptography/CryptographyConstants.java b/sdk/storage/azure-storage-blob-cryptography/src/main/java/com/azure/storage/blob/specialized/cryptography/CryptographyConstants.java index 2dc5e960a5cd..bca0671b6b8f 100644 --- a/sdk/storage/azure-storage-blob-cryptography/src/main/java/com/azure/storage/blob/specialized/cryptography/CryptographyConstants.java +++ b/sdk/storage/azure-storage-blob-cryptography/src/main/java/com/azure/storage/blob/specialized/cryptography/CryptographyConstants.java @@ -17,10 +17,7 @@ final class CryptographyConstants { static final String AES = "AES"; - // This is properties file's name. - private static final String AZURE_STORAGE_PROPERTIES = "azure-storage-blob.properties"; - - static final Map USER_AGENT_PROPERTIES = CoreUtils.getProperties(AZURE_STORAGE_PROPERTIES); + static final Map USER_AGENT_PROPERTIES = CoreUtils.getProperties("azure-storage-blob.properties"); static final String AGENT_METADATA_VALUE = "JavaTrack2" + USER_AGENT_PROPERTIES.get("version"); diff --git a/sdk/storage/azure-storage-blob-cryptography/src/main/java/com/azure/storage/blob/specialized/cryptography/EncryptedBlobClientBuilder.java b/sdk/storage/azure-storage-blob-cryptography/src/main/java/com/azure/storage/blob/specialized/cryptography/EncryptedBlobClientBuilder.java index 8ebe53951102..6fe06546aade 100644 --- a/sdk/storage/azure-storage-blob-cryptography/src/main/java/com/azure/storage/blob/specialized/cryptography/EncryptedBlobClientBuilder.java +++ b/sdk/storage/azure-storage-blob-cryptography/src/main/java/com/azure/storage/blob/specialized/cryptography/EncryptedBlobClientBuilder.java @@ -161,8 +161,10 @@ private HttpPipeline getHttpPipeline() { List policies = new ArrayList<>(); policies.add(new BlobDecryptionPolicy(keyWrapper, keyResolver)); - policies.add(new UserAgentPolicy(logOptions.getApplicationId(), USER_AGENT_PROPERTIES.get(SDK_NAME), - USER_AGENT_PROPERTIES.get(SDK_VERSION), userAgentConfiguration)); + String clientName = USER_AGENT_PROPERTIES.getOrDefault(SDK_NAME, "UnknownName"); + String clientVersion = USER_AGENT_PROPERTIES.getOrDefault(SDK_VERSION, "UnknownVersion"); + policies.add(new UserAgentPolicy(logOptions.getApplicationId(), clientName, clientVersion, + userAgentConfiguration)); policies.add(new RequestIdPolicy()); policies.add(new AddDatePolicy()); diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/BuilderHelper.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/BuilderHelper.java index 4357acc49729..31bcf0dc84ec 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/BuilderHelper.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/BuilderHelper.java @@ -155,8 +155,10 @@ public static void httpsValidation(Object objectToCheck, String objectName, Stri private static UserAgentPolicy getUserAgentPolicy(Configuration configuration) { configuration = (configuration == null) ? Configuration.NONE : configuration; - return new UserAgentPolicy(getDefaultHttpLogOptions().getApplicationId(), - PROPERTIES.get(SDK_NAME), PROPERTIES.get(SDK_VERSION), configuration); + String clientName = PROPERTIES.getOrDefault(SDK_NAME, "UnknownName"); + String clientVersion = PROPERTIES.getOrDefault(SDK_VERSION, "UnknownVersion"); + return new UserAgentPolicy(getDefaultHttpLogOptions().getApplicationId(), clientName, clientVersion, + configuration); } /* diff --git a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/implementation/util/BuilderHelper.java b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/implementation/util/BuilderHelper.java index 8b774a26bd09..f3dba9d1914b 100644 --- a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/implementation/util/BuilderHelper.java +++ b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/implementation/util/BuilderHelper.java @@ -143,8 +143,10 @@ public static String getEndpoint(BlobUrlParts parts) { private static UserAgentPolicy getUserAgentPolicy(Configuration configuration) { configuration = (configuration == null) ? Configuration.NONE : configuration; - return new UserAgentPolicy(getDefaultHttpLogOptions().getApplicationId(), - PROPERTIES.get(SDK_NAME), PROPERTIES.get(SDK_VERSION), configuration); + String clientName = PROPERTIES.getOrDefault(SDK_NAME, "UnknownName"); + String clientVersion = PROPERTIES.getOrDefault(SDK_VERSION, "UnknownVersion"); + return new UserAgentPolicy(getDefaultHttpLogOptions().getApplicationId(), clientName, clientVersion, + configuration); } /* diff --git a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/implementation/util/BuilderHelper.java b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/implementation/util/BuilderHelper.java index 9ee373db83a3..64c5c9b393c0 100644 --- a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/implementation/util/BuilderHelper.java +++ b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/implementation/util/BuilderHelper.java @@ -95,8 +95,10 @@ public static HttpPipeline buildPipeline(Supplier credential private static UserAgentPolicy getUserAgentPolicy(Configuration configuration) { configuration = (configuration == null) ? Configuration.NONE : configuration; - return new UserAgentPolicy(getDefaultHttpLogOptions().getApplicationId(), - PROPERTIES.get(SDK_NAME), PROPERTIES.get(SDK_VERSION), configuration); + String clientName = PROPERTIES.getOrDefault(SDK_NAME, "UnknownName"); + String clientVersion = PROPERTIES.getOrDefault(SDK_VERSION, "UnknownVersion"); + return new UserAgentPolicy(getDefaultHttpLogOptions().getApplicationId(), clientName, clientVersion, + configuration); } /** diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/util/BuilderHelper.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/util/BuilderHelper.java index f0391e11790d..ec4e615d074c 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/util/BuilderHelper.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/util/BuilderHelper.java @@ -202,8 +202,10 @@ public static HttpLogOptions getDefaultHttpLogOptions() { private static UserAgentPolicy getUserAgentPolicy(Configuration configuration) { configuration = (configuration == null) ? Configuration.NONE : configuration; - return new UserAgentPolicy(getDefaultHttpLogOptions().getApplicationId(), - PROPERTIES.get(SDK_NAME), PROPERTIES.get(SDK_VERSION), configuration); + String clientName = PROPERTIES.getOrDefault(SDK_NAME, "UnknownName"); + String clientVersion = PROPERTIES.getOrDefault(SDK_VERSION, "UnknownVersion"); + return new UserAgentPolicy(getDefaultHttpLogOptions().getApplicationId(), clientName, clientVersion, + configuration); } /* From 99b6863ed504557b0e9fa003bf1abd860c924a01 Mon Sep 17 00:00:00 2001 From: Sima Zhu Date: Tue, 10 Dec 2019 10:40:33 -0800 Subject: [PATCH 8/8] Fixed linting issue --- .../keyvault/certificates/CertificateClientBuilder.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk/keyvault/azure-security-keyvault-certificates/src/main/java/com/azure/security/keyvault/certificates/CertificateClientBuilder.java b/sdk/keyvault/azure-security-keyvault-certificates/src/main/java/com/azure/security/keyvault/certificates/CertificateClientBuilder.java index fb9b8a5a1897..0c349784b1d2 100644 --- a/sdk/keyvault/azure-security-keyvault-certificates/src/main/java/com/azure/security/keyvault/certificates/CertificateClientBuilder.java +++ b/sdk/keyvault/azure-security-keyvault-certificates/src/main/java/com/azure/security/keyvault/certificates/CertificateClientBuilder.java @@ -116,8 +116,8 @@ public CertificateClient buildClient() { * {@link CertificateClientBuilder#vaultUrl(String)} have not been set. */ public CertificateAsyncClient buildAsyncClient() { - Configuration buildConfiguration = (configuration != null) ? configuration: - Configuration.getGlobalConfiguration().clone(); + Configuration buildConfiguration = (configuration != null) ? configuration + : Configuration.getGlobalConfiguration().clone(); URL buildEndpoint = getBuildEndpoint(buildConfiguration); if (buildEndpoint == null) {