From 2781b89560ef7a331b23ee278b68c0c13f623b64 Mon Sep 17 00:00:00 2001 From: Rabab Date: Thu, 12 May 2022 14:30:10 -0700 Subject: [PATCH] Reset changes to the patch version. --- .../azure-storage-file-share/CHANGELOG.md | 20 +- .../azure-storage-file-share/README.md | 2 +- sdk/storage/azure-storage-file-share/pom.xml | 26 +- .../storage/file/share/FileSmbProperties.java | 25 +- .../storage/file/share/ShareAsyncClient.java | 659 ++++-------------- .../azure/storage/file/share/ShareClient.java | 395 +---------- .../file/share/ShareClientBuilder.java | 20 +- .../file/share/ShareDirectoryAsyncClient.java | 628 ++++------------- .../file/share/ShareDirectoryClient.java | 372 +--------- .../file/share/ShareFileAsyncClient.java | 416 +++++------ .../storage/file/share/ShareFileClient.java | 118 +--- .../file/share/ShareFileClientBuilder.java | 18 +- .../file/share/ShareServiceAsyncClient.java | 63 +- .../file/share/ShareServiceClientBuilder.java | 18 +- .../file/share/ShareServiceVersion.java | 9 +- .../file/share/StorageFileInputStream.java | 4 +- .../share/implementation/DirectoriesImpl.java | 49 +- .../file/share/implementation/FilesImpl.java | 87 +-- .../share/implementation/ServicesImpl.java | 8 +- .../file/share/implementation/SharesImpl.java | 34 +- .../models/CopyFileSmbInfo.java | 30 - .../models/DirectoriesRenameHeaders.java | 180 ++--- .../models/FilesRenameHeaders.java | 180 ++--- .../FilesUploadRangeFromURLHeaders.java | 26 - .../models/FilesUploadRangeHeaders.java | 26 - .../share/models/DownloadRetryOptions.java | 4 +- .../share/models/FileLastWrittenMode.java | 47 -- .../file/share/models/ShareFileRange.java | 6 +- .../models/ShareFileUploadRangeOptions.java | 21 - .../file/share/models/ShareProtocols.java | 4 +- .../options/ShareDirectoryCreateOptions.java | 75 -- .../share/options/ShareFileCreateOptions.java | 130 ---- .../share/options/ShareFileRenameOptions.java | 23 - .../ShareFileUploadRangeFromUrlOptions.java | 22 - .../ShareListFilesAndDirectoriesOptions.java | 4 + .../specialized/ShareLeaseAsyncClient.java | 56 +- .../share/ShareAsyncJavaDocCodeSamples.java | 163 ----- ...ShareDirectoryAsyncJavaDocCodeSamples.java | 156 ----- .../ShareDirectoryJavaDocCodeSamples.java | 144 +--- .../ShareFileAsyncJavaDocCodeSamples.java | 39 -- .../share/ShareFileJavaDocCodeSamples.java | 33 - .../file/share/ShareJavaDocCodeSamples.java | 145 ---- .../file/share/DirectoryAPITests.groovy | 344 --------- .../file/share/DirectoryAsyncAPITests.groovy | 304 -------- .../storage/file/share/FileAPITests.groovy | 168 +---- .../file/share/FileAsyncAPITests.groovy | 58 -- .../storage/file/share/ShareAPITests.groovy | 287 -------- .../file/share/ShareAsyncAPITests.groovy | 248 ------- .../DirectoryAPITestsCreateChangeTime.json | 83 --- ...oryAPITestsCreateIfNotExistsDirectory.json | 54 -- ...ITestsCreateIfNotExistsDirectoryError.json | 47 -- ...APITestsCreateIfNotExistsDirectoryMin.json | 54 -- ...istsDirectoryPermissionAndKeyError[0].json | 25 - ...istsDirectoryPermissionAndKeyError[1].json | 25 - ...IfNotExistsDirectoryThatAlreadyExists.json | 76 -- ...fNotExistsDirectoryWithFilePermission.json | 54 -- ...tExistsDirectoryWithFilePermissionKey.json | 75 -- ...reateIfNotExistsDirectoryWithMetadata.json | 54 -- ...fNotExistsDirectoryWithNtfsAttributes.json | 75 -- ...APITestsCreateIfNotExistsSubDirectory.json | 83 --- ...IfNotExistsSubDirectoryFilePermission.json | 83 --- ...otExistsSubDirectoryFilePermissionKey.json | 104 --- ...ateIfNotExistsSubDirectoryInvalidName.json | 76 -- ...CreateIfNotExistsSubDirectoryMetadata.json | 83 --- ...eIfNotExistsSubDirectoryMetadataError.json | 76 -- ...otExistsSubdirectoryThatAlreadyExists.json | 105 --- ...ectoryAPITestsDeleteIfExistsDirectory.json | 73 -- ...oryAPITestsDeleteIfExistsDirectoryMin.json | 73 -- ...leteIfExistsDirectoryThatDoesNotExist.json | 70 -- ...fExistsDirectoryThatWasAlreadyDeleted.json | 95 --- .../DirectoryAPITestsDeleteIfExistsFile.json | 102 --- ...irectoryAPITestsDeleteIfExistsFileMin.json | 102 --- ...stsDeleteIfExistsFileThatDoesNotExist.json | 76 -- ...oryAPITestsDeleteIfExistsSubDirectory.json | 102 --- ...APITestsDeleteIfExistsSubDirectoryMin.json | 102 --- ...eIfExistsSubDirectoryThatDoesNotExist.json | 47 -- ...ectoryAPITestsRenameFileSmbProperties.json | 137 ++-- ...ctoryAPITestsSetHttpHeadersChangeTime.json | 133 ---- ...tsCreateIfNotExistsDirWithFilePermKey.json | 75 -- ...yncAPITestsCreateIfNotExistsDirectory.json | 54 -- ...ITestsCreateIfNotExistsDirectoryError.json | 47 -- ...IfNotExistsDirectoryThatAlreadyExists.json | 76 -- ...fNotExistsDirectoryWithFilePermission.json | 54 -- ...reateIfNotExistsDirectoryWithMetadata.json | 54 -- ...APITestsCreateIfNotExistsSubDirectory.json | 83 --- ...ateIfNotExistsSubDirectoryFilePermKey.json | 104 --- ...IfNotExistsSubDirectoryFilePermission.json | 83 --- ...ateIfNotExistsSubDirectoryInvalidName.json | 76 -- ...CreateIfNotExistsSubDirectoryMetadata.json | 83 --- ...eIfNotExistsSubDirectoryMetadataError.json | 76 -- ...otExistsSubdirectoryThatAlreadyExists.json | 105 --- ...yAsyncAPITestsDeleteIfExistsDirectory.json | 73 -- ...yncAPITestsDeleteIfExistsDirectoryMin.json | 73 -- ...leteIfExistsDirectoryThatDoesNotExist.json | 70 -- ...fExistsDirectoryThatWasAlreadyDeleted.json | 95 --- ...ectoryAsyncAPITestsDeleteIfExistsFile.json | 102 --- ...yAsyncAPITestsDeleteIfExistsFileLease.json | 124 ---- ...ncAPITestsDeleteIfExistsFileLeaseFail.json | 127 ---- ...oryAsyncAPITestsDeleteIfExistsFileMin.json | 102 --- ...stsDeleteIfExistsFileThatDoesNotExist.json | 99 --- ...yncAPITestsDeleteIfExistsSubDirectory.json | 102 --- ...APITestsDeleteIfExistsSubDirectoryMin.json | 83 --- ...eIfExistsSubdirectoryThatDoesNotExist.json | 99 --- .../FileAPITestsCreateChangeTime.json | 87 --- .../FileAPITestsDeleteIfExistsFile.json | 73 -- .../FileAPITestsDeleteIfExistsFileMin.json | 73 -- ...stsDeleteIfExistsFileThatDoesNotExist.json | 67 -- ...leteIfExistsFileThatWasAlreadyDeleted.json | 95 --- .../FileAPITestsRenameContentType.json | 117 ---- .../FileAPITestsRenameFileSmbProperties.json | 135 ++-- .../FileAPITestsRenameHeadersIllegal.json | 25 - .../FileAPITestsSetHttpHeadersChangeTime.json | 116 --- ...geFromUrlPreserveFileLastWrittenOn[0].json | 198 ------ ...geFromUrlPreserveFileLastWrittenOn[1].json | 198 ------ ...loadRangePreserveFileLastWrittenOn[0].json | 145 ---- ...loadRangePreserveFileLastWrittenOn[1].json | 145 ---- ...yncAPITestsDeleteFileThatDoesNotExist.json | 67 -- .../FileAsyncAPITestsDeleteIfExistsFile.json | 73 -- ...eAsyncAPITestsDeleteIfExistsFileLease.json | 95 --- ...ncAPITestsDeleteIfExistsFileLeaseFail.json | 98 --- ...leteIfExistsFileThatWasAlreadyDeleted.json | 95 --- ...ntSASNetworkAccountSasTokenOnEndpoint.json | 6 +- ...stsAccountSASNetworkCreateDeleteShare.json | 4 +- .../FileSASTestsCanUseSasToAuthenticate.json | 18 +- ...TestsFileSASNetworkTestDownloadUpload.json | 4 +- ...SASTestsFileSASNetworkTestUploadFails.json | 4 +- .../FileSASTestsParseProtocol.json | 6 +- ...sShareSASNetworkIdentifierPermissions.json | 8 +- ...stsAccountSASNetworkCreateDeleteShare.json | 4 +- ...TestsFileSASNetworkTestDownloadUpload.json | 4 +- ...entTestsFileSASNetworkTestUploadFails.json | 4 +- ...sShareSASNetworkIdentifierPermissions.json | 8 +- ...geBlobAPITestCreateIfNotExistsTags[0].json | 90 --- ...geBlobAPITestCreateIfNotExistsTags[1].json | 90 --- ...geBlobAPITestCreateIfNotExistsTags[2].json | 90 --- ...eIfNotExistDirectoryFilePermissionKey.json | 75 -- ...areAPITestsCreateIfNotExistsDirectory.json | 54 -- ...ateIfNotExistsDirectoryFilePermission.json | 54 -- ...CreateIfNotExistsDirectoryInvalidName.json | 47 -- ...stsCreateIfNotExistsDirectoryMetadata.json | 54 -- ...eateIfNotExistsDirectoryMetadataError.json | 47 -- ...IfNotExistsDirectoryThatAlreadyExists.json | 76 -- .../ShareAPITestsCreateIfNotExistsShare.json | 25 - ...eateIfNotExistsShareThatAlreadyExists.json | 47 -- ...estsCreateIfNotExistsShareWithArgs[0].json | 25 - ...estsCreateIfNotExistsShareWithArgs[1].json | 25 - ...estsCreateIfNotExistsShareWithArgs[2].json | 25 - ...estsCreateIfNotExistsShareWithArgs[3].json | 25 - ...estsCreateIfNotExistsShareWithArgs[4].json | 25 - ...ateIfNotExistsShareWithInvalidArgs[0].json | 26 - ...ateIfNotExistsShareWithInvalidArgs[1].json | 26 - ...ateIfNotExistsShareWithInvalidArgs[2].json | 26 - .../ShareAPITestsDeleteFile.json | 106 ++- .../ShareAPITestsDeleteFileError.json | 80 ++- ...eleteIfExistsDirThatWasAlreadyDeleted.json | 66 -- .../ShareAPITestsDeleteIfExistsDirectory.json | 73 -- ...areAPITestsDeleteIfExistsDirectoryMin.json | 73 -- ...leteIfExistsDirectoryThatDoesNotExist.json | 47 -- .../ShareAPITestsDeleteIfExistsFile.json | 73 -- .../ShareAPITestsDeleteIfExistsFileMin.json | 73 -- ...stsDeleteIfExistsFileThatDoesNotExist.json | 47 -- .../ShareAPITestsDeleteIfExistsShare.json | 44 -- ...eteIfExistsShareDeleteSnapshotOptions.json | 134 ---- ...ExistsShareDeleteSnapshotOptionsError.json | 91 --- ...ShareAPITestsDeleteIfExistsShareLease.json | 66 -- ...APITestsDeleteIfExistsShareLeaseError.json | 47 -- .../ShareAPITestsDeleteIfExistsShareMin.json | 44 -- ...sDeleteIfExistsShareThatDoesNotExists.json | 49 -- ...yncAPITestsCreateIfNotExistsDirectory.json | 54 -- ...ateIfNotExistsDirectoryFilePermission.json | 54 -- ...IfNotExistsDirectoryFilePermissionKey.json | 75 -- ...CreateIfNotExistsDirectoryInvalidName.json | 47 -- ...stsCreateIfNotExistsDirectoryMetadata.json | 54 -- ...eateIfNotExistsDirectoryMetadataError.json | 47 -- ...IfNotExistsDirectoryThatAlreadyExists.json | 76 -- ...reAsyncAPITestsCreateIfNotExistsShare.json | 25 - ...eateIfNotExistsShareThatAlreadyExists.json | 47 -- ...estsCreateIfNotExistsShareWithArgs[0].json | 25 - ...estsCreateIfNotExistsShareWithArgs[1].json | 25 - ...estsCreateIfNotExistsShareWithArgs[2].json | 25 - ...estsCreateIfNotExistsShareWithArgs[3].json | 25 - ...ateIfNotExistsShareWithInvalidArgs[0].json | 26 - ...ateIfNotExistsShareWithInvalidArgs[1].json | 26 - ...ateIfNotExistsShareWithInvalidArgs[2].json | 26 - ...eleteIfExistsDirThatWasAlreadyDeleted.json | 66 -- ...eAsyncAPITestsDeleteIfExistsDirectory.json | 73 -- ...leteIfExistsDirectoryThatDoesNotExist.json | 47 -- .../ShareAsyncAPITestsDeleteIfExistsFile.json | 73 -- ...eAsyncAPITestsDeleteIfExistsFileLease.json | 95 --- ...ncAPITestsDeleteIfExistsFileLeaseFail.json | 98 --- ...stsDeleteIfExistsFileThatDoesNotExist.json | 47 -- ...ShareAsyncAPITestsDeleteIfExistsShare.json | 25 - ...sDeleteIfExistsShareThatDoesNotExists.json | 49 -- .../swagger/README.md | 40 +- 194 files changed, 1133 insertions(+), 14531 deletions(-) delete mode 100644 sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/models/FileLastWrittenMode.java delete mode 100644 sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/options/ShareDirectoryCreateOptions.java delete mode 100644 sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/options/ShareFileCreateOptions.java delete mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsCreateChangeTime.json delete mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsCreateIfNotExistsDirectory.json delete mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsCreateIfNotExistsDirectoryError.json delete mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsCreateIfNotExistsDirectoryMin.json delete mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsCreateIfNotExistsDirectoryPermissionAndKeyError[0].json delete mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsCreateIfNotExistsDirectoryPermissionAndKeyError[1].json delete mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsCreateIfNotExistsDirectoryThatAlreadyExists.json delete mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsCreateIfNotExistsDirectoryWithFilePermission.json delete mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsCreateIfNotExistsDirectoryWithFilePermissionKey.json delete mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsCreateIfNotExistsDirectoryWithMetadata.json delete mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsCreateIfNotExistsDirectoryWithNtfsAttributes.json delete mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsCreateIfNotExistsSubDirectory.json delete mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsCreateIfNotExistsSubDirectoryFilePermission.json delete mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsCreateIfNotExistsSubDirectoryFilePermissionKey.json delete mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsCreateIfNotExistsSubDirectoryInvalidName.json delete mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsCreateIfNotExistsSubDirectoryMetadata.json delete mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsCreateIfNotExistsSubDirectoryMetadataError.json delete mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsCreateIfNotExistsSubdirectoryThatAlreadyExists.json delete mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsDeleteIfExistsDirectory.json delete mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsDeleteIfExistsDirectoryMin.json delete mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsDeleteIfExistsDirectoryThatDoesNotExist.json delete mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsDeleteIfExistsDirectoryThatWasAlreadyDeleted.json delete mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsDeleteIfExistsFile.json delete mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsDeleteIfExistsFileMin.json delete mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsDeleteIfExistsFileThatDoesNotExist.json delete mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsDeleteIfExistsSubDirectory.json delete mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsDeleteIfExistsSubDirectoryMin.json delete mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsDeleteIfExistsSubDirectoryThatDoesNotExist.json delete mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsSetHttpHeadersChangeTime.json delete mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAsyncAPITestsCreateIfNotExistsDirWithFilePermKey.json delete mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAsyncAPITestsCreateIfNotExistsDirectory.json delete mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAsyncAPITestsCreateIfNotExistsDirectoryError.json delete mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAsyncAPITestsCreateIfNotExistsDirectoryThatAlreadyExists.json delete mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAsyncAPITestsCreateIfNotExistsDirectoryWithFilePermission.json delete mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAsyncAPITestsCreateIfNotExistsDirectoryWithMetadata.json delete mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAsyncAPITestsCreateIfNotExistsSubDirectory.json delete mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAsyncAPITestsCreateIfNotExistsSubDirectoryFilePermKey.json delete mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAsyncAPITestsCreateIfNotExistsSubDirectoryFilePermission.json delete mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAsyncAPITestsCreateIfNotExistsSubDirectoryInvalidName.json delete mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAsyncAPITestsCreateIfNotExistsSubDirectoryMetadata.json delete mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAsyncAPITestsCreateIfNotExistsSubDirectoryMetadataError.json delete mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAsyncAPITestsCreateIfNotExistsSubdirectoryThatAlreadyExists.json delete mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAsyncAPITestsDeleteIfExistsDirectory.json delete mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAsyncAPITestsDeleteIfExistsDirectoryMin.json delete mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAsyncAPITestsDeleteIfExistsDirectoryThatDoesNotExist.json delete mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAsyncAPITestsDeleteIfExistsDirectoryThatWasAlreadyDeleted.json delete mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAsyncAPITestsDeleteIfExistsFile.json delete mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAsyncAPITestsDeleteIfExistsFileLease.json delete mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAsyncAPITestsDeleteIfExistsFileLeaseFail.json delete mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAsyncAPITestsDeleteIfExistsFileMin.json delete mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAsyncAPITestsDeleteIfExistsFileThatDoesNotExist.json delete mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAsyncAPITestsDeleteIfExistsSubDirectory.json delete mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAsyncAPITestsDeleteIfExistsSubDirectoryMin.json delete mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAsyncAPITestsDeleteIfExistsSubdirectoryThatDoesNotExist.json delete mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/FileAPITestsCreateChangeTime.json delete mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/FileAPITestsDeleteIfExistsFile.json delete mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/FileAPITestsDeleteIfExistsFileMin.json delete mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/FileAPITestsDeleteIfExistsFileThatDoesNotExist.json delete mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/FileAPITestsDeleteIfExistsFileThatWasAlreadyDeleted.json delete mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/FileAPITestsRenameContentType.json delete mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/FileAPITestsRenameHeadersIllegal.json delete mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/FileAPITestsSetHttpHeadersChangeTime.json delete mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/FileAPITestsUploadRangeFromUrlPreserveFileLastWrittenOn[0].json delete mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/FileAPITestsUploadRangeFromUrlPreserveFileLastWrittenOn[1].json delete mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/FileAPITestsUploadRangePreserveFileLastWrittenOn[0].json delete mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/FileAPITestsUploadRangePreserveFileLastWrittenOn[1].json delete mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/FileAsyncAPITestsDeleteFileThatDoesNotExist.json delete mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/FileAsyncAPITestsDeleteIfExistsFile.json delete mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/FileAsyncAPITestsDeleteIfExistsFileLease.json delete mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/FileAsyncAPITestsDeleteIfExistsFileLeaseFail.json delete mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/FileAsyncAPITestsDeleteIfExistsFileThatWasAlreadyDeleted.json delete mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/PageBlobAPITestCreateIfNotExistsTags[0].json delete mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/PageBlobAPITestCreateIfNotExistsTags[1].json delete mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/PageBlobAPITestCreateIfNotExistsTags[2].json delete mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAPITestsCreateIfNotExistDirectoryFilePermissionKey.json delete mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAPITestsCreateIfNotExistsDirectory.json delete mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAPITestsCreateIfNotExistsDirectoryFilePermission.json delete mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAPITestsCreateIfNotExistsDirectoryInvalidName.json delete mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAPITestsCreateIfNotExistsDirectoryMetadata.json delete mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAPITestsCreateIfNotExistsDirectoryMetadataError.json delete mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAPITestsCreateIfNotExistsDirectoryThatAlreadyExists.json delete mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAPITestsCreateIfNotExistsShare.json delete mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAPITestsCreateIfNotExistsShareThatAlreadyExists.json delete mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAPITestsCreateIfNotExistsShareWithArgs[0].json delete mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAPITestsCreateIfNotExistsShareWithArgs[1].json delete mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAPITestsCreateIfNotExistsShareWithArgs[2].json delete mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAPITestsCreateIfNotExistsShareWithArgs[3].json delete mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAPITestsCreateIfNotExistsShareWithArgs[4].json delete mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAPITestsCreateIfNotExistsShareWithInvalidArgs[0].json delete mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAPITestsCreateIfNotExistsShareWithInvalidArgs[1].json delete mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAPITestsCreateIfNotExistsShareWithInvalidArgs[2].json delete mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAPITestsDeleteIfExistsDirThatWasAlreadyDeleted.json delete mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAPITestsDeleteIfExistsDirectory.json delete mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAPITestsDeleteIfExistsDirectoryMin.json delete mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAPITestsDeleteIfExistsDirectoryThatDoesNotExist.json delete mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAPITestsDeleteIfExistsFile.json delete mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAPITestsDeleteIfExistsFileMin.json delete mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAPITestsDeleteIfExistsFileThatDoesNotExist.json delete mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAPITestsDeleteIfExistsShare.json delete mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAPITestsDeleteIfExistsShareDeleteSnapshotOptions.json delete mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAPITestsDeleteIfExistsShareDeleteSnapshotOptionsError.json delete mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAPITestsDeleteIfExistsShareLease.json delete mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAPITestsDeleteIfExistsShareLeaseError.json delete mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAPITestsDeleteIfExistsShareMin.json delete mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAPITestsDeleteIfExistsShareThatDoesNotExists.json delete mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAsyncAPITestsCreateIfNotExistsDirectory.json delete mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAsyncAPITestsCreateIfNotExistsDirectoryFilePermission.json delete mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAsyncAPITestsCreateIfNotExistsDirectoryFilePermissionKey.json delete mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAsyncAPITestsCreateIfNotExistsDirectoryInvalidName.json delete mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAsyncAPITestsCreateIfNotExistsDirectoryMetadata.json delete mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAsyncAPITestsCreateIfNotExistsDirectoryMetadataError.json delete mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAsyncAPITestsCreateIfNotExistsDirectoryThatAlreadyExists.json delete mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAsyncAPITestsCreateIfNotExistsShare.json delete mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAsyncAPITestsCreateIfNotExistsShareThatAlreadyExists.json delete mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAsyncAPITestsCreateIfNotExistsShareWithArgs[0].json delete mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAsyncAPITestsCreateIfNotExistsShareWithArgs[1].json delete mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAsyncAPITestsCreateIfNotExistsShareWithArgs[2].json delete mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAsyncAPITestsCreateIfNotExistsShareWithArgs[3].json delete mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAsyncAPITestsCreateIfNotExistsShareWithInvalidArgs[0].json delete mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAsyncAPITestsCreateIfNotExistsShareWithInvalidArgs[1].json delete mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAsyncAPITestsCreateIfNotExistsShareWithInvalidArgs[2].json delete mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAsyncAPITestsDeleteIfExistsDirThatWasAlreadyDeleted.json delete mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAsyncAPITestsDeleteIfExistsDirectory.json delete mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAsyncAPITestsDeleteIfExistsDirectoryThatDoesNotExist.json delete mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAsyncAPITestsDeleteIfExistsFile.json delete mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAsyncAPITestsDeleteIfExistsFileLease.json delete mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAsyncAPITestsDeleteIfExistsFileLeaseFail.json delete mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAsyncAPITestsDeleteIfExistsFileThatDoesNotExist.json delete mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAsyncAPITestsDeleteIfExistsShare.json delete mode 100644 sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAsyncAPITestsDeleteIfExistsShareThatDoesNotExists.json diff --git a/sdk/storage/azure-storage-file-share/CHANGELOG.md b/sdk/storage/azure-storage-file-share/CHANGELOG.md index 9bd2efadf6ec0..aa32b834fe3aa 100644 --- a/sdk/storage/azure-storage-file-share/CHANGELOG.md +++ b/sdk/storage/azure-storage-file-share/CHANGELOG.md @@ -1,27 +1,11 @@ # Release History -## 12.13.0-beta.2 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed - -### Other Changes - -## 12.13.0-beta.1 (2022-05-06) - -### Features Added -- Added support for the 2021-06-08 service version. -- Added support for setting the change time on directory/file create, set properties, and rename -- Added support for setting content type on file rename. -- Added support for FileLastWrittenMode. - ## 12.12.1 (2022-04-07) ### Other Changes + #### Dependency Updates + - Upgraded `azure-core` from `1.26.0` to version `1.27.0`. - Upgraded `azure-core-http-netty` from `1.11.8` to version `1.11.9`. - Upgraded `azure-storage-common` from `12.15.0` to version `12.15.1`. diff --git a/sdk/storage/azure-storage-file-share/README.md b/sdk/storage/azure-storage-file-share/README.md index 3340909ad4c59..06bc518b009dc 100644 --- a/sdk/storage/azure-storage-file-share/README.md +++ b/sdk/storage/azure-storage-file-share/README.md @@ -59,7 +59,7 @@ add the direct dependency to your project as follows. com.azure azure-storage-file-share - 12.12.1 + 12.12.0 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/storage/azure-storage-file-share/pom.xml b/sdk/storage/azure-storage-file-share/pom.xml index 462169ce4f59c..ac2a7040aff77 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.13.0-beta.2 + 12.12.1 Microsoft Azure client library for File Share Storage This module contains client library for Microsoft Azure File Share Storage. @@ -57,23 +57,23 @@ com.azure azure-core - 1.28.0 + 1.27.0 com.azure azure-core-http-netty - 1.12.0 + 1.11.9 com.azure azure-storage-common - 12.15.2 + 12.15.1 com.azure azure-storage-common - 12.15.2 + 12.15.1 tests test-jar test @@ -92,49 +92,49 @@ com.azure azure-core-test - 1.8.0 + 1.7.10 test io.projectreactor reactor-test - 3.4.17 + 3.4.14 test com.azure azure-identity - 1.5.1 + 1.5.0 test com.azure azure-storage-blob - 12.16.1 + 12.16.0 test org.apache.logging.log4j log4j-slf4j-impl - 2.17.2 + 2.17.1 test org.apache.logging.log4j log4j-api - 2.17.2 + 2.17.1 test org.apache.logging.log4j log4j-core - 2.17.2 + 2.17.1 test com.azure azure-core-http-okhttp - 1.9.0 + 1.8.0 test diff --git a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/FileSmbProperties.java b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/FileSmbProperties.java index f3e077bb400e7..a5d9b183e9045 100644 --- a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/FileSmbProperties.java +++ b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/FileSmbProperties.java @@ -19,7 +19,7 @@ public class FileSmbProperties { private EnumSet ntfsFileAttributes; private OffsetDateTime fileCreationTime; private OffsetDateTime fileLastWriteTime; - private OffsetDateTime fileChangeTime; + private final OffsetDateTime fileChangeTime; private final String fileId; private final String parentId; @@ -28,6 +28,7 @@ public class FileSmbProperties { */ public FileSmbProperties() { // Non user-settable properties + fileChangeTime = null; fileId = null; parentId = null; } @@ -125,17 +126,6 @@ public FileSmbProperties setFileLastWriteTime(OffsetDateTime fileLastWriteTime) return this; } - /** - * Sets the file change time. - * - * @param fileChangeTime The file change time. - * @return the updated FileSmbProperties object. - */ - public FileSmbProperties setFileChangeTime(OffsetDateTime fileChangeTime) { - this.fileChangeTime = fileChangeTime; - return this; - } - // HELPER METHODS /** @@ -187,17 +177,6 @@ String setFileLastWriteTime(String defaultValue) { : parseFileSMBDate(fileLastWriteTime); } - /** - * Gets the string representation of the file change time or null if no value is set - * - * @return The value of the file change time header - */ - String getFileChangeTimeString() { - return fileChangeTime == null - ? null - : parseFileSMBDate(fileChangeTime); - } - /** * Given an OffsetDateTime, generates a {@code String} representing a date in the format needed for * file SMB properties diff --git a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/ShareAsyncClient.java b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/ShareAsyncClient.java index 35a662a23b35b..f80dea9aca51a 100644 --- a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/ShareAsyncClient.java +++ b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/ShareAsyncClient.java @@ -40,7 +40,6 @@ import com.azure.storage.file.share.models.ShareStorageException; import com.azure.storage.file.share.options.ShareCreateOptions; import com.azure.storage.file.share.options.ShareDeleteOptions; -import com.azure.storage.file.share.options.ShareDirectoryCreateOptions; import com.azure.storage.file.share.options.ShareGetAccessPolicyOptions; import com.azure.storage.file.share.options.ShareGetPropertiesOptions; import com.azure.storage.file.share.options.ShareGetStatisticsOptions; @@ -88,7 +87,7 @@ */ @ServiceClient(builder = ShareClientBuilder.class, isAsync = true) public class ShareAsyncClient { - private static final ClientLogger LOGGER = new ClientLogger(ShareAsyncClient.class); + private final ClientLogger logger = new ClientLogger(ShareAsyncClient.class); private final AzureFileStorageImpl azureFileStorageClient; private final String shareName; @@ -233,9 +232,9 @@ public Mono exists() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> existsWithResponse() { try { - return withContext(this::existsWithResponse); + return withContext(context -> existsWithResponse(context)); } catch (RuntimeException ex) { - return monoError(LOGGER, ex); + return monoError(logger, ex); } } @@ -278,7 +277,11 @@ Mono> existsWithResponse(Context context) { */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono create() { - return createWithResponse(null).flatMap(FluxUtil::toMono); + try { + return createWithResponse(null).flatMap(FluxUtil::toMono); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } } /** @@ -322,7 +325,12 @@ public Mono create() { */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> createWithResponse(Map metadata, Integer quotaInGB) { - return createWithResponse(new ShareCreateOptions().setMetadata(metadata).setQuotaInGb(quotaInGB)); + try { + return withContext(context -> createWithResponse(new ShareCreateOptions().setMetadata(metadata) + .setQuotaInGb(quotaInGB), context)); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } } /** @@ -358,7 +366,7 @@ public Mono> createWithResponse(ShareCreateOptions options) try { return withContext(context -> createWithResponse(options, context)); } catch (RuntimeException ex) { - return monoError(LOGGER, ex); + return monoError(logger, ex); } } @@ -374,83 +382,6 @@ Mono> createWithResponse(ShareCreateOptions options, Context .map(this::mapToShareInfoResponse); } - /** - * Creates the share in the storage account if it does not exist. - * - *

Code Samples

- * - *

Create the share

- * - * - *
-     * shareAsyncClient.createIfNotExists().subscribe(response ->
-     *     System.out.printf("Created at %s%n", response.getLastModified()));
-     * 
- * - * - *

For more information, see the - * Azure Docs.

- * - * @return A reactive response {@link Mono} signaling completion. {@link ShareInfo} contains information about the - * created share. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createIfNotExists() { - return createIfNotExistsWithResponse(null).flatMap(FluxUtil::toMono); - } - - /** - * Creates the share in the storage account with the specified options if it does not exist. - * - *

Code Samples

- * - *

Create the share with optional parameters

- * - * - *
-     * shareAsyncClient.createIfNotExistsWithResponse(new ShareCreateOptions()
-     *     .setMetadata(Collections.singletonMap("share", "metadata")).setQuotaInGb(1)
-     *     .setAccessTier(ShareAccessTier.HOT)).subscribe(response -> {
-     *     if (response.getStatusCode() == 409) {
-     *         System.out.println("Already exists.");
-     *     } else {
-     *         System.out.println("successfully created.");
-     *     }
-     * });
-     * 
- * - * - *

For more information, see the - * Azure Docs.

- * - * @param options {@link ShareCreateOptions} - * @return A {@link Mono} containing {@link Response} signaling completion, whose {@link Response#getValue() value} - * contains a {@link ShareInfo} containing information about the share. If {@link Response}'s status code is - * 201, a new share was successfully created. If status code is 409, a share already existed at this location. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> createIfNotExistsWithResponse(ShareCreateOptions options) { - try { - return createIfNotExistsWithResponse(options, null); - } catch (RuntimeException ex) { - return monoError(LOGGER, ex); - } - } - - Mono> createIfNotExistsWithResponse(ShareCreateOptions options, Context context) { - try { - options = options == null ? new ShareCreateOptions() : options; - return createWithResponse(options, context).onErrorResume(t -> t instanceof ShareStorageException - && ((ShareStorageException) t).getStatusCode() == 409, t -> { - HttpResponse response = ((ShareStorageException) t).getResponse(); - return Mono.just(new SimpleResponse<>(response.getRequest(), response.getStatusCode(), - response.getHeaders(), null)); - }); - } catch (RuntimeException ex) { - return monoError(LOGGER, ex); - } - } - /** * Creates a snapshot of the share with the same metadata associated to the share at the time of creation. * @@ -478,7 +409,11 @@ Mono> createIfNotExistsWithResponse(ShareCreateOptions optio */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono createSnapshot() { - return createSnapshotWithResponse(null).flatMap(FluxUtil::toMono); + try { + return createSnapshotWithResponse(null).flatMap(FluxUtil::toMono); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } } /** @@ -513,7 +448,7 @@ public Mono> createSnapshotWithResponse(Map createSnapshotWithResponse(metadata, context)); } catch (RuntimeException ex) { - return monoError(LOGGER, ex); + return monoError(logger, ex); } } @@ -549,7 +484,11 @@ Mono> createSnapshotWithResponse(Map */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono delete() { - return deleteWithResponse().flatMap(FluxUtil::toMono); + try { + return deleteWithResponse().flatMap(FluxUtil::toMono); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } } /** @@ -578,7 +517,11 @@ public Mono delete() { */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> deleteWithResponse() { - return deleteWithResponse(new ShareDeleteOptions()); + try { + return deleteWithResponse(new ShareDeleteOptions()); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } } /** @@ -611,7 +554,7 @@ public Mono> deleteWithResponse(ShareDeleteOptions options) { try { return withContext(context -> deleteWithResponse(options, context)); } catch (RuntimeException ex) { - return monoError(LOGGER, ex); + return monoError(logger, ex); } } @@ -628,116 +571,6 @@ Mono> deleteWithResponse(ShareDeleteOptions options, Context cont .map(response -> new SimpleResponse<>(response, null)); } - /** - * Deletes the share in the storage account if it exists. - * - *

Code Samples

- * - *

Delete the share

- * - * - *
-     * shareAsyncClient.deleteIfExists().subscribe(deleted -> {
-     *     if (deleted) {
-     *         System.out.println("Successfully deleted.");
-     *     } else {
-     *         System.out.println("Does not exist.");
-     *     }
-     * });
-     * 
- * - * - *

For more information, see the - * Azure Docs.

- * - * @return a reactive response signaling completion. {@code true} indicates that the share was successfully - * deleted, {@code false} indicates that the share did not exist. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono deleteIfExists() { - return deleteIfExistsWithResponse().map(response -> response.getStatusCode() != 404); - } - - /** - * Deletes the share in the storage account if it exists - * - *

Code Samples

- * - *

Delete the share

- * - * - *
-     * shareAsyncClient.deleteIfExistsWithResponse().subscribe(response -> {
-     *             if (response.getStatusCode() == 404) {
-     *                 System.out.println("Does not exist.");
-     *             } else {
-     *                 System.out.println("successfully deleted.");
-     *             }
-     *         });
-     * 
- * - * - *

For more information, see the - * Azure Docs.

- * - * @return A reactive response signaling completion. If {@link Response}'s status code is 202, the share was - * successfully deleted. If status code is 404, the share does not exist. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> deleteIfExistsWithResponse() { - try { - return deleteIfExistsWithResponse(new ShareDeleteOptions()); - } catch (RuntimeException ex) { - return monoError(LOGGER, ex); - } - } - - /** - * Deletes the share in the storage account if it exists - * - *

Code Samples

- * - *

Delete the share

- * - * - *
-     * shareAsyncClient.deleteIfExistsWithResponse(new ShareDeleteOptions()
-     *     .setRequestConditions(new ShareRequestConditions().setLeaseId(leaseId))).subscribe(response -> {
-     *             if (response.getStatusCode() == 404) {
-     *                 System.out.println("Does not exist.");
-     *             } else {
-     *                 System.out.println("successfully deleted.");
-     *             }
-     *         });
-     * 
- * - * - *

For more information, see the - * Azure Docs.

- * - * @param options {@link ShareDeleteOptions} - * @return A reactive response signaling completion. If {@link Response}'s status code is 202, the share was - * successfully deleted. If status code is 404, the share does not exist. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> deleteIfExistsWithResponse(ShareDeleteOptions options) { - try { - return withContext(context -> deleteIfExistsWithResponse(options, context)); - } catch (RuntimeException ex) { - return monoError(LOGGER, ex); - } - } - - Mono> deleteIfExistsWithResponse(ShareDeleteOptions options, Context context) { - return deleteWithResponse(options, context).onErrorResume(t -> t instanceof ShareStorageException - && ((ShareStorageException) t).getStatusCode() == 404, - t -> { - HttpResponse response = ((ShareStorageException) t).getResponse(); - return Mono.just(new SimpleResponse<>(response.getRequest(), response.getStatusCode(), - response.getHeaders(), null)); - }); - } - /** * Retrieves the properties of the share, these include the metadata associated to it and the quota that the share * is restricted to. @@ -763,7 +596,11 @@ Mono> deleteIfExistsWithResponse(ShareDeleteOptions options, Cont */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono getProperties() { - return getPropertiesWithResponse().flatMap(FluxUtil::toMono); + try { + return getPropertiesWithResponse().flatMap(FluxUtil::toMono); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } } /** @@ -793,7 +630,11 @@ public Mono getProperties() { */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getPropertiesWithResponse() { - return getPropertiesWithResponse(new ShareGetPropertiesOptions()); + try { + return getPropertiesWithResponse(new ShareGetPropertiesOptions()); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } } /** @@ -828,7 +669,7 @@ public Mono> getPropertiesWithResponse(ShareGetPropert try { return withContext(context -> getPropertiesWithResponse(options, context)); } catch (RuntimeException ex) { - return monoError(LOGGER, ex); + return monoError(logger, ex); } } @@ -869,7 +710,11 @@ Mono> getPropertiesWithResponse(ShareGetPropertiesOpti @Deprecated @ServiceMethod(returns = ReturnType.SINGLE) public Mono setQuota(int quotaInGB) { - return setQuotaWithResponse(quotaInGB).flatMap(FluxUtil::toMono); + try { + return setQuotaWithResponse(quotaInGB).flatMap(FluxUtil::toMono); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } } /** @@ -900,7 +745,11 @@ public Mono setQuota(int quotaInGB) { @Deprecated @ServiceMethod(returns = ReturnType.SINGLE) public Mono> setQuotaWithResponse(int quotaInGB) { - return setPropertiesWithResponse(new ShareSetPropertiesOptions().setQuotaInGb(quotaInGB)); + try { + return setPropertiesWithResponse(new ShareSetPropertiesOptions().setQuotaInGb(quotaInGB)); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } } /** @@ -924,7 +773,11 @@ public Mono> setQuotaWithResponse(int quotaInGB) { */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono setProperties(ShareSetPropertiesOptions options) { - return setPropertiesWithResponse(options).map(Response::getValue); + try { + return setPropertiesWithResponse(options).map(Response::getValue); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } } /** @@ -954,7 +807,7 @@ public Mono> setPropertiesWithResponse(ShareSetPropertiesOpt try { return withContext(context -> setPropertiesWithResponse(options, context)); } catch (RuntimeException ex) { - return monoError(LOGGER, ex); + return monoError(logger, ex); } } @@ -1005,7 +858,11 @@ Mono> setPropertiesWithResponse(ShareSetPropertiesOptions op */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono setMetadata(Map metadata) { - return setMetadataWithResponse(metadata).flatMap(FluxUtil::toMono); + try { + return setMetadataWithResponse(metadata).flatMap(FluxUtil::toMono); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } } /** @@ -1045,7 +902,11 @@ public Mono setMetadata(Map metadata) { */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> setMetadataWithResponse(Map metadata) { - return setMetadataWithResponse(new ShareSetMetadataOptions().setMetadata(metadata)); + try { + return setMetadataWithResponse(new ShareSetMetadataOptions().setMetadata(metadata)); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } } /** @@ -1079,7 +940,7 @@ public Mono> setMetadataWithResponse(ShareSetMetadataOptions try { return withContext(context -> setMetadataWithResponse(options, context)); } catch (RuntimeException ex) { - return monoError(LOGGER, ex); + return monoError(logger, ex); } } @@ -1118,7 +979,11 @@ Mono> setMetadataWithResponse(ShareSetMetadataOptions option */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux getAccessPolicy() { - return getAccessPolicy(new ShareGetAccessPolicyOptions()); + try { + return getAccessPolicy(new ShareGetAccessPolicyOptions()); + } catch (RuntimeException ex) { + return pagedFluxError(logger, ex); + } } /** @@ -1164,7 +1029,7 @@ public PagedFlux getAccessPolicy(ShareGetAccessPolicyOpti return new PagedFlux<>(() -> retriever.apply(null), retriever); } catch (RuntimeException ex) { - return pagedFluxError(LOGGER, ex); + return pagedFluxError(logger, ex); } } @@ -1197,7 +1062,11 @@ public PagedFlux getAccessPolicy(ShareGetAccessPolicyOpti */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono setAccessPolicy(List permissions) { - return setAccessPolicyWithResponse(permissions).flatMap(FluxUtil::toMono); + try { + return setAccessPolicyWithResponse(permissions).flatMap(FluxUtil::toMono); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } } /** @@ -1231,7 +1100,12 @@ public Mono setAccessPolicy(List permissions) */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> setAccessPolicyWithResponse(List permissions) { - return setAccessPolicyWithResponse(new ShareSetAccessPolicyOptions().setPermissions(permissions)); + try { + return withContext(context -> setAccessPolicyWithResponse(new ShareSetAccessPolicyOptions() + .setPermissions(permissions), context)); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } } /** @@ -1270,7 +1144,7 @@ public Mono> setAccessPolicyWithResponse(ShareSetAccessPolic try { return withContext(context -> setAccessPolicyWithResponse(options, context)); } catch (RuntimeException ex) { - return monoError(LOGGER, ex); + return monoError(logger, ex); } } @@ -1326,7 +1200,11 @@ OffsetDateTime.now will only give back milliseconds (more precise fields are zer */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono getStatistics() { - return getStatisticsWithResponse().flatMap(FluxUtil::toMono); + try { + return getStatisticsWithResponse().flatMap(FluxUtil::toMono); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } } /** @@ -1351,7 +1229,11 @@ public Mono getStatistics() { */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getStatisticsWithResponse() { - return getStatisticsWithResponse(new ShareGetStatisticsOptions()); + try { + return getStatisticsWithResponse(new ShareGetStatisticsOptions()); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } } /** @@ -1382,7 +1264,7 @@ public Mono> getStatisticsWithResponse(ShareGetStatist try { return withContext(context -> getStatisticsWithResponse(options, context)); } catch (RuntimeException ex) { - return monoError(LOGGER, ex); + return monoError(logger, ex); } } @@ -1424,7 +1306,11 @@ Mono> getStatisticsWithResponse(ShareGetStatisticsOpti */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono createDirectory(String directoryName) { - return createDirectoryWithResponse(directoryName, null, null, null).flatMap(FluxUtil::toMono); + try { + return createDirectoryWithResponse(directoryName, null, null, null).flatMap(FluxUtil::toMono); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } } /** @@ -1465,7 +1351,7 @@ public Mono> createDirectoryWithResponse(Str return withContext(context -> createDirectoryWithResponse(directoryName, smbProperties, filePermission, metadata, context)); } catch (RuntimeException ex) { - return monoError(LOGGER, ex); + return monoError(logger, ex); } } @@ -1476,98 +1362,6 @@ Mono> createDirectoryWithResponse(String dir .map(response -> new SimpleResponse<>(response, shareDirectoryAsyncClient)); } - /** - * Creates the directory in the share with the given name if it does not exist. - * - *

Code Samples

- * - *

Create the directory "mydirectory"

- * - * - *
-     * shareAsyncClient.createDirectoryIfNotExists("mydirectory")
-     *     .switchIfEmpty(Mono.<ShareDirectoryAsyncClient>empty()
-     *         .doOnSuccess(x -> System.out.println("Already exists.")))
-     *     .subscribe(response -> System.out.println("Create completed."));
-     * 
- * - * - *

For more information, see the - * Azure Docs.

- * - * @param directoryName Name of the directory - * @return A {@link Mono} containing a {@link ShareDirectoryAsyncClient} used to interact with the directory - * created. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createDirectoryIfNotExists(String directoryName) { - return createDirectoryIfNotExistsWithResponse(directoryName, new ShareDirectoryCreateOptions()) - .flatMap(FluxUtil::toMono); - } - - /** - * Creates the directory in the share with the given name and associates the passed metadata to it if it - * does not exist. - * - *

Code Samples

- * - *

Create the directory "documents" with metadata "directory:metadata"

- * - * - *
-     * FileSmbProperties smbProperties = new FileSmbProperties();
-     * String filePermission = "filePermission";
-     * Map<String, String> metadata = Collections.singletonMap("directory", "metadata");
-     * ShareDirectoryCreateOptions options = new ShareDirectoryCreateOptions().setSmbProperties(smbProperties)
-     *     .setFilePermission(filePermission).setMetadata(metadata);
-     *
-     * shareAsyncClient.createDirectoryIfNotExistsWithResponse("documents", options).subscribe(response -> {
-     *     if (response.getStatusCode() == 409) {
-     *         System.out.println("Already exists.");
-     *     } else {
-     *         System.out.println("successfully created.");
-     *     }
-     * });
-     * 
- * - * - *

For more information, see the - * Azure Docs.

- * - * @param directoryName Name of the directory - * @param options {@link ShareDirectoryCreateOptions} - * @return A {@link Mono} containing a {@link Response} whose {@link Response#getValue() value} contains a - * {@link ShareDirectoryAsyncClient} used to interact with the directory created. If {@link Response}'s status - * code is 201, a new directory was successfully created. If status code is 409, a directory with the same name - * already existed at this location. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> createDirectoryIfNotExistsWithResponse(String directoryName, - ShareDirectoryCreateOptions options) { - try { - return withContext(context -> - createDirectoryIfNotExistsWithResponse(directoryName, options, context)); - } catch (RuntimeException ex) { - return monoError(LOGGER, ex); - } - } - - Mono> createDirectoryIfNotExistsWithResponse(String directoryName, - ShareDirectoryCreateOptions options, Context context) { - try { - options = options == null ? new ShareDirectoryCreateOptions() : options; - return createDirectoryWithResponse(directoryName, options.getSmbProperties(), options.getFilePermission(), - options.getMetadata(), context).onErrorResume(t -> t instanceof ShareStorageException - && ((ShareStorageException) t).getStatusCode() == 409, t -> { - HttpResponse response = ((ShareStorageException) t).getResponse(); - return Mono.just(new SimpleResponse<>(response.getRequest(), response.getStatusCode(), - response.getHeaders(), getDirectoryClient(directoryName))); - }); - } catch (RuntimeException ex) { - return monoError(LOGGER, ex); - } - } - /** * Creates the file in the share with the given name and file max size. * @@ -1604,7 +1398,11 @@ Mono> createDirectoryIfNotExistsWithResponse */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono createFile(String fileName, long maxSize) { - return createFileWithResponse(fileName, maxSize, null, null, null, null).flatMap(FluxUtil::toMono); + try { + return createFileWithResponse(fileName, maxSize, null, null, null, null).flatMap(FluxUtil::toMono); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } } /** @@ -1728,7 +1526,7 @@ public Mono> createFileWithResponse(String fileNa createFileWithResponse(fileName, maxSize, httpHeaders, smbProperties, filePermission, metadata, requestConditions, context)); } catch (RuntimeException ex) { - return monoError(LOGGER, ex); + return monoError(logger, ex); } } @@ -1768,7 +1566,11 @@ Mono> createFileWithResponse(String fileName, lon */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono deleteDirectory(String directoryName) { - return deleteDirectoryWithResponse(directoryName).flatMap(FluxUtil::toMono); + try { + return deleteDirectoryWithResponse(directoryName).flatMap(FluxUtil::toMono); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } } /** @@ -1801,7 +1603,7 @@ public Mono> deleteDirectoryWithResponse(String directoryName) { try { return withContext(context -> deleteDirectoryWithResponse(directoryName, context)); } catch (RuntimeException ex) { - return monoError(LOGGER, ex); + return monoError(logger, ex); } } @@ -1809,86 +1611,6 @@ Mono> deleteDirectoryWithResponse(String directoryName, Context c return getDirectoryClient(directoryName).deleteWithResponse(context); } - /** - * Deletes the specified directory in the share if exists. - * - *

Code Samples

- * - *

Delete the directory "mydirectory"

- * - * - *
-     * shareAsyncClient.deleteDirectoryIfExists("mydirectory").subscribe(deleted -> {
-     *     if (deleted) {
-     *         System.out.println("Successfully deleted.");
-     *     } else {
-     *         System.out.println("Does not exist.");
-     *     }
-     * });
-     * 
- * - * - *

For more information, see the - * Azure Docs.

- * - * @param directoryName Name of the directory - * @return a reactive response signaling completion. {@code true} indicates that the directory was successfully - * deleted, {@code false} indicates that the directory did not exist. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono deleteDirectoryIfExists(String directoryName) { - return deleteDirectoryIfExistsWithResponse(directoryName).map(response -> response.getStatusCode() != 404); - } - - /** - * Deletes the specified directory in the share if it exists. - * - *

Code Samples

- * - *

Delete the directory "mydirectory"

- * - * - *
-     * shareAsyncClient.deleteDirectoryIfExistsWithResponse("mydirectory").subscribe(response -> {
-     *             if (response.getStatusCode() == 404) {
-     *                 System.out.println("Does not exist.");
-     *             } else {
-     *                 System.out.println("successfully deleted.");
-     *             }
-     *         });
-     * 
- * - * - *

For more information, see the - * Azure Docs.

- * - * @param directoryName Name of the directory - * @return A reactive response signaling completion. If {@link Response}'s status code is 202, the directory was - * successfully deleted. If status code is 404, the directory does not exist. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> deleteDirectoryIfExistsWithResponse(String directoryName) { - try { - return withContext(context -> deleteDirectoryIfExistsWithResponse(directoryName, context)); - } catch (RuntimeException ex) { - return monoError(LOGGER, ex); - } - } - - Mono> deleteDirectoryIfExistsWithResponse(String directoryName, Context context) { - try { - return deleteDirectoryWithResponse(directoryName, context).onErrorResume(t -> t - instanceof ShareStorageException && ((ShareStorageException) t).getStatusCode() == 404, - t -> { - HttpResponse response = ((ShareStorageException) t).getResponse(); - return Mono.just(new SimpleResponse<>(response.getRequest(), response.getStatusCode(), - response.getHeaders(), null)); - }); - } catch (RuntimeException ex) { - return monoError(LOGGER, ex); - } - } - /** * Deletes the specified file in the share. * @@ -1916,7 +1638,11 @@ Mono> deleteDirectoryIfExistsWithResponse(String directoryName, C */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono deleteFile(String fileName) { - return deleteFileWithResponse(fileName).flatMap(FluxUtil::toMono); + try { + return deleteFileWithResponse(fileName).flatMap(FluxUtil::toMono); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } } /** @@ -1979,9 +1705,10 @@ public Mono> deleteFileWithResponse(String fileName) { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> deleteFileWithResponse(String fileName, ShareRequestConditions requestConditions) { try { - return withContext(context -> deleteFileWithResponse(fileName, requestConditions, context)); + return withContext(context -> deleteFileWithResponse(fileName, requestConditions, + context)); } catch (RuntimeException ex) { - return monoError(LOGGER, ex); + return monoError(logger, ex); } } @@ -1990,126 +1717,6 @@ Mono> deleteFileWithResponse(String fileName, ShareRequestConditi return getFileClient(fileName).deleteWithResponse(requestConditions, context); } - /** - * Deletes the specified file in the share if it exists. - * - *

Code Samples

- * - *

Delete the file "myfile"

- * - * - *
-     * shareAsyncClient.deleteFileIfExists("myfile").subscribe(deleted -> {
-     *     if (deleted) {
-     *         System.out.println("Successfully deleted.");
-     *     } else {
-     *         System.out.println("Does not exist.");
-     *     }
-     * });
-     * 
- * - * - *

For more information, see the - * Azure Docs.

- * - * @param fileName Name of the file. - * @return a reactive response signaling completion. {@code true} indicates that the file was successfully - * deleted, {@code false} indicates that the file did not exist. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono deleteFileIfExists(String fileName) { - return deleteFileIfExistsWithResponse(fileName, null).map(response -> response.getStatusCode() != 404); - } - - /** - * Deletes the specified file in the share if it exists. - * - *

Code Samples

- * - *

Delete the file "myfile"

- * - * - *
-     * shareAsyncClient.deleteFileIfExistsWithResponse("myfile").subscribe(response -> {
-     *             if (response.getStatusCode() == 404) {
-     *                 System.out.println("Does not exist.");
-     *             } else {
-     *                 System.out.println("successfully deleted.");
-     *             }
-     *         });
-     * 
-     *
-     * 

For more information, see the - * Azure Docs.

- * - * @param fileName Name of the file. - * @return A reactive response signaling completion. If {@link Response}'s status code is 202, the file was - * successfully deleted. If status code is 404, the file does not exist. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> deleteFileIfExistsWithResponse(String fileName) { - try { - return deleteFileIfExistsWithResponse(fileName, null); - } catch (RuntimeException ex) { - return monoError(LOGGER, ex); - } - } - - /** - * Deletes the specified file in the share if it exists. - * - *

Code Samples

- * - *

Delete the file "myfile"

- * - * - *
-     * ShareRequestConditions requestConditions = new ShareRequestConditions().setLeaseId(leaseId);
-     * ShareDeleteOptions options = new ShareDeleteOptions().setRequestConditions(requestConditions);
-     *
-     * shareAsyncClient.deleteFileIfExistsWithResponse("myfile", options).subscribe(response -> {
-     *             if (response.getStatusCode() == 404) {
-     *                 System.out.println("Does not exist.");
-     *             } else {
-     *                 System.out.println("successfully deleted.");
-     *             }
-     *         });
-     * 
- * - * - *

For more information, see the - * Azure Docs.

- * - * @param fileName Name of the file. - * @param options {@link ShareDeleteOptions} - * @return A reactive response signaling completion. If {@link Response}'s status code is 202, the file was - * successfully deleted. If status code is 404, the file does not exist. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> deleteFileIfExistsWithResponse(String fileName, ShareDeleteOptions options) { - try { - return withContext(context -> deleteFileIfExistsWithResponse(fileName, options, context)); - } catch (RuntimeException ex) { - return monoError(LOGGER, ex); - } - } - - Mono> deleteFileIfExistsWithResponse(String fileName, ShareDeleteOptions options, Context context) { - try { - options = options == null ? new ShareDeleteOptions() : options; - return deleteFileWithResponse(fileName, options.getRequestConditions(), context) - .onErrorResume(t -> t instanceof ShareStorageException && ((ShareStorageException) t) - .getStatusCode() == 404, - t -> { - HttpResponse response = ((ShareStorageException) t).getResponse(); - return Mono.just(new SimpleResponse<>(response.getRequest(), response.getStatusCode(), - response.getHeaders(), null)); - }); - } catch (RuntimeException ex) { - return monoError(LOGGER, ex); - } - } - /** * Creates a permission at the share level. If a permission already exists, it returns the key of it, else creates a * new permission and returns the key. @@ -2128,7 +1735,11 @@ Mono> deleteFileIfExistsWithResponse(String fileName, ShareDelete */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono createPermission(String filePermission) { - return createPermissionWithResponse(filePermission).flatMap(FluxUtil::toMono); + try { + return createPermissionWithResponse(filePermission).flatMap(FluxUtil::toMono); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } } /** @@ -2152,7 +1763,7 @@ public Mono> createPermissionWithResponse(String filePermission try { return withContext(context -> createPermissionWithResponse(filePermission, context)); } catch (RuntimeException ex) { - return monoError(LOGGER, ex); + return monoError(logger, ex); } } @@ -2182,7 +1793,11 @@ Mono> createPermissionWithResponse(String filePermission, Conte */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono getPermission(String filePermissionKey) { - return getPermissionWithResponse(filePermissionKey).flatMap(FluxUtil::toMono); + try { + return getPermissionWithResponse(filePermissionKey).flatMap(FluxUtil::toMono); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } } /** @@ -2205,7 +1820,7 @@ public Mono> getPermissionWithResponse(String filePermissionKey try { return withContext(context -> getPermissionWithResponse(filePermissionKey, context)); } catch (RuntimeException ex) { - return monoError(LOGGER, ex); + return monoError(logger, ex); } } diff --git a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/ShareClient.java b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/ShareClient.java index 42d719a965007..6f7a1139a962a 100644 --- a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/ShareClient.java +++ b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/ShareClient.java @@ -13,18 +13,16 @@ import com.azure.core.util.Context; import com.azure.storage.common.StorageSharedKeyCredential; import com.azure.storage.common.implementation.StorageImplUtils; -import com.azure.storage.file.share.models.ShareDirectoryInfo; import com.azure.storage.file.share.models.ShareFileHttpHeaders; -import com.azure.storage.file.share.models.ShareInfo; -import com.azure.storage.file.share.models.ShareProperties; import com.azure.storage.file.share.models.ShareRequestConditions; import com.azure.storage.file.share.models.ShareSignedIdentifier; +import com.azure.storage.file.share.models.ShareStorageException; +import com.azure.storage.file.share.models.ShareInfo; +import com.azure.storage.file.share.models.ShareProperties; import com.azure.storage.file.share.models.ShareSnapshotInfo; import com.azure.storage.file.share.models.ShareStatistics; -import com.azure.storage.file.share.models.ShareStorageException; import com.azure.storage.file.share.options.ShareCreateOptions; import com.azure.storage.file.share.options.ShareDeleteOptions; -import com.azure.storage.file.share.options.ShareDirectoryCreateOptions; import com.azure.storage.file.share.options.ShareGetAccessPolicyOptions; import com.azure.storage.file.share.options.ShareGetPropertiesOptions; import com.azure.storage.file.share.options.ShareGetStatisticsOptions; @@ -292,65 +290,6 @@ public Response createWithResponse(ShareCreateOptions options, Durati return StorageImplUtils.blockWithOptionalTimeout(response, timeout); } - /** - * Creates the share in the storage account if it does not exist. - * - *

Code Samples

- * - *

Create the share

- * - * - *
-     * shareClient.createIfNotExists();
-     * System.out.println("Completed creating the share.");
-     * 
- * - * - *

For more information, see the - * Azure Docs.

- * - * @return {@link ShareInfo} that contains information about the created resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ShareInfo createIfNotExists() { - return createIfNotExistsWithResponse(null, null, null).getValue(); - } - - /** - * Creates the share in the storage account with the specified options if it does not exist. - * - *

Code Samples

- * - * - *
-     * Response<ShareInfo> response = shareClient.createIfNotExistsWithResponse(new ShareCreateOptions()
-     *     .setMetadata(Collections.singletonMap("share", "metadata")).setQuotaInGb(1)
-     *     .setAccessTier(ShareAccessTier.HOT), Duration.ofSeconds(1), new Context(key1, value1));
-     *
-     * if (response.getStatusCode() == 409) {
-     *     System.out.println("Already existed.");
-     * } else {
-     *     System.out.printf("Create completed with status %d%n", response.getStatusCode());
-     * }
-     * 
- * - * - *

For more information, see the - * Azure Docs.

- * - * @param options {@link ShareCreateOptions} - * @param timeout An optional timeout applied to the operation. If a response is not returned before the timeout - * concludes a {@link RuntimeException} will be thrown. - * @param context Additional context that is passed through the Http pipeline during the service call. - * @return A reactive {@link Response} signaling completion, whose {@link Response#getValue() value} contains a - * {@link ShareInfo} containing information about the share. If {@link Response}'s status code is 201, a new - * share was successfully created. If status code is 409, a share already existed at this location. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createIfNotExistsWithResponse(ShareCreateOptions options, Duration timeout, Context context) { - return StorageImplUtils.blockWithOptionalTimeout(client.createIfNotExistsWithResponse(options, context), timeout); - } - /** * Creates a snapshot of the share with the same metadata associated to the share at the time of creation. * @@ -500,97 +439,6 @@ public Response deleteWithResponse(ShareDeleteOptions options, Duration ti return StorageImplUtils.blockWithOptionalTimeout(response, timeout); } - /** - * Deletes the share in the storage account if it exists. - * - *

Code Samples

- * - *

Delete the share

- * - * - *
-     * boolean result = shareClient.deleteIfExists();
-     * System.out.println("Share deleted: " + result);
-     * 
- * - * - *

For more information, see the - * Azure Docs.

- * @return {@code true} if the share is successfully deleted, {@code false} if the share does not exist. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public boolean deleteIfExists() { - Response response = deleteIfExistsWithResponse(null, Context.NONE); - return response.getStatusCode() == 202; - } - - /** - * Deletes the share in the storage account if it exists. - * - *

Code Samples

- * - *

Delete the share

- * - * - *
-     * Response<Void> response = shareClient.deleteIfExistsWithResponse(Duration.ofSeconds(1), new Context(key1, value1));
-     * if (response.getStatusCode() == 404) {
-     *     System.out.println("Does not exist.");
-     * } else {
-     *     System.out.printf("Delete completed with status %d%n", response.getStatusCode());
-     * }
-     * 
- * - * - *

For more information, see the - * Azure Docs.

- * - * @param timeout An optional timeout applied to the operation. If a response is not returned before the timeout - * concludes a {@link RuntimeException} will be thrown. - * @param context Additional context that is passed through the Http pipeline during the service call. - * @return A response containing status code and HTTP headers. If {@link Response}'s status code is 202, the share - * was successfully deleted. If status code is 404, the share does not exist. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteIfExistsWithResponse(Duration timeout, Context context) { - return deleteIfExistsWithResponse(new ShareDeleteOptions(), timeout, context); - } - - /** - * Deletes the share in the storage account if it exists. - * - *

Code Samples

- * - *

Delete the share

- * - * - *
-     * Response<Void> res = shareClient.deleteIfExistsWithResponse(new ShareDeleteOptions()
-     *         .setRequestConditions(new ShareRequestConditions().setLeaseId(leaseId)),
-     *     Duration.ofSeconds(1), new Context(key1, value1));
-     * if (res.getStatusCode() == 404) {
-     *     System.out.println("Does not exist.");
-     * } else {
-     *     System.out.printf("Delete completed with status %d%n", response.getStatusCode());
-     * }
-     * 
- * - * - *

For more information, see the - * Azure Docs.

- * - * @param options {@link ShareDeleteOptions} - * @param timeout An optional timeout applied to the operation. If a response is not returned before the timeout - * concludes a {@link RuntimeException} will be thrown. - * @param context Additional context that is passed through the Http pipeline during the service call. - * @return A response containing status code and HTTP headers. If {@link Response}'s status code is 202, the share - * was successfully deleted. If status code is 404, the share does not exist. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteIfExistsWithResponse(ShareDeleteOptions options, Duration timeout, Context context) { - return StorageImplUtils.blockWithOptionalTimeout(client.deleteIfExistsWithResponse(options, context), timeout); - } - /** * Retrieves the properties of the share, these include the metadata associated to it and the quota that the share * is restricted to. @@ -1238,78 +1086,6 @@ public Response createDirectoryWithResponse(String directo timeout, context), shareDirectoryClient); } - /** - * Creates the directory in the share with the given name if it does not exist. - * - *

Code Samples

- * - *

Create the directory "documents"

- * - * - *
-     * ShareDirectoryClient directoryClient = shareClient.createDirectoryIfNotExists("mydirectory");
-     * System.out.println("Complete creating the directory.");
-     * 
- * - * - *

For more information, see the - * Azure Docs.

- * - * @param directoryName Name of the directory - * @return The {@link ShareDirectoryClient} used to interact with the directory created. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ShareDirectoryClient createDirectoryIfNotExists(String directoryName) { - return createDirectoryIfNotExistsWithResponse(directoryName, new ShareDirectoryCreateOptions(), null, - Context.NONE).getValue(); - } - - /** - * Creates the directory if it does not exist in the share with the given name and associates the - * passed metadata to it. - * - *

Code Samples

- * - *

Create the directory "documents" with metadata "directory:metadata"

- * - * - *
-     * FileSmbProperties smbProperties = new FileSmbProperties();
-     * String filePermission = "filePermission";
-     * Map<String, String> metadata = Collections.singletonMap("directory", "metadata");
-     * ShareDirectoryCreateOptions options = new ShareDirectoryCreateOptions().setSmbProperties(smbProperties).
-     *     setFilePermission(filePermission).setMetadata(metadata);
-     * Response<ShareDirectoryClient> response = shareClient.createDirectoryIfNotExistsWithResponse("documents",
-     *     options, Duration.ofSeconds(1), new Context(key1, value1));
-     *
-     * if (response.getStatusCode() == 409) {
-     *     System.out.println("Already existed.");
-     * } else {
-     *     System.out.printf("Create completed with status %d%n", response.getStatusCode());
-     * }
-     * 
- * - * - *

For more information, see the - * Azure Docs.

- * - * @param directoryName Name of the directory - * @param options {@link ShareDirectoryCreateOptions} - * @param context Additional context that is passed through the Http pipeline during the service call. - * @param timeout An optional timeout applied to the operation. If a response is not returned before the timeout - * concludes a {@link RuntimeException} will be thrown. - * @return A {@link Response} whose {@link Response#getValue() value} contains the {@link ShareDirectoryClient} - * used to interact with the directory created. If {@link Response}'s status code is 201, a new directory was - * successfully created. If status code is 409, a directory with the same name already existed at this location. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createDirectoryIfNotExistsWithResponse(String directoryName, - ShareDirectoryCreateOptions options, Duration timeout, Context context) { - ShareDirectoryClient shareDirectoryClient = getDirectoryClient(directoryName); - Response response = shareDirectoryClient.createIfNotExistsWithResponse(options, timeout, context); - return new SimpleResponse<>(response, shareDirectoryClient); - } - /** * Creates the file in the share with the given name and file max size. * @@ -1533,69 +1309,6 @@ public Response deleteDirectoryWithResponse(String directoryName, Duration return StorageImplUtils.blockWithOptionalTimeout(response, timeout); } - /** - * Deletes the specified directory in the share if it exists. - * - *

Code Samples

- * - *

Delete the directory "mydirectory"

- * - * - *
-     * boolean result = shareClient.deleteDirectoryIfExists("mydirectory");
-     * System.out.println("Directory deleted: " + result);
-     * 
- * - * - *

For more information, see the - * Azure Docs.

- * - * @param directoryName Name of the directory - * @throws ShareStorageException If the directory isn't empty - * @return {@code true} if the directory is successfully deleted, {@code false} if the directory does not exist. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public boolean deleteDirectoryIfExists(String directoryName) { - Response response = deleteDirectoryIfExistsWithResponse(directoryName, null, Context.NONE); - return response.getStatusCode() == 202; - } - - /** - * Deletes the specified directory in the share if it exists. - * - *

Code Samples

- * - *

Delete the directory "mydirectory"

- * - * - *
-     * Response<Void> response = shareClient.deleteDirectoryIfExistsWithResponse("mydirectory",
-     *     Duration.ofSeconds(1), new Context(key1, value1));
-     * if (response.getStatusCode() == 404) {
-     *     System.out.println("Does not exist.");
-     * } else {
-     *     System.out.printf("Delete completed with status %d%n", response.getStatusCode());
-     * }
-     * 
- * - * - *

For more information, see the - * Azure Docs.

- * - * @param directoryName Name of the directory - * @param timeout An optional timeout applied to the operation. If a response is not returned before the timeout - * concludes a {@link RuntimeException} will be thrown. - * @param context Additional context that is passed through the Http pipeline during the service call. - * @return A response containing status code and HTTP headers. If {@link Response}'s status code is 202, the directory - * was successfully deleted. If status code is 404, the directory does not exist. - * @throws ShareStorageException If the directory isn't empty - * @throws RuntimeException if the operation doesn't complete before the timeout concludes. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteDirectoryIfExistsWithResponse(String directoryName, Duration timeout, Context context) { - return StorageImplUtils.blockWithOptionalTimeout(client.deleteDirectoryIfExistsWithResponse(directoryName, context), timeout); - } - /** * Deletes the specified file in the share. * @@ -1687,108 +1400,6 @@ public Response deleteFileWithResponse(String fileName, ShareRequestCondit return StorageImplUtils.blockWithOptionalTimeout(response, timeout); } - /** - * Deletes the specified file in the share if it exists. - * - *

Code Samples

- * - *

Delete the file "myfile"

- * - * - *
-     * boolean result = shareClient.deleteFileIfExists("myfile");
-     * System.out.println("File deleted: " + result);
-     * 
- * - * - *

For more information, see the - * Azure Docs.

- * - * @param fileName Name of the file - * @return {@code true} if the file is successfully deleted, {@code false} if the file does not exist. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public boolean deleteFileIfExists(String fileName) { - Response response = deleteFileIfExistsWithResponse(fileName, null, Context.NONE); - return response.getStatusCode() == 202; - } - - /** - * Deletes the specified file in the share if it exists. - * - *

Code Samples

- * - *

Delete the file "myfile"

- * - * - *
-     * Response<Void> response = shareClient.deleteFileIfExistsWithResponse("myfile",
-     *     Duration.ofSeconds(1), new Context(key1, value1));
-     * if (response.getStatusCode() == 404) {
-     *     System.out.println("Does not exist.");
-     * } else {
-     *     System.out.printf("Delete completed with status %d%n", response.getStatusCode());
-     * }
-     * 
- * - * - *

For more information, see the - * Azure Docs.

- * - * @param fileName Name of the file - * @param timeout An optional timeout applied to the operation. If a response is not returned before the timeout - * concludes a {@link RuntimeException} will be thrown. - * @param context Additional context that is passed through the Http pipeline during the service call. - * @return A response containing status code and HTTP headers. If {@link Response}'s status code is 202, the file - * was successfully deleted. If status code is 404, the file does not exist. - * @throws RuntimeException if the operation doesn't complete before the timeout concludes. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteFileIfExistsWithResponse(String fileName, Duration timeout, Context context) { - return this.deleteFileIfExistsWithResponse(fileName, null, timeout, context); - } - - /** - * Deletes the specified file in the share if it exists. - * - *

Code Samples

- * - *

Delete the file "myfile"

- * - * - *
-     * ShareRequestConditions requestConditions = new ShareRequestConditions().setLeaseId(leaseId);
-     * ShareDeleteOptions options = new ShareDeleteOptions().setRequestConditions(requestConditions);
-     *
-     * Response<Void> res = shareClient.deleteFileIfExistsWithResponse("myfile", options,
-     *     Duration.ofSeconds(1), new Context(key1, value1));
-     * if (res.getStatusCode() == 404) {
-     *     System.out.println("Does not exist.");
-     * } else {
-     *     System.out.printf("Delete completed with status %d%n", response.getStatusCode());
-     * }
-     * 
- * - * - *

For more information, see the - * Azure Docs.

- * - * @param fileName Name of the file - * @param options {@link ShareDeleteOptions} - * @param timeout An optional timeout applied to the operation. If a response is not returned before the timeout - * concludes a {@link RuntimeException} will be thrown. - * @param context Additional context that is passed through the Http pipeline during the service call. - * @return A response containing status code and HTTP headers. If {@link Response}'s status code is 202, the file - * was successfully deleted. If status code is 404, the file does not exist. - * @throws RuntimeException if the operation doesn't complete before the timeout concludes. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteFileIfExistsWithResponse(String fileName, ShareDeleteOptions options, - Duration timeout, Context context) { - return StorageImplUtils.blockWithOptionalTimeout(client.deleteFileIfExistsWithResponse(fileName, - options, context), timeout); - } - /** * Creates a permission at the share level. If a permission already exists, it returns the key of it, else creates a * new permission and returns the key. diff --git a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/ShareClientBuilder.java b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/ShareClientBuilder.java index 97c17e6d2c306..15d7d483e6e69 100644 --- a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/ShareClientBuilder.java +++ b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/ShareClientBuilder.java @@ -139,7 +139,7 @@ public class ShareClientBuilder implements AzureSasCredentialTrait, ConfigurationTrait, EndpointTrait { - private static final ClientLogger LOGGER = new ClientLogger(ShareClientBuilder.class); + private final ClientLogger logger = new ClientLogger(ShareClientBuilder.class); private String endpoint; private String accountName; @@ -191,7 +191,7 @@ public ShareClientBuilder() { public ShareAsyncClient buildAsyncClient() { Objects.requireNonNull(shareName, "'shareName' cannot be null."); CredentialValidator.validateSingleCredentialIsPresent( - storageSharedKeyCredential, null, azureSasCredential, sasToken, LOGGER); + storageSharedKeyCredential, null, azureSasCredential, sasToken, logger); ShareServiceVersion serviceVersion = version != null ? version : ShareServiceVersion.getLatest(); HttpPipeline pipeline = (httpPipeline != null) ? httpPipeline : BuilderHelper.buildPipeline(() -> { @@ -202,11 +202,11 @@ public ShareAsyncClient buildAsyncClient() { } else if (sasToken != null) { return new AzureSasCredentialPolicy(new AzureSasCredential(sasToken), false); } else { - throw LOGGER.logExceptionAsError( + throw logger.logExceptionAsError( new IllegalArgumentException("Credentials are required for authorization")); } }, retryOptions, coreRetryOptions, logOptions, clientOptions, httpClient, - perCallPolicies, perRetryPolicies, configuration, LOGGER); + perCallPolicies, perRetryPolicies, configuration, logger); AzureFileStorageImpl azureFileStorage = new AzureFileStorageImplBuilder() .url(endpoint) @@ -265,7 +265,7 @@ public ShareClientBuilder endpoint(String endpoint) { String[] pathSegments = fullUrl.getPath().split("/"); int length = pathSegments.length; if (length > 3) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( + throw logger.logExceptionAsError(new IllegalArgumentException( "Cannot accept a URL to a file or directory to construct a file share client")); } this.shareName = length >= 2 ? pathSegments[1] : this.shareName; @@ -286,7 +286,7 @@ public ShareClientBuilder endpoint(String endpoint) { this.sasToken(sasToken); } } catch (MalformedURLException ex) { - throw LOGGER.logExceptionAsError( + throw logger.logExceptionAsError( new IllegalArgumentException("The Azure Storage File Service endpoint url is malformed.", ex)); } @@ -383,10 +383,10 @@ public ShareClientBuilder credential(AzureSasCredential credential) { @Override public ShareClientBuilder connectionString(String connectionString) { StorageConnectionString storageConnectionString - = StorageConnectionString.create(connectionString, LOGGER); + = StorageConnectionString.create(connectionString, logger); StorageEndpoint endpoint = storageConnectionString.getFileEndpoint(); if (endpoint == null || endpoint.getPrimaryUri() == null) { - throw LOGGER + throw logger .logExceptionAsError(new IllegalArgumentException( "connectionString missing required settings to derive file service endpoint.")); } @@ -420,7 +420,7 @@ public ShareClientBuilder connectionString(String connectionString) { @Override public ShareClientBuilder httpClient(HttpClient httpClient) { if (this.httpClient != null && httpClient == null) { - LOGGER.info("'httpClient' is being set to 'null' when it was previously configured."); + logger.info("'httpClient' is being set to 'null' when it was previously configured."); } this.httpClient = httpClient; @@ -548,7 +548,7 @@ public ShareClientBuilder retryOptions(RetryOptions retryOptions) { @Override public ShareClientBuilder pipeline(HttpPipeline httpPipeline) { if (this.httpPipeline != null && httpPipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + logger.info("HttpPipeline is being set to 'null' when it was previously configured."); } this.httpPipeline = httpPipeline; diff --git a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/ShareDirectoryAsyncClient.java b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/ShareDirectoryAsyncClient.java index e4cf0ef620209..fa72f48ba35fc 100644 --- a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/ShareDirectoryAsyncClient.java +++ b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/ShareDirectoryAsyncClient.java @@ -45,8 +45,6 @@ import com.azure.storage.file.share.models.ShareFileItem; import com.azure.storage.file.share.models.ShareRequestConditions; import com.azure.storage.file.share.models.ShareStorageException; -import com.azure.storage.file.share.options.ShareDeleteOptions; -import com.azure.storage.file.share.options.ShareDirectoryCreateOptions; import com.azure.storage.file.share.options.ShareFileRenameOptions; import com.azure.storage.file.share.options.ShareListFilesAndDirectoriesOptions; import com.azure.storage.file.share.sas.ShareServiceSasSignatureValues; @@ -97,7 +95,7 @@ */ @ServiceClient(builder = ShareFileClientBuilder.class, isAsync = true) public class ShareDirectoryAsyncClient { - private static final ClientLogger LOGGER = new ClientLogger(ShareDirectoryAsyncClient.class); + private final ClientLogger logger = new ClientLogger(ShareDirectoryAsyncClient.class); private final AzureFileStorageImpl azureFileStorageClient; private final String shareName; @@ -232,7 +230,7 @@ public Mono> existsWithResponse() { try { return withContext(this::existsWithResponse); } catch (RuntimeException ex) { - return monoError(LOGGER, ex); + return monoError(logger, ex); } } @@ -282,7 +280,11 @@ private boolean checkDoesNotExistStatusCode(Throwable t) { */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono create() { - return createWithResponse(null, null, null).flatMap(FluxUtil::toMono); + try { + return createWithResponse(null, null, null).flatMap(FluxUtil::toMono); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } } /** @@ -321,7 +323,7 @@ public Mono> createWithResponse(FileSmbProperties s try { return withContext(context -> createWithResponse(smbProperties, filePermission, metadata, context)); } catch (RuntimeException ex) { - return monoError(LOGGER, ex); + return monoError(logger, ex); } } @@ -339,101 +341,13 @@ Mono> createWithResponse(FileSmbProperties smbPrope String fileAttributes = properties.setNtfsFileAttributes(FileConstants.FILE_ATTRIBUTES_NONE); String fileCreationTime = properties.setFileCreationTime(FileConstants.FILE_TIME_NOW); String fileLastWriteTime = properties.setFileLastWriteTime(FileConstants.FILE_TIME_NOW); - String fileChangeTime = properties.getFileChangeTimeString(); context = context == null ? Context.NONE : context; return azureFileStorageClient.getDirectories() - .createWithResponseAsync(shareName, directoryPath, fileAttributes, null, metadata, filePermission, - filePermissionKey, fileCreationTime, fileLastWriteTime, fileChangeTime, + .createWithResponseAsync(shareName, directoryPath, fileAttributes, fileCreationTime, fileLastWriteTime, + null, metadata, filePermission, filePermissionKey, context.addData(AZ_TRACING_NAMESPACE_KEY, STORAGE_TRACING_NAMESPACE_VALUE)) - .map(ShareDirectoryAsyncClient::createWithRestResponse); - } - - /** - * Creates this directory in the file share if it does not exist. - * - *

Code Samples

- * - *

Create the directory

- * - * - *
-     * shareDirectoryAsyncClient.createIfNotExists().subscribe(response ->
-     *     System.out.printf("Created at %s%n", response.getLastModified()));
-     * 
- * - * - *

For more information, see the - * Azure Docs.

- * - * @return A reactive response signaling completion. {@link ShareDirectoryInfo} contains information about the - * created directory. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createIfNotExists() { - try { - return createIfNotExistsWithResponse(new ShareDirectoryCreateOptions(), null).flatMap(FluxUtil::toMono); - } catch (RuntimeException ex) { - return monoError(LOGGER, ex); - } - } - - /** - * Creates a directory in the file share if it does not exist. - * - *

Code Samples

- * - *

Create the directory

- * - * - *
-     * FileSmbProperties smbProperties = new FileSmbProperties();
-     * String filePermission = "filePermission";
-     * Map<String, String> metadata = Collections.singletonMap("directory", "metadata");
-     * ShareDirectoryCreateOptions options = new ShareDirectoryCreateOptions().setSmbProperties(smbProperties)
-     *     .setFilePermission(filePermission).setMetadata(metadata);
-     *
-     * shareDirectoryAsyncClient.createIfNotExistsWithResponse(options).subscribe(response -> {
-     *     if (response.getStatusCode() == 409) {
-     *         System.out.println("Already exists.");
-     *     } else {
-     *         System.out.println("successfully created.");
-     *     }
-     * });
-     * 
- * - * - *

For more information, see the - * Azure Docs.

- * - * @param options {@link ShareDirectoryCreateOptions} - * @return A {@link Mono} containing {@link Response} signaling completion, whose {@link Response#getValue() value} - * contains a {@link ShareDirectoryInfo} containing information about the directory. If {@link Response}'s status - * code is 201, a new directory was successfully created. If status code is 409, a directory already existed at this - * location. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> createIfNotExistsWithResponse(ShareDirectoryCreateOptions options) { - try { - return createIfNotExistsWithResponse(options, null); - } catch (RuntimeException ex) { - return monoError(LOGGER, ex); - } - } - - Mono> createIfNotExistsWithResponse(ShareDirectoryCreateOptions options, Context context) { - try { - options = options == null ? new ShareDirectoryCreateOptions() : options; - return createWithResponse(options.getSmbProperties(), options.getFilePermission(), options.getMetadata(), - context).onErrorResume(t -> t instanceof ShareStorageException && ((ShareStorageException) t) - .getStatusCode() == 409, t -> { - HttpResponse response = ((ShareStorageException) t).getResponse(); - return Mono.just(new SimpleResponse<>(response.getRequest(), response.getStatusCode(), - response.getHeaders(), null)); - }); - } catch (RuntimeException ex) { - return monoError(LOGGER, ex); - } + .map(this::createWithRestResponse); } /** @@ -462,7 +376,11 @@ Mono> createIfNotExistsWithResponse(ShareDirectoryC */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono delete() { - return deleteWithResponse().flatMap(FluxUtil::toMono); + try { + return deleteWithResponse().flatMap(FluxUtil::toMono); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } } /** @@ -492,7 +410,7 @@ public Mono> deleteWithResponse() { try { return withContext(this::deleteWithResponse); } catch (RuntimeException ex) { - return monoError(LOGGER, ex); + return monoError(logger, ex); } } @@ -504,82 +422,7 @@ Mono> deleteWithResponse(Context context) { } /** - * Deletes the directory in the file share if it exists. - * - *

Code Samples

- * - *

Delete the directory

- * - * - *
-     * shareDirectoryAsyncClient.deleteIfExists().subscribe(deleted -> {
-     *     if (deleted) {
-     *         System.out.println("Successfully deleted.");
-     *     } else {
-     *         System.out.println("Does not exist.");
-     *     }
-     * });
-     * 
- * - * - *

For more information, see the - * Azure Docs.

- * - * @return a reactive response signaling completion. {@code true} indicates that the directory was successfully - * deleted, {@code false} indicates that the directory did not exist. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono deleteIfExists() { - return deleteIfExistsWithResponse().map(response -> response.getStatusCode() != 404); - } - - /** - * Deletes the directory in the file share if it exists. - * - *

Code Samples

- * - *

Delete the directory

- * - * - *
-     * shareDirectoryAsyncClient.deleteIfExistsWithResponse().subscribe(response -> {
-     *             if (response.getStatusCode() == 404) {
-     *                 System.out.println("Does not exist.");
-     *             } else {
-     *                 System.out.println("successfully deleted.");
-     *             }
-     *         });
-     * 
- * - * - *

For more information, see the - * Azure Docs.

- * - * @return A reactive response signaling completion. If {@link Response}'s status code is 202, the directory was - * successfully deleted. If status code is 404, the directory does not exist. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> deleteIfExistsWithResponse() { - try { - return withContext(this::deleteIfExistsWithResponse); - } catch (RuntimeException ex) { - return monoError(LOGGER, ex); - } - } - - Mono> deleteIfExistsWithResponse(Context context) { - context = context == null ? Context.NONE : context; - return deleteWithResponse(context).onErrorResume(t -> t instanceof ShareStorageException - && ((ShareStorageException) t).getStatusCode() == 404, - t -> { - HttpResponse response = ((ShareStorageException) t).getResponse(); - return Mono.just(new SimpleResponse<>(response.getRequest(), response.getStatusCode(), - response.getHeaders(), null)); - }); - } - - /** - * Retrieves the properties of this directory. The properties include directory metadata, last modified date, is + * Retrieves the properties of this directory. The properties includes directory metadata, last modified date, is * server encrypted, and eTag. * *

Code Samples

@@ -601,11 +444,15 @@ Mono> deleteIfExistsWithResponse(Context context) { */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono getProperties() { - return getPropertiesWithResponse().flatMap(FluxUtil::toMono); + try { + return getPropertiesWithResponse().flatMap(FluxUtil::toMono); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } } /** - * Retrieves the properties of this directory. The properties include directory metadata, last modified date, is + * Retrieves the properties of this directory. The properties includes directory metadata, last modified date, is * server encrypted, and eTag. * *

Code Samples

@@ -630,7 +477,7 @@ public Mono> getPropertiesWithResponse() { try { return withContext(this::getPropertiesWithResponse); } catch (RuntimeException ex) { - return monoError(LOGGER, ex); + return monoError(logger, ex); } } @@ -639,7 +486,7 @@ Mono> getPropertiesWithResponse(Context conte return azureFileStorageClient.getDirectories() .getPropertiesWithResponseAsync(shareName, directoryPath, snapshot, null, context.addData(AZ_TRACING_NAMESPACE_KEY, STORAGE_TRACING_NAMESPACE_VALUE)) - .map(ShareDirectoryAsyncClient::getPropertiesResponse); + .map(this::getPropertiesResponse); } /** @@ -668,7 +515,11 @@ Mono> getPropertiesWithResponse(Context conte */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono setProperties(FileSmbProperties smbProperties, String filePermission) { - return setPropertiesWithResponse(smbProperties, filePermission).flatMap(FluxUtil::toMono); + try { + return setPropertiesWithResponse(smbProperties, filePermission).flatMap(FluxUtil::toMono); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } } /** @@ -701,7 +552,7 @@ public Mono> setPropertiesWithResponse(FileSmbPrope try { return withContext(context -> setPropertiesWithResponse(smbProperties, filePermission, context)); } catch (RuntimeException ex) { - return monoError(LOGGER, ex); + return monoError(logger, ex); } } @@ -720,14 +571,13 @@ Mono> setPropertiesWithResponse(FileSmbProperties s String fileAttributes = properties.setNtfsFileAttributes(FileConstants.PRESERVE); String fileCreationTime = properties.setFileCreationTime(FileConstants.PRESERVE); String fileLastWriteTime = properties.setFileLastWriteTime(FileConstants.PRESERVE); - String fileChangeTime = properties.getFileChangeTimeString(); context = context == null ? Context.NONE : context; return azureFileStorageClient.getDirectories() - .setPropertiesWithResponseAsync(shareName, directoryPath, fileAttributes, null, filePermission, - filePermissionKey, fileCreationTime, fileLastWriteTime, fileChangeTime, + .setPropertiesWithResponseAsync(shareName, directoryPath, fileAttributes, fileCreationTime, + fileLastWriteTime, null, filePermission, filePermissionKey, context.addData(AZ_TRACING_NAMESPACE_KEY, STORAGE_TRACING_NAMESPACE_VALUE)) - .map(ShareDirectoryAsyncClient::setPropertiesResponse); + .map(this::setPropertiesResponse); } /** @@ -765,7 +615,11 @@ Mono> setPropertiesWithResponse(FileSmbProperties s */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono setMetadata(Map metadata) { - return setMetadataWithResponse(metadata).flatMap(FluxUtil::toMono); + try { + return setMetadataWithResponse(metadata).flatMap(FluxUtil::toMono); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } } /** @@ -808,7 +662,7 @@ public Mono> setMetadataWithResponse(Map try { return withContext(context -> setMetadataWithResponse(metadata, context)); } catch (RuntimeException ex) { - return monoError(LOGGER, ex); + return monoError(logger, ex); } } @@ -818,7 +672,7 @@ Mono> setMetadataWithResponse(Map> setMetadataWithResponse(Map listFilesAndDirectories() { - return listFilesAndDirectories(null, null); + try { + return listFilesAndDirectories(null, null); + } catch (RuntimeException ex) { + return pagedFluxError(logger, ex); + } } /** @@ -881,8 +739,12 @@ public PagedFlux listFilesAndDirectories() { */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux listFilesAndDirectories(String prefix, Integer maxResultsPerPage) { - return listFilesAndDirectories(new ShareListFilesAndDirectoriesOptions().setPrefix(prefix) - .setMaxResultsPerPage(maxResultsPerPage)); + try { + return listFilesAndDirectoriesWithOptionalTimeout(new ShareListFilesAndDirectoriesOptions() + .setPrefix(prefix).setMaxResultsPerPage(maxResultsPerPage), null, Context.NONE); + } catch (RuntimeException ex) { + return pagedFluxError(logger, ex); + } } /** @@ -916,7 +778,7 @@ public PagedFlux listFilesAndDirectories(ShareListFilesAndDirecto try { return listFilesAndDirectoriesWithOptionalTimeout(options, null, Context.NONE); } catch (RuntimeException ex) { - return pagedFluxError(LOGGER, ex); + return pagedFluxError(logger, ex); } } @@ -985,7 +847,7 @@ public PagedFlux listHandles(Integer maxResultPerPage, boolean recur try { return listHandlesWithOptionalTimeout(maxResultPerPage, recursive, null, Context.NONE); } catch (RuntimeException ex) { - return pagedFluxError(LOGGER, ex); + return pagedFluxError(logger, ex); } } @@ -1029,7 +891,12 @@ PagedFlux listHandlesWithOptionalTimeout(Integer maxResultPerPage, b */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono forceCloseHandle(String handleId) { - return forceCloseHandleWithResponse(handleId).flatMap(FluxUtil::toMono); + try { + return withContext(context -> forceCloseHandleWithResponse(handleId, + context)).flatMap(FluxUtil::toMono); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } } /** @@ -1060,7 +927,7 @@ public Mono> forceCloseHandleWithResponse(String hand try { return withContext(context -> forceCloseHandleWithResponse(handleId, context)); } catch (RuntimeException ex) { - return monoError(LOGGER, ex); + return monoError(logger, ex); } } @@ -1102,7 +969,7 @@ public Mono forceCloseAllHandles(boolean recursive) { (accu, next) -> new CloseHandlesInfo(accu.getClosedHandles() + next.getClosedHandles(), accu.getFailedHandles() + next.getFailedHandles()))); } catch (RuntimeException ex) { - return monoError(LOGGER, ex); + return monoError(logger, ex); } } @@ -1143,7 +1010,11 @@ PagedFlux forceCloseAllHandlesWithTimeout(boolean recursive, D */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono rename(String destinationPath) { - return renameWithResponse(new ShareFileRenameOptions(destinationPath)).flatMap(FluxUtil::toMono); + try { + return renameWithResponse(new ShareFileRenameOptions(destinationPath)).flatMap(FluxUtil::toMono); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } } /** @@ -1182,9 +1053,10 @@ public Mono rename(String destinationPath) { public Mono> renameWithResponse(ShareFileRenameOptions options) { try { return withContext(context -> renameWithResponse(options, context)) - .map(response -> new SimpleResponse<>(response, new ShareDirectoryAsyncClient(response.getValue()))); + .map(response -> new SimpleResponse<>(response, + new ShareDirectoryAsyncClient(response.getValue()))); } catch (RuntimeException ex) { - return monoError(LOGGER, ex); + return monoError(logger, ex); } } @@ -1212,12 +1084,10 @@ Mono> renameWithResponse(ShareFileRenameOpti String fileAttributes = NtfsFileAttributes.toString(tempSmbProperties.getNtfsFileAttributes()); String fileCreationTime = FileSmbProperties.parseFileSMBDate(tempSmbProperties.getFileCreationTime()); String fileLastWriteTime = FileSmbProperties.parseFileSMBDate(tempSmbProperties.getFileLastWriteTime()); - String fileChangeTime = FileSmbProperties.parseFileSMBDate(tempSmbProperties.getFileChangeTime()); smbInfo = new CopyFileSmbInfo() .setFileAttributes(fileAttributes) .setFileCreationTime(fileCreationTime) .setFileLastWriteTime(fileLastWriteTime) - .setFileChangeTime(fileChangeTime) .setIgnoreReadOnly(options.isIgnoreReadOnly()); } @@ -1245,7 +1115,7 @@ Mono> renameWithResponse(ShareFileRenameOpti */ ShareDirectoryAsyncClient getDirectoryAsyncClient(String destinationPath) { if (CoreUtils.isNullOrEmpty(destinationPath)) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException("'destinationPath' can not be set to null")); + throw logger.logExceptionAsError(new IllegalArgumentException("'destinationPath' can not be set to null")); } return new ShareDirectoryAsyncClient(this.azureFileStorageClient, getShareName(), destinationPath, null, @@ -1277,7 +1147,12 @@ ShareDirectoryAsyncClient getDirectoryAsyncClient(String destinationPath) { */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono createSubdirectory(String subdirectoryName) { - return createSubdirectoryWithResponse(subdirectoryName, null, null, null).flatMap(FluxUtil::toMono); + try { + return createSubdirectoryWithResponse(subdirectoryName, null, null, null) + .flatMap(FluxUtil::toMono); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } } /** @@ -1317,10 +1192,11 @@ public Mono createSubdirectory(String subdirectoryNam public Mono> createSubdirectoryWithResponse(String subdirectoryName, FileSmbProperties smbProperties, String filePermission, Map metadata) { try { - return withContext(context -> - createSubdirectoryWithResponse(subdirectoryName, smbProperties, filePermission, metadata, context)); + return withContext( + context -> createSubdirectoryWithResponse(subdirectoryName, smbProperties, filePermission, + metadata, context)); } catch (RuntimeException ex) { - return monoError(LOGGER, ex); + return monoError(logger, ex); } } @@ -1331,94 +1207,6 @@ Mono> createSubdirectoryWithResponse(String .map(response -> new SimpleResponse<>(response, createSubClient)); } - /** - * Creates a subdirectory under current directory with specific name if it does not exist and returns a response of - * ShareDirectoryAsyncClient to interact with it. - * - *

Code Samples

- * - *

Create the sub directory "subdir"

- * - * - *
-     * shareDirectoryAsyncClient.createSubdirectoryIfNotExists("subdir")
-     *     .switchIfEmpty(Mono.<ShareDirectoryAsyncClient>empty()
-     *         .doOnSuccess(x -> System.out.println("Already exists.")))
-     *     .subscribe(response -> System.out.println("Create completed."));
-     * 
- * - * - *

For more information, see the - * Azure Docs.

- * - * @param subdirectoryName Name of the subdirectory - * @return A {@link Mono} containing a {@link ShareDirectoryAsyncClient} used to interact with the subdirectory created. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createSubdirectoryIfNotExists(String subdirectoryName) { - return createSubdirectoryIfNotExistsWithResponse(subdirectoryName, new ShareDirectoryCreateOptions()) - .flatMap(FluxUtil::toMono); - } - - /** - * Creates a subdirectory under current directory with specific name and metadata if it does not exist, - * and returns a response of ShareDirectoryAsyncClient to interact with it. - * - *

Code Samples

- * - *

Create the subdirectory named "subdir", with metadata

- * - * - *
-     * FileSmbProperties smbProperties = new FileSmbProperties();
-     * String filePermission = "filePermission";
-     * Map<String, String> metadata = Collections.singletonMap("directory", "metadata");
-     * ShareDirectoryCreateOptions options = new ShareDirectoryCreateOptions().setSmbProperties(smbProperties)
-     *     .setFilePermission(filePermission).setMetadata(metadata);
-     *
-     * shareDirectoryAsyncClient.createSubdirectoryIfNotExistsWithResponse("subdir", options).subscribe(response -> {
-     *     if (response.getStatusCode() == 409) {
-     *         System.out.println("Already exists.");
-     *     } else {
-     *         System.out.println("successfully created.");
-     *     }
-     * });
-     * 
- * - * - *

For more information, see the - * Azure Docs.

- * - * @param subdirectoryName Name of the subdirectory - * @param options {@link ShareDirectoryCreateOptions} - * @return A reactive response signaling completion. The presence of a {@link Response} item indicates a new - * subdirectory was created, and {@link Response#getValue() value} contains a {@link ShareDirectoryAsyncClient} - * which can be used to interact with the newly created directory. An empty {@code Mono} indicates the specified - * subdirectory already existed at this location. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> createSubdirectoryIfNotExistsWithResponse(String subdirectoryName, - ShareDirectoryCreateOptions options) { - try { - return withContext( - context -> createSubdirectoryIfNotExistsWithResponse(subdirectoryName, options, context)); - } catch (RuntimeException ex) { - return monoError(LOGGER, ex); - } - } - - Mono> createSubdirectoryIfNotExistsWithResponse(String subdirectoryName, - ShareDirectoryCreateOptions options, Context context) { - try { - options = options == null ? new ShareDirectoryCreateOptions() : options; - ShareDirectoryAsyncClient createSubClient = getSubdirectoryClient(subdirectoryName); - return createSubClient.createIfNotExistsWithResponse(options, context) - .map(response -> new SimpleResponse<>(response, createSubClient)); - } catch (RuntimeException ex) { - return monoError(LOGGER, ex); - } - } - /** * Deletes the subdirectory with specific name in this directory. * @@ -1447,7 +1235,11 @@ Mono> createSubdirectoryIfNotExistsWithRespo */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono deleteSubdirectory(String subdirectoryName) { - return deleteSubdirectoryWithResponse(subdirectoryName).flatMap(FluxUtil::toMono); + try { + return deleteSubdirectoryWithResponse(subdirectoryName).flatMap(FluxUtil::toMono); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } } /** @@ -1479,9 +1271,10 @@ public Mono deleteSubdirectory(String subdirectoryName) { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> deleteSubdirectoryWithResponse(String subdirectoryName) { try { - return withContext(context -> deleteSubdirectoryWithResponse(subdirectoryName, context)); + return withContext(context -> deleteSubdirectoryWithResponse(subdirectoryName, + context)); } catch (RuntimeException ex) { - return monoError(LOGGER, ex); + return monoError(logger, ex); } } @@ -1490,81 +1283,6 @@ Mono> deleteSubdirectoryWithResponse(String subdirectoryName, Con return deleteSubClient.deleteWithResponse(context); } - /** - * Deletes the subdirectory with specific name in this directory if it exists. - * - *

Code Samples

- * - *

Delete the subdirectory named "subdir"

- * - * - *
-     * shareDirectoryAsyncClient.deleteSubdirectoryIfExists("mysubdirectory").subscribe(deleted -> {
-     *     if (deleted) {
-     *         System.out.println("Successfully deleted.");
-     *     } else {
-     *         System.out.println("Does not exist.");
-     *     }
-     * });
-     * 
- * - * - *

For more information, see the - * Azure Docs.

- * - * @param subdirectoryName Name of the subdirectory - * @return a reactive response signaling completion. {@code true} indicates that the subdirectory was successfully - * deleted, {@code false} indicates that the subdirectory did not exist. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono deleteSubdirectoryIfExists(String subdirectoryName) { - return deleteSubdirectoryIfExistsWithResponse(subdirectoryName).map(response -> response.getStatusCode() != 404); - } - - /** - * Deletes the subdirectory with specific name in this directory if it exists. - * - *

Code Samples

- * - *

Delete the subdirectory named "subdir"

- * - * - *
-     * shareDirectoryAsyncClient.deleteSubdirectoryIfExistsWithResponse("mysubdirectory").subscribe(response -> {
-     *             if (response.getStatusCode() == 404) {
-     *                 System.out.println("Does not exist.");
-     *             } else {
-     *                 System.out.println("successfully deleted.");
-     *             }
-     *         });
-     * 
- * - * - *

For more information, see the - * Azure Docs.

- * - * @param subdirectoryName Name of the subdirectory - * @return A reactive response signaling completion. If {@link Response}'s status code is 202, the subdirectory was - * successfully deleted. If status code is 404, the subdirectory does not exist. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> deleteSubdirectoryIfExistsWithResponse(String subdirectoryName) { - try { - return withContext(context -> deleteSubdirectoryIfExistsWithResponse(subdirectoryName, - context)); - } catch (RuntimeException ex) { - return monoError(LOGGER, ex); - } - } - - Mono> deleteSubdirectoryIfExistsWithResponse(String subdirectoryName, Context context) { - try { - return getSubdirectoryClient(subdirectoryName).deleteIfExistsWithResponse(context); - } catch (RuntimeException ex) { - return monoError(LOGGER, ex); - } - } - /** * Creates a file in this directory with specific name, max number of results and returns a response of * ShareDirectoryInfo to interact with it. @@ -1590,11 +1308,17 @@ Mono> deleteSubdirectoryIfExistsWithResponse(String subdirectoryN * @param fileName Name of the file * @param maxSize Size of the file * @return The ShareFileAsyncClient. - * @throws ShareStorageException If the parent directory does not exist or file name is an invalid resource name. + * @throws ShareStorageException If the file has already existed, the parent directory does not exist or file name + * is an invalid resource name. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono createFile(String fileName, long maxSize) { - return createFileWithResponse(fileName, maxSize, null, null, null, null).flatMap(FluxUtil::toMono); + try { + return createFileWithResponse(fileName, maxSize, null, null, null, null) + .flatMap(FluxUtil::toMono); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } } /** @@ -1639,7 +1363,8 @@ public Mono createFile(String fileName, long maxSize) { * @param filePermission The file permission of the file. * @param metadata Optional name-value pairs associated with the file as metadata. * @return A response containing the directory info and the status of creating the directory. - * @throws ShareStorageException If the parent directory does not exist or file name is an invalid resource name. + * @throws ShareStorageException If the directory has already existed, the parent directory does not exist or file + * name is an invalid resource name. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> createFileWithResponse(String fileName, long maxSize, @@ -1695,7 +1420,8 @@ public Mono> createFileWithResponse(String fileNa * @param metadata Optional name-value pairs associated with the file as metadata. * @param requestConditions {@link ShareRequestConditions} * @return A response containing the directory info and the status of creating the directory. - * @throws ShareStorageException If the parent directory does not exist or file name is an invalid resource name. + * @throws ShareStorageException If the directory has already existed, the parent directory does not exist or file + * name is an invalid resource name. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> createFileWithResponse(String fileName, long maxSize, @@ -1706,7 +1432,7 @@ public Mono> createFileWithResponse(String fileNa createFileWithResponse(fileName, maxSize, httpHeaders, smbProperties, filePermission, metadata, requestConditions, context)); } catch (RuntimeException ex) { - return monoError(LOGGER, ex); + return monoError(logger, ex); } } @@ -1747,7 +1473,11 @@ Mono> createFileWithResponse(String fileName, lon */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono deleteFile(String fileName) { - return deleteFileWithResponse(fileName).flatMap(FluxUtil::toMono); + try { + return deleteFileWithResponse(fileName).flatMap(FluxUtil::toMono); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } } /** @@ -1810,9 +1540,10 @@ public Mono> deleteFileWithResponse(String fileName) { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> deleteFileWithResponse(String fileName, ShareRequestConditions requestConditions) { try { - return withContext(context -> deleteFileWithResponse(fileName, requestConditions, context)); + return withContext(context -> deleteFileWithResponse(fileName, requestConditions, + context)); } catch (RuntimeException ex) { - return monoError(LOGGER, ex); + return monoError(logger, ex); } } @@ -1822,128 +1553,6 @@ Mono> deleteFileWithResponse(String fileName, ShareRequestConditi return shareFileAsyncClient.deleteWithResponse(requestConditions, context); } - /** - * Deletes the file with specific name in this directory if it exists. - * - *

Code Samples

- * - *

Delete the file "filetest"

- * - * - *
-     * shareDirectoryAsyncClient.deleteFileIfExists("myfile").subscribe(deleted -> {
-     *     if (deleted) {
-     *         System.out.println("Successfully deleted.");
-     *     } else {
-     *         System.out.println("Does not exist.");
-     *     }
-     * });
-     * 
- * - * - *

For more information, see the - * Azure Docs.

- * - * @param fileName Name of the file - * @return a reactive response signaling completion. {@code true} indicates that the file was successfully - * deleted, {@code false} indicates that the file did not exist. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono deleteFileIfExists(String fileName) { - return deleteFileIfExistsWithResponse(fileName).map(response -> response.getStatusCode() != 404); - } - - /** - * Deletes the file with specific name in this directory if it exists. - * - *

Code Samples

- * - *

Delete the file "filetest"

- * - * - *
-     * shareDirectoryAsyncClient.deleteFileIfExistsWithResponse("myfile").subscribe(response -> {
-     *             if (response.getStatusCode() == 404) {
-     *                 System.out.println("Does not exist.");
-     *             } else {
-     *                 System.out.println("successfully deleted.");
-     *             }
-     *         });
-     * 
- * - * - *

For more information, see the - * Azure Docs.

- * - * @param fileName Name of the file - * @return A reactive response signaling completion. If {@link Response}'s status code is 202, the file was - * successfully deleted. If status code is 404, the file does not exist. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> deleteFileIfExistsWithResponse(String fileName) { - try { - return this.deleteFileIfExistsWithResponse(fileName, null); - } catch (RuntimeException ex) { - return monoError(LOGGER, ex); - } - } - - /** - * Deletes the file with specific name in this directory if it exists. - * - *

Code Samples

- * - *

Delete the file "filetest"

- * - * - *
-     * ShareRequestConditions requestConditions = new ShareRequestConditions().setLeaseId(leaseId);
-     * ShareDeleteOptions options = new ShareDeleteOptions().setRequestConditions(requestConditions);
-     *
-     * shareDirectoryAsyncClient.deleteFileIfExistsWithResponse("myfile", options).subscribe(response -> {
-     *             if (response.getStatusCode() == 404) {
-     *                 System.out.println("Does not exist.");
-     *             } else {
-     *                 System.out.println("successfully deleted.");
-     *             }
-     *         });
-     * 
- * - * - *

For more information, see the - * Azure Docs.

- * - * @param fileName Name of the file - * @param options {@link ShareDeleteOptions} - * @return A reactive response signaling completion. If {@link Response}'s status code is 202, the file was - * successfully deleted. If status code is 404, the file does not exist. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> deleteFileIfExistsWithResponse(String fileName, ShareDeleteOptions options) { - try { - return withContext(context -> deleteFileIfExistsWithResponse(fileName, options, - context)); - } catch (RuntimeException ex) { - return monoError(LOGGER, ex); - } - } - - Mono> deleteFileIfExistsWithResponse(String fileName, ShareDeleteOptions options, Context context) { - try { - options = options == null ? new ShareDeleteOptions() : options; - return deleteFileWithResponse(fileName, options.getRequestConditions(), context) - .onErrorResume(t -> t instanceof ShareStorageException && ((ShareStorageException) t) - .getStatusCode() == 404, - t -> { - HttpResponse response = ((ShareStorageException) t).getResponse(); - return Mono.just(new SimpleResponse<>(response.getRequest(), response.getStatusCode(), - response.getHeaders(), null)); - }); - } catch (RuntimeException ex) { - return monoError(LOGGER, ex); - } - } - /** * Get snapshot id which attached to {@link ShareDirectoryAsyncClient}. Return {@code null} if no snapshot id * attached. @@ -2086,7 +1695,7 @@ public String generateSas(ShareServiceSasSignatureValues shareServiceSasSignatur .generateSas(SasImplUtils.extractSharedKeyCredential(getHttpPipeline()), context); } - private static Response createWithRestResponse(final DirectoriesCreateResponse response) { + private Response createWithRestResponse(final DirectoriesCreateResponse response) { String eTag = response.getDeserializedHeaders().getETag(); OffsetDateTime lastModified = response.getDeserializedHeaders().getLastModified(); FileSmbProperties smbProperties = new FileSmbProperties(response.getHeaders()); @@ -2094,7 +1703,7 @@ private static Response createWithRestResponse(final Directo return new SimpleResponse<>(response, shareDirectoryInfo); } - private static Response getPropertiesResponse(DirectoriesGetPropertiesResponse response) { + private Response getPropertiesResponse(DirectoriesGetPropertiesResponse response) { Map metadata = response.getDeserializedHeaders().getXMsMeta(); String eTag = response.getDeserializedHeaders().getETag(); OffsetDateTime offsetDateTime = response.getDeserializedHeaders().getLastModified(); @@ -2105,7 +1714,7 @@ private static Response getPropertiesResponse(Director return new SimpleResponse<>(response, shareDirectoryProperties); } - private static Response setPropertiesResponse(final DirectoriesSetPropertiesResponse response) { + private Response setPropertiesResponse(final DirectoriesSetPropertiesResponse response) { String eTag = response.getDeserializedHeaders().getETag(); OffsetDateTime lastModified = response.getDeserializedHeaders().getLastModified(); FileSmbProperties smbProperties = new FileSmbProperties(response.getHeaders()); @@ -2113,8 +1722,7 @@ private static Response setPropertiesResponse(final Director return new SimpleResponse<>(response, shareDirectoryInfo); } - private static Response setMetadataResponse( - final DirectoriesSetMetadataResponse response) { + private Response setMetadataResponse(final DirectoriesSetMetadataResponse response) { String eTag = response.getDeserializedHeaders().getETag(); boolean isServerEncrypted = response.getDeserializedHeaders().isXMsRequestServerEncrypted(); ShareDirectorySetMetadataInfo shareDirectorySetMetadataInfo = new ShareDirectorySetMetadataInfo(eTag, @@ -2122,7 +1730,7 @@ private static Response setMetadataResponse( return new SimpleResponse<>(response, shareDirectorySetMetadataInfo); } - private static List convertResponseAndGetNumOfResults( + private List convertResponseAndGetNumOfResults( DirectoriesListFilesAndDirectoriesSegmentResponse response) { Set shareFileItems = new TreeSet<>(Comparator.comparing(ShareFileItem::getName)); if (response.getValue().getSegment() != null) { @@ -2148,9 +1756,9 @@ private static List convertResponseAndGetNumOfResults( * @param filePermissionKey The file permission key. * @throws IllegalArgumentException for invalid file permission or file permission keys. */ - private static void validateFilePermissionAndKey(String filePermission, String filePermissionKey) { + private void validateFilePermissionAndKey(String filePermission, String filePermissionKey) { if (filePermission != null && filePermissionKey != null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( + throw logger.logExceptionAsError(new IllegalArgumentException( FileConstants.MessageConstants.FILE_PERMISSION_FILE_PERMISSION_KEY_INVALID)); } diff --git a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/ShareDirectoryClient.java b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/ShareDirectoryClient.java index 8bb025d399d11..58abde70570bb 100644 --- a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/ShareDirectoryClient.java +++ b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/ShareDirectoryClient.java @@ -23,8 +23,6 @@ import com.azure.storage.file.share.models.ShareRequestConditions; import com.azure.storage.file.share.models.ShareStorageException; import com.azure.storage.file.share.models.ShareFileItem; -import com.azure.storage.file.share.options.ShareDeleteOptions; -import com.azure.storage.file.share.options.ShareDirectoryCreateOptions; import com.azure.storage.file.share.options.ShareFileRenameOptions; import com.azure.storage.file.share.options.ShareListFilesAndDirectoriesOptions; import com.azure.storage.file.share.sas.ShareServiceSasSignatureValues; @@ -221,75 +219,6 @@ public Response createWithResponse(FileSmbProperties smbProp return StorageImplUtils.blockWithOptionalTimeout(response, timeout); } - /** - * Creates a directory in the file share if it does not exist. - * - *

Code Samples

- * - *

Create the directory

- * - * - *
-     * ShareDirectoryClient shareDirectoryClient = createClientWithSASToken();
-     * ShareDirectoryInfo shareDirectoryInfo = shareDirectoryClient.createIfNotExists();
-     * System.out.printf("Last Modified Time:%s", shareDirectoryInfo.getLastModified());
-     * 
- * - * - *

For more information, see the - * Azure Docs.

- * - * @return A {@link ShareDirectoryInfo} that contains information about the created directory. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ShareDirectoryInfo createIfNotExists() { - return createIfNotExistsWithResponse(new ShareDirectoryCreateOptions(), null, null).getValue(); - } - - /** - * Creates a directory in the file share if it does not exist. - * - *

Code Samples

- * - *

Create the directory

- * - * - *
-     * ShareDirectoryClient directoryClient = createClientWithSASToken();
-     * FileSmbProperties smbProperties = new FileSmbProperties();
-     * String filePermission = "filePermission";
-     * ShareDirectoryCreateOptions options = new ShareDirectoryCreateOptions().setSmbProperties(smbProperties)
-     *     .setFilePermission(filePermission).setMetadata(Collections.singletonMap("directory", "metadata"));
-     *
-     * Response<ShareDirectoryInfo> response = directoryClient.createIfNotExistsWithResponse(options,
-     *     Duration.ofSeconds(1), new Context(key1, value1));
-     *
-     * if (response.getStatusCode() == 409) {
-     *     System.out.println("Already existed.");
-     * } else {
-     *     System.out.printf("Create completed with status %d%n", response.getStatusCode());
-     * }
-     * 
- * - * - *

For more information, see the - * Azure Docs.

- * - * @param options {@link ShareDirectoryCreateOptions} - * @param timeout An optional timeout applied to the operation. If a response is not returned before the timeout - * concludes a {@link RuntimeException} will be thrown. - * @param context Additional context that is passed through the Http pipeline during the service call. - * @return A reactive {@link Response} signaling completion, whose {@link Response#getValue() value} contains a - * {@link ShareDirectoryInfo} containing information about the directory. If {@link Response}'s status code is 201, - * a new directory was successfully created. If status code is 409, a directory already existed at this location. - * */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createIfNotExistsWithResponse(ShareDirectoryCreateOptions options, - Duration timeout, Context context) { - return StorageImplUtils.blockWithOptionalTimeout(shareDirectoryAsyncClient.createIfNotExistsWithResponse(options, context), - timeout); - } - /** * Deletes the directory in the file share. The directory must be empty before it can be deleted. * @@ -344,64 +273,6 @@ public Response deleteWithResponse(Duration timeout, Context context) { return StorageImplUtils.blockWithOptionalTimeout(response, timeout); } - /** - * Deletes the directory in the file share if it exists. The directory must be empty before it can be deleted. - * - *

Code Samples

- * - *

Delete the directory

- * - * - *
-     * ShareDirectoryClient shareDirectoryClient = createClientWithSASToken();
-     * boolean result = shareDirectoryClient.deleteIfExists();
-     * System.out.println("Directory deleted: " + result);
-     * 
- * - * - *

For more information, see the - * Azure Docs.

- * @return {@code true} if the directory is successfully deleted, {@code false} if the directory does not exist. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public boolean deleteIfExists() { - Response response = deleteIfExistsWithResponse(null, Context.NONE); - return response.getStatusCode() == 202; - } - - /** - * Deletes the directory in the file share if it exists. The directory must be empty before it can be deleted. - * - *

Code Samples

- * - *

Delete the directory

- * - * - *
-     * Response<Void> response = shareDirectoryClient.deleteIfExistsWithResponse(Duration.ofSeconds(1),
-     *     new Context(key1, value1));
-     * if (response.getStatusCode() == 404) {
-     *     System.out.println("Does not exist.");
-     * } else {
-     *     System.out.printf("Delete completed with status %d%n", response.getStatusCode());
-     * }
-     * 
- * - * - *

For more information, see the - * Azure Docs.

- * - * @param timeout An optional timeout applied to the operation. If a response is not returned before the timeout - * concludes a {@link RuntimeException} will be thrown. - * @param context Additional context that is passed through the Http pipeline during the service call. - * @return A response containing status code and HTTP headers. If {@link Response}'s status code is 202, the directory - * was successfully deleted. If status code is 404, the directory does not exist. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteIfExistsWithResponse(Duration timeout, Context context) { - return StorageImplUtils.blockWithOptionalTimeout(shareDirectoryAsyncClient.deleteIfExistsWithResponse(context), - timeout); - } /** * Retrieves the properties of this directory. The properties includes directory metadata, last modified date, is * server encrypted, and eTag. @@ -982,77 +853,6 @@ public Response createSubdirectoryWithResponse(String subd .createWithResponse(smbProperties, filePermission, metadata, timeout, context), shareDirectoryClient); } - /** - * Creates a subdirectory under current directory with specified name if it does not exist. - * - *

Code Samples

- * - *

Create the sub directory "subdir"

- * - * - *
-     * ShareDirectoryClient subdirectoryClient = shareDirectoryClient.createSubdirectoryIfNotExists("subdir");
-     * 
- * - * - *

For more information, see the - * Azure Docs.

- * - * @param subdirectoryName Name of the subdirectory - * @return A {@link ShareDirectoryClient} used to interact with the subdirectory created. - * */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ShareDirectoryClient createSubdirectoryIfNotExists(String subdirectoryName) { - return createSubdirectoryIfNotExistsWithResponse(subdirectoryName, new ShareDirectoryCreateOptions(), null, - Context.NONE).getValue(); - } - - /** - * Creates a subdirectory under current directory with specific name and metadata if it does not exist. - * - *

Code Samples

- * - *

Create the subdirectory named "subdir", with metadata

- * - * - *
-     * FileSmbProperties smbProperties = new FileSmbProperties();
-     * String filePermission = "filePermission";
-     * ShareDirectoryCreateOptions options = new ShareDirectoryCreateOptions().setSmbProperties(smbProperties)
-     *     .setFilePermission(filePermission).setMetadata(Collections.singletonMap("directory", "metadata"));
-     *
-     * Response<ShareDirectoryClient> response = shareDirectoryClient
-     *     .createSubdirectoryIfNotExistsWithResponse("subdir", options, Duration.ofSeconds(1),
-     *         new Context(key1, value1));
-     * if (response.getStatusCode() == 409) {
-     *     System.out.println("Already existed.");
-     * } else {
-     *     System.out.printf("Create completed with status %d%n", response.getStatusCode());
-     * }
-     * 
- * - * - *

For more information, see the - * Azure Docs.

- * - * @param subdirectoryName Name of the subdirectory - * @param options {@link ShareDirectoryCreateOptions} - * @param timeout An optional timeout applied to the operation. If a response is not returned before the timeout - * concludes a {@link RuntimeException} will be thrown. - * @param context Additional context that is passed through the Http pipeline during the service call. - * @return A {@link Response} whose {@link Response#getValue() value} contains the {@link ShareDirectoryClient} used - * to interact with the subdirectory created. If {@link Response}'s status code is 201, a new subdirectory was - * successfully created. If status code is 409, a subdirectory with the same name already existed at this location. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createSubdirectoryIfNotExistsWithResponse(String subdirectoryName, - ShareDirectoryCreateOptions options, Duration timeout, Context context) { - ShareDirectoryClient shareDirectoryClient = getSubdirectoryClient(subdirectoryName); - Response response = shareDirectoryClient.createIfNotExistsWithResponse(options, - timeout, context); - return new SimpleResponse<>(response, shareDirectoryClient); - } - /** * Deletes the subdirectory with specific name in this directory. The directory must be empty before it can be * deleted. @@ -1115,71 +915,6 @@ public Response deleteSubdirectoryWithResponse(String subdirectoryName, Du return StorageImplUtils.blockWithOptionalTimeout(response, timeout); } - /** - * Deletes the subdirectory with specific name in this directory if it exists. The directory must be empty before - * it can be deleted. - * - *

Code Samples

- * - *

Delete the subdirectory named "subdir"

- * - * - *
-     * boolean result = shareDirectoryClient.deleteSubdirectoryIfExists("mysubdirectory");
-     * System.out.println("Subdirectory deleted: " + result);
-     * 
- * - * - *

For more information, see the - * Azure Docs.

- * - * @param subdirectoryName Name of the subdirectory - * @return {@code true} if subdirectory is successfully deleted, {@code false} if subdirectory does not exist. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public boolean deleteSubdirectoryIfExists(String subdirectoryName) { - Response response = deleteSubdirectoryIfExistsWithResponse(subdirectoryName, null, Context.NONE); - return response.getStatusCode() == 202; - } - - /** - * Deletes the subdirectory with specific name in this directory if it exists. The directory must be empty - * before it can be deleted. - * - *

Code Samples

- * - *

Delete the subdirectory named "mysubdirectory"

- * - * - *
-     * Response<Void> response = shareDirectoryClient.deleteSubdirectoryIfExistsWithResponse("mysubdirectory",
-     *     Duration.ofSeconds(1), new Context(key1, value1));
-     * if (response.getStatusCode() == 404) {
-     *     System.out.println("Does not exist.");
-     * } else {
-     *     System.out.printf("Delete completed with status %d%n", response.getStatusCode());
-     * }
-     * 
- * - * - *

For more information, see the - * Azure Docs.

- * - * @param subdirectoryName Name of the subdirectory - * @param context Additional context that is passed through the Http pipeline during the service call. - * @param timeout An optional timeout applied to the operation. If a response is not returned before the timeout - * concludes a {@link RuntimeException} will be thrown. - * @return A response containing status code and HTTP headers. If {@link Response}'s status code is 202, the - * subdirectory was successfully deleted. If status code is 404, the subdirectory does not exist. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteSubdirectoryIfExistsWithResponse(String subdirectoryName, Duration timeout, - Context context) { - Mono> response = shareDirectoryAsyncClient - .deleteSubdirectoryIfExistsWithResponse(subdirectoryName, context); - return StorageImplUtils.blockWithOptionalTimeout(response, timeout); - } - /** * Creates a file in this directory with specific name, max number of results and returns a response of * ShareDirectoryInfo to interact with it. @@ -1201,7 +936,8 @@ public Response deleteSubdirectoryIfExistsWithResponse(String subdirectory * @param fileName Name of the file * @param maxSize Size of the file * @return The ShareFileClient - * @throws ShareStorageException If the parent directory does not exist or file name is an invalid resource name. + * @throws ShareStorageException If the file has already existed, the parent directory does not exist or file name + * is an invalid resource name. */ @ServiceMethod(returns = ReturnType.SINGLE) public ShareFileClient createFile(String fileName, long maxSize) { @@ -1252,7 +988,8 @@ public ShareFileClient createFile(String fileName, long maxSize) { * concludes a {@link RuntimeException} will be thrown. * @param context Additional context that is passed through the Http pipeline during the service call. * @return A response containing the directory info and the status of creating the directory. - * @throws ShareStorageException If the parent directory does not exist or file name is an invalid resource name. + * @throws ShareStorageException If the directory has already existed, the parent directory does not exist or file + * name is an invalid resource name. * @throws RuntimeException if the operation doesn't complete before the timeout concludes. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -1419,107 +1156,6 @@ public Response deleteFileWithResponse(String fileName, ShareRequestCondit return StorageImplUtils.blockWithOptionalTimeout(response, timeout); } - /** - * Deletes the file with specific name in this directory if it exists. - * - *

Code Samples

- * - *

Delete the file "filetest"

- * - * - *
-     * boolean result = shareDirectoryClient.deleteFileIfExists("myfile");
-     * System.out.println("File deleted: " + result);
-     * 
- * - * - *

For more information, see the - * Azure Docs.

- * - * @param fileName Name of the file - * @return {@code true} if the file is successfully deleted, {@code false} if the file does not exist. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public boolean deleteFileIfExists(String fileName) { - Response response = deleteFileIfExistsWithResponse(fileName, new ShareDeleteOptions(), null, - Context.NONE); - return response.getStatusCode() == 202; - } - - /** - * Deletes the file with specific name in this directory if it exists. - * - *

Code Samples

- * - *

Delete the file "filetest"

- * - * - *
-     * Response<Void> response = shareDirectoryClient.deleteFileIfExistsWithResponse("myfile",
-     *     Duration.ofSeconds(1), new Context(key1, value1));
-     * if (response.getStatusCode() == 404) {
-     *     System.out.println("Does not exist.");
-     * } else {
-     *     System.out.printf("Delete completed with status %d%n", response.getStatusCode());
-     * }
-     * 
- * - * - *

For more information, see the - * Azure Docs.

- * - * @param fileName Name of the file - * @param timeout An optional timeout applied to the operation. If a response is not returned before the timeout - * concludes a {@link RuntimeException} will be thrown. - * @param context Additional context that is passed through the Http pipeline during the service call. - * @return A response containing status code and HTTP headers. If {@link Response}'s status code is 202, the file - * was successfully deleted. If status code is 404, the file does not exist. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteFileIfExistsWithResponse(String fileName, Duration timeout, Context context) { - return this.deleteFileIfExistsWithResponse(fileName, new ShareDeleteOptions(), timeout, context); - } - - /** - * Deletes the file with specific name in this directory if it exists. - * - *

Code Samples

- * - *

Delete the file "filetest"

- * - * - *
-     * ShareRequestConditions requestConditions = new ShareRequestConditions().setLeaseId(leaseId);
-     * ShareDeleteOptions options = new ShareDeleteOptions().setRequestConditions(requestConditions);
-     *
-     * Response<Void> fileResponse = shareDirectoryClient.deleteFileIfExistsWithResponse("myfile", options,
-     *     Duration.ofSeconds(1), new Context(key1, value1));
-     * if (fileResponse.getStatusCode() == 404) {
-     *     System.out.println("Does not exist.");
-     * } else {
-     *     System.out.printf("Delete completed with status %d%n", response.getStatusCode());
-     * }
-     * 
- * - * - *

For more information, see the - * Azure Docs.

- * - * @param fileName Name of the file - * @param options {@link ShareDeleteOptions} - * @param timeout An optional timeout applied to the operation. If a response is not returned before the timeout - * concludes a {@link RuntimeException} will be thrown. - * @param context Additional context that is passed through the Http pipeline during the service call. - * @return A response containing status code and HTTP headers. If {@link Response}'s status code is 202, the file - * was successfully deleted. If status code is 404, the file does not exist. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteFileIfExistsWithResponse(String fileName, ShareDeleteOptions options, Duration timeout, - Context context) { - return StorageImplUtils.blockWithOptionalTimeout(shareDirectoryAsyncClient - .deleteFileIfExistsWithResponse(fileName, options, context), timeout); - } - /** * Get snapshot id which attached to {@link ShareDirectoryClient}. Return {@code null} if no snapshot id attached. * diff --git a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/ShareFileAsyncClient.java b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/ShareFileAsyncClient.java index ee94ed8317663..c354ffc8100cc 100644 --- a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/ShareFileAsyncClient.java +++ b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/ShareFileAsyncClient.java @@ -69,10 +69,10 @@ import com.azure.storage.file.share.models.ShareFileProperties; import com.azure.storage.file.share.models.ShareFileRange; import com.azure.storage.file.share.models.ShareFileRangeList; -import com.azure.storage.file.share.models.ShareFileUploadInfo; import com.azure.storage.file.share.models.ShareFileUploadOptions; -import com.azure.storage.file.share.models.ShareFileUploadRangeFromUrlInfo; +import com.azure.storage.file.share.models.ShareFileUploadInfo; import com.azure.storage.file.share.models.ShareFileUploadRangeOptions; +import com.azure.storage.file.share.models.ShareFileUploadRangeFromUrlInfo; import com.azure.storage.file.share.models.ShareRequestConditions; import com.azure.storage.file.share.models.ShareStorageException; import com.azure.storage.file.share.options.ShareFileDownloadOptions; @@ -114,6 +114,7 @@ import java.util.function.Function; import java.util.stream.Collectors; +import static com.azure.core.util.FluxUtil.fluxError; import static com.azure.core.util.FluxUtil.monoError; import static com.azure.core.util.FluxUtil.pagedFluxError; import static com.azure.core.util.FluxUtil.withContext; @@ -145,7 +146,7 @@ */ @ServiceClient(builder = ShareFileClientBuilder.class, isAsync = true) public class ShareFileAsyncClient { - private static final ClientLogger LOGGER = new ClientLogger(ShareFileAsyncClient.class); + private final ClientLogger logger = new ClientLogger(ShareFileAsyncClient.class); static final long FILE_DEFAULT_BLOCK_SIZE = 4 * 1024 * 1024L; static final long FILE_MAX_PUT_RANGE_SIZE = 4 * Constants.MB; private static final long DOWNLOAD_UPLOAD_CHUNK_TIMEOUT = 300; @@ -253,7 +254,7 @@ public Mono> existsWithResponse() { try { return withContext(this::existsWithResponse); } catch (RuntimeException ex) { - return monoError(LOGGER, ex); + return monoError(logger, ex); } } @@ -314,7 +315,12 @@ private boolean checkDoesNotExistStatusCode(Throwable t) { */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono create(long maxSize) { - return createWithResponse(maxSize, null, null, null, null).flatMap(FluxUtil::toMono); + try { + return createWithResponse(maxSize, null, null, null, null) + .flatMap(FluxUtil::toMono); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } } /** @@ -361,7 +367,11 @@ public Mono create(long maxSize) { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> createWithResponse(long maxSize, ShareFileHttpHeaders httpHeaders, FileSmbProperties smbProperties, String filePermission, Map metadata) { - return createWithResponse(maxSize, httpHeaders, smbProperties, filePermission, metadata, null); + try { + return createWithResponse(maxSize, httpHeaders, smbProperties, filePermission, metadata, null); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } } /** @@ -418,7 +428,7 @@ public Mono> createWithResponse(long maxSize, ShareFileH createWithResponse(maxSize, httpHeaders, smbProperties, filePermission, metadata, requestConditions, context)); } catch (RuntimeException ex) { - return monoError(LOGGER, ex); + return monoError(logger, ex); } } @@ -438,13 +448,12 @@ Mono> createWithResponse(long maxSize, ShareFileHttpHead String fileAttributes = smbProperties.setNtfsFileAttributes(FileConstants.FILE_ATTRIBUTES_NONE); String fileCreationTime = smbProperties.setFileCreationTime(FileConstants.FILE_TIME_NOW); String fileLastWriteTime = smbProperties.setFileLastWriteTime(FileConstants.FILE_TIME_NOW); - String fileChangeTime = smbProperties.getFileChangeTimeString(); return azureFileStorageClient.getFiles() - .createWithResponseAsync(shareName, filePath, maxSize, fileAttributes, null, metadata, filePermission, - filePermissionKey, fileCreationTime, fileLastWriteTime, fileChangeTime, requestConditions.getLeaseId(), + .createWithResponseAsync(shareName, filePath, maxSize, fileAttributes, fileCreationTime, + fileLastWriteTime, null, metadata, filePermission, filePermissionKey, requestConditions.getLeaseId(), httpHeaders, context) - .map(ShareFileAsyncClient::createFileInfoResponse); + .map(this::createFileInfoResponse); } /** @@ -523,8 +532,8 @@ public PollerFlux beginCopy(String sourceUrl, Map beginCopy(String sourceUrl, FileSmbPr if (filePermissionCopyMode == null || filePermissionCopyMode == PermissionCopyModeType.SOURCE) { if (filePermission != null || filePermissionKey != null) { - return PollerFlux.error(LOGGER.logExceptionAsError(new IllegalArgumentException( + throw logger.logExceptionAsError(new IllegalArgumentException( "File permission and file permission key can not be set when PermissionCopyModeType is source or " - + "null"))); + + "null")); } } else if (filePermissionCopyMode == PermissionCopyModeType.OVERRIDE) { // Checks that file permission and file permission key are valid - try { - validateFilePermissionAndKey(filePermission, tempSmbProperties.getFilePermissionKey()); - } catch (RuntimeException ex) { - return PollerFlux.error(LOGGER.logExceptionAsError(ex)); - } + validateFilePermissionAndKey(filePermission, tempSmbProperties.getFilePermissionKey()); } final CopyFileSmbInfo copyFileSmbInfo = new CopyFileSmbInfo() @@ -592,24 +597,24 @@ public PollerFlux beginCopy(String sourceUrl, FileSmbPr response.getHeaders().getValue("x-ms-error-code")); }); } catch (RuntimeException ex) { - return monoError(LOGGER, ex); + return monoError(logger, ex); } }, (pollingContext) -> { try { return onPoll(pollingContext.getLatestResponse(), finalRequestConditions); } catch (RuntimeException ex) { - return monoError(LOGGER, ex); + return monoError(logger, ex); } }, (pollingContext, firstResponse) -> { if (firstResponse == null || firstResponse.getValue() == null) { - return Mono.error(LOGGER.logExceptionAsError( + return Mono.error(logger.logExceptionAsError( new IllegalArgumentException("Cannot cancel a poll response that never started."))); } final String copyIdentifier = firstResponse.getValue().getCopyId(); if (!CoreUtils.isNullOrEmpty(copyIdentifier)) { - LOGGER.info("Cancelling copy operation for copy id: {}", copyIdentifier); + logger.info("Cancelling copy operation for copy id: {}", copyIdentifier); return abortCopyWithResponse(copyIdentifier, finalRequestConditions) .thenReturn(firstResponse.getValue()); } @@ -627,7 +632,7 @@ private Mono> onPoll(PollResponse(LongRunningOperationStatus.fromString("COPY_START_FAILED", true), null)); } @@ -654,7 +659,7 @@ private Mono> onPoll(PollResponse> onPoll(PollResponse abortCopy(String copyId) { - return abortCopyWithResponse(copyId).flatMap(FluxUtil::toMono); + try { + return abortCopyWithResponse(copyId).flatMap(FluxUtil::toMono); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } } /** @@ -740,9 +749,10 @@ public Mono> abortCopyWithResponse(String copyId) { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> abortCopyWithResponse(String copyId, ShareRequestConditions requestConditions) { try { - return withContext(context -> abortCopyWithResponse(copyId, requestConditions, context)); + return withContext(context -> abortCopyWithResponse(copyId, requestConditions, + context)); } catch (RuntimeException ex) { - return monoError(LOGGER, ex); + return monoError(logger, ex); } } @@ -785,7 +795,11 @@ Mono> abortCopyWithResponse(String copyId, ShareRequestConditions */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono downloadToFile(String downloadFilePath) { - return downloadToFileWithResponse(downloadFilePath, null).flatMap(FluxUtil::toMono); + try { + return downloadToFileWithResponse(downloadFilePath, null).flatMap(FluxUtil::toMono); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } } /** @@ -870,7 +884,7 @@ public Mono> downloadToFileWithResponse(String dow return withContext(context -> downloadToFileWithResponse(downloadFilePath, range, requestConditions, context)); } catch (RuntimeException ex) { - return monoError(LOGGER, ex); + return monoError(logger, ex); } } @@ -914,7 +928,7 @@ private AsynchronousFileChannel channelSetup(String filePath, OpenOption... opti try { return AsynchronousFileChannel.open(Paths.get(filePath), options); } catch (IOException e) { - throw LOGGER.logExceptionAsError(new UncheckedIOException(e)); + throw logger.logExceptionAsError(new UncheckedIOException(e)); } } @@ -922,7 +936,7 @@ private void channelCleanUp(AsynchronousFileChannel channel) { try { channel.close(); } catch (IOException e) { - throw LOGGER.logExceptionAsError(Exceptions.propagate(new UncheckedIOException(e))); + throw logger.logExceptionAsError(Exceptions.propagate(new UncheckedIOException(e))); } } @@ -949,7 +963,11 @@ private void channelCleanUp(AsynchronousFileChannel channel) { * @return A reactive response containing the file data. */ public Flux download() { - return downloadWithResponse(null).flatMapMany(ShareFileDownloadAsyncResponse::getValue); + try { + return downloadWithResponse(null).flatMapMany(ShareFileDownloadAsyncResponse::getValue); + } catch (RuntimeException ex) { + return fluxError(logger, ex); + } } /** @@ -1049,7 +1067,7 @@ public Mono downloadWithResponse(ShareFileDownlo try { return withContext(context -> downloadWithResponse(options, context)); } catch (RuntimeException ex) { - return monoError(LOGGER, ex); + return monoError(logger, ex); } } @@ -1091,7 +1109,7 @@ Mono downloadWithResponse(ShareFileDownloadOptio of the stream. */ if (newCount == 0) { - LOGGER.warning("Exception encountered in ReliableDownload after all data read from the network but " + logger.warning("Exception encountered in ReliableDownload after all data read from the network but " + "but before stream signaled completion. Returning success as all data was downloaded. " + "Exception message: " + throwable.getMessage()); return Flux.empty(); @@ -1156,7 +1174,11 @@ private Mono downloadRange(ShareFileRange range, Boolean rangeGe */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono delete() { - return deleteWithResponse(null).flatMap(FluxUtil::toMono); + try { + return deleteWithResponse(null).flatMap(FluxUtil::toMono); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } } /** @@ -1215,7 +1237,7 @@ public Mono> deleteWithResponse(ShareRequestConditions requestCon try { return withContext(context -> this.deleteWithResponse(requestConditions, context)); } catch (RuntimeException ex) { - return monoError(LOGGER, ex); + return monoError(logger, ex); } } @@ -1226,121 +1248,7 @@ Mono> deleteWithResponse(ShareRequestConditions requestConditions } /** - * Deletes the file associate with the client if it exists. - * - *

Code Samples

- * - *

Delete the file

- * - * - *
-     * shareFileAsyncClient.deleteIfExists().subscribe(deleted -> {
-     *     if (deleted) {
-     *         System.out.println("Successfully deleted.");
-     *     } else {
-     *         System.out.println("Does not exist.");
-     *     }
-     * });
-     * 
- * - * - *

For more information, see the - * Azure Docs.

- * - * @return a reactive response signaling completion. {@code true} indicates that the file was successfully - * deleted, {@code false} indicates that the file did not exist. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono deleteIfExists() { - return deleteIfExistsWithResponse().map(response -> response.getStatusCode() != 404); - } - - /** - * Deletes the file associate with the client if it exists. - * - *

Code Samples

- * - *

Delete the file

- * - * - *
-     * shareFileAsyncClient.deleteIfExistsWithResponse().subscribe(response -> {
-     *             if (response.getStatusCode() == 404) {
-     *                 System.out.println("Does not exist.");
-     *             } else {
-     *                 System.out.println("successfully deleted.");
-     *             }
-     *         });
-     * 
- * - * - *

For more information, see the - * Azure Docs.

- * - * @return A reactive response signaling completion. If {@link Response}'s status code is 202, the file was - * successfully deleted. If status code is 404, the file does not exist. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> deleteIfExistsWithResponse() { - try { - return deleteIfExistsWithResponse(null); - } catch (RuntimeException ex) { - return monoError(LOGGER, ex); - } - } - - /** - * Deletes the file associate with the client if it does not exist. - * - *

Code Samples

- * - *

Delete the file

- * - * - *
-     * ShareRequestConditions requestConditions = new ShareRequestConditions().setLeaseId(leaseId);
-     * shareFileAsyncClient.deleteIfExistsWithResponse(requestConditions).subscribe(response -> {
-     *             if (response.getStatusCode() == 404) {
-     *                 System.out.println("Does not exist.");
-     *             } else {
-     *                 System.out.println("successfully deleted.");
-     *             }
-     *         });
-     * 
- * - * - *

For more information, see the - * Azure Docs.

- * - * @param requestConditions {@link ShareRequestConditions} - * @return A reactive response signaling completion. If {@link Response}'s status code is 202, the file was - * successfully deleted. If status code is 404, the file does not exist. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> deleteIfExistsWithResponse(ShareRequestConditions requestConditions) { - try { - return withContext(context -> this.deleteIfExistsWithResponse(requestConditions, context)); - } catch (RuntimeException ex) { - return monoError(LOGGER, ex); - } - } - - Mono> deleteIfExistsWithResponse(ShareRequestConditions requestConditions, Context context) { - try { - return deleteWithResponse(requestConditions, context).onErrorResume(t -> t instanceof ShareStorageException - && ((ShareStorageException) t).getStatusCode() == 404, - t -> { - HttpResponse response = ((ShareStorageException) t).getResponse(); - return Mono.just(new SimpleResponse<>(response.getRequest(), response.getStatusCode(), - response.getHeaders(), null)); - }); - } catch (RuntimeException ex) { - return monoError(LOGGER, ex); - } - } - - /** - * Retrieves the properties of the storage account's file. The properties include file metadata, last modified + * Retrieves the properties of the storage account's file. The properties includes file metadata, last modified * date, is server encrypted, and eTag. * *

Code Samples

@@ -1363,11 +1271,15 @@ Mono> deleteIfExistsWithResponse(ShareRequestConditions requestCo */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono getProperties() { - return getPropertiesWithResponse().flatMap(FluxUtil::toMono); + try { + return getPropertiesWithResponse().flatMap(FluxUtil::toMono); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } } /** - * Retrieves the properties of the storage account's file. The properties include file metadata, last modified + * Retrieves the properties of the storage account's file. The properties includes file metadata, last modified * date, is server encrypted, and eTag. * *

Code Samples

@@ -1395,7 +1307,7 @@ public Mono> getPropertiesWithResponse() { } /** - * Retrieves the properties of the storage account's file. The properties include file metadata, last modified + * Retrieves the properties of the storage account's file. The properties includes file metadata, last modified * date, is server encrypted, and eTag. * *

Code Samples

@@ -1422,9 +1334,10 @@ public Mono> getPropertiesWithResponse() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getPropertiesWithResponse(ShareRequestConditions requestConditions) { try { - return withContext(context -> this.getPropertiesWithResponse(requestConditions, context)); + return withContext(context -> this.getPropertiesWithResponse(requestConditions, + context)); } catch (RuntimeException ex) { - return monoError(LOGGER, ex); + return monoError(logger, ex); } } @@ -1435,7 +1348,7 @@ Mono> getPropertiesWithResponse(ShareRequestCondit return azureFileStorageClient.getFiles() .getPropertiesWithResponseAsync(shareName, filePath, snapshot, null, requestConditions.getLeaseId(), context.addData(AZ_TRACING_NAMESPACE_KEY, STORAGE_TRACING_NAMESPACE_VALUE)) - .map(ShareFileAsyncClient::getPropertiesResponse); + .map(this::getPropertiesResponse); } /** @@ -1492,8 +1405,12 @@ Mono> getPropertiesWithResponse(ShareRequestCondit @ServiceMethod(returns = ReturnType.SINGLE) public Mono setProperties(long newFileSize, ShareFileHttpHeaders httpHeaders, FileSmbProperties smbProperties, String filePermission) { - return setPropertiesWithResponse(newFileSize, httpHeaders, smbProperties, filePermission) - .flatMap(FluxUtil::toMono); + try { + return setPropertiesWithResponse(newFileSize, httpHeaders, smbProperties, filePermission) + .flatMap(FluxUtil::toMono); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } } /** @@ -1617,7 +1534,7 @@ public Mono> setPropertiesWithResponse(long newFileSize, setPropertiesWithResponse(newFileSize, httpHeaders, smbProperties, filePermission, requestConditions, context)); } catch (RuntimeException ex) { - return monoError(LOGGER, ex); + return monoError(logger, ex); } } @@ -1637,14 +1554,13 @@ Mono> setPropertiesWithResponse(long newFileSize, ShareF String fileAttributes = smbProperties.setNtfsFileAttributes(FileConstants.PRESERVE); String fileCreationTime = smbProperties.setFileCreationTime(FileConstants.PRESERVE); String fileLastWriteTime = smbProperties.setFileLastWriteTime(FileConstants.PRESERVE); - String fileChangeTime = smbProperties.getFileChangeTimeString(); context = context == null ? Context.NONE : context; return azureFileStorageClient.getFiles() - .setHttpHeadersWithResponseAsync(shareName, filePath, fileAttributes, null, newFileSize, filePermission, - filePermissionKey, fileCreationTime, fileLastWriteTime, fileChangeTime, requestConditions.getLeaseId(), + .setHttpHeadersWithResponseAsync(shareName, filePath, fileAttributes, fileCreationTime, + fileLastWriteTime, null, newFileSize, filePermission, filePermissionKey, requestConditions.getLeaseId(), httpHeaders, context.addData(AZ_TRACING_NAMESPACE_KEY, STORAGE_TRACING_NAMESPACE_VALUE)) - .map(ShareFileAsyncClient::setPropertiesResponse); + .map(this::setPropertiesResponse); } /** @@ -1682,7 +1598,11 @@ Mono> setPropertiesWithResponse(long newFileSize, ShareF */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono setMetadata(Map metadata) { - return setMetadataWithResponse(metadata).flatMap(FluxUtil::toMono); + try { + return setMetadataWithResponse(metadata).flatMap(FluxUtil::toMono); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } } /** @@ -1767,7 +1687,7 @@ public Mono> setMetadataWithResponse(Map setMetadataWithResponse(metadata, requestConditions, context)); } catch (RuntimeException ex) { - return monoError(LOGGER, ex); + return monoError(logger, ex); } } @@ -1780,9 +1700,9 @@ Mono> setMetadataWithResponse(Map> setMetadataWithResponse(Map upload(Flux data, long length) { - return uploadWithResponse(data, length, 0L).flatMap(FluxUtil::toMono); + try { + return uploadWithResponse(data, length, 0L).flatMap(FluxUtil::toMono); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } } /** @@ -1908,10 +1832,10 @@ public Mono> uploadWithResponse(Flux d public Mono> uploadWithResponse(Flux data, long length, Long offset, ShareRequestConditions requestConditions) { try { - return uploadRangeWithResponse(new ShareFileUploadRangeOptions(data, length).setOffset(offset) - .setRequestConditions(requestConditions)); + return withContext(context -> uploadRangeWithResponse(new ShareFileUploadRangeOptions(data, length) + .setOffset(offset).setRequestConditions(requestConditions), context)); } catch (RuntimeException ex) { - return monoError(LOGGER, ex); + return monoError(logger, ex); } } @@ -1945,7 +1869,7 @@ public Mono upload(Flux data, ParallelTransferO return uploadWithResponse(new ShareFileUploadOptions(data).setParallelTransferOptions(transferOptions)) .flatMap(FluxUtil::toMono); } catch (RuntimeException ex) { - return monoError(LOGGER, ex); + return monoError(logger, ex); } } @@ -1979,7 +1903,7 @@ public Mono> uploadWithResponse(ShareFileUploadOpt try { return withContext(context -> uploadWithResponse(options, context)); } catch (RuntimeException ex) { - return monoError(LOGGER, ex); + return monoError(logger, ex); } } @@ -2019,7 +1943,7 @@ Mono> uploadWithResponse(ShareFileUploadOptions op return UploadUtils.uploadFullOrChunked(data, validatedParallelTransferOptions, uploadInChunks, uploadFull); } catch (RuntimeException ex) { - return monoError(LOGGER, ex); + return monoError(logger, ex); } } @@ -2105,7 +2029,7 @@ public Mono uploadRange(Flux data, long length) try { return uploadRangeWithResponse(new ShareFileUploadRangeOptions(data, length)).flatMap(FluxUtil::toMono); } catch (RuntimeException ex) { - return monoError(LOGGER, ex); + return monoError(logger, ex); } } @@ -2140,7 +2064,7 @@ public Mono> uploadRangeWithResponse(ShareFileUplo try { return withContext(context -> uploadRangeWithResponse(options, context)); } catch (RuntimeException ex) { - return monoError(LOGGER, ex); + return monoError(logger, ex); } } @@ -2161,11 +2085,12 @@ Mono> uploadRangeWithResponse(ShareFileUploadRange return azureFileStorageClient.getFiles() .uploadRangeWithResponseAsync(shareName, filePath, range.toString(), ShareFileRangeWriteType.UPDATE, - options.getLength(), null, null, requestConditions.getLeaseId(), options.getLastWrittenMode(), data, + options.getLength(), null, null, requestConditions.getLeaseId(), data, context.addData(AZ_TRACING_NAMESPACE_KEY, STORAGE_TRACING_NAMESPACE_VALUE)) - .map(ShareFileAsyncClient::uploadResponse); + .map(this::uploadResponse); } + // TODO: (gapra) Fix put range from URL link. Service docs have not been updated to show this API /** * Uploads a range of bytes from one file to another file. * @@ -2184,7 +2109,7 @@ Mono> uploadRangeWithResponse(ShareFileUploadRange * * *

For more information, see the - * Azure Docs.

+ * Azure Docs.

* * @param length Specifies the number of bytes being transmitted in the request body. * @param destinationOffset Starting point of the upload range on the destination. @@ -2195,10 +2120,15 @@ Mono> uploadRangeWithResponse(ShareFileUploadRange @ServiceMethod(returns = ReturnType.SINGLE) public Mono uploadRangeFromUrl(long length, long destinationOffset, long sourceOffset, String sourceUrl) { - return uploadRangeFromUrlWithResponse(length, destinationOffset, sourceOffset, sourceUrl) - .flatMap(FluxUtil::toMono); + try { + return uploadRangeFromUrlWithResponse(length, destinationOffset, sourceOffset, sourceUrl) + .flatMap(FluxUtil::toMono); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } } + // TODO: (gapra) Fix put range from URL link. Service docs have not been updated to show this API /** * Uploads a range of bytes from one file to another file. * @@ -2217,7 +2147,7 @@ public Mono uploadRangeFromUrl(long length, lon * * *

For more information, see the - * Azure Docs.

+ * Azure Docs.

* * @param length Specifies the number of bytes being transmitted in the request body. * @param destinationOffset Starting point of the upload range on the destination. @@ -2232,6 +2162,7 @@ public Mono> uploadRangeFromUrlWithRes return this.uploadRangeFromUrlWithResponse(length, destinationOffset, sourceOffset, sourceUrl, null); } + // TODO: (gapra) Fix put range from URL link. Service docs have not been updated to show this API /** * Uploads a range of bytes from one file to another file. * @@ -2251,7 +2182,7 @@ public Mono> uploadRangeFromUrlWithRes * * *

For more information, see the - * Azure Docs.

+ * Azure Docs.

* * @param length Specifies the number of bytes being transmitted in the request body. * @param destinationOffset Starting point of the upload range on the destination. @@ -2265,15 +2196,12 @@ public Mono> uploadRangeFromUrlWithRes public Mono> uploadRangeFromUrlWithResponse(long length, long destinationOffset, long sourceOffset, String sourceUrl, ShareRequestConditions destinationRequestConditions) { - try { - return this.uploadRangeFromUrlWithResponse(new ShareFileUploadRangeFromUrlOptions(length, sourceUrl) - .setDestinationOffset(destinationOffset).setSourceOffset(sourceOffset) - .setDestinationRequestConditions(destinationRequestConditions)); - } catch (RuntimeException ex) { - return monoError(LOGGER, ex); - } + return this.uploadRangeFromUrlWithResponse(new ShareFileUploadRangeFromUrlOptions(length, sourceUrl) + .setDestinationOffset(destinationOffset).setSourceOffset(sourceOffset) + .setDestinationRequestConditions(destinationRequestConditions)); } + // TODO: (gapra) Fix put range from URL link. Service docs have not been updated to show this API /** * Uploads a range of bytes from one file to another file. * @@ -2293,7 +2221,7 @@ public Mono> uploadRangeFromUrlWithRes * * *

For more information, see the - * Azure Docs.

+ * Azure Docs.

* * @param options argument collection * @return A response containing the {@link ShareFileUploadRangeFromUrlInfo file upload range from url info} with @@ -2303,9 +2231,10 @@ public Mono> uploadRangeFromUrlWithRes public Mono> uploadRangeFromUrlWithResponse( ShareFileUploadRangeFromUrlOptions options) { try { - return withContext(context -> uploadRangeFromUrlWithResponse(options, context)); + return withContext(context -> + uploadRangeFromUrlWithResponse(options, context)); } catch (RuntimeException ex) { - return monoError(LOGGER, ex); + return monoError(logger, ex); } } @@ -2326,10 +2255,9 @@ Mono> uploadRangeFromUrlWithResponse( return azureFileStorageClient.getFiles() .uploadRangeFromURLWithResponseAsync(shareName, filePath, destinationRange.toString(), copySource, 0, - null, sourceRange.toString(), null, modifiedRequestConditions.getLeaseId(), sourceAuth, - options.getLastWrittenMode(), null, + null, sourceRange.toString(), null, modifiedRequestConditions.getLeaseId(), sourceAuth, null, context.addData(AZ_TRACING_NAMESPACE_KEY, STORAGE_TRACING_NAMESPACE_VALUE)) - .map(ShareFileAsyncClient::uploadRangeFromUrlResponse); + .map(this::uploadRangeFromUrlResponse); } /** @@ -2358,7 +2286,11 @@ Mono> uploadRangeFromUrlWithResponse( */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono clearRange(long length) { - return clearRangeWithResponse(length, 0).flatMap(FluxUtil::toMono); + try { + return clearRangeWithResponse(length, 0).flatMap(FluxUtil::toMono); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } } /** @@ -2426,9 +2358,10 @@ public Mono> clearRangeWithResponse(long length, l public Mono> clearRangeWithResponse(long length, long offset, ShareRequestConditions requestConditions) { try { - return withContext(context -> clearRangeWithResponse(length, offset, requestConditions, context)); + return withContext(context -> clearRangeWithResponse(length, offset, requestConditions, + context)); } catch (RuntimeException ex) { - return monoError(LOGGER, ex); + return monoError(logger, ex); } } @@ -2439,9 +2372,9 @@ Mono> clearRangeWithResponse(long length, long off context = context == null ? Context.NONE : context; return azureFileStorageClient.getFiles() .uploadRangeWithResponseAsync(shareName, filePath, range.toString(), ShareFileRangeWriteType.CLEAR, - 0L, null, null, requestConditions.getLeaseId(), null, null, + 0L, null, null, requestConditions.getLeaseId(), null, context.addData(AZ_TRACING_NAMESPACE_KEY, STORAGE_TRACING_NAMESPACE_VALUE)) - .map(ShareFileAsyncClient::uploadResponse); + .map(this::uploadResponse); } /** @@ -2516,11 +2449,11 @@ public Mono uploadFromFile(String uploadFilePath, ShareRequestConditions r || throwable instanceof TimeoutException))) .then(), this::channelCleanUp); } catch (RuntimeException ex) { - return monoError(LOGGER, ex); + return monoError(logger, ex); } } - private static List sliceFile(String path) { + private List sliceFile(String path) { File file = new File(path); assert file.exists(); List ranges = new ArrayList<>(); @@ -2555,7 +2488,11 @@ private static List sliceFile(String path) { */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux listRanges() { - return listRanges(null); + try { + return listRanges(null); + } catch (RuntimeException ex) { + return pagedFluxError(logger, ex); + } } /** @@ -2612,7 +2549,7 @@ public PagedFlux listRanges(ShareFileRange range, ShareRequestCo try { return listRangesWithOptionalTimeout(range, requestConditions, null, Context.NONE); } catch (RuntimeException ex) { - return pagedFluxError(LOGGER, ex); + return pagedFluxError(logger, ex); } } @@ -2647,7 +2584,7 @@ public Mono listRangesDiff(String previousSnapshot) { return listRangesDiffWithResponse(new ShareFileListRangesDiffOptions(previousSnapshot)) .map(Response::getValue); } catch (RuntimeException ex) { - return monoError(LOGGER, ex); + return monoError(logger, ex); } } @@ -2683,7 +2620,7 @@ public Mono> listRangesDiffWithResponse(ShareFileLi return listRangesWithResponse(options.getRange(), options.getRequestConditions(), options.getPreviousSnapshot(), Context.NONE); } catch (RuntimeException ex) { - return monoError(LOGGER, ex); + return monoError(logger, ex); } } @@ -2741,7 +2678,11 @@ Mono> listRangesWithResponse(ShareFileRange range, */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux listHandles() { - return listHandles(null); + try { + return listHandles(null); + } catch (RuntimeException ex) { + return pagedFluxError(logger, ex); + } } /** @@ -2769,7 +2710,7 @@ public PagedFlux listHandles(Integer maxResultsPerPage) { try { return listHandlesWithOptionalTimeout(maxResultsPerPage, null, Context.NONE); } catch (RuntimeException ex) { - return pagedFluxError(LOGGER, ex); + return pagedFluxError(logger, ex); } } @@ -2812,7 +2753,12 @@ PagedFlux listHandlesWithOptionalTimeout(Integer maxResultsPerPage, */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono forceCloseHandle(String handleId) { - return forceCloseHandleWithResponse(handleId).flatMap(FluxUtil::toMono); + try { + return withContext(context -> forceCloseHandleWithResponse(handleId, + context)).flatMap(FluxUtil::toMono); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } } /** @@ -2843,7 +2789,7 @@ public Mono> forceCloseHandleWithResponse(String hand try { return withContext(context -> forceCloseHandleWithResponse(handleId, context)); } catch (RuntimeException ex) { - return monoError(LOGGER, ex); + return monoError(logger, ex); } } @@ -2880,12 +2826,12 @@ Mono> forceCloseHandleWithResponse(String handleId, C @ServiceMethod(returns = ReturnType.SINGLE) public Mono forceCloseAllHandles() { try { - return withContext(context -> forceCloseAllHandlesWithOptionalTimeout(null, context) - .reduce(new CloseHandlesInfo(0, 0), + return withContext(context -> forceCloseAllHandlesWithOptionalTimeout(null, + context).reduce(new CloseHandlesInfo(0, 0), (accu, next) -> new CloseHandlesInfo(accu.getClosedHandles() + next.getClosedHandles(), accu.getFailedHandles() + next.getFailedHandles()))); } catch (RuntimeException ex) { - return monoError(LOGGER, ex); + return monoError(logger, ex); } } @@ -2929,7 +2875,7 @@ public Mono rename(String destinationPath) { try { return renameWithResponse(new ShareFileRenameOptions(destinationPath)).flatMap(FluxUtil::toMono); } catch (RuntimeException ex) { - return monoError(LOGGER, ex); + return monoError(logger, ex); } } @@ -2969,9 +2915,10 @@ public Mono rename(String destinationPath) { public Mono> renameWithResponse(ShareFileRenameOptions options) { try { return withContext(context -> renameWithResponse(options, context)) - .map(response -> new SimpleResponse<>(response, new ShareFileAsyncClient(response.getValue()))); + .map(response -> new SimpleResponse<>(response, + new ShareFileAsyncClient(response.getValue()))); } catch (RuntimeException ex) { - return monoError(LOGGER, ex); + return monoError(logger, ex); } } @@ -2999,20 +2946,15 @@ Mono> renameWithResponse(ShareFileRenameOptions o String fileAttributes = NtfsFileAttributes.toString(tempSmbProperties.getNtfsFileAttributes()); String fileCreationTime = FileSmbProperties.parseFileSMBDate(tempSmbProperties.getFileCreationTime()); String fileLastWriteTime = FileSmbProperties.parseFileSMBDate(tempSmbProperties.getFileLastWriteTime()); - String fileChangeTime = FileSmbProperties.parseFileSMBDate(tempSmbProperties.getFileChangeTime()); smbInfo = new CopyFileSmbInfo() .setFileAttributes(fileAttributes) .setFileCreationTime(fileCreationTime) .setFileLastWriteTime(fileLastWriteTime) - .setFileChangeTime(fileChangeTime) .setIgnoreReadOnly(options.isIgnoreReadOnly()); } ShareFileAsyncClient destinationFileClient = getFileAsyncClient(options.getDestinationPath()); - ShareFileHttpHeaders headers = options.getContentType() == null ? null - : new ShareFileHttpHeaders().setContentType(options.getContentType()); - String renameSource = this.getFileUrl(); // TODO (rickle-msft): when support added to core // String sasToken = this.extractSasToken(); @@ -3022,7 +2964,7 @@ Mono> renameWithResponse(ShareFileRenameOptions o destinationFileClient.getShareName(), destinationFileClient.getFilePath(), renameSource, null /* timeout */, options.getReplaceIfExists(), options.isIgnoreReadOnly(), options.getFilePermission(), filePermissionKey, options.getMetadata(), sourceConditions, - destinationConditions, smbInfo, headers, + destinationConditions, smbInfo, context.addData(AZ_TRACING_NAMESPACE_KEY, STORAGE_TRACING_NAMESPACE_VALUE)) .map(response -> new SimpleResponse<>(response, destinationFileClient)); } @@ -3034,7 +2976,7 @@ Mono> renameWithResponse(ShareFileRenameOptions o */ ShareFileAsyncClient getFileAsyncClient(String destinationPath) { if (CoreUtils.isNullOrEmpty(destinationPath)) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException("'destinationPath' can not be set to null")); + throw logger.logExceptionAsError(new IllegalArgumentException("'destinationPath' can not be set to null")); } return new ShareFileAsyncClient(this.azureFileStorageClient, getShareName(), destinationPath, null, @@ -3192,7 +3134,7 @@ public String generateSas(ShareServiceSasSignatureValues shareServiceSasSignatur .generateSas(SasImplUtils.extractSharedKeyCredential(getHttpPipeline()), context); } - private static Response createFileInfoResponse(final FilesCreateResponse response) { + private Response createFileInfoResponse(final FilesCreateResponse response) { String eTag = response.getDeserializedHeaders().getETag(); OffsetDateTime lastModified = response.getDeserializedHeaders().getLastModified(); boolean isServerEncrypted = response.getDeserializedHeaders().isXMsRequestServerEncrypted(); @@ -3201,7 +3143,7 @@ private static Response createFileInfoResponse(final FilesCreateR return new SimpleResponse<>(response, shareFileInfo); } - private static Response setPropertiesResponse(final FilesSetHttpHeadersResponse response) { + private Response setPropertiesResponse(final FilesSetHttpHeadersResponse response) { String eTag = response.getDeserializedHeaders().getETag(); OffsetDateTime lastModified = response.getDeserializedHeaders().getLastModified(); boolean isServerEncrypted = response.getDeserializedHeaders().isXMsRequestServerEncrypted(); @@ -3210,7 +3152,7 @@ private static Response setPropertiesResponse(final FilesSetHttpH return new SimpleResponse<>(response, shareFileInfo); } - private static Response getPropertiesResponse(final FilesGetPropertiesResponse response) { + private Response getPropertiesResponse(final FilesGetPropertiesResponse response) { FilesGetPropertiesHeaders headers = response.getDeserializedHeaders(); String eTag = headers.getETag(); OffsetDateTime lastModified = headers.getLastModified(); @@ -3236,16 +3178,16 @@ private static Response getPropertiesResponse(final FilesGe String copyProgress = headers.getXMsCopyProgress(); String copySource = headers.getXMsCopySource(); CopyStatusType copyStatus = headers.getXMsCopyStatus(); - Boolean isServerEncrypted = headers.isXMsServerEncrypted(); + Boolean isServerEncrpted = headers.isXMsServerEncrypted(); FileSmbProperties smbProperties = new FileSmbProperties(response.getHeaders()); ShareFileProperties shareFileProperties = new ShareFileProperties(eTag, lastModified, metadata, fileType, contentLength, contentType, contentMD5, contentEncoding, cacheControl, contentDisposition, leaseStatusType, leaseStateType, leaseDurationType, copyCompletionTime, copyStatusDescription, copyId, - copyProgress, copySource, copyStatus, isServerEncrypted, smbProperties); + copyProgress, copySource, copyStatus, isServerEncrpted, smbProperties); return new SimpleResponse<>(response, shareFileProperties); } - private static Response uploadResponse(final FilesUploadRangeResponse response) { + private Response uploadResponse(final FilesUploadRangeResponse response) { FilesUploadRangeHeaders headers = response.getDeserializedHeaders(); String eTag = headers.getETag(); OffsetDateTime lastModified = headers.getLastModified(); @@ -3261,7 +3203,7 @@ private static Response uploadResponse(final FilesUploadRan return new SimpleResponse<>(response, shareFileUploadInfo); } - private static Response uploadRangeFromUrlResponse( + private Response uploadRangeFromUrlResponse( final FilesUploadRangeFromURLResponse response) { FilesUploadRangeFromURLHeaders headers = response.getDeserializedHeaders(); String eTag = headers.getETag(); @@ -3272,7 +3214,7 @@ private static Response uploadRangeFromUrlRespo return new SimpleResponse<>(response, shareFileUploadRangeFromUrlInfo); } - private static Response setMetadataResponse(final FilesSetMetadataResponse response) { + private Response setMetadataResponse(final FilesSetMetadataResponse response) { String eTag = response.getDeserializedHeaders().getETag(); Boolean isServerEncrypted = response.getDeserializedHeaders().isXMsRequestServerEncrypted(); ShareFileMetadataInfo shareFileMetadataInfo = new ShareFileMetadataInfo(eTag, isServerEncrypted); @@ -3286,9 +3228,9 @@ private static Response setMetadataResponse(final FilesSe * @param filePermissionKey The file permission key. * @throws IllegalArgumentException for invalid file permission or file permission keys. */ - private static void validateFilePermissionAndKey(String filePermission, String filePermissionKey) { + private void validateFilePermissionAndKey(String filePermission, String filePermissionKey) { if (filePermission != null && filePermissionKey != null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( + throw logger.logExceptionAsError(new IllegalArgumentException( FileConstants.MessageConstants.FILE_PERMISSION_FILE_PERMISSION_KEY_INVALID)); } diff --git a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/ShareFileClient.java b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/ShareFileClient.java index d093764eb0582..f5af9d3e25fcb 100644 --- a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/ShareFileClient.java +++ b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/ShareFileClient.java @@ -12,6 +12,7 @@ import com.azure.core.http.rest.SimpleResponse; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.SyncPoller; import com.azure.storage.common.ParallelTransferOptions; import com.azure.storage.common.StorageSharedKeyCredential; @@ -72,6 +73,8 @@ */ @ServiceClient(builder = ShareFileClientBuilder.class) public class ShareFileClient { + private final ClientLogger logger = new ClientLogger(ShareFileClient.class); + private final ShareFileAsyncClient shareFileAsyncClient; /** @@ -410,8 +413,8 @@ public SyncPoller beginCopy(String sourceUrl, Map deleteWithResponse(ShareRequestConditions requestCondition } /** - * Deletes the file associate with the client if it exists. - * - *

Code Samples

- * - *

Delete the file

- * - * - *
-     * boolean result = fileClient.deleteIfExists();
-     * System.out.println("File deleted: " + result);
-     * 
- * - * - *

For more information, see the - * Azure Docs.

- * @return {@code true} if the file is successfully deleted, {@code false} if the file does not exist. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public boolean deleteIfExists() { - Response response = deleteIfExistsWithResponse(null, Context.NONE); - return response.getStatusCode() == 202; - } - - /** - * Deletes the file associate with the client if it exists. - * - *

Code Samples

- * - *

Delete the file

- * - * - *
-     * Response<Void> response = fileClient.deleteIfExistsWithResponse(Duration.ofSeconds(1), new Context(key1, value1));
-     * if (response.getStatusCode() == 404) {
-     *     System.out.println("Does not exist.");
-     * } else {
-     *     System.out.printf("Delete completed with status %d%n", response.getStatusCode());
-     * }
-     * 
- * - * - *

For more information, see the - * Azure Docs.

- * - * @param timeout An optional timeout applied to the operation. If a response is not returned before the timeout - * concludes a {@link RuntimeException} will be thrown. - * @param context Additional context that is passed through the Http pipeline during the service call. - * @return A response containing status code and HTTP headers. If {@link Response}'s status code is 202, the file - * was successfully deleted. If status code is 404, the file does not exist. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteIfExistsWithResponse(Duration timeout, Context context) { - return this.deleteIfExistsWithResponse(null, timeout, context); - } - - /** - * Deletes the file associate with the client if it exists. - * - *

Code Samples

- * - *

Delete the file

- * - * - *
-     * ShareRequestConditions requestConditions = new ShareRequestConditions().setLeaseId(leaseId);
-     * Response<Void> res = fileClient.deleteIfExistsWithResponse(requestConditions, Duration.ofSeconds(1),
-     *     new Context(key1, value1));
-     * if (res.getStatusCode() == 404) {
-     *     System.out.println("Does not exist.");
-     * } else {
-     *     System.out.printf("Delete completed with status %d%n", response.getStatusCode());
-     * }
-     * 
- * - * - *

For more information, see the - * Azure Docs.

- * - * @param requestConditions {@link ShareRequestConditions} - * @param timeout An optional timeout applied to the operation. If a response is not returned before the timeout - * concludes a {@link RuntimeException} will be thrown. - * @param context Additional context that is passed through the Http pipeline during the service call. - * @return A response containing status code and HTTP headers. If {@link Response}'s status code is 202, the file - * was successfully deleted. If status code is 404, the file does not exist. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteIfExistsWithResponse(ShareRequestConditions requestConditions, Duration timeout, - Context context) { - Mono> response = shareFileAsyncClient.deleteIfExistsWithResponse(requestConditions, context); - return StorageImplUtils.blockWithOptionalTimeout(response, timeout); - } - - /** - * Retrieves the properties of the storage account's file. The properties include file metadata, last modified + * Retrieves the properties of the storage account's file. The properties includes file metadata, last modified * date, is server encrypted, and eTag. * *

Code Samples

@@ -1002,7 +912,7 @@ public ShareFileProperties getProperties() { } /** - * Retrieves the properties of the storage account's file. The properties include file metadata, last modified + * Retrieves the properties of the storage account's file. The properties includes file metadata, last modified * date, is server encrypted, and eTag. * *

Code Samples

@@ -1033,7 +943,7 @@ public Response getPropertiesWithResponse(Duration timeout, } /** - * Retrieves the properties of the storage account's file. The properties include file metadata, last modified + * Retrieves the properties of the storage account's file. The properties includes file metadata, last modified * date, is server encrypted, and eTag. * *

Code Samples

@@ -1651,7 +1561,7 @@ public Response uploadRangeWithResponse(ShareFileUploadRang * * *

For more information, see the - * Azure Docs.

+ * Azure Docs.

* * @param length Specifies the number of bytes being transmitted in the request body. * @param destinationOffset Starting point of the upload range on the destination. @@ -1659,6 +1569,7 @@ public Response uploadRangeWithResponse(ShareFileUploadRang * @param sourceUrl Specifies the URL of the source file. * @return The {@link ShareFileUploadRangeFromUrlInfo file upload range from url info} */ + // TODO: (gapra) Fix put range from URL link. Service docs have not been updated to show this API @ServiceMethod(returns = ReturnType.SINGLE) public ShareFileUploadRangeFromUrlInfo uploadRangeFromUrl(long length, long destinationOffset, long sourceOffset, String sourceUrl) { @@ -1682,7 +1593,7 @@ public ShareFileUploadRangeFromUrlInfo uploadRangeFromUrl(long length, long dest * * *

For more information, see the - * Azure Docs.

+ * Azure Docs.

* * @param length Specifies the number of bytes being transmitted in the request body. * @param destinationOffset Starting point of the upload range on the destination. @@ -1695,6 +1606,7 @@ public ShareFileUploadRangeFromUrlInfo uploadRangeFromUrl(long length, long dest * headers and response status code. * @throws RuntimeException if the operation doesn't complete before the timeout concludes. */ + // TODO: (gapra) Fix put range from URL link. Service docs have not been updated to show this API @ServiceMethod(returns = ReturnType.SINGLE) public Response uploadRangeFromUrlWithResponse(long length, long destinationOffset, long sourceOffset, String sourceUrl, Duration timeout, Context context) { @@ -1719,7 +1631,7 @@ public Response uploadRangeFromUrlWithResponse( * * *

For more information, see the - * Azure Docs.

+ * Azure Docs.

* * @param length Specifies the number of bytes being transmitted in the request body. * @param destinationOffset Starting point of the upload range on the destination. @@ -1733,6 +1645,7 @@ public Response uploadRangeFromUrlWithResponse( * headers and response status code. * @throws RuntimeException if the operation doesn't complete before the timeout concludes. */ + // TODO: (gapra) Fix put range from URL link. Service docs have not been updated to show this API @ServiceMethod(returns = ReturnType.SINGLE) public Response uploadRangeFromUrlWithResponse(long length, long destinationOffset, long sourceOffset, String sourceUrl, ShareRequestConditions requestConditions, Duration timeout, @@ -1759,7 +1672,7 @@ public Response uploadRangeFromUrlWithResponse( * * *

For more information, see the - * Azure Docs.

+ * Azure Docs.

* * @param options argument collection * @param timeout An optional timeout applied to the operation. If a response is not returned before the timeout @@ -1769,6 +1682,7 @@ public Response uploadRangeFromUrlWithResponse( * headers and response status code. * @throws RuntimeException if the operation doesn't complete before the timeout concludes. */ + // TODO: (gapra) Fix put range from URL link. Service docs have not been updated to show this API @ServiceMethod(returns = ReturnType.SINGLE) public Response uploadRangeFromUrlWithResponse( ShareFileUploadRangeFromUrlOptions options, Duration timeout, Context context) { diff --git a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/ShareFileClientBuilder.java b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/ShareFileClientBuilder.java index f4d224b184742..832ed93a92a99 100644 --- a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/ShareFileClientBuilder.java +++ b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/ShareFileClientBuilder.java @@ -155,7 +155,7 @@ public class ShareFileClientBuilder implements AzureSasCredentialTrait, ConfigurationTrait, EndpointTrait { - private static final ClientLogger LOGGER = new ClientLogger(ShareFileClientBuilder.class); + private final ClientLogger logger = new ClientLogger(ShareFileClientBuilder.class); private String endpoint; private String accountName; @@ -195,7 +195,7 @@ private AzureFileStorageImpl constructImpl(ShareServiceVersion serviceVersion) { Objects.requireNonNull(shareName, "'shareName' cannot be null."); Objects.requireNonNull(resourcePath, "'resourcePath' cannot be null."); CredentialValidator.validateSingleCredentialIsPresent( - storageSharedKeyCredential, null, azureSasCredential, sasToken, LOGGER); + storageSharedKeyCredential, null, azureSasCredential, sasToken, logger); HttpPipeline pipeline = (httpPipeline != null) ? httpPipeline : BuilderHelper.buildPipeline(() -> { if (storageSharedKeyCredential != null) { @@ -205,11 +205,11 @@ private AzureFileStorageImpl constructImpl(ShareServiceVersion serviceVersion) { } else if (sasToken != null) { return new AzureSasCredentialPolicy(new AzureSasCredential(sasToken), false); } else { - throw LOGGER.logExceptionAsError( + throw logger.logExceptionAsError( new IllegalArgumentException("Credentials are required for authorization")); } }, retryOptions, coreRetryOptions, logOptions, clientOptions, httpClient, perCallPolicies, - perRetryPolicies, configuration, LOGGER); + perRetryPolicies, configuration, logger); return new AzureFileStorageImplBuilder() .url(endpoint) @@ -347,7 +347,7 @@ public ShareFileClientBuilder endpoint(String endpoint) { sasToken(sasToken); } } catch (MalformedURLException ex) { - throw LOGGER.logExceptionAsError( + throw logger.logExceptionAsError( new IllegalArgumentException("The Azure Storage File endpoint url is malformed.", ex)); } @@ -456,10 +456,10 @@ public ShareFileClientBuilder credential(AzureSasCredential credential) { @Override public ShareFileClientBuilder connectionString(String connectionString) { StorageConnectionString storageConnectionString - = StorageConnectionString.create(connectionString, LOGGER); + = StorageConnectionString.create(connectionString, logger); StorageEndpoint endpoint = storageConnectionString.getFileEndpoint(); if (endpoint == null || endpoint.getPrimaryUri() == null) { - throw LOGGER + throw logger .logExceptionAsError(new IllegalArgumentException( "connectionString missing required settings to derive file service endpoint.")); } @@ -493,7 +493,7 @@ public ShareFileClientBuilder connectionString(String connectionString) { @Override public ShareFileClientBuilder httpClient(HttpClient httpClient) { if (this.httpClient != null && httpClient == null) { - LOGGER.info("'httpClient' is being set to 'null' when it was previously configured."); + logger.info("'httpClient' is being set to 'null' when it was previously configured."); } this.httpClient = httpClient; @@ -621,7 +621,7 @@ public ShareFileClientBuilder retryOptions(RetryOptions retryOptions) { @Override public ShareFileClientBuilder pipeline(HttpPipeline httpPipeline) { if (this.httpPipeline != null && httpPipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + logger.info("HttpPipeline is being set to 'null' when it was previously configured."); } this.httpPipeline = httpPipeline; diff --git a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/ShareServiceAsyncClient.java b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/ShareServiceAsyncClient.java index 60b64ba89f6b0..58d99772557e5 100644 --- a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/ShareServiceAsyncClient.java +++ b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/ShareServiceAsyncClient.java @@ -72,7 +72,7 @@ */ @ServiceClient(builder = ShareServiceClientBuilder.class, isAsync = true) public final class ShareServiceAsyncClient { - private static final ClientLogger LOGGER = new ClientLogger(ShareServiceAsyncClient.class); + private final ClientLogger logger = new ClientLogger(ShareServiceAsyncClient.class); private final AzureFileStorageImpl azureFileStorageClient; private final String accountName; private final ShareServiceVersion serviceVersion; @@ -160,7 +160,11 @@ public ShareAsyncClient getShareAsyncClient(String shareName, String snapshot) { */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux listShares() { - return listShares(null); + try { + return listShares(null); + } catch (RuntimeException ex) { + return pagedFluxError(logger, ex); + } } /** @@ -215,7 +219,7 @@ public PagedFlux listShares(ListSharesOptions options) { try { return listSharesWithOptionalTimeout(null, options, null, Context.NONE); } catch (RuntimeException ex) { - return pagedFluxError(LOGGER, ex); + return pagedFluxError(logger, ex); } } @@ -295,7 +299,11 @@ PagedFlux listSharesWithOptionalTimeout(String marker, ListSharesOpti */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono getProperties() { - return getPropertiesWithResponse().flatMap(FluxUtil::toMono); + try { + return getPropertiesWithResponse().flatMap(FluxUtil::toMono); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } } /** @@ -326,7 +334,7 @@ public Mono> getPropertiesWithResponse() { try { return withContext(this::getPropertiesWithResponse); } catch (RuntimeException ex) { - return monoError(LOGGER, ex); + return monoError(logger, ex); } } @@ -382,7 +390,11 @@ Mono> getPropertiesWithResponse(Context context */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono setProperties(ShareServiceProperties properties) { - return setPropertiesWithResponse(properties).flatMap(FluxUtil::toMono); + try { + return setPropertiesWithResponse(properties).flatMap(FluxUtil::toMono); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } } /** @@ -448,7 +460,7 @@ public Mono> setPropertiesWithResponse(ShareServiceProperties pro try { return withContext(context -> setPropertiesWithResponse(properties, context)); } catch (RuntimeException ex) { - return monoError(LOGGER, ex); + return monoError(logger, ex); } } @@ -486,7 +498,11 @@ Mono> setPropertiesWithResponse(ShareServiceProperties properties */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono createShare(String shareName) { - return createShareWithResponse(shareName, (ShareCreateOptions) null, null).flatMap(FluxUtil::toMono); + try { + return createShareWithResponse(shareName, (ShareCreateOptions) null, null).flatMap(FluxUtil::toMono); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } } /** @@ -536,8 +552,12 @@ public Mono createShare(String shareName) { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> createShareWithResponse(String shareName, Map metadata, Integer quotaInGB) { - return createShareWithResponse(shareName, new ShareCreateOptions().setMetadata(metadata) - .setQuotaInGb(quotaInGB)); + try { + return withContext(context -> createShareWithResponse(shareName, new ShareCreateOptions() + .setMetadata(metadata).setQuotaInGb(quotaInGB), context)); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } } /** @@ -573,7 +593,7 @@ public Mono> createShareWithResponse(String shareName try { return withContext(context -> createShareWithResponse(shareName, options, context)); } catch (RuntimeException ex) { - return monoError(LOGGER, ex); + return monoError(logger, ex); } } @@ -610,7 +630,11 @@ Mono> createShareWithResponse(String shareName, Share */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono deleteShare(String shareName) { - return deleteShareWithResponse(shareName, null).flatMap(FluxUtil::toMono); + try { + return deleteShareWithResponse(shareName, null).flatMap(FluxUtil::toMono); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } } /** @@ -643,7 +667,7 @@ public Mono> deleteShareWithResponse(String shareName, String sna try { return withContext(context -> deleteShareWithResponse(shareName, snapshot, context)); } catch (RuntimeException ex) { - return monoError(LOGGER, ex); + return monoError(logger, ex); } } @@ -781,7 +805,8 @@ public String generateAccountSas(AccountSasSignatureValues accountSasSignatureVa * to interact with the restored share. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono undeleteShare(String deletedShareName, String deletedShareVersion) { + public Mono undeleteShare( + String deletedShareName, String deletedShareVersion) { return this.undeleteShareWithResponse(deletedShareName, deletedShareVersion).flatMap(FluxUtil::toMono); } @@ -823,12 +848,14 @@ public Mono undeleteShare(String deletedShareName, String dele * ShareAsyncClient} used to interact with the restored share. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> undeleteShareWithResponse(String deletedShareName, - String deletedShareVersion) { + public Mono> undeleteShareWithResponse( + String deletedShareName, String deletedShareVersion) { try { - return withContext(context -> undeleteShareWithResponse(deletedShareName, deletedShareVersion, context)); + return withContext(context -> + undeleteShareWithResponse( + deletedShareName, deletedShareVersion, context)); } catch (RuntimeException ex) { - return monoError(LOGGER, ex); + return monoError(logger, ex); } } diff --git a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/ShareServiceClientBuilder.java b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/ShareServiceClientBuilder.java index cc570bce65f74..3c373952ba9de 100644 --- a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/ShareServiceClientBuilder.java +++ b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/ShareServiceClientBuilder.java @@ -133,7 +133,7 @@ public final class ShareServiceClientBuilder implements AzureSasCredentialTrait, ConfigurationTrait, EndpointTrait { - private static final ClientLogger LOGGER = new ClientLogger(ShareServiceClientBuilder.class); + private final ClientLogger logger = new ClientLogger(ShareServiceClientBuilder.class); private String endpoint; private String accountName; @@ -181,7 +181,7 @@ public ShareServiceClientBuilder() { */ public ShareServiceAsyncClient buildAsyncClient() { CredentialValidator.validateSingleCredentialIsPresent( - storageSharedKeyCredential, null, azureSasCredential, sasToken, LOGGER); + storageSharedKeyCredential, null, azureSasCredential, sasToken, logger); ShareServiceVersion serviceVersion = version != null ? version : ShareServiceVersion.getLatest(); HttpPipeline pipeline = (httpPipeline != null) ? httpPipeline : BuilderHelper.buildPipeline(() -> { @@ -192,11 +192,11 @@ public ShareServiceAsyncClient buildAsyncClient() { } else if (sasToken != null) { return new AzureSasCredentialPolicy(new AzureSasCredential(sasToken), false); } else { - throw LOGGER.logExceptionAsError( + throw logger.logExceptionAsError( new IllegalArgumentException("Credentials are required for authorization")); } }, retryOptions, coreRetryOptions, logOptions, clientOptions, httpClient, perCallPolicies, - perRetryPolicies, configuration, LOGGER); + perRetryPolicies, configuration, logger); AzureFileStorageImpl azureFileStorage = new AzureFileStorageImplBuilder() .url(endpoint) @@ -255,7 +255,7 @@ public ShareServiceClientBuilder endpoint(String endpoint) { this.sasToken(sasToken); } } catch (MalformedURLException ex) { - throw LOGGER.logExceptionAsError( + throw logger.logExceptionAsError( new IllegalArgumentException("The Azure Storage File Service endpoint url is malformed.", ex)); } @@ -327,10 +327,10 @@ public ShareServiceClientBuilder credential(AzureSasCredential credential) { @Override public ShareServiceClientBuilder connectionString(String connectionString) { StorageConnectionString storageConnectionString - = StorageConnectionString.create(connectionString, LOGGER); + = StorageConnectionString.create(connectionString, logger); StorageEndpoint endpoint = storageConnectionString.getFileEndpoint(); if (endpoint == null || endpoint.getPrimaryUri() == null) { - throw LOGGER + throw logger .logExceptionAsError(new IllegalArgumentException( "connectionString missing required settings to derive file service endpoint.")); } @@ -364,7 +364,7 @@ public ShareServiceClientBuilder connectionString(String connectionString) { @Override public ShareServiceClientBuilder httpClient(HttpClient httpClient) { if (this.httpClient != null && httpClient == null) { - LOGGER.info("'httpClient' is being set to 'null' when it was previously configured."); + logger.info("'httpClient' is being set to 'null' when it was previously configured."); } this.httpClient = httpClient; @@ -492,7 +492,7 @@ public ShareServiceClientBuilder retryOptions(RetryOptions retryOptions) { @Override public ShareServiceClientBuilder pipeline(HttpPipeline httpPipeline) { if (this.httpPipeline != null && httpPipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + logger.info("HttpPipeline is being set to 'null' when it was previously configured."); } this.httpPipeline = httpPipeline; diff --git a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/ShareServiceVersion.java b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/ShareServiceVersion.java index bbebea6cf22ca..1061b4a3d9f82 100644 --- a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/ShareServiceVersion.java +++ b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/ShareServiceVersion.java @@ -63,12 +63,7 @@ public enum ShareServiceVersion implements ServiceVersion { /** * Service version {@code 2021-04-10}. */ - V2021_04_10("2021-04-10"), - - /** - * Service version {@code 2021-06-08}. - */ - V2021_06_08("2021-06-08"); + V2021_04_10("2021-04-10"); private final String version; @@ -90,6 +85,6 @@ public String getVersion() { * @return the latest {@link ShareServiceVersion} */ public static ShareServiceVersion getLatest() { - return V2021_06_08; + return V2021_04_10; } } diff --git a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/StorageFileInputStream.java b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/StorageFileInputStream.java index c7b3f02345a42..7abf126d69c23 100644 --- a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/StorageFileInputStream.java +++ b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/StorageFileInputStream.java @@ -17,7 +17,7 @@ * Provides an input stream to read a given storage file resource. */ public class StorageFileInputStream extends StorageInputStream { - private static final ClientLogger LOGGER = new ClientLogger(StorageFileInputStream.class); + private final ClientLogger logger = new ClientLogger(StorageFileInputStream.class); private final ShareFileAsyncClient shareFileAsyncClient; @@ -70,7 +70,7 @@ protected synchronized ByteBuffer dispatchRead(final int readLength, final long this.streamFaulted = true; this.lastError = new IOException(e); - throw LOGGER.logExceptionAsError(new RuntimeException(this.lastError.getMessage(), e)); + throw logger.logExceptionAsError(new RuntimeException(this.lastError.getMessage())); } } } diff --git a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/implementation/DirectoriesImpl.java b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/implementation/DirectoriesImpl.java index c2a05d1fc9cd2..a04fc762bac6d 100644 --- a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/implementation/DirectoriesImpl.java +++ b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/implementation/DirectoriesImpl.java @@ -81,7 +81,6 @@ Mono create( @HeaderParam("x-ms-file-attributes") String fileAttributes, @HeaderParam("x-ms-file-creation-time") String fileCreationTime, @HeaderParam("x-ms-file-last-write-time") String fileLastWriteTime, - @HeaderParam("x-ms-file-change-time") String fileChangeTime, @HeaderParam("Accept") String accept, Context context); @@ -128,7 +127,6 @@ Mono setProperties( @HeaderParam("x-ms-file-attributes") String fileAttributes, @HeaderParam("x-ms-file-creation-time") String fileCreationTime, @HeaderParam("x-ms-file-last-write-time") String fileLastWriteTime, - @HeaderParam("x-ms-file-change-time") String fileChangeTime, @HeaderParam("Accept") String accept, Context context); @@ -220,7 +218,6 @@ Mono rename( @HeaderParam("x-ms-file-attributes") String fileAttributes, @HeaderParam("x-ms-file-creation-time") String fileCreationTime, @HeaderParam("x-ms-file-last-write-time") String fileLastWriteTime, - @HeaderParam("x-ms-file-change-time") String fileChangeTime, @HeaderParam("x-ms-file-permission") String filePermission, @HeaderParam("x-ms-file-permission-key") String filePermissionKey, @HeaderParam("x-ms-meta-") Map metadata, @@ -235,6 +232,8 @@ Mono rename( * @param directory The path of the target directory. * @param fileAttributes If specified, the provided file attributes shall be set. Default value: ‘Archive’ for file * and ‘Directory’ for directory. ‘None’ can also be specified as default. + * @param fileCreationTime Creation time for the file/directory. Default value: Now. + * @param fileLastWriteTime Last write time for the file/directory. Default value: Now. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/Setting-Timeouts-for-File-Service-Operations?redirectedfrom=MSDN">Setting * Timeouts for File Service Operations.</a>. @@ -245,27 +244,23 @@ Mono rename( * the x-ms-file-permission or x-ms-file-permission-key should be specified. * @param filePermissionKey Key of the permission to be set for the directory/file. Note: Only one of the * x-ms-file-permission or x-ms-file-permission-key should be specified. - * @param fileCreationTime Creation time for the file/directory. Default value: Now. - * @param fileLastWriteTime Last write time for the file/directory. Default value: Now. - * @param fileChangeTime Change time for the file/directory. Default value: Now. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ShareStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return the completion. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono createWithResponseAsync( String shareName, String directory, String fileAttributes, + String fileCreationTime, + String fileLastWriteTime, Integer timeout, Map metadata, String filePermission, String filePermissionKey, - String fileCreationTime, - String fileLastWriteTime, - String fileChangeTime, Context context) { final String restype = "directory"; final String accept = "application/xml"; @@ -282,7 +277,6 @@ public Mono createWithResponseAsync( fileAttributes, fileCreationTime, fileLastWriteTime, - fileChangeTime, accept, context); } @@ -302,7 +296,7 @@ public Mono createWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ShareStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return the completion. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono getPropertiesWithResponseAsync( @@ -333,7 +327,7 @@ public Mono getPropertiesWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ShareStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return the completion. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono deleteWithResponseAsync( @@ -358,6 +352,8 @@ public Mono deleteWithResponseAsync( * @param directory The path of the target directory. * @param fileAttributes If specified, the provided file attributes shall be set. Default value: ‘Archive’ for file * and ‘Directory’ for directory. ‘None’ can also be specified as default. + * @param fileCreationTime Creation time for the file/directory. Default value: Now. + * @param fileLastWriteTime Last write time for the file/directory. Default value: Now. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/Setting-Timeouts-for-File-Service-Operations?redirectedfrom=MSDN">Setting * Timeouts for File Service Operations.</a>. @@ -367,26 +363,22 @@ public Mono deleteWithResponseAsync( * the x-ms-file-permission or x-ms-file-permission-key should be specified. * @param filePermissionKey Key of the permission to be set for the directory/file. Note: Only one of the * x-ms-file-permission or x-ms-file-permission-key should be specified. - * @param fileCreationTime Creation time for the file/directory. Default value: Now. - * @param fileLastWriteTime Last write time for the file/directory. Default value: Now. - * @param fileChangeTime Change time for the file/directory. Default value: Now. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ShareStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return the completion. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono setPropertiesWithResponseAsync( String shareName, String directory, String fileAttributes, + String fileCreationTime, + String fileLastWriteTime, Integer timeout, String filePermission, String filePermissionKey, - String fileCreationTime, - String fileLastWriteTime, - String fileChangeTime, Context context) { final String restype = "directory"; final String comp = "properties"; @@ -404,7 +396,6 @@ public Mono setPropertiesWithResponseAsync( fileAttributes, fileCreationTime, fileLastWriteTime, - fileChangeTime, accept, context); } @@ -422,7 +413,7 @@ public Mono setPropertiesWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ShareStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return the completion. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono setMetadataWithResponseAsync( @@ -467,7 +458,7 @@ public Mono setMetadataWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ShareStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an enumeration of directories and files on successful completion of {@link Mono}. + * @return an enumeration of directories and files. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono listFilesAndDirectoriesSegmentWithResponseAsync( @@ -526,7 +517,7 @@ public Mono listFilesAndDirec * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ShareStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an enumeration of handles on successful completion of {@link Mono}. + * @return an enumeration of handles. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono listHandlesWithResponseAsync( @@ -577,7 +568,7 @@ public Mono listHandlesWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ShareStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return the completion. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono forceCloseHandlesWithResponseAsync( @@ -637,7 +628,7 @@ public Mono forceCloseHandlesWithResponseA * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ShareStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return the completion. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono renameWithResponseAsync( @@ -682,11 +673,6 @@ public Mono renameWithResponseAsync( fileLastWriteTimeInternal = copyFileSmbInfo.getFileLastWriteTime(); } String fileLastWriteTime = fileLastWriteTimeInternal; - String fileChangeTimeInternal = null; - if (copyFileSmbInfo != null) { - fileChangeTimeInternal = copyFileSmbInfo.getFileChangeTime(); - } - String fileChangeTime = fileChangeTimeInternal; return service.rename( this.client.getUrl(), shareName, @@ -703,7 +689,6 @@ public Mono renameWithResponseAsync( fileAttributes, fileCreationTime, fileLastWriteTime, - fileChangeTime, filePermission, filePermissionKey, metadata, diff --git a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/implementation/FilesImpl.java b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/implementation/FilesImpl.java index 4e52edd54cce2..9a9cfeda2319d 100644 --- a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/implementation/FilesImpl.java +++ b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/implementation/FilesImpl.java @@ -44,7 +44,6 @@ import com.azure.storage.file.share.implementation.models.FilesUploadRangeResponse; import com.azure.storage.file.share.implementation.models.ShareFileRangeWriteType; import com.azure.storage.file.share.implementation.models.SourceLeaseAccessConditions; -import com.azure.storage.file.share.models.FileLastWrittenMode; import com.azure.storage.file.share.models.PermissionCopyModeType; import com.azure.storage.file.share.models.ShareFileHttpHeaders; import com.azure.storage.file.share.models.ShareStorageException; @@ -102,7 +101,6 @@ Mono create( @HeaderParam("x-ms-file-attributes") String fileAttributes, @HeaderParam("x-ms-file-creation-time") String fileCreationTime, @HeaderParam("x-ms-file-last-write-time") String fileLastWriteTime, - @HeaderParam("x-ms-file-change-time") String fileChangeTime, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("Accept") String accept, Context context); @@ -171,7 +169,6 @@ Mono setHttpHeaders( @HeaderParam("x-ms-file-attributes") String fileAttributes, @HeaderParam("x-ms-file-creation-time") String fileCreationTime, @HeaderParam("x-ms-file-last-write-time") String fileLastWriteTime, - @HeaderParam("x-ms-file-change-time") String fileChangeTime, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("Accept") String accept, Context context); @@ -191,7 +188,6 @@ Mono uploadRange( @HeaderParam("Content-MD5") String contentMD5, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-lease-id") String leaseId, - @HeaderParam("x-ms-file-last-write-time") FileLastWrittenMode fileLastWrittenMode, @BodyParam("application/octet-stream") Flux optionalbody, @HeaderParam("Accept") String accept, Context context); @@ -297,7 +293,6 @@ Mono uploadRangeFromURL( @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-copy-source-authorization") String copySourceAuthorization, - @HeaderParam("x-ms-file-last-write-time") FileLastWrittenMode fileLastWrittenMode, @HeaderParam("Accept") String accept, Context context); @@ -332,7 +327,7 @@ Mono startCopy( @HeaderParam("x-ms-file-permission") String filePermission, @HeaderParam("x-ms-file-permission-key") String filePermissionKey, @HeaderParam("x-ms-file-permission-copy-mode") PermissionCopyModeType filePermissionCopyMode, - @HeaderParam("x-ms-file-copy-ignore-readonly") Boolean ignoreReadOnly, + @HeaderParam("x-ms-file-copy-ignore-read-only") Boolean ignoreReadOnly, @HeaderParam("x-ms-file-attributes") String fileAttributes, @HeaderParam("x-ms-file-creation-time") String fileCreationTime, @HeaderParam("x-ms-file-last-write-time") String fileLastWriteTime, @@ -407,11 +402,9 @@ Mono rename( @HeaderParam("x-ms-file-attributes") String fileAttributes, @HeaderParam("x-ms-file-creation-time") String fileCreationTime, @HeaderParam("x-ms-file-last-write-time") String fileLastWriteTime, - @HeaderParam("x-ms-file-change-time") String fileChangeTime, @HeaderParam("x-ms-file-permission") String filePermission, @HeaderParam("x-ms-file-permission-key") String filePermissionKey, @HeaderParam("x-ms-meta-") Map metadata, - @HeaderParam("x-ms-content-type") String contentType, @HeaderParam("Accept") String accept, Context context); } @@ -424,6 +417,8 @@ Mono rename( * @param fileContentLength Specifies the maximum size for the file, up to 4 TB. * @param fileAttributes If specified, the provided file attributes shall be set. Default value: ‘Archive’ for file * and ‘Directory’ for directory. ‘None’ can also be specified as default. + * @param fileCreationTime Creation time for the file/directory. Default value: Now. + * @param fileLastWriteTime Last write time for the file/directory. Default value: Now. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/Setting-Timeouts-for-File-Service-Operations?redirectedfrom=MSDN">Setting * Timeouts for File Service Operations.</a>. @@ -434,16 +429,13 @@ Mono rename( * the x-ms-file-permission or x-ms-file-permission-key should be specified. * @param filePermissionKey Key of the permission to be set for the directory/file. Note: Only one of the * x-ms-file-permission or x-ms-file-permission-key should be specified. - * @param fileCreationTime Creation time for the file/directory. Default value: Now. - * @param fileLastWriteTime Last write time for the file/directory. Default value: Now. - * @param fileChangeTime Change time for the file/directory. Default value: Now. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param shareFileHttpHeaders Parameter group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ShareStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return the completion. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono createWithResponseAsync( @@ -451,13 +443,12 @@ public Mono createWithResponseAsync( String fileName, long fileContentLength, String fileAttributes, + String fileCreationTime, + String fileLastWriteTime, Integer timeout, Map metadata, String filePermission, String filePermissionKey, - String fileCreationTime, - String fileLastWriteTime, - String fileChangeTime, String leaseId, ShareFileHttpHeaders shareFileHttpHeaders, Context context) { @@ -514,7 +505,6 @@ public Mono createWithResponseAsync( fileAttributes, fileCreationTime, fileLastWriteTime, - fileChangeTime, leaseId, accept, context); @@ -536,7 +526,7 @@ public Mono createWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ShareStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body on successful completion of {@link Mono}. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono downloadWithResponseAsync( @@ -577,7 +567,7 @@ public Mono downloadWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ShareStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return the completion. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono getPropertiesWithResponseAsync( @@ -608,7 +598,7 @@ public Mono getPropertiesWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ShareStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return the completion. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono deleteWithResponseAsync( @@ -625,6 +615,8 @@ public Mono deleteWithResponseAsync( * @param fileName The path of the target file. * @param fileAttributes If specified, the provided file attributes shall be set. Default value: ‘Archive’ for file * and ‘Directory’ for directory. ‘None’ can also be specified as default. + * @param fileCreationTime Creation time for the file/directory. Default value: Now. + * @param fileLastWriteTime Last write time for the file/directory. Default value: Now. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/Setting-Timeouts-for-File-Service-Operations?redirectedfrom=MSDN">Setting * Timeouts for File Service Operations.</a>. @@ -636,29 +628,25 @@ public Mono deleteWithResponseAsync( * the x-ms-file-permission or x-ms-file-permission-key should be specified. * @param filePermissionKey Key of the permission to be set for the directory/file. Note: Only one of the * x-ms-file-permission or x-ms-file-permission-key should be specified. - * @param fileCreationTime Creation time for the file/directory. Default value: Now. - * @param fileLastWriteTime Last write time for the file/directory. Default value: Now. - * @param fileChangeTime Change time for the file/directory. Default value: Now. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param shareFileHttpHeaders Parameter group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ShareStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return the completion. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono setHttpHeadersWithResponseAsync( String shareName, String fileName, String fileAttributes, + String fileCreationTime, + String fileLastWriteTime, Integer timeout, Long fileContentLength, String filePermission, String filePermissionKey, - String fileCreationTime, - String fileLastWriteTime, - String fileChangeTime, String leaseId, ShareFileHttpHeaders shareFileHttpHeaders, Context context) { @@ -714,7 +702,6 @@ public Mono setHttpHeadersWithResponseAsync( fileAttributes, fileCreationTime, fileLastWriteTime, - fileChangeTime, leaseId, accept, context); @@ -744,13 +731,12 @@ public Mono setHttpHeadersWithResponseAsync( * has arrived with the header value that was sent. If the two hashes do not match, the operation will fail with * error code 400 (Bad Request). * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. - * @param fileLastWrittenMode If the file last write time should be preserved or overwritten. * @param optionalbody Initial data. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ShareStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return the completion. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono uploadRangeWithResponseAsync( @@ -762,7 +748,6 @@ public Mono uploadRangeWithResponseAsync( Integer timeout, byte[] contentMD5, String leaseId, - FileLastWrittenMode fileLastWrittenMode, Flux optionalbody, Context context) { final String comp = "range"; @@ -780,7 +765,6 @@ public Mono uploadRangeWithResponseAsync( contentMD5Converted, this.client.getVersion(), leaseId, - fileLastWrittenMode, optionalbody, accept, context); @@ -800,7 +784,7 @@ public Mono uploadRangeWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ShareStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return the completion. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono setMetadataWithResponseAsync( @@ -845,7 +829,7 @@ public Mono setMetadataWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ShareStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return the completion. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono acquireLeaseWithResponseAsync( @@ -889,7 +873,7 @@ public Mono acquireLeaseWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ShareStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return the completion. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono releaseLeaseWithResponseAsync( @@ -929,7 +913,7 @@ public Mono releaseLeaseWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ShareStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return the completion. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono changeLeaseWithResponseAsync( @@ -973,7 +957,7 @@ public Mono changeLeaseWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ShareStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return the completion. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono breakLeaseWithResponseAsync( @@ -1018,13 +1002,12 @@ public Mono breakLeaseWithResponseAsync( * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param copySourceAuthorization Only Bearer type is supported. Credentials should be a valid OAuth access token to * copy source. - * @param fileLastWrittenMode If the file last write time should be preserved or overwritten. * @param sourceModifiedAccessConditions Parameter group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ShareStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return the completion. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono uploadRangeFromURLWithResponseAsync( @@ -1038,7 +1021,6 @@ public Mono uploadRangeFromURLWithResponseAsync byte[] sourceContentCrc64, String leaseId, String copySourceAuthorization, - FileLastWrittenMode fileLastWrittenMode, SourceModifiedAccessConditions sourceModifiedAccessConditions, Context context) { final String comp = "range"; @@ -1074,7 +1056,6 @@ public Mono uploadRangeFromURLWithResponseAsync this.client.getVersion(), leaseId, copySourceAuthorization, - fileLastWrittenMode, accept, context); } @@ -1097,7 +1078,7 @@ public Mono uploadRangeFromURLWithResponseAsync * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ShareStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of file ranges on successful completion of {@link Mono}. + * @return the list of file ranges. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono getRangeListWithResponseAsync( @@ -1153,7 +1134,7 @@ public Mono getRangeListWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ShareStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return the completion. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono startCopyWithResponseAsync( @@ -1233,7 +1214,7 @@ public Mono startCopyWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ShareStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return the completion. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono abortCopyWithResponseAsync( @@ -1275,7 +1256,7 @@ public Mono abortCopyWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ShareStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an enumeration of handles on successful completion of {@link Mono}. + * @return an enumeration of handles. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono listHandlesWithResponseAsync( @@ -1322,7 +1303,7 @@ public Mono listHandlesWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ShareStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return the completion. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono forceCloseHandlesWithResponseAsync( @@ -1376,12 +1357,11 @@ public Mono forceCloseHandlesWithResponseAsync( * @param sourceLeaseAccessConditions Parameter group. * @param destinationLeaseAccessConditions Parameter group. * @param copyFileSmbInfo Parameter group. - * @param shareFileHttpHeaders Parameter group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ShareStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return the completion. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono renameWithResponseAsync( @@ -1397,7 +1377,6 @@ public Mono renameWithResponseAsync( SourceLeaseAccessConditions sourceLeaseAccessConditions, DestinationLeaseAccessConditions destinationLeaseAccessConditions, CopyFileSmbInfo copyFileSmbInfo, - ShareFileHttpHeaders shareFileHttpHeaders, Context context) { final String comp = "rename"; final String accept = "application/xml"; @@ -1426,16 +1405,6 @@ public Mono renameWithResponseAsync( fileLastWriteTimeInternal = copyFileSmbInfo.getFileLastWriteTime(); } String fileLastWriteTime = fileLastWriteTimeInternal; - String fileChangeTimeInternal = null; - if (copyFileSmbInfo != null) { - fileChangeTimeInternal = copyFileSmbInfo.getFileChangeTime(); - } - String fileChangeTime = fileChangeTimeInternal; - String contentTypeInternal = null; - if (shareFileHttpHeaders != null) { - contentTypeInternal = shareFileHttpHeaders.getContentType(); - } - String contentType = contentTypeInternal; return service.rename( this.client.getUrl(), shareName, @@ -1451,11 +1420,9 @@ public Mono renameWithResponseAsync( fileAttributes, fileCreationTime, fileLastWriteTime, - fileChangeTime, filePermission, filePermissionKey, metadata, - contentType, accept, context); } diff --git a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/implementation/ServicesImpl.java b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/implementation/ServicesImpl.java index 155e1f492b56e..06e66552a601e 100644 --- a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/implementation/ServicesImpl.java +++ b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/implementation/ServicesImpl.java @@ -122,7 +122,7 @@ Mono listSharesSegmentNext( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ShareStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return the completion. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono setPropertiesWithResponseAsync( @@ -153,7 +153,7 @@ public Mono setPropertiesWithResponseAsync( * @throws ShareStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the properties of a storage account's File service, including properties for Storage Analytics metrics - * and CORS (Cross-Origin Resource Sharing) rules on successful completion of {@link Mono}. + * and CORS (Cross-Origin Resource Sharing) rules. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono getPropertiesWithResponseAsync(Integer timeout, Context context) { @@ -182,7 +182,7 @@ public Mono getPropertiesWithResponseAsync(Intege * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ShareStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an enumeration of shares along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return an enumeration of shares. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> listSharesSegmentSinglePageAsync( @@ -226,7 +226,7 @@ public Mono> listSharesSegmentSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ShareStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an enumeration of shares along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return an enumeration of shares. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> listSharesSegmentNextSinglePageAsync( diff --git a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/implementation/SharesImpl.java b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/implementation/SharesImpl.java index c19d7c1f1f926..d531342362cca 100644 --- a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/implementation/SharesImpl.java +++ b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/implementation/SharesImpl.java @@ -357,7 +357,7 @@ Mono restore( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ShareStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return the completion. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono createWithResponseAsync( @@ -401,7 +401,7 @@ public Mono createWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ShareStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return the completion. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono getPropertiesWithResponseAsync( @@ -436,7 +436,7 @@ public Mono getPropertiesWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ShareStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return the completion. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono deleteWithResponseAsync( @@ -483,7 +483,7 @@ public Mono deleteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ShareStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return the completion. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono acquireLeaseWithResponseAsync( @@ -531,7 +531,7 @@ public Mono acquireLeaseWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ShareStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return the completion. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono releaseLeaseWithResponseAsync( @@ -580,7 +580,7 @@ public Mono releaseLeaseWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ShareStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return the completion. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono changeLeaseWithResponseAsync( @@ -628,7 +628,7 @@ public Mono changeLeaseWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ShareStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return the completion. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono renewLeaseWithResponseAsync( @@ -680,7 +680,7 @@ public Mono renewLeaseWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ShareStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return the completion. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono breakLeaseWithResponseAsync( @@ -723,7 +723,7 @@ public Mono breakLeaseWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ShareStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return the completion. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono createSnapshotWithResponseAsync( @@ -755,7 +755,7 @@ public Mono createSnapshotWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ShareStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return the completion. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono createPermissionWithResponseAsync( @@ -787,7 +787,7 @@ public Mono createPermissionWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ShareStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a permission (a security descriptor) at the share level on successful completion of {@link Mono}. + * @return a permission (a security descriptor) at the share level. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono getPermissionWithResponseAsync( @@ -822,7 +822,7 @@ public Mono getPermissionWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ShareStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return the completion. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono setPropertiesWithResponseAsync( @@ -864,7 +864,7 @@ public Mono setPropertiesWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ShareStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return the completion. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono setMetadataWithResponseAsync( @@ -897,7 +897,7 @@ public Mono setMetadataWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ShareStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of signed identifiers on successful completion of {@link Mono}. + * @return a collection of signed identifiers. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono getAccessPolicyWithResponseAsync( @@ -930,7 +930,7 @@ public Mono getAccessPolicyWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ShareStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return the completion. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono setAccessPolicyWithResponseAsync( @@ -964,7 +964,7 @@ public Mono setAccessPolicyWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ShareStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return stats for the share on successful completion of {@link Mono}. + * @return stats for the share. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono getStatisticsWithResponseAsync( @@ -999,7 +999,7 @@ public Mono getStatisticsWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ShareStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return the completion. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono restoreWithResponseAsync( diff --git a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/implementation/models/CopyFileSmbInfo.java b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/implementation/models/CopyFileSmbInfo.java index 669eac22f9819..3c1255ca58f59 100644 --- a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/implementation/models/CopyFileSmbInfo.java +++ b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/implementation/models/CopyFileSmbInfo.java @@ -37,14 +37,6 @@ public final class CopyFileSmbInfo { @JsonProperty(value = "fileLastWriteTime") private String fileLastWriteTime; - /* - * Specifies either the option to copy file last write time from a source - * file(source) to a target file or a time value in ISO 8601 format to set - * as last write time on a target file. - */ - @JsonProperty(value = "fileChangeTime") - private String fileChangeTime; - /* * Specifies the option to copy file security descriptor from source file * or to set it using the value which is defined by the header value of @@ -134,28 +126,6 @@ public CopyFileSmbInfo setFileLastWriteTime(String fileLastWriteTime) { return this; } - /** - * Get the fileChangeTime property: Specifies either the option to copy file last write time from a source - * file(source) to a target file or a time value in ISO 8601 format to set as last write time on a target file. - * - * @return the fileChangeTime value. - */ - public String getFileChangeTime() { - return this.fileChangeTime; - } - - /** - * Set the fileChangeTime property: Specifies either the option to copy file last write time from a source - * file(source) to a target file or a time value in ISO 8601 format to set as last write time on a target file. - * - * @param fileChangeTime the fileChangeTime value to set. - * @return the CopyFileSmbInfo object itself. - */ - public CopyFileSmbInfo setFileChangeTime(String fileChangeTime) { - this.fileChangeTime = fileChangeTime; - return this; - } - /** * Get the filePermissionCopyMode property: Specifies the option to copy file security descriptor from source file * or to set it using the value which is defined by the header value of x-ms-file-permission or diff --git a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/implementation/models/DirectoriesRenameHeaders.java b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/implementation/models/DirectoriesRenameHeaders.java index 634fd0f80ae93..fda73b4f13668 100644 --- a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/implementation/models/DirectoriesRenameHeaders.java +++ b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/implementation/models/DirectoriesRenameHeaders.java @@ -38,24 +38,6 @@ public final class DirectoriesRenameHeaders { @JsonProperty(value = "x-ms-file-creation-time") private OffsetDateTime xMsFileCreationTime; - /* - * The Last-Modified property. - */ - @JsonProperty(value = "Last-Modified") - private DateTimeRfc1123 lastModified; - - /* - * The x-ms-request-server-encrypted property. - */ - @JsonProperty(value = "x-ms-request-server-encrypted") - private Boolean xMsRequestServerEncrypted; - - /* - * The Date property. - */ - @JsonProperty(value = "Date") - private DateTimeRfc1123 dateProperty; - /* * The ETag property. */ @@ -75,10 +57,10 @@ public final class DirectoriesRenameHeaders { private OffsetDateTime xMsFileChangeTime; /* - * The x-ms-file-parent-id property. + * The Last-Modified property. */ - @JsonProperty(value = "x-ms-file-parent-id") - private String xMsFileParentId; + @JsonProperty(value = "Last-Modified") + private DateTimeRfc1123 lastModified; /* * The x-ms-request-id property. @@ -86,6 +68,18 @@ public final class DirectoriesRenameHeaders { @JsonProperty(value = "x-ms-request-id") private String xMsRequestId; + /* + * The x-ms-request-server-encrypted property. + */ + @JsonProperty(value = "x-ms-request-server-encrypted") + private Boolean xMsRequestServerEncrypted; + + /* + * The Date property. + */ + @JsonProperty(value = "Date") + private DateTimeRfc1123 dateProperty; + /* * The x-ms-file-last-write-time property. */ @@ -172,80 +166,6 @@ public DirectoriesRenameHeaders setXMsFileCreationTime(OffsetDateTime xMsFileCre return this; } - /** - * Get the lastModified property: The Last-Modified property. - * - * @return the lastModified value. - */ - public OffsetDateTime getLastModified() { - if (this.lastModified == null) { - return null; - } - return this.lastModified.getDateTime(); - } - - /** - * Set the lastModified property: The Last-Modified property. - * - * @param lastModified the lastModified value to set. - * @return the DirectoriesRenameHeaders object itself. - */ - public DirectoriesRenameHeaders setLastModified(OffsetDateTime lastModified) { - if (lastModified == null) { - this.lastModified = null; - } else { - this.lastModified = new DateTimeRfc1123(lastModified); - } - return this; - } - - /** - * Get the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. - * - * @return the xMsRequestServerEncrypted value. - */ - public Boolean isXMsRequestServerEncrypted() { - return this.xMsRequestServerEncrypted; - } - - /** - * Set the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. - * - * @param xMsRequestServerEncrypted the xMsRequestServerEncrypted value to set. - * @return the DirectoriesRenameHeaders object itself. - */ - public DirectoriesRenameHeaders setXMsRequestServerEncrypted(Boolean xMsRequestServerEncrypted) { - this.xMsRequestServerEncrypted = xMsRequestServerEncrypted; - return this; - } - - /** - * Get the dateProperty property: The Date property. - * - * @return the dateProperty value. - */ - public OffsetDateTime getDateProperty() { - if (this.dateProperty == null) { - return null; - } - return this.dateProperty.getDateTime(); - } - - /** - * Set the dateProperty property: The Date property. - * - * @param dateProperty the dateProperty value to set. - * @return the DirectoriesRenameHeaders object itself. - */ - public DirectoriesRenameHeaders setDateProperty(OffsetDateTime dateProperty) { - if (dateProperty == null) { - this.dateProperty = null; - } else { - this.dateProperty = new DateTimeRfc1123(dateProperty); - } - return this; - } - /** * Get the eTag property: The ETag property. * @@ -307,22 +227,29 @@ public DirectoriesRenameHeaders setXMsFileChangeTime(OffsetDateTime xMsFileChang } /** - * Get the xMsFileParentId property: The x-ms-file-parent-id property. + * Get the lastModified property: The Last-Modified property. * - * @return the xMsFileParentId value. + * @return the lastModified value. */ - public String getXMsFileParentId() { - return this.xMsFileParentId; + public OffsetDateTime getLastModified() { + if (this.lastModified == null) { + return null; + } + return this.lastModified.getDateTime(); } /** - * Set the xMsFileParentId property: The x-ms-file-parent-id property. + * Set the lastModified property: The Last-Modified property. * - * @param xMsFileParentId the xMsFileParentId value to set. + * @param lastModified the lastModified value to set. * @return the DirectoriesRenameHeaders object itself. */ - public DirectoriesRenameHeaders setXMsFileParentId(String xMsFileParentId) { - this.xMsFileParentId = xMsFileParentId; + public DirectoriesRenameHeaders setLastModified(OffsetDateTime lastModified) { + if (lastModified == null) { + this.lastModified = null; + } else { + this.lastModified = new DateTimeRfc1123(lastModified); + } return this; } @@ -346,6 +273,53 @@ public DirectoriesRenameHeaders setXMsRequestId(String xMsRequestId) { return this; } + /** + * Get the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. + * + * @return the xMsRequestServerEncrypted value. + */ + public Boolean isXMsRequestServerEncrypted() { + return this.xMsRequestServerEncrypted; + } + + /** + * Set the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. + * + * @param xMsRequestServerEncrypted the xMsRequestServerEncrypted value to set. + * @return the DirectoriesRenameHeaders object itself. + */ + public DirectoriesRenameHeaders setXMsRequestServerEncrypted(Boolean xMsRequestServerEncrypted) { + this.xMsRequestServerEncrypted = xMsRequestServerEncrypted; + return this; + } + + /** + * Get the dateProperty property: The Date property. + * + * @return the dateProperty value. + */ + public OffsetDateTime getDateProperty() { + if (this.dateProperty == null) { + return null; + } + return this.dateProperty.getDateTime(); + } + + /** + * Set the dateProperty property: The Date property. + * + * @param dateProperty the dateProperty value to set. + * @return the DirectoriesRenameHeaders object itself. + */ + public DirectoriesRenameHeaders setDateProperty(OffsetDateTime dateProperty) { + if (dateProperty == null) { + this.dateProperty = null; + } else { + this.dateProperty = new DateTimeRfc1123(dateProperty); + } + return this; + } + /** * Get the xMsFileLastWriteTime property: The x-ms-file-last-write-time property. * diff --git a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/implementation/models/FilesRenameHeaders.java b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/implementation/models/FilesRenameHeaders.java index fcd88ddb6eea2..fe26e9656479a 100644 --- a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/implementation/models/FilesRenameHeaders.java +++ b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/implementation/models/FilesRenameHeaders.java @@ -38,24 +38,6 @@ public final class FilesRenameHeaders { @JsonProperty(value = "x-ms-file-creation-time") private OffsetDateTime xMsFileCreationTime; - /* - * The Last-Modified property. - */ - @JsonProperty(value = "Last-Modified") - private DateTimeRfc1123 lastModified; - - /* - * The x-ms-request-server-encrypted property. - */ - @JsonProperty(value = "x-ms-request-server-encrypted") - private Boolean xMsRequestServerEncrypted; - - /* - * The Date property. - */ - @JsonProperty(value = "Date") - private DateTimeRfc1123 dateProperty; - /* * The ETag property. */ @@ -75,10 +57,10 @@ public final class FilesRenameHeaders { private OffsetDateTime xMsFileChangeTime; /* - * The x-ms-file-parent-id property. + * The Last-Modified property. */ - @JsonProperty(value = "x-ms-file-parent-id") - private String xMsFileParentId; + @JsonProperty(value = "Last-Modified") + private DateTimeRfc1123 lastModified; /* * The x-ms-request-id property. @@ -86,6 +68,18 @@ public final class FilesRenameHeaders { @JsonProperty(value = "x-ms-request-id") private String xMsRequestId; + /* + * The x-ms-request-server-encrypted property. + */ + @JsonProperty(value = "x-ms-request-server-encrypted") + private Boolean xMsRequestServerEncrypted; + + /* + * The Date property. + */ + @JsonProperty(value = "Date") + private DateTimeRfc1123 dateProperty; + /* * The x-ms-file-last-write-time property. */ @@ -172,80 +166,6 @@ public FilesRenameHeaders setXMsFileCreationTime(OffsetDateTime xMsFileCreationT return this; } - /** - * Get the lastModified property: The Last-Modified property. - * - * @return the lastModified value. - */ - public OffsetDateTime getLastModified() { - if (this.lastModified == null) { - return null; - } - return this.lastModified.getDateTime(); - } - - /** - * Set the lastModified property: The Last-Modified property. - * - * @param lastModified the lastModified value to set. - * @return the FilesRenameHeaders object itself. - */ - public FilesRenameHeaders setLastModified(OffsetDateTime lastModified) { - if (lastModified == null) { - this.lastModified = null; - } else { - this.lastModified = new DateTimeRfc1123(lastModified); - } - return this; - } - - /** - * Get the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. - * - * @return the xMsRequestServerEncrypted value. - */ - public Boolean isXMsRequestServerEncrypted() { - return this.xMsRequestServerEncrypted; - } - - /** - * Set the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. - * - * @param xMsRequestServerEncrypted the xMsRequestServerEncrypted value to set. - * @return the FilesRenameHeaders object itself. - */ - public FilesRenameHeaders setXMsRequestServerEncrypted(Boolean xMsRequestServerEncrypted) { - this.xMsRequestServerEncrypted = xMsRequestServerEncrypted; - return this; - } - - /** - * Get the dateProperty property: The Date property. - * - * @return the dateProperty value. - */ - public OffsetDateTime getDateProperty() { - if (this.dateProperty == null) { - return null; - } - return this.dateProperty.getDateTime(); - } - - /** - * Set the dateProperty property: The Date property. - * - * @param dateProperty the dateProperty value to set. - * @return the FilesRenameHeaders object itself. - */ - public FilesRenameHeaders setDateProperty(OffsetDateTime dateProperty) { - if (dateProperty == null) { - this.dateProperty = null; - } else { - this.dateProperty = new DateTimeRfc1123(dateProperty); - } - return this; - } - /** * Get the eTag property: The ETag property. * @@ -307,22 +227,29 @@ public FilesRenameHeaders setXMsFileChangeTime(OffsetDateTime xMsFileChangeTime) } /** - * Get the xMsFileParentId property: The x-ms-file-parent-id property. + * Get the lastModified property: The Last-Modified property. * - * @return the xMsFileParentId value. + * @return the lastModified value. */ - public String getXMsFileParentId() { - return this.xMsFileParentId; + public OffsetDateTime getLastModified() { + if (this.lastModified == null) { + return null; + } + return this.lastModified.getDateTime(); } /** - * Set the xMsFileParentId property: The x-ms-file-parent-id property. + * Set the lastModified property: The Last-Modified property. * - * @param xMsFileParentId the xMsFileParentId value to set. + * @param lastModified the lastModified value to set. * @return the FilesRenameHeaders object itself. */ - public FilesRenameHeaders setXMsFileParentId(String xMsFileParentId) { - this.xMsFileParentId = xMsFileParentId; + public FilesRenameHeaders setLastModified(OffsetDateTime lastModified) { + if (lastModified == null) { + this.lastModified = null; + } else { + this.lastModified = new DateTimeRfc1123(lastModified); + } return this; } @@ -346,6 +273,53 @@ public FilesRenameHeaders setXMsRequestId(String xMsRequestId) { return this; } + /** + * Get the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. + * + * @return the xMsRequestServerEncrypted value. + */ + public Boolean isXMsRequestServerEncrypted() { + return this.xMsRequestServerEncrypted; + } + + /** + * Set the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. + * + * @param xMsRequestServerEncrypted the xMsRequestServerEncrypted value to set. + * @return the FilesRenameHeaders object itself. + */ + public FilesRenameHeaders setXMsRequestServerEncrypted(Boolean xMsRequestServerEncrypted) { + this.xMsRequestServerEncrypted = xMsRequestServerEncrypted; + return this; + } + + /** + * Get the dateProperty property: The Date property. + * + * @return the dateProperty value. + */ + public OffsetDateTime getDateProperty() { + if (this.dateProperty == null) { + return null; + } + return this.dateProperty.getDateTime(); + } + + /** + * Set the dateProperty property: The Date property. + * + * @param dateProperty the dateProperty value to set. + * @return the FilesRenameHeaders object itself. + */ + public FilesRenameHeaders setDateProperty(OffsetDateTime dateProperty) { + if (dateProperty == null) { + this.dateProperty = null; + } else { + this.dateProperty = new DateTimeRfc1123(dateProperty); + } + return this; + } + /** * Get the xMsFileLastWriteTime property: The x-ms-file-last-write-time property. * diff --git a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/implementation/models/FilesUploadRangeFromURLHeaders.java b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/implementation/models/FilesUploadRangeFromURLHeaders.java index b7504a391552a..7596aa9c14eba 100644 --- a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/implementation/models/FilesUploadRangeFromURLHeaders.java +++ b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/implementation/models/FilesUploadRangeFromURLHeaders.java @@ -57,12 +57,6 @@ public final class FilesUploadRangeFromURLHeaders { @JsonProperty(value = "Date") private DateTimeRfc1123 dateProperty; - /* - * The x-ms-file-last-write-time property. - */ - @JsonProperty(value = "x-ms-file-last-write-time") - private OffsetDateTime xMsFileLastWriteTime; - /** * Get the xMsVersion property: The x-ms-version property. * @@ -216,24 +210,4 @@ public FilesUploadRangeFromURLHeaders setDateProperty(OffsetDateTime datePropert } return this; } - - /** - * Get the xMsFileLastWriteTime property: The x-ms-file-last-write-time property. - * - * @return the xMsFileLastWriteTime value. - */ - public OffsetDateTime getXMsFileLastWriteTime() { - return this.xMsFileLastWriteTime; - } - - /** - * Set the xMsFileLastWriteTime property: The x-ms-file-last-write-time property. - * - * @param xMsFileLastWriteTime the xMsFileLastWriteTime value to set. - * @return the FilesUploadRangeFromURLHeaders object itself. - */ - public FilesUploadRangeFromURLHeaders setXMsFileLastWriteTime(OffsetDateTime xMsFileLastWriteTime) { - this.xMsFileLastWriteTime = xMsFileLastWriteTime; - return this; - } } diff --git a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/implementation/models/FilesUploadRangeHeaders.java b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/implementation/models/FilesUploadRangeHeaders.java index 9ba3a72ac485d..b99b35578683f 100644 --- a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/implementation/models/FilesUploadRangeHeaders.java +++ b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/implementation/models/FilesUploadRangeHeaders.java @@ -51,12 +51,6 @@ public final class FilesUploadRangeHeaders { @JsonProperty(value = "Date") private DateTimeRfc1123 dateProperty; - /* - * The x-ms-file-last-write-time property. - */ - @JsonProperty(value = "x-ms-file-last-write-time") - private OffsetDateTime xMsFileLastWriteTime; - /* * The Content-MD5 property. */ @@ -197,26 +191,6 @@ public FilesUploadRangeHeaders setDateProperty(OffsetDateTime dateProperty) { return this; } - /** - * Get the xMsFileLastWriteTime property: The x-ms-file-last-write-time property. - * - * @return the xMsFileLastWriteTime value. - */ - public OffsetDateTime getXMsFileLastWriteTime() { - return this.xMsFileLastWriteTime; - } - - /** - * Set the xMsFileLastWriteTime property: The x-ms-file-last-write-time property. - * - * @param xMsFileLastWriteTime the xMsFileLastWriteTime value to set. - * @return the FilesUploadRangeHeaders object itself. - */ - public FilesUploadRangeHeaders setXMsFileLastWriteTime(OffsetDateTime xMsFileLastWriteTime) { - this.xMsFileLastWriteTime = xMsFileLastWriteTime; - return this; - } - /** * Get the contentMD5 property: The Content-MD5 property. * diff --git a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/models/DownloadRetryOptions.java b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/models/DownloadRetryOptions.java index 8a95daa026998..22abdb12dcdaa 100644 --- a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/models/DownloadRetryOptions.java +++ b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/models/DownloadRetryOptions.java @@ -16,7 +16,7 @@ public final class DownloadRetryOptions { private static final String PARAMETER_NOT_IN_RANGE = "The value of the parameter '%s' should be between %s and %s."; - private static final ClientLogger LOGGER = new ClientLogger(DownloadRetryOptions.class); + private final ClientLogger logger = new ClientLogger(DownloadRetryOptions.class); /* We use "retry" here because by the time the user passes this type, the initial request, or try, has already been @@ -45,7 +45,7 @@ public int getMaxRetryRequests() { */ public DownloadRetryOptions setMaxRetryRequests(int maxRetryRequests) { if (maxRetryRequests < 0) { - throw LOGGER.logExceptionAsError( + throw logger.logExceptionAsError( new IllegalArgumentException(String.format(Locale.ROOT, PARAMETER_NOT_IN_RANGE, "options.maxRetryRequests", 0, Integer.MAX_VALUE))); } diff --git a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/models/FileLastWrittenMode.java b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/models/FileLastWrittenMode.java deleted file mode 100644 index 931c9246a68b8..0000000000000 --- a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/models/FileLastWrittenMode.java +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.storage.file.share.models; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** Defines values for FileLastWrittenMode. */ -public enum FileLastWrittenMode { - /** Enum value Now. */ - NOW("Now"), - - /** Enum value Preserve. */ - PRESERVE("Preserve"); - - /** The actual serialized value for a FileLastWrittenMode instance. */ - private final String value; - - FileLastWrittenMode(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a FileLastWrittenMode instance. - * - * @param value the serialized value to parse. - * @return the parsed FileLastWrittenMode object, or null if unable to parse. - */ - @JsonCreator - public static FileLastWrittenMode fromString(String value) { - FileLastWrittenMode[] items = FileLastWrittenMode.values(); - for (FileLastWrittenMode item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - @JsonValue - @Override - public String toString() { - return this.value; - } -} diff --git a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/models/ShareFileRange.java b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/models/ShareFileRange.java index 4806a6c73996c..8faf265424586 100644 --- a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/models/ShareFileRange.java +++ b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/models/ShareFileRange.java @@ -12,7 +12,7 @@ */ @Immutable public final class ShareFileRange { - private static final ClientLogger LOGGER = new ClientLogger(ShareFileRange.class); + final ClientLogger logger = new ClientLogger(ShareFileRange.class); private static final String RANGE_HEADER_FORMAT = "bytes=%d-%d"; private static final String BEGIN_RANGE_HEADER_FORMAT = "bytes=%d-"; private final long start; @@ -34,13 +34,13 @@ public ShareFileRange(final long start) { */ public ShareFileRange(final long start, final Long end) { if (start < 0) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( + throw logger.logExceptionAsError(new IllegalArgumentException( "ShareFileRange offset must be greater than or equal to 0.")); } this.start = start; if (end != null && end < 0) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException(new IllegalArgumentException( + throw logger.logExceptionAsError(new IllegalArgumentException(new IllegalArgumentException( "ShareFileRange end must be greater than or equal to 0 if specified."))); } this.end = end; diff --git a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/models/ShareFileUploadRangeOptions.java b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/models/ShareFileUploadRangeOptions.java index a082d71e9f6ed..ef4eaa0c9c9dc 100644 --- a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/models/ShareFileUploadRangeOptions.java +++ b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/models/ShareFileUploadRangeOptions.java @@ -18,7 +18,6 @@ public final class ShareFileUploadRangeOptions { private final long length; private Long offset; private ShareRequestConditions requestConditions; - private FileLastWrittenMode lastWrittenMode; /** * Constructs a new {@code FileParallelUploadOptions}. @@ -121,24 +120,4 @@ public ShareFileUploadRangeOptions setRequestConditions(ShareRequestConditions r this.requestConditions = requestConditions; return this; } - - /** - * Gets the {@link FileLastWrittenMode}. - * - * @return The {@link FileLastWrittenMode}. - */ - public FileLastWrittenMode getLastWrittenMode() { - return this.lastWrittenMode; - } - - /** - * Sets the {@link FileLastWrittenMode}. - * - * @param lastWrittenMode {@link FileLastWrittenMode} - * @return The updated options. - */ - public ShareFileUploadRangeOptions setLastWrittenMode(FileLastWrittenMode lastWrittenMode) { - this.lastWrittenMode = lastWrittenMode; - return this; - } } diff --git a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/models/ShareProtocols.java b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/models/ShareProtocols.java index dac2ae55731a8..785bedeec8fee 100644 --- a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/models/ShareProtocols.java +++ b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/models/ShareProtocols.java @@ -10,7 +10,7 @@ * Represents protocols that can be set on a share. */ public class ShareProtocols { - private static final ClientLogger LOGGER = new ClientLogger(ShareProtocols.class); + private final ClientLogger logger = new ClientLogger(ShareProtocols.class); private boolean smbEnabled; @@ -57,7 +57,7 @@ public ShareProtocols setNfsEnabled(boolean nfs) { public String toString() { if (this.smbEnabled) { if (this.nfsEnabled) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException("SMB and NFS cannot both be set.")); + throw logger.logExceptionAsError(new IllegalArgumentException("SMB and NFS cannot both be set.")); } return Constants.HeaderConstants.SMB_PROTOCOL; } diff --git a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/options/ShareDirectoryCreateOptions.java b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/options/ShareDirectoryCreateOptions.java deleted file mode 100644 index 7c562bb1c405f..0000000000000 --- a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/options/ShareDirectoryCreateOptions.java +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.storage.file.share.options; - -import com.azure.core.annotation.Fluent; -import com.azure.storage.file.share.FileSmbProperties; - -import java.util.Map; - -/** - * Extended options that may be passed when creating a share directory. - */ -@Fluent -public class ShareDirectoryCreateOptions { - - private FileSmbProperties smbProperties; - private String filePermission; - private Map metadata; - - /** - * @return The file's permission key. - */ - public String getFilePermission() { - return filePermission; - } - - /** - * Sets the file permission key. - * - * @param filePermissionKey The file permission key. - * @return the updated options. - */ - public ShareDirectoryCreateOptions setFilePermission(String filePermissionKey) { - this.filePermission = filePermissionKey; - return this; - } - - /** - * @return Optional SMB properties to set on the destination file or directory. The only properties that are - * considered are file attributes, file creation time, file last write time, and file permission key. The rest are - * ignored. - */ - public FileSmbProperties getSmbProperties() { - return smbProperties; - } - - /** - * @param smbProperties Optional SMB properties to set on the destination file or directory. The only properties - * that are considered are file attributes, file creation time, file last write time, and file permission key. The - * rest are ignored. - * @return The updated options. - */ - public ShareDirectoryCreateOptions setSmbProperties(FileSmbProperties smbProperties) { - this.smbProperties = smbProperties; - return this; - } - - /** - * @return Metadata to associate with the share - */ - public Map getMetadata() { - return metadata; - } - - /** - * @param metadata Metadata to associate with the share. If there is leading or trailing whitespace in any - * metadata key or value, it must be removed or encoded. - * @return The updated options. - */ - public ShareDirectoryCreateOptions setMetadata(Map metadata) { - this.metadata = metadata; - return this; - } -} diff --git a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/options/ShareFileCreateOptions.java b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/options/ShareFileCreateOptions.java deleted file mode 100644 index 95c1e3e17f09d..0000000000000 --- a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/options/ShareFileCreateOptions.java +++ /dev/null @@ -1,130 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.storage.file.share.options; - -import com.azure.core.annotation.Fluent; -import com.azure.storage.file.share.FileSmbProperties; -import com.azure.storage.file.share.models.ShareFileHttpHeaders; -import com.azure.storage.file.share.models.ShareRequestConditions; -import java.util.Map; - -/** - * Extended options that may be passed when creating a share. - */ -@Fluent -public class ShareFileCreateOptions { - - private final long size; - private ShareFileHttpHeaders httpHeaders; - private FileSmbProperties smbProperties; - private String filePermission; - private Map metadata; - private ShareRequestConditions requestConditions; - - /** - * @param size Specifies the maximum size for the file share. - */ - public ShareFileCreateOptions(long size) { - this.size = size; - } - - /** - * @return Specifies the maximum size for the file share. - */ - public long getSize() { - return this.size; - } - - /** - * @return the file's http headers. - */ - public ShareFileHttpHeaders getShareFileHttpHeaders() { - return httpHeaders; - } - - /** - * Sets the file's http headers. - * @param headers the http headers. - * @return the updated options. - */ - public ShareFileCreateOptions setShareFileHttpHeaders(ShareFileHttpHeaders headers) { - httpHeaders = headers; - return this; - } - - /** - * @return The file's permission key. - */ - public String getFilePermission() { - return filePermission; - } - - /** - * Sets the file permission key. - * - * @param filePermissionKey The file permission key. - * @return the updated options. - */ - public ShareFileCreateOptions setFilePermission(String filePermissionKey) { - this.filePermission = filePermissionKey; - return this; - } - - /** - * @return Optional SMB properties to set on the destination file or directory. The only properties that are - * considered are file attributes, file creation time, file last write time, and file permission key. The rest are - * ignored. - */ - public FileSmbProperties getSmbProperties() { - return smbProperties; - } - - /** - * @param smbProperties Optional SMB properties to set on the destination file or directory. The only properties - * that are considered are file attributes, file creation time, file last write time, and file permission key. The - * rest are ignored. - * @return The updated options. - */ - public ShareFileCreateOptions setSmbProperties(FileSmbProperties smbProperties) { - this.smbProperties = smbProperties; - return this; - } - - /** - * @return Metadata to associate with the share - */ - public Map getMetadata() { - return metadata; - } - - /** - * @param metadata Metadata to associate with the share. If there is leading or trailing whitespace in any - * metadata key or value, it must be removed or encoded. - * @return The updated options. - */ - public ShareFileCreateOptions setMetadata(Map metadata) { - this.metadata = metadata; - return this; - } - - /** - * Gets the {@link ShareRequestConditions}. - * - * @return {@link ShareRequestConditions} - */ - public ShareRequestConditions getRequestConditions() { - return requestConditions; - } - - /** - * Sets the {@link ShareRequestConditions}. - * - * @param requestConditions {@link ShareRequestConditions} - * @return The updated options. - */ - public ShareFileCreateOptions setRequestConditions(ShareRequestConditions requestConditions) { - this.requestConditions = requestConditions; - return this; - } -} diff --git a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/options/ShareFileRenameOptions.java b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/options/ShareFileRenameOptions.java index a0e9317fc318a..aaa6ee97eb17b 100644 --- a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/options/ShareFileRenameOptions.java +++ b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/options/ShareFileRenameOptions.java @@ -4,7 +4,6 @@ package com.azure.storage.file.share.options; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.storage.common.implementation.StorageImplUtils; import com.azure.storage.file.share.FileSmbProperties; import com.azure.storage.file.share.models.ShareRequestConditions; @@ -16,7 +15,6 @@ */ @Fluent public final class ShareFileRenameOptions { - private static final ClientLogger LOGGER = new ClientLogger(ShareFileRenameOptions.class); private final String destinationPath; private Boolean replaceIfExists; @@ -26,7 +24,6 @@ public final class ShareFileRenameOptions { private String filePermission; private FileSmbProperties smbProperties; private Map metadata; - private String contentType; /** * Creates a {@code ShareFileRenameOptions} object. @@ -173,24 +170,4 @@ public ShareFileRenameOptions setMetadata(Map metadata) { this.metadata = metadata; return this; } - - /** - * Gets the content type. - * - * @return The content type. - */ - public String getContentType() { - return this.contentType; - } - - /** - * Sets the content type. - * - * @param contentType the content type. - * @return The updated options. - */ - public ShareFileRenameOptions setContentType(String contentType) { - this.contentType = contentType; - return this; - } } diff --git a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/options/ShareFileUploadRangeFromUrlOptions.java b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/options/ShareFileUploadRangeFromUrlOptions.java index 9d3f04d897838..f971fbc31ccdd 100644 --- a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/options/ShareFileUploadRangeFromUrlOptions.java +++ b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/options/ShareFileUploadRangeFromUrlOptions.java @@ -6,7 +6,6 @@ import com.azure.core.annotation.Fluent; import com.azure.core.http.HttpAuthorization; import com.azure.storage.common.implementation.StorageImplUtils; -import com.azure.storage.file.share.models.FileLastWrittenMode; import com.azure.storage.file.share.models.ShareRequestConditions; /** @@ -20,7 +19,6 @@ public final class ShareFileUploadRangeFromUrlOptions { private long sourceOffset; private HttpAuthorization sourceAuthorization; private ShareRequestConditions destinationRequestConditions; - private FileLastWrittenMode lastWrittenMode; /** * @param length data length to upload for this operation. @@ -114,24 +112,4 @@ public ShareFileUploadRangeFromUrlOptions setDestinationRequestConditions( this.destinationRequestConditions = destinationRequestConditions; return this; } - - /** - * Gets the {@link FileLastWrittenMode}. - * - * @return The {@link FileLastWrittenMode}. - */ - public FileLastWrittenMode getLastWrittenMode() { - return this.lastWrittenMode; - } - - /** - * Sets the {@link FileLastWrittenMode}. - * - * @param lastWrittenMode {@link FileLastWrittenMode} - * @return The updated options. - */ - public ShareFileUploadRangeFromUrlOptions setLastWrittenMode(FileLastWrittenMode lastWrittenMode) { - this.lastWrittenMode = lastWrittenMode; - return this; - } } diff --git a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/options/ShareListFilesAndDirectoriesOptions.java b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/options/ShareListFilesAndDirectoriesOptions.java index e336dd7911516..b9f9b38c32e8b 100644 --- a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/options/ShareListFilesAndDirectoriesOptions.java +++ b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/options/ShareListFilesAndDirectoriesOptions.java @@ -3,10 +3,14 @@ package com.azure.storage.file.share.options; +import com.azure.core.util.logging.ClientLogger; + /** * Extended options for a directory listing operation. */ public final class ShareListFilesAndDirectoriesOptions { + private final ClientLogger logger = new ClientLogger(ShareListFilesAndDirectoriesOptions.class); + private String prefix; private Integer maxResultsPerPage; private boolean includeTimestamps; diff --git a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/specialized/ShareLeaseAsyncClient.java b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/specialized/ShareLeaseAsyncClient.java index 5451ce56b72a0..98f8f9ad84505 100644 --- a/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/specialized/ShareLeaseAsyncClient.java +++ b/sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/specialized/ShareLeaseAsyncClient.java @@ -49,7 +49,7 @@ */ @ServiceClient(builder = ShareLeaseClientBuilder.class, isAsync = true) public final class ShareLeaseAsyncClient { - private static final ClientLogger LOGGER = new ClientLogger(ShareLeaseAsyncClient.class); + private final ClientLogger logger = new ClientLogger(ShareLeaseAsyncClient.class); private final String shareName; private final String shareSnapshot; @@ -126,7 +126,11 @@ public String getLeaseId() { */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono acquireLease() { - return acquireLeaseWithResponse().flatMap(FluxUtil::toMono); + try { + return acquireLeaseWithResponse().flatMap(FluxUtil::toMono); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } } /** @@ -145,7 +149,11 @@ public Mono acquireLease() { */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> acquireLeaseWithResponse() { - return acquireLeaseWithResponse(new ShareAcquireLeaseOptions()); + try { + return acquireLeaseWithResponse(new ShareAcquireLeaseOptions()); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } } /** @@ -168,7 +176,7 @@ public Mono> acquireLeaseWithResponse(ShareAcquireLeaseOptions try { return withContext(context -> acquireLeaseWithResponse(options, context)); } catch (RuntimeException ex) { - return monoError(LOGGER, ex); + return monoError(logger, ex); } } @@ -208,7 +216,11 @@ Mono> acquireLeaseWithResponse(ShareAcquireLeaseOptions options */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono releaseLease() { - return releaseLeaseWithResponse().flatMap(FluxUtil::toMono); + try { + return releaseLeaseWithResponse().flatMap(FluxUtil::toMono); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } } /** @@ -230,7 +242,7 @@ public Mono> releaseLeaseWithResponse() { try { return withContext(this::releaseLeaseWithResponse); } catch (RuntimeException ex) { - return monoError(LOGGER, ex); + return monoError(logger, ex); } } @@ -263,7 +275,11 @@ Mono> releaseLeaseWithResponse(Context context) { */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono breakLease() { - return breakLeaseWithResponse().flatMap(FluxUtil::toMono); + try { + return breakLeaseWithResponse().flatMap(FluxUtil::toMono); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } } /** @@ -284,7 +300,11 @@ public Mono breakLease() { */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> breakLeaseWithResponse() { - return breakLeaseWithResponse(new ShareBreakLeaseOptions()); + try { + return breakLeaseWithResponse(new ShareBreakLeaseOptions()); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } } /** @@ -309,7 +329,7 @@ public Mono> breakLeaseWithResponse(ShareBreakLeaseOptions option try { return withContext(context -> breakLeaseWithResponse(options, context)); } catch (RuntimeException ex) { - return monoError(LOGGER, ex); + return monoError(logger, ex); } } @@ -346,7 +366,11 @@ Mono> breakLeaseWithResponse(ShareBreakLeaseOptions options, Cont */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono changeLease(String proposedId) { - return changeLeaseWithResponse(proposedId).flatMap(FluxUtil::toMono); + try { + return changeLeaseWithResponse(proposedId).flatMap(FluxUtil::toMono); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } } /** @@ -369,7 +393,7 @@ public Mono> changeLeaseWithResponse(String proposedId) { try { return withContext(context -> changeLeaseWithResponse(proposedId, context)); } catch (RuntimeException ex) { - return monoError(LOGGER, ex); + return monoError(logger, ex); } } @@ -406,7 +430,11 @@ Mono> changeLeaseWithResponse(String proposedId, Context contex */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono renewLease() { - return renewLeaseWithResponse().flatMap(FluxUtil::toMono); + try { + return renewLeaseWithResponse().flatMap(FluxUtil::toMono); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } } /** @@ -428,7 +456,7 @@ public Mono> renewLeaseWithResponse() { try { return withContext(this::renewLeaseWithResponse); } catch (RuntimeException ex) { - return monoError(LOGGER, ex); + return monoError(logger, ex); } } @@ -437,7 +465,7 @@ Mono> renewLeaseWithResponse(Context context) { Mono> response; if (this.isShareFile) { - throw LOGGER.logExceptionAsError(new UnsupportedOperationException( + throw logger.logExceptionAsError(new UnsupportedOperationException( "Cannot renew a lease on a share file.")); } else { response = this.client.getShares().renewLeaseWithResponseAsync(shareName, this.leaseId, null, diff --git a/sdk/storage/azure-storage-file-share/src/samples/java/com/azure/storage/file/share/ShareAsyncJavaDocCodeSamples.java b/sdk/storage/azure-storage-file-share/src/samples/java/com/azure/storage/file/share/ShareAsyncJavaDocCodeSamples.java index 484f3cc8cb68d..408092b988ad4 100644 --- a/sdk/storage/azure-storage-file-share/src/samples/java/com/azure/storage/file/share/ShareAsyncJavaDocCodeSamples.java +++ b/sdk/storage/azure-storage-file-share/src/samples/java/com/azure/storage/file/share/ShareAsyncJavaDocCodeSamples.java @@ -12,7 +12,6 @@ import com.azure.storage.file.share.models.NtfsFileAttributes; import com.azure.storage.file.share.options.ShareCreateOptions; import com.azure.storage.file.share.options.ShareDeleteOptions; -import com.azure.storage.file.share.options.ShareDirectoryCreateOptions; import com.azure.storage.file.share.options.ShareGetAccessPolicyOptions; import com.azure.storage.file.share.options.ShareGetPropertiesOptions; import com.azure.storage.file.share.options.ShareGetStatisticsOptions; @@ -21,7 +20,6 @@ import com.azure.storage.file.share.options.ShareSetMetadataOptions; import com.azure.storage.file.share.sas.ShareSasPermission; import com.azure.storage.file.share.sas.ShareServiceSasSignatureValues; -import reactor.core.publisher.Mono; import java.time.LocalDateTime; import java.time.OffsetDateTime; @@ -775,165 +773,4 @@ public void generateSasWithContext() { shareAsyncClient.generateSas(values, new Context("key", "value")); // END: com.azure.storage.file.share.ShareAsyncClient.generateSas#ShareServiceSasSignatureValues-Context } - - /** - * Generates a code sample for using {@link ShareAsyncClient#createIfNotExists()} and - * {@link ShareAsyncClient#createIfNotExistsWithResponse(ShareCreateOptions)} - */ - public void createIfNotExistsCodeSnippets() { - ShareAsyncClient shareAsyncClient = createAsyncClientWithSASToken(); - // BEGIN: com.azure.storage.file.share.ShareAsyncClient.createIfNotExists - shareAsyncClient.createIfNotExists().subscribe(response -> - System.out.printf("Created at %s%n", response.getLastModified())); - // END: com.azure.storage.file.share.ShareAsyncClient.createIfNotExists - - // BEGIN: com.azure.storage.file.share.ShareAsyncClient.createIfNotExistsWithResponse#ShareCreateOptions - shareAsyncClient.createIfNotExistsWithResponse(new ShareCreateOptions() - .setMetadata(Collections.singletonMap("share", "metadata")).setQuotaInGb(1) - .setAccessTier(ShareAccessTier.HOT)).subscribe(response -> { - if (response.getStatusCode() == 409) { - System.out.println("Already exists."); - } else { - System.out.println("successfully created."); - } - }); - // END: com.azure.storage.file.share.ShareAsyncClient.createIfNotExistsWithResponse#ShareCreateOptions - } - - /** - * Generates a code sample for using {@link ShareAsyncClient#deleteIfExists()}, - * {@link ShareAsyncClient#deleteIfExistsWithResponse()} and - * {@link ShareAsyncClient#deleteIfExistsWithResponse(ShareDeleteOptions)} - */ - public void deleteIfExistsCodeSnippets() { - ShareAsyncClient shareAsyncClient = createAsyncClientWithSASToken(); - // BEGIN: com.azure.storage.file.share.ShareAsyncClient.deleteIfExists - shareAsyncClient.deleteIfExists().subscribe(deleted -> { - if (deleted) { - System.out.println("Successfully deleted."); - } else { - System.out.println("Does not exist."); - } - }); - // END: com.azure.storage.file.share.ShareAsyncClient.deleteIfExists - - // BEGIN: com.azure.storage.file.share.ShareAsyncClient.deleteIfExistsWithResponse - shareAsyncClient.deleteIfExistsWithResponse().subscribe(response -> { - if (response.getStatusCode() == 404) { - System.out.println("Does not exist."); - } else { - System.out.println("successfully deleted."); - } - }); - // END: com.azure.storage.file.share.ShareAsyncClient.deleteIfExistsWithResponse - - // BEGIN: com.azure.storage.file.share.ShareAsyncClient.deleteIfExistsWithResponse#ShareDeleteOptions - shareAsyncClient.deleteIfExistsWithResponse(new ShareDeleteOptions() - .setRequestConditions(new ShareRequestConditions().setLeaseId(leaseId))).subscribe(response -> { - if (response.getStatusCode() == 404) { - System.out.println("Does not exist."); - } else { - System.out.println("successfully deleted."); - } - }); - // END: com.azure.storage.file.share.ShareAsyncClient.deleteIfExistsWithResponse#ShareDeleteOptions - } - - /** - * Generates a code sample for using {@link ShareAsyncClient#createDirectoryIfNotExists(String)} and - * {@link ShareAsyncClient#createDirectoryIfNotExistsWithResponse(String, ShareDirectoryCreateOptions)} - */ - public void createDirectoryIfNotExistsCodeSnippets() { - ShareAsyncClient shareAsyncClient = createAsyncClientWithSASToken(); - // BEGIN: com.azure.storage.file.share.ShareAsyncClient.createDirectoryIfNotExists#string - shareAsyncClient.createDirectoryIfNotExists("mydirectory") - .switchIfEmpty(Mono.empty() - .doOnSuccess(x -> System.out.println("Already exists."))) - .subscribe(response -> System.out.println("Create completed.")); - // END: com.azure.storage.file.share.ShareAsyncClient.createDirectoryIfNotExists#string - - // BEGIN: com.azure.storage.file.share.ShareAsyncClient.createDirectoryIfNotExistsWithResponse#String-ShareDirectoryCreateOptions - FileSmbProperties smbProperties = new FileSmbProperties(); - String filePermission = "filePermission"; - Map metadata = Collections.singletonMap("directory", "metadata"); - ShareDirectoryCreateOptions options = new ShareDirectoryCreateOptions().setSmbProperties(smbProperties) - .setFilePermission(filePermission).setMetadata(metadata); - - shareAsyncClient.createDirectoryIfNotExistsWithResponse("documents", options).subscribe(response -> { - if (response.getStatusCode() == 409) { - System.out.println("Already exists."); - } else { - System.out.println("successfully created."); - } - }); - // END: com.azure.storage.file.share.ShareAsyncClient.createDirectoryIfNotExistsWithResponse#String-ShareDirectoryCreateOptions - } - - /** - * Generates a code sample for using {@link ShareAsyncClient#deleteDirectoryIfExists(String)} and - * {@link ShareAsyncClient#deleteDirectoryIfExistsWithResponse(String)} - */ - public void deleteDirectoryIfExistsCodeSnippets() { - ShareAsyncClient shareAsyncClient = createAsyncClientWithSASToken(); - // BEGIN: com.azure.storage.file.share.ShareAsyncClient.deleteDirectoryIfExists#string - shareAsyncClient.deleteDirectoryIfExists("mydirectory").subscribe(deleted -> { - if (deleted) { - System.out.println("Successfully deleted."); - } else { - System.out.println("Does not exist."); - } - }); - // END: com.azure.storage.file.share.ShareAsyncClient.deleteDirectoryIfExists#string - - // BEGIN: com.azure.storage.file.share.ShareAsyncClient.deleteDirectoryIfExistsWithResponse#string - shareAsyncClient.deleteDirectoryIfExistsWithResponse("mydirectory").subscribe(response -> { - if (response.getStatusCode() == 404) { - System.out.println("Does not exist."); - } else { - System.out.println("successfully deleted."); - } - }); - // END: com.azure.storage.file.share.ShareAsyncClient.deleteDirectoryIfExistsWithResponse#string - } - - /** - * Generates a code sample for using {@link ShareAsyncClient#deleteFileIfExists(String)}, - * {@link ShareAsyncClient#deleteFileIfExistsWithResponse(String)} and - * {@link ShareAsyncClient#deleteFileIfExistsWithResponse(String, ShareDeleteOptions)} - */ - public void deleteFileIfExistsCodeSnippets() { - ShareAsyncClient shareAsyncClient = createAsyncClientWithSASToken(); - // BEGIN: com.azure.storage.file.share.ShareAsyncClient.deleteFileIfExists#string - shareAsyncClient.deleteFileIfExists("myfile").subscribe(deleted -> { - if (deleted) { - System.out.println("Successfully deleted."); - } else { - System.out.println("Does not exist."); - } - }); - // END: com.azure.storage.file.share.ShareAsyncClient.deleteFileIfExists#string - - // BEGIN: com.azure.storage.file.share.ShareAsyncClient.deleteFileIfExistsWithResponse#string - shareAsyncClient.deleteFileIfExistsWithResponse("myfile").subscribe(response -> { - if (response.getStatusCode() == 404) { - System.out.println("Does not exist."); - } else { - System.out.println("successfully deleted."); - } - }); - // END: com.azure.storage.file.share.ShareAsyncClient.deleteFileIfExistsWithResponse#string - - // BEGIN: com.azure.storage.file.share.ShareAsyncClient.deleteFileIfExistsWithResponse#string-ShareDeleteOptions - ShareRequestConditions requestConditions = new ShareRequestConditions().setLeaseId(leaseId); - ShareDeleteOptions options = new ShareDeleteOptions().setRequestConditions(requestConditions); - - shareAsyncClient.deleteFileIfExistsWithResponse("myfile", options).subscribe(response -> { - if (response.getStatusCode() == 404) { - System.out.println("Does not exist."); - } else { - System.out.println("successfully deleted."); - } - }); - // END: com.azure.storage.file.share.ShareAsyncClient.deleteFileIfExistsWithResponse#string-ShareDeleteOptions - } } diff --git a/sdk/storage/azure-storage-file-share/src/samples/java/com/azure/storage/file/share/ShareDirectoryAsyncJavaDocCodeSamples.java b/sdk/storage/azure-storage-file-share/src/samples/java/com/azure/storage/file/share/ShareDirectoryAsyncJavaDocCodeSamples.java index 0578cb09ed065..edd14772ce784 100644 --- a/sdk/storage/azure-storage-file-share/src/samples/java/com/azure/storage/file/share/ShareDirectoryAsyncJavaDocCodeSamples.java +++ b/sdk/storage/azure-storage-file-share/src/samples/java/com/azure/storage/file/share/ShareDirectoryAsyncJavaDocCodeSamples.java @@ -7,13 +7,10 @@ import com.azure.storage.file.share.models.NtfsFileAttributes; import com.azure.storage.file.share.models.ShareFileHttpHeaders; import com.azure.storage.file.share.models.ShareRequestConditions; -import com.azure.storage.file.share.options.ShareDeleteOptions; -import com.azure.storage.file.share.options.ShareDirectoryCreateOptions; import com.azure.storage.file.share.options.ShareFileRenameOptions; import com.azure.storage.file.share.options.ShareListFilesAndDirectoriesOptions; import com.azure.storage.file.share.sas.ShareFileSasPermission; import com.azure.storage.file.share.sas.ShareServiceSasSignatureValues; -import reactor.core.publisher.Mono; import java.time.LocalDateTime; import java.time.OffsetDateTime; @@ -652,157 +649,4 @@ public void generateSasWithContext() { shareDirectoryAsyncClient.generateSas(values, new Context("key", "value")); // END: com.azure.storage.file.share.ShareDirectoryAsyncClient.generateSas#ShareServiceSasSignatureValues-Context } - - /** - * Generates a code sample for using {@link ShareDirectoryAsyncClient#createIfNotExists()} and - * {@link ShareDirectoryAsyncClient#createIfNotExistsWithResponse(ShareDirectoryCreateOptions)} - */ - public void createIfNotExistsCodeSnippets() { - ShareDirectoryAsyncClient shareDirectoryAsyncClient = createAsyncClientWithSASToken(); - // BEGIN: com.azure.storage.file.share.ShareDirectoryAsyncClient.createIfNotExists - shareDirectoryAsyncClient.createIfNotExists().subscribe(response -> - System.out.printf("Created at %s%n", response.getLastModified())); - // END: com.azure.storage.file.share.ShareDirectoryAsyncClient.createIfNotExists - - // BEGIN: com.azure.storage.file.share.ShareDirectoryAsyncClient.createIfNotExistsWithResponse#ShareDirectoryCreateOptions - FileSmbProperties smbProperties = new FileSmbProperties(); - String filePermission = "filePermission"; - Map metadata = Collections.singletonMap("directory", "metadata"); - ShareDirectoryCreateOptions options = new ShareDirectoryCreateOptions().setSmbProperties(smbProperties) - .setFilePermission(filePermission).setMetadata(metadata); - - shareDirectoryAsyncClient.createIfNotExistsWithResponse(options).subscribe(response -> { - if (response.getStatusCode() == 409) { - System.out.println("Already exists."); - } else { - System.out.println("successfully created."); - } - }); - // END: com.azure.storage.file.share.ShareDirectoryAsyncClient.createIfNotExistsWithResponse#ShareDirectoryCreateOptions - } - - /** - * Generates a code sample for using {@link ShareDirectoryAsyncClient#deleteIfExists()} and - * {@link ShareDirectoryAsyncClient#deleteIfExistsWithResponse()} - */ - public void deleteIfExistsCodeSnippets() { - ShareDirectoryAsyncClient shareDirectoryAsyncClient = createAsyncClientWithSASToken(); - // BEGIN: com.azure.storage.file.share.ShareDirectoryAsyncClient.deleteIfExists - shareDirectoryAsyncClient.deleteIfExists().subscribe(deleted -> { - if (deleted) { - System.out.println("Successfully deleted."); - } else { - System.out.println("Does not exist."); - } - }); - // END: com.azure.storage.file.share.ShareDirectoryAsyncClient.deleteIfExists - - // BEGIN: com.azure.storage.file.share.ShareDirectoryAsyncClient.deleteIfExistsWithResponse - shareDirectoryAsyncClient.deleteIfExistsWithResponse().subscribe(response -> { - if (response.getStatusCode() == 404) { - System.out.println("Does not exist."); - } else { - System.out.println("successfully deleted."); - } - }); - // END: com.azure.storage.file.share.ShareDirectoryAsyncClient.deleteIfExistsWithResponse - } - - /** - * Generates code sample for creating a subdirectory with {@link ShareDirectoryAsyncClient#createSubdirectoryIfNotExists(String)} - * and {@link ShareDirectoryAsyncClient#createSubdirectoryIfNotExistsWithResponse(String, ShareDirectoryCreateOptions)} - */ - public void createSubdirectoryIfNotExistsCodeSnippets() { - ShareDirectoryAsyncClient shareDirectoryAsyncClient = createAsyncClientWithSASToken(); - // BEGIN: com.azure.storage.file.share.ShareDirectoryAsyncClient.createSubdirectoryIfNotExists#string - shareDirectoryAsyncClient.createSubdirectoryIfNotExists("subdir") - .switchIfEmpty(Mono.empty() - .doOnSuccess(x -> System.out.println("Already exists."))) - .subscribe(response -> System.out.println("Create completed.")); - // END: com.azure.storage.file.share.ShareDirectoryAsyncClient.createSubdirectoryIfNotExists#string - - // BEGIN: com.azure.storage.file.share.ShareDirectoryAsyncClient.createSubdirectoryIfNotExistsWithResponse#String-ShareDirectoryCreateOptions - FileSmbProperties smbProperties = new FileSmbProperties(); - String filePermission = "filePermission"; - Map metadata = Collections.singletonMap("directory", "metadata"); - ShareDirectoryCreateOptions options = new ShareDirectoryCreateOptions().setSmbProperties(smbProperties) - .setFilePermission(filePermission).setMetadata(metadata); - - shareDirectoryAsyncClient.createSubdirectoryIfNotExistsWithResponse("subdir", options).subscribe(response -> { - if (response.getStatusCode() == 409) { - System.out.println("Already exists."); - } else { - System.out.println("successfully created."); - } - }); - // END: com.azure.storage.file.share.ShareDirectoryAsyncClient.createSubdirectoryIfNotExistsWithResponse#String-ShareDirectoryCreateOptions - } - - /** - * Generates a code sample for using {@link ShareDirectoryAsyncClient#deleteSubdirectoryIfExists(String)} and - * {@link ShareDirectoryAsyncClient#deleteSubdirectoryIfExistsWithResponse(String)} - */ - public void deleteSubdirectoryIfExistsCodeSnippets() { - ShareDirectoryAsyncClient shareDirectoryAsyncClient = createAsyncClientWithSASToken(); - // BEGIN: com.azure.storage.file.share.ShareDirectoryAsyncClient.deleteSubdirectoryIfExists#string - shareDirectoryAsyncClient.deleteSubdirectoryIfExists("mysubdirectory").subscribe(deleted -> { - if (deleted) { - System.out.println("Successfully deleted."); - } else { - System.out.println("Does not exist."); - } - }); - // END: com.azure.storage.file.share.ShareDirectoryAsyncClient.deleteSubdirectoryIfExists#string - - // BEGIN: com.azure.storage.file.share.ShareDirectoryAsyncClient.deleteSubdirectoryIfExistsWithResponse#string - shareDirectoryAsyncClient.deleteSubdirectoryIfExistsWithResponse("mysubdirectory").subscribe(response -> { - if (response.getStatusCode() == 404) { - System.out.println("Does not exist."); - } else { - System.out.println("successfully deleted."); - } - }); - // END: com.azure.storage.file.share.ShareDirectoryAsyncClient.deleteSubdirectoryIfExistsWithResponse#string - } - - /** - * Generates a code sample for using {@link ShareDirectoryAsyncClient#deleteFileIfExists(String)}, - * {@link ShareDirectoryAsyncClient#deleteFileIfExistsWithResponse(String)} and - * {@link ShareDirectoryAsyncClient#deleteFileIfExistsWithResponse(String, ShareDeleteOptions)} - */ - public void deleteFileIfExistsCodeSnippets() { - ShareDirectoryAsyncClient shareDirectoryAsyncClient = createAsyncClientWithSASToken(); - // BEGIN: com.azure.storage.file.share.ShareDirectoryAsyncClient.deleteFileIfExists#string - shareDirectoryAsyncClient.deleteFileIfExists("myfile").subscribe(deleted -> { - if (deleted) { - System.out.println("Successfully deleted."); - } else { - System.out.println("Does not exist."); - } - }); - // END: com.azure.storage.file.share.ShareDirectoryAsyncClient.deleteFileIfExists#string - - // BEGIN: com.azure.storage.file.share.ShareDirectoryAsyncClient.deleteFileIfExistsWithResponse#string - shareDirectoryAsyncClient.deleteFileIfExistsWithResponse("myfile").subscribe(response -> { - if (response.getStatusCode() == 404) { - System.out.println("Does not exist."); - } else { - System.out.println("successfully deleted."); - } - }); - // END: com.azure.storage.file.share.ShareDirectoryAsyncClient.deleteFileIfExistsWithResponse#string - - // BEGIN: com.azure.storage.file.share.ShareDirectoryAsyncClient.deleteFileIfExistsWithResponse#string-ShareDeleteOptions - ShareRequestConditions requestConditions = new ShareRequestConditions().setLeaseId(leaseId); - ShareDeleteOptions options = new ShareDeleteOptions().setRequestConditions(requestConditions); - - shareDirectoryAsyncClient.deleteFileIfExistsWithResponse("myfile", options).subscribe(response -> { - if (response.getStatusCode() == 404) { - System.out.println("Does not exist."); - } else { - System.out.println("successfully deleted."); - } - }); - // END: com.azure.storage.file.share.ShareDirectoryAsyncClient.deleteFileIfExistsWithResponse#string-ShareDeleteOptions - } } diff --git a/sdk/storage/azure-storage-file-share/src/samples/java/com/azure/storage/file/share/ShareDirectoryJavaDocCodeSamples.java b/sdk/storage/azure-storage-file-share/src/samples/java/com/azure/storage/file/share/ShareDirectoryJavaDocCodeSamples.java index a99dcdaf7aa2b..ff225dc06c813 100644 --- a/sdk/storage/azure-storage-file-share/src/samples/java/com/azure/storage/file/share/ShareDirectoryJavaDocCodeSamples.java +++ b/sdk/storage/azure-storage-file-share/src/samples/java/com/azure/storage/file/share/ShareDirectoryJavaDocCodeSamples.java @@ -13,8 +13,6 @@ import com.azure.storage.file.share.models.HandleItem; import com.azure.storage.file.share.models.NtfsFileAttributes; import com.azure.storage.file.share.models.ShareRequestConditions; -import com.azure.storage.file.share.options.ShareDeleteOptions; -import com.azure.storage.file.share.options.ShareDirectoryCreateOptions; import com.azure.storage.file.share.options.ShareFileRenameOptions; import com.azure.storage.file.share.options.ShareListFilesAndDirectoriesOptions; import com.azure.storage.file.share.sas.ShareFileSasPermission; @@ -286,7 +284,7 @@ public void listDirectoriesAndFilesOptionsBagOverload() { } /** - * Generates a code sample for using {@link ShareDirectoryClient#deleteFile(String)} + * Generates a code sample for using {@link ShareDirectoryClient#deleteFile(String)} ()} */ public void deleteFile() { ShareDirectoryClient shareDirectoryClient = createClientWithSASToken(); @@ -621,144 +619,4 @@ public void generateSasWithContext() { shareDirectoryClient.generateSas(values, new Context("key", "value")); // END: com.azure.storage.file.share.ShareDirectoryClient.generateSas#ShareServiceSasSignatureValues-Context } - - /** - * Generates a code sample for using {@link ShareDirectoryClient#createIfNotExists()} and - * {@link ShareDirectoryClient#createIfNotExistsWithResponse(ShareDirectoryCreateOptions, Duration, Context)} - */ - public void createIfNotExistsCodeSnippets() { - - // BEGIN: com.azure.storage.file.share.ShareDirectoryClient.createIfNotExists - ShareDirectoryClient shareDirectoryClient = createClientWithSASToken(); - ShareDirectoryInfo shareDirectoryInfo = shareDirectoryClient.createIfNotExists(); - System.out.printf("Last Modified Time:%s", shareDirectoryInfo.getLastModified()); - // END: com.azure.storage.file.share.ShareDirectoryClient.createIfNotExists - - // BEGIN: com.azure.storage.file.share.ShareDirectoryClient.createIfNotExistsWithResponse#ShareDirectoryCreateOptions-Duration-Context - ShareDirectoryClient directoryClient = createClientWithSASToken(); - FileSmbProperties smbProperties = new FileSmbProperties(); - String filePermission = "filePermission"; - ShareDirectoryCreateOptions options = new ShareDirectoryCreateOptions().setSmbProperties(smbProperties) - .setFilePermission(filePermission).setMetadata(Collections.singletonMap("directory", "metadata")); - - Response response = directoryClient.createIfNotExistsWithResponse(options, - Duration.ofSeconds(1), new Context(key1, value1)); - - if (response.getStatusCode() == 409) { - System.out.println("Already existed."); - } else { - System.out.printf("Create completed with status %d%n", response.getStatusCode()); - } - // END: com.azure.storage.file.share.ShareDirectoryClient.createIfNotExistsWithResponse#ShareDirectoryCreateOptions-Duration-Context - } - - /** - * Generates a code sample for using {@link ShareDirectoryClient#deleteIfExists()} and - * {@link ShareDirectoryClient#deleteIfExistsWithResponse(Duration, Context)} - */ - public void deleteDirectoryIfExistsCodeSnippets() { - // BEGIN: com.azure.storage.file.share.ShareDirectoryClient.deleteIfExists - ShareDirectoryClient shareDirectoryClient = createClientWithSASToken(); - boolean result = shareDirectoryClient.deleteIfExists(); - System.out.println("Directory deleted: " + result); - // END: com.azure.storage.file.share.ShareDirectoryClient.deleteIfExists - - // BEGIN: com.azure.storage.file.share.ShareDirectoryClient.deleteIfExistsWithResponse#duration-context - Response response = shareDirectoryClient.deleteIfExistsWithResponse(Duration.ofSeconds(1), - new Context(key1, value1)); - if (response.getStatusCode() == 404) { - System.out.println("Does not exist."); - } else { - System.out.printf("Delete completed with status %d%n", response.getStatusCode()); - } - // END: com.azure.storage.file.share.ShareDirectoryClient.deleteIfExistsWithResponse#duration-context - } - - /** - * Generates a code sample for using {@link ShareDirectoryClient#createSubdirectoryIfNotExists(String)} and - * {@link ShareDirectoryClient#createSubdirectoryIfNotExistsWithResponse(String, ShareDirectoryCreateOptions, Duration, Context)} - */ - public void createIfNotExistsSubdirectoryCodeSnippets() { - ShareDirectoryClient shareDirectoryClient = createClientWithSASToken(); - // BEGIN: com.azure.storage.file.share.ShareDirectoryClient.createSubdirectoryIfNotExists#string - ShareDirectoryClient subdirectoryClient = shareDirectoryClient.createSubdirectoryIfNotExists("subdir"); - // END: com.azure.storage.file.share.ShareDirectoryClient.createSubdirectoryIfNotExists#string - - // BEGIN: com.azure.storage.file.share.ShareDirectoryClient.createSubdirectoryIfNotExistsWithResponse#String-ShareDirectoryCreateOptions-Duration-Context - FileSmbProperties smbProperties = new FileSmbProperties(); - String filePermission = "filePermission"; - ShareDirectoryCreateOptions options = new ShareDirectoryCreateOptions().setSmbProperties(smbProperties) - .setFilePermission(filePermission).setMetadata(Collections.singletonMap("directory", "metadata")); - - Response response = shareDirectoryClient - .createSubdirectoryIfNotExistsWithResponse("subdir", options, Duration.ofSeconds(1), - new Context(key1, value1)); - if (response.getStatusCode() == 409) { - System.out.println("Already existed."); - } else { - System.out.printf("Create completed with status %d%n", response.getStatusCode()); - } - // END: com.azure.storage.file.share.ShareDirectoryClient.createSubdirectoryIfNotExistsWithResponse#String-ShareDirectoryCreateOptions-Duration-Context - } - - /** - * Generates a code sample for using {@link ShareDirectoryClient#deleteSubdirectoryIfExists(String)} and - * {@link ShareDirectoryClient#deleteSubdirectoryIfExistsWithResponse(String, Duration, Context)} - */ - public void deleteSubdirectoryIfExistsCodeSnippets() { - ShareDirectoryClient shareDirectoryClient = createClientWithSASToken(); - // BEGIN: com.azure.storage.file.share.ShareDirectoryClient.deleteSubdirectoryIfExists#string - boolean result = shareDirectoryClient.deleteSubdirectoryIfExists("mysubdirectory"); - System.out.println("Subdirectory deleted: " + result); - // END: com.azure.storage.file.share.ShareDirectoryClient.deleteSubdirectoryIfExists#string - - // BEGIN: com.azure.storage.file.share.ShareDirectoryClient.deleteSubdirectoryIfExistsWithResponse#string-duration-context - Response response = shareDirectoryClient.deleteSubdirectoryIfExistsWithResponse("mysubdirectory", - Duration.ofSeconds(1), new Context(key1, value1)); - if (response.getStatusCode() == 404) { - System.out.println("Does not exist."); - } else { - System.out.printf("Delete completed with status %d%n", response.getStatusCode()); - } - // END: com.azure.storage.file.share.ShareDirectoryClient.deleteSubdirectoryIfExistsWithResponse#string-duration-context - } - - /** - * Generates a code sample for using {@link ShareDirectoryClient#deleteFileIfExists(String)}, - * {@link ShareDirectoryClient#deleteFileIfExistsWithResponse(String, Duration, Context)} and - * {@link ShareDirectoryClient#deleteFileIfExistsWithResponse(String, ShareDeleteOptions, Duration, Context)} - */ - public void deleteFileIfExistsCodeSnippets() { - ShareDirectoryClient shareDirectoryClient = createClientWithSASToken(); - // BEGIN: com.azure.storage.file.share.ShareDirectoryClient.deleteFileIfExists#string - boolean result = shareDirectoryClient.deleteFileIfExists("myfile"); - System.out.println("File deleted: " + result); - // END: com.azure.storage.file.share.ShareDirectoryClient.deleteFileIfExists#string - - // BEGIN: com.azure.storage.file.share.ShareDirectoryClient.deleteFileIfExistsWithResponse#String-Duration-Context - Response response = shareDirectoryClient.deleteFileIfExistsWithResponse("myfile", - Duration.ofSeconds(1), new Context(key1, value1)); - if (response.getStatusCode() == 404) { - System.out.println("Does not exist."); - } else { - System.out.printf("Delete completed with status %d%n", response.getStatusCode()); - } - // END: com.azure.storage.file.share.ShareDirectoryClient.deleteFileIfExistsWithResponse#String-Duration-Context - - // BEGIN: com.azure.storage.file.share.ShareDirectoryClient.deleteFileIfExistsWithResponse#String-ShareDeleteOptions-Duration-Context - ShareRequestConditions requestConditions = new ShareRequestConditions().setLeaseId(leaseId); - ShareDeleteOptions options = new ShareDeleteOptions().setRequestConditions(requestConditions); - - Response fileResponse = shareDirectoryClient.deleteFileIfExistsWithResponse("myfile", options, - Duration.ofSeconds(1), new Context(key1, value1)); - if (fileResponse.getStatusCode() == 404) { - System.out.println("Does not exist."); - } else { - System.out.printf("Delete completed with status %d%n", response.getStatusCode()); - } - // END: com.azure.storage.file.share.ShareDirectoryClient.deleteFileIfExistsWithResponse#String-ShareDeleteOptions-Duration-Context - - } - - } diff --git a/sdk/storage/azure-storage-file-share/src/samples/java/com/azure/storage/file/share/ShareFileAsyncJavaDocCodeSamples.java b/sdk/storage/azure-storage-file-share/src/samples/java/com/azure/storage/file/share/ShareFileAsyncJavaDocCodeSamples.java index d1cd296d5ab5d..e4da02d5ff1fd 100644 --- a/sdk/storage/azure-storage-file-share/src/samples/java/com/azure/storage/file/share/ShareFileAsyncJavaDocCodeSamples.java +++ b/sdk/storage/azure-storage-file-share/src/samples/java/com/azure/storage/file/share/ShareFileAsyncJavaDocCodeSamples.java @@ -1139,43 +1139,4 @@ public void generateSasWithContext() { shareFileAsyncClient.generateSas(values, new Context("key", "value")); // END: com.azure.storage.file.share.ShareFileAsyncClient.generateSas#ShareServiceSasSignatureValues-Context } - - /** - * Generates a code sample for using {@link ShareFileAsyncClient#deleteIfExists()}, - * {@link ShareFileAsyncClient#deleteIfExistsWithResponse()} and - * {@link ShareFileAsyncClient#deleteIfExistsWithResponse(ShareRequestConditions)} - */ - public void deleteFileIfExistsCodeSnippets() { - ShareFileAsyncClient shareFileAsyncClient = createAsyncClientWithSASToken(); - // BEGIN: com.azure.storage.file.share.ShareFileAsyncClient.deleteIfExists - shareFileAsyncClient.deleteIfExists().subscribe(deleted -> { - if (deleted) { - System.out.println("Successfully deleted."); - } else { - System.out.println("Does not exist."); - } - }); - // END: com.azure.storage.file.share.ShareFileAsyncClient.deleteIfExists - - // BEGIN: com.azure.storage.file.share.ShareFileAsyncClient.deleteIfExistsWithResponse - shareFileAsyncClient.deleteIfExistsWithResponse().subscribe(response -> { - if (response.getStatusCode() == 404) { - System.out.println("Does not exist."); - } else { - System.out.println("successfully deleted."); - } - }); - // END: com.azure.storage.file.share.ShareFileAsyncClient.deleteIfExistsWithResponse - - // BEGIN: com.azure.storage.file.share.ShareFileAsyncClient.deleteIfExistsWithResponse#ShareRequestConditions - ShareRequestConditions requestConditions = new ShareRequestConditions().setLeaseId(leaseId); - shareFileAsyncClient.deleteIfExistsWithResponse(requestConditions).subscribe(response -> { - if (response.getStatusCode() == 404) { - System.out.println("Does not exist."); - } else { - System.out.println("successfully deleted."); - } - }); - // END: com.azure.storage.file.share.ShareFileAsyncClient.deleteIfExistsWithResponse#ShareRequestConditions - } } diff --git a/sdk/storage/azure-storage-file-share/src/samples/java/com/azure/storage/file/share/ShareFileJavaDocCodeSamples.java b/sdk/storage/azure-storage-file-share/src/samples/java/com/azure/storage/file/share/ShareFileJavaDocCodeSamples.java index f338c27efcc15..c38b3385d6d1c 100644 --- a/sdk/storage/azure-storage-file-share/src/samples/java/com/azure/storage/file/share/ShareFileJavaDocCodeSamples.java +++ b/sdk/storage/azure-storage-file-share/src/samples/java/com/azure/storage/file/share/ShareFileJavaDocCodeSamples.java @@ -1134,37 +1134,4 @@ public void generateSasWithContext() { shareFileClient.generateSas(values, new Context("key", "value")); // END: com.azure.storage.file.share.ShareFileClient.generateSas#ShareServiceSasSignatureValues-Context } - - /** - * Generates a code sample for using {@link ShareFileClient#deleteIfExists()}, - * {@link ShareFileClient#deleteIfExistsWithResponse(Duration, Context)} and - * {@link ShareFileClient#deleteIfExistsWithResponse(ShareRequestConditions, Duration, Context)} - */ - public void deleteFileIfExistsCodeSnippets() { - ShareFileClient fileClient = createClientWithSASToken(); - // BEGIN: com.azure.storage.file.share.ShareFileClient.deleteIfExists - boolean result = fileClient.deleteIfExists(); - System.out.println("File deleted: " + result); - // END: com.azure.storage.file.share.ShareFileClient.deleteIfExists - - // BEGIN: com.azure.storage.file.share.ShareFileClient.deleteIfExistsWithResponse#duration-context - Response response = fileClient.deleteIfExistsWithResponse(Duration.ofSeconds(1), new Context(key1, value1)); - if (response.getStatusCode() == 404) { - System.out.println("Does not exist."); - } else { - System.out.printf("Delete completed with status %d%n", response.getStatusCode()); - } - // END: com.azure.storage.file.share.ShareFileClient.deleteIfExistsWithResponse#duration-context - - // BEGIN: com.azure.storage.file.share.ShareFileClient.deleteIfExistsWithResponse#ShareRequestConditions-duration-context - ShareRequestConditions requestConditions = new ShareRequestConditions().setLeaseId(leaseId); - Response res = fileClient.deleteIfExistsWithResponse(requestConditions, Duration.ofSeconds(1), - new Context(key1, value1)); - if (res.getStatusCode() == 404) { - System.out.println("Does not exist."); - } else { - System.out.printf("Delete completed with status %d%n", response.getStatusCode()); - } - // END: com.azure.storage.file.share.ShareFileClient.deleteIfExistsWithResponse#ShareRequestConditions-duration-context - } } diff --git a/sdk/storage/azure-storage-file-share/src/samples/java/com/azure/storage/file/share/ShareJavaDocCodeSamples.java b/sdk/storage/azure-storage-file-share/src/samples/java/com/azure/storage/file/share/ShareJavaDocCodeSamples.java index c3b22785d0c81..8734174eb49bf 100644 --- a/sdk/storage/azure-storage-file-share/src/samples/java/com/azure/storage/file/share/ShareJavaDocCodeSamples.java +++ b/sdk/storage/azure-storage-file-share/src/samples/java/com/azure/storage/file/share/ShareJavaDocCodeSamples.java @@ -17,7 +17,6 @@ import com.azure.storage.file.share.models.ShareStatistics; import com.azure.storage.file.share.options.ShareCreateOptions; import com.azure.storage.file.share.options.ShareDeleteOptions; -import com.azure.storage.file.share.options.ShareDirectoryCreateOptions; import com.azure.storage.file.share.options.ShareGetAccessPolicyOptions; import com.azure.storage.file.share.options.ShareGetPropertiesOptions; import com.azure.storage.file.share.options.ShareGetStatisticsOptions; @@ -751,148 +750,4 @@ public void generateSasWithContext() { shareClient.generateSas(values, new Context("key", "value")); // END: com.azure.storage.file.share.ShareClient.generateSas#ShareServiceSasSignatureValues-Context } - - /** - * Generates a code sample for using {@link ShareClient#createIfNotExists()} and - * {@link ShareClient#createIfNotExistsWithResponse(ShareCreateOptions, Duration, Context)} - */ - public void createIfNotExistsCodeSnippets() { - ShareClient shareClient = createClientWithSASToken(); - // BEGIN: com.azure.storage.file.share.ShareClient.createIfNotExists - shareClient.createIfNotExists(); - System.out.println("Completed creating the share."); - // END: com.azure.storage.file.share.ShareClient.createIfNotExists - - // BEGIN: ShareClient.createIfNotExistsWithResponse#ShareCreateOptions-Duration-Context - Response response = shareClient.createIfNotExistsWithResponse(new ShareCreateOptions() - .setMetadata(Collections.singletonMap("share", "metadata")).setQuotaInGb(1) - .setAccessTier(ShareAccessTier.HOT), Duration.ofSeconds(1), new Context(key1, value1)); - - if (response.getStatusCode() == 409) { - System.out.println("Already existed."); - } else { - System.out.printf("Create completed with status %d%n", response.getStatusCode()); - } - // END: ShareClient.createIfNotExistsWithResponse#ShareCreateOptions-Duration-Context - } - - /** - * Generates a code sample for using {@link ShareClient#deleteIfExists()}, - * {@link ShareClient#deleteIfExistsWithResponse(Duration, Context)} and - * {@link ShareClient#deleteIfExistsWithResponse(ShareDeleteOptions, Duration, Context)} - */ - public void deleteIfExistsCodeSnippets() { - ShareClient shareClient = createClientWithSASToken(); - // BEGIN: com.azure.storage.file.share.ShareClient.deleteIfExists - boolean result = shareClient.deleteIfExists(); - System.out.println("Share deleted: " + result); - // END: com.azure.storage.file.share.ShareClient.deleteIfExists - - // BEGIN: com.azure.storage.file.share.ShareClient.deleteIfExistsWithResponse#Duration-Context - Response response = shareClient.deleteIfExistsWithResponse(Duration.ofSeconds(1), new Context(key1, value1)); - if (response.getStatusCode() == 404) { - System.out.println("Does not exist."); - } else { - System.out.printf("Delete completed with status %d%n", response.getStatusCode()); - } - // END: com.azure.storage.file.share.ShareClient.deleteIfExistsWithResponse#Duration-Context - - // BEGIN: com.azure.storage.file.share.ShareClient.deleteIfExistsWithResponse#ShareDeleteOptions-Duration-Context - Response res = shareClient.deleteIfExistsWithResponse(new ShareDeleteOptions() - .setRequestConditions(new ShareRequestConditions().setLeaseId(leaseId)), - Duration.ofSeconds(1), new Context(key1, value1)); - if (res.getStatusCode() == 404) { - System.out.println("Does not exist."); - } else { - System.out.printf("Delete completed with status %d%n", response.getStatusCode()); - } - // END: com.azure.storage.file.share.ShareClient.deleteIfExistsWithResponse#ShareDeleteOptions-Duration-Context - } - - /** - * Generates a code sample for using {@link ShareClient#createDirectoryIfNotExists(String)} and - * {@link ShareClient#createDirectoryIfNotExistsWithResponse(String, ShareDirectoryCreateOptions, Duration, Context)} - */ - public void createDirectoryIfNotExistsCodeSnippets() { - ShareClient shareClient = createClientWithSASToken(); - // BEGIN: com.azure.storage.file.share.ShareClient.createDirectoryIfNotExists#string - ShareDirectoryClient directoryClient = shareClient.createDirectoryIfNotExists("mydirectory"); - System.out.println("Complete creating the directory."); - // END: com.azure.storage.file.share.ShareClient.createDirectoryIfNotExists#string - - // BEGIN: com.azure.storage.file.share.ShareClient.createDirectoryIfNotExistsWithResponse#String-ShareDirectoryCreateOptions-Duration-Context - FileSmbProperties smbProperties = new FileSmbProperties(); - String filePermission = "filePermission"; - Map metadata = Collections.singletonMap("directory", "metadata"); - ShareDirectoryCreateOptions options = new ShareDirectoryCreateOptions().setSmbProperties(smbProperties). - setFilePermission(filePermission).setMetadata(metadata); - Response response = shareClient.createDirectoryIfNotExistsWithResponse("documents", - options, Duration.ofSeconds(1), new Context(key1, value1)); - - if (response.getStatusCode() == 409) { - System.out.println("Already existed."); - } else { - System.out.printf("Create completed with status %d%n", response.getStatusCode()); - } - // END: com.azure.storage.file.share.ShareClient.createDirectoryIfNotExistsWithResponse#String-ShareDirectoryCreateOptions-Duration-Context - } - - /** - * Generates a code sample for using {@link ShareClient#deleteDirectoryIfExists(String)} and - * {@link ShareClient#deleteDirectoryIfExistsWithResponse(String, Duration, Context)} - */ - public void deleteDirectoryIfExistsCodeSnippets() { - ShareClient shareClient = createClientWithSASToken(); - // BEGIN: com.azure.storage.file.share.ShareClient.deleteDirectoryIfExists#string - boolean result = shareClient.deleteDirectoryIfExists("mydirectory"); - System.out.println("Directory deleted: " + result); - // END: com.azure.storage.file.share.ShareClient.deleteDirectoryIfExists#string - - // BEGIN: com.azure.storage.file.share.ShareClient.deleteDirectoryIfExistsWithResponse#string-duration-context - Response response = shareClient.deleteDirectoryIfExistsWithResponse("mydirectory", - Duration.ofSeconds(1), new Context(key1, value1)); - if (response.getStatusCode() == 404) { - System.out.println("Does not exist."); - } else { - System.out.printf("Delete completed with status %d%n", response.getStatusCode()); - } - // END: com.azure.storage.file.share.ShareClient.deleteDirectoryIfExistsWithResponse#string-duration-context - } - - /** - * Generates a code sample for using {@link ShareClient#deleteFileIfExists(String)}, - * {@link ShareClient#deleteFileIfExistsWithResponse(String, Duration, Context)} and - * {@link ShareClient#deleteFileIfExistsWithResponse(String, ShareDeleteOptions, Duration, Context)} - */ - public void deleteFileIfExistsCodeSnippets() { - ShareClient shareClient = createClientWithSASToken(); - // BEGIN: com.azure.storage.file.share.ShareClient.deleteFileIfExists#string - boolean result = shareClient.deleteFileIfExists("myfile"); - System.out.println("File deleted: " + result); - // END: com.azure.storage.file.share.ShareClient.deleteFileIfExists#string - - // BEGIN: com.azure.storage.file.share.ShareClient.deleteFileIfExistsWithResponse#string-duration-context - Response response = shareClient.deleteFileIfExistsWithResponse("myfile", - Duration.ofSeconds(1), new Context(key1, value1)); - if (response.getStatusCode() == 404) { - System.out.println("Does not exist."); - } else { - System.out.printf("Delete completed with status %d%n", response.getStatusCode()); - } - // END: com.azure.storage.file.share.ShareClient.deleteFileIfExistsWithResponse#string-duration-context - - // BEGIN: com.azure.storage.file.share.ShareClient.deleteFileIfExistsWithResponse#string-ShareDeleteOptions-duration-context - ShareRequestConditions requestConditions = new ShareRequestConditions().setLeaseId(leaseId); - ShareDeleteOptions options = new ShareDeleteOptions().setRequestConditions(requestConditions); - - Response res = shareClient.deleteFileIfExistsWithResponse("myfile", options, - Duration.ofSeconds(1), new Context(key1, value1)); - if (res.getStatusCode() == 404) { - System.out.println("Does not exist."); - } else { - System.out.printf("Delete completed with status %d%n", response.getStatusCode()); - } - // END: com.azure.storage.file.share.ShareClient.deleteFileIfExistsWithResponse#string-ShareDeleteOptions-duration-context - } - } diff --git a/sdk/storage/azure-storage-file-share/src/test/java/com/azure/storage/file/share/DirectoryAPITests.groovy b/sdk/storage/azure-storage-file-share/src/test/java/com/azure/storage/file/share/DirectoryAPITests.groovy index fc59e5eb1f5a0..9618da6362d72 100644 --- a/sdk/storage/azure-storage-file-share/src/test/java/com/azure/storage/file/share/DirectoryAPITests.groovy +++ b/sdk/storage/azure-storage-file-share/src/test/java/com/azure/storage/file/share/DirectoryAPITests.groovy @@ -14,8 +14,6 @@ import com.azure.storage.file.share.models.ShareFileItem import com.azure.storage.file.share.models.ShareRequestConditions import com.azure.storage.file.share.models.ShareSnapshotInfo import com.azure.storage.file.share.models.ShareStorageException -import com.azure.storage.file.share.options.ShareCreateOptions -import com.azure.storage.file.share.options.ShareDirectoryCreateOptions import com.azure.storage.file.share.options.ShareFileRenameOptions import com.azure.storage.file.share.options.ShareListFilesAndDirectoriesOptions import spock.lang.Unroll @@ -203,19 +201,6 @@ class DirectoryAPITests extends APISpec { resp.getValue().getSmbProperties().getFileId() } - @RequiredServiceVersion(clazz = ShareServiceVersion.class, min = "V2021_06_08") - def "Create change time"() { - setup: - def changeTime = namer.getUtcNow() - - when: - primaryDirectoryClient.createWithResponse(new FileSmbProperties().setFileChangeTime(changeTime), null, null, - null, null) - - then: - primaryDirectoryClient.getProperties().getSmbProperties().getFileChangeTime() == changeTime - } - @Unroll def "Create directory permission and key error"() { when: @@ -229,129 +214,6 @@ class DirectoryAPITests extends APISpec { null | new String(FileTestHelper.getRandomBuffer(9 * Constants.KB)) } - def "Create if not exists directory min"() { - expect: - primaryDirectoryClient.createIfNotExists() != null - } - - def "Create if not exists directory"() { - expect: - FileTestHelper.assertResponseStatusCode(primaryDirectoryClient - .createIfNotExistsWithResponse(new ShareDirectoryCreateOptions(), null, null), 201) - } - - def "Create if not exists directory error"() { - given: - def testShareName = namer.getRandomName(60) - - when: - directoryBuilderHelper(testShareName, directoryPath).buildDirectoryClient().createIfNotExists() - - then: - def e = thrown(ShareStorageException) - FileTestHelper.assertExceptionStatusCodeAndMessage(e, 404, ShareErrorCode.SHARE_NOT_FOUND) - } - - def "Create if not exists directory that already exists"() { - setup: - def options = new ShareDirectoryCreateOptions() - def primaryDirectoryClient = shareClient.getDirectoryClient(generatePathName()) - - when: - def initialResponse = primaryDirectoryClient.createIfNotExistsWithResponse(options, null, null) - def secondResponse = primaryDirectoryClient.createIfNotExistsWithResponse(options, null, null) - - then: - FileTestHelper.assertResponseStatusCode(initialResponse, 201) - FileTestHelper.assertResponseStatusCode(secondResponse, 409) - } - - def "Create if not exists directory with metadata"() { - setup: - def options = new ShareDirectoryCreateOptions().setMetadata(testMetadata) - expect: - FileTestHelper.assertResponseStatusCode(primaryDirectoryClient - .createIfNotExistsWithResponse(options, null, null), 201) - } - - def "Create if not exists directory with file permission"() { - setup: - def options = new ShareDirectoryCreateOptions().setFilePermission(filePermission) - when: - def resp = primaryDirectoryClient.createIfNotExistsWithResponse(options, null, null) - - then: - FileTestHelper.assertResponseStatusCode(resp, 201) - resp.getValue().getSmbProperties() - resp.getValue().getSmbProperties().getFilePermissionKey() - resp.getValue().getSmbProperties().getNtfsFileAttributes() - resp.getValue().getSmbProperties().getFileLastWriteTime() - resp.getValue().getSmbProperties().getFileCreationTime() - resp.getValue().getSmbProperties().getFileChangeTime() - resp.getValue().getSmbProperties().getParentId() - resp.getValue().getSmbProperties().getFileId() - } - - def "Create if not exists directory with file permission key"() { - setup: - def filePermissionKey = shareClient.createPermission(filePermission) - smbProperties.setFileCreationTime(namer.getUtcNow()) - .setFileLastWriteTime(namer.getUtcNow()) - .setFilePermissionKey(filePermissionKey) - def options = new ShareDirectoryCreateOptions().setSmbProperties(smbProperties) - when: - def resp = primaryDirectoryClient.createIfNotExistsWithResponse(options, null, null) - - then: - FileTestHelper.assertResponseStatusCode(resp, 201) - resp.getValue().getSmbProperties() - resp.getValue().getSmbProperties().getFilePermissionKey() - resp.getValue().getSmbProperties().getNtfsFileAttributes() - resp.getValue().getSmbProperties().getFileLastWriteTime() - resp.getValue().getSmbProperties().getFileCreationTime() - resp.getValue().getSmbProperties().getFileChangeTime() - resp.getValue().getSmbProperties().getParentId() - resp.getValue().getSmbProperties().getFileId() - } - - def "Create if not exists directory with ntfs attributes"() { - setup: - def filePermissionKey = shareClient.createPermission(filePermission) - def attributes = EnumSet.of(NtfsFileAttributes.HIDDEN, NtfsFileAttributes.DIRECTORY) - smbProperties.setFileCreationTime(namer.getUtcNow()) - .setFileLastWriteTime(namer.getUtcNow()) - .setFilePermissionKey(filePermissionKey) - .setNtfsFileAttributes(attributes) - def options = new ShareDirectoryCreateOptions().setSmbProperties(smbProperties) - when: - def resp = primaryDirectoryClient.createIfNotExistsWithResponse(options, null, null) - - then: - FileTestHelper.assertResponseStatusCode(resp, 201) - resp.getValue().getSmbProperties() - resp.getValue().getSmbProperties().getFilePermissionKey() - resp.getValue().getSmbProperties().getNtfsFileAttributes() - resp.getValue().getSmbProperties().getFileLastWriteTime() - resp.getValue().getSmbProperties().getFileCreationTime() - resp.getValue().getSmbProperties().getFileChangeTime() - resp.getValue().getSmbProperties().getParentId() - resp.getValue().getSmbProperties().getFileId() - } - - @Unroll - def "Create if not exists directory permission and key error"() { - when: - FileSmbProperties properties = new FileSmbProperties().setFilePermissionKey(filePermissionKey) - def options = new ShareDirectoryCreateOptions().setSmbProperties(properties).setFilePermission(permission) - primaryDirectoryClient.createIfNotExistsWithResponse(options, null, null) - then: - thrown(IllegalArgumentException) - where: - filePermissionKey | permission - "filePermissionKey" | filePermission - null | new String(FileTestHelper.getRandomBuffer(9 * Constants.KB)) - } - def "Delete directory"() { given: primaryDirectoryClient.create() @@ -369,48 +231,6 @@ class DirectoryAPITests extends APISpec { FileTestHelper.assertExceptionStatusCodeAndMessage(e, 404, ShareErrorCode.RESOURCE_NOT_FOUND) } - def "Delete if exists directory"() { - given: - primaryDirectoryClient.create() - - expect: - FileTestHelper.assertResponseStatusCode(primaryDirectoryClient.deleteIfExistsWithResponse(null, null), 202) - } - - def "Delete if exists directory min"() { - given: - primaryDirectoryClient.create() - - expect: - primaryDirectoryClient.deleteIfExists() - } - - def "Delete if exists directory that does not exist"() { - setup: - primaryDirectoryClient = shareClient.getDirectoryClient(generatePathName()) - - when: - def response = primaryDirectoryClient.deleteIfExistsWithResponse(null, null) - - then: - response.getStatusCode() == 404 - !primaryDirectoryClient.exists() - } - - def "Delete if exists directory that was already deleted"() { - setup: - primaryDirectoryClient.create() - - when: - def initialResponse = primaryDirectoryClient.deleteIfExistsWithResponse(null, null) - def secondResponse = primaryDirectoryClient.deleteIfExistsWithResponse(null, null) - - then: - initialResponse.getStatusCode() == 202 - secondResponse.getStatusCode() == 404 - - } - def "Get properties"() { given: primaryDirectoryClient.create() @@ -475,22 +295,6 @@ class DirectoryAPITests extends APISpec { resp.getValue().getSmbProperties().getFileId() } - @RequiredServiceVersion(clazz = ShareServiceVersion.class, min = "V2021_06_08") - def "Set httpHeaders change time"() { - setup: - primaryDirectoryClient.create() - def filePermissionKey = shareClient.createPermission(filePermission) - def changeTime = namer.getUtcNow() - smbProperties.setFileChangeTime(namer.getUtcNow()) - .setFilePermissionKey(filePermissionKey) - - when: - primaryDirectoryClient.setProperties(new FileSmbProperties().setFileChangeTime(changeTime), null) - - then: - primaryDirectoryClient.getProperties().getSmbProperties().getFileChangeTime() == changeTime - } - @Unroll def "Set properties error"() { when: @@ -939,13 +743,11 @@ class DirectoryAPITests extends APISpec { primaryDirectoryClient.create() def filePermission = "O:S-1-5-21-2127521184-1604012920-1887927527-21560751G:S-1-5-21-2127521184-1604012920-1887927527-513D:AI(A;;FA;;;SY)(A;;FA;;;BA)(A;;0x1200a9;;;S-1-5-21-397955417-626881126-188441444-3053964)" def permissionKey = shareClient.createPermission(filePermission) - def fileChangeTime = namer.getUtcNow() def smbProperties = new FileSmbProperties() .setFilePermissionKey(permissionKey) .setNtfsFileAttributes(EnumSet.of(NtfsFileAttributes.DIRECTORY)) .setFileCreationTime(namer.getUtcNow().minusDays(5)) .setFileLastWriteTime(namer.getUtcNow().minusYears(2)) - .setFileChangeTime(fileChangeTime) when: def destClient = primaryDirectoryClient.renameWithResponse(new ShareFileRenameOptions(generatePathName()) @@ -956,7 +758,6 @@ class DirectoryAPITests extends APISpec { destProperties.getSmbProperties().getNtfsFileAttributes() == EnumSet.of(NtfsFileAttributes.DIRECTORY) destProperties.getSmbProperties().getFileCreationTime() destProperties.getSmbProperties().getFileLastWriteTime() - destProperties.getSmbProperties().getFileChangeTime() == fileChangeTime } @RequiredServiceVersion(clazz = ShareServiceVersion.class, min = "V2021_04_10") @@ -1096,90 +897,6 @@ class DirectoryAPITests extends APISpec { primaryDirectoryClient.createSubdirectoryWithResponse("testCreateSubDirectory", smbProperties, null, null, null, null), 201) } - def "Create if not exists sub directory"() { - given: - primaryDirectoryClient.create() - - expect: - FileTestHelper.assertResponseStatusCode( - primaryDirectoryClient.createSubdirectoryIfNotExistsWithResponse("testCreateSubDirectory", - new ShareDirectoryCreateOptions(), null, null), 201) - } - - def "Create if not exists subdirectory that already exists"() { - setup: - def subdirectoryName = generatePathName() - primaryDirectoryClient = shareClient.getDirectoryClient(generatePathName()) - primaryDirectoryClient.create() - def initialResponse = primaryDirectoryClient.createSubdirectoryIfNotExistsWithResponse(subdirectoryName, - new ShareDirectoryCreateOptions(), null, null) - - when: - def secondResponse = primaryDirectoryClient.createSubdirectoryIfNotExistsWithResponse(subdirectoryName, - new ShareDirectoryCreateOptions(), null, null) - - then: - initialResponse.getStatusCode() == 201 - secondResponse.getStatusCode() == 409 - } - - def "Create if not exists sub directory invalid name"() { - given: - primaryDirectoryClient.create() - - when: - primaryDirectoryClient.createSubdirectoryIfNotExists("test/subdirectory") - - then: - def e = thrown(ShareStorageException) - FileTestHelper.assertExceptionStatusCodeAndMessage(e, 404, ShareErrorCode.PARENT_NOT_FOUND) - } - - def "Create if not exists sub directory metadata"() { - given: - primaryDirectoryClient.create() - - expect: - FileTestHelper.assertResponseStatusCode( - primaryDirectoryClient.createSubdirectoryIfNotExistsWithResponse("testCreateSubDirectory", - new ShareDirectoryCreateOptions().setMetadata(testMetadata), null, null), 201) - } - - def "Create if not exists sub directory metadata error"() { - given: - primaryDirectoryClient.create() - - when: - primaryDirectoryClient.createSubdirectoryIfNotExistsWithResponse("testsubdirectory", - new ShareDirectoryCreateOptions().setMetadata(Collections.singletonMap("", "value")), null, null) - - then: - def e = thrown(ShareStorageException) - FileTestHelper.assertExceptionStatusCodeAndMessage(e, 400, ShareErrorCode.EMPTY_METADATA_KEY) - } - - def "Create if not exists sub directory file permission"() { - given: - primaryDirectoryClient.create() - expect: - FileTestHelper.assertResponseStatusCode( - primaryDirectoryClient.createSubdirectoryIfNotExistsWithResponse("testCreateSubDirectory", - new ShareDirectoryCreateOptions().setFilePermission(filePermission), null, null), 201) - } - - def "Create if not exists sub directory file permission key"() { - given: - primaryDirectoryClient.create() - def filePermissionKey = shareClient.createPermission(filePermission) - smbProperties.setFileCreationTime(namer.getUtcNow()) - .setFileLastWriteTime(namer.getUtcNow()) - .setFilePermissionKey(filePermissionKey) - expect: - FileTestHelper.assertResponseStatusCode( - primaryDirectoryClient.createSubdirectoryIfNotExistsWithResponse("testCreateSubDirectory", - new ShareDirectoryCreateOptions().setSmbProperties(smbProperties), null, null), 201) - } - def "Delete sub directory"() { given: def subDirectoryName = "testSubCreateDirectory" @@ -1202,34 +919,6 @@ class DirectoryAPITests extends APISpec { FileTestHelper.assertExceptionStatusCodeAndMessage(e, 404, ShareErrorCode.RESOURCE_NOT_FOUND) } - def "Delete if exists sub directory"() { - given: - def subDirectoryName = "testSubCreateDirectory" - primaryDirectoryClient.create() - primaryDirectoryClient.createSubdirectory(subDirectoryName) - - expect: - FileTestHelper.assertResponseStatusCode(primaryDirectoryClient.deleteSubdirectoryIfExistsWithResponse(subDirectoryName, null, null), 202) - } - - def "Delete if exists sub directory min"() { - given: - def subDirectoryName = "testSubCreateDirectory" - primaryDirectoryClient.create() - primaryDirectoryClient.createSubdirectory(subDirectoryName) - - expect: - primaryDirectoryClient.deleteSubdirectoryIfExists(subDirectoryName) - } - - def "Delete if exists sub directory that does not exist"() { - when: - def response = primaryDirectoryClient.deleteSubdirectoryIfExistsWithResponse("testsubdirectory", null, null) - - then: - response.getStatusCode() == 404 - } - def "Create file"() { given: @@ -1315,38 +1004,6 @@ class DirectoryAPITests extends APISpec { FileTestHelper.assertExceptionStatusCodeAndMessage(e, 404, ShareErrorCode.RESOURCE_NOT_FOUND) } - def "Delete if exists file min"() { - given: - def fileName = "testCreateFile" - primaryDirectoryClient.create() - primaryDirectoryClient.createFile(fileName, 1024) - - expect: - primaryDirectoryClient.deleteFileIfExists(fileName) - } - - def "Delete if exists file"() { - given: - def fileName = "testCreateFile" - primaryDirectoryClient.create() - primaryDirectoryClient.createFile(fileName, 1024) - - expect: - FileTestHelper.assertResponseStatusCode( - primaryDirectoryClient.deleteFileIfExistsWithResponse(fileName, null, null), 202) - } - - def "Delete if exists file that does not exist"() { - given: - primaryDirectoryClient.create() - - when: - def response = primaryDirectoryClient.deleteFileIfExistsWithResponse("testfile", null, null) - - then: - response.getStatusCode() == 404 - } - def "Get snapshot id"() { given: def snapshot = OffsetDateTime.of(LocalDateTime.of(2000, 1, 1, @@ -1403,5 +1060,4 @@ class DirectoryAPITests extends APISpec { _ | "" _ | "/" } - } diff --git a/sdk/storage/azure-storage-file-share/src/test/java/com/azure/storage/file/share/DirectoryAsyncAPITests.groovy b/sdk/storage/azure-storage-file-share/src/test/java/com/azure/storage/file/share/DirectoryAsyncAPITests.groovy index c9139845dcbdb..5efb87c767d35 100644 --- a/sdk/storage/azure-storage-file-share/src/test/java/com/azure/storage/file/share/DirectoryAsyncAPITests.groovy +++ b/sdk/storage/azure-storage-file-share/src/test/java/com/azure/storage/file/share/DirectoryAsyncAPITests.groovy @@ -11,8 +11,6 @@ import com.azure.storage.file.share.models.ShareFileHttpHeaders import com.azure.storage.file.share.models.ShareRequestConditions import com.azure.storage.file.share.models.ShareStorageException import com.azure.storage.file.share.models.NtfsFileAttributes -import com.azure.storage.file.share.options.ShareDeleteOptions -import com.azure.storage.file.share.options.ShareDirectoryCreateOptions import reactor.test.StepVerifier import spock.lang.Unroll @@ -126,83 +124,6 @@ class DirectoryAsyncAPITests extends APISpec { }.verifyComplete() } - def "Create if not exists directory"() { - expect: - StepVerifier.create(primaryDirectoryAsyncClient.createIfNotExistsWithResponse(new ShareDirectoryCreateOptions())) - .assertNext { - assert FileTestHelper.assertResponseStatusCode(it, 201) - }.verifyComplete() - } - - def "Create if not exists directory error"() { - given: - def testShareName = namer.getRandomName(60) - when: - def createDirErrorVerifier = StepVerifier.create(directoryBuilderHelper(testShareName, directoryPath).buildDirectoryAsyncClient().createIfNotExists()) - then: - createDirErrorVerifier.verifyErrorSatisfies { - assert FileTestHelper.assertExceptionStatusCodeAndMessage(it, 404, ShareErrorCode.SHARE_NOT_FOUND) - } - } - - def "Create if not exists directory that already exists"() { - setup: - def client = primaryDirectoryAsyncClient.getDirectoryAsyncClient(generatePathName()) - def initialResponse = client.createIfNotExistsWithResponse(new ShareDirectoryCreateOptions()).block() - - when: - def secondResponse = client.createIfNotExistsWithResponse(new ShareDirectoryCreateOptions()).block() - - then: - FileTestHelper.assertResponseStatusCode(initialResponse, 201) - FileTestHelper.assertResponseStatusCode(secondResponse, 409) - } - - def "Create if not exists directory with metadata"() { - expect: - StepVerifier.create(primaryDirectoryAsyncClient.createIfNotExistsWithResponse(new ShareDirectoryCreateOptions().setMetadata(testMetadata))) - .assertNext { - assert FileTestHelper.assertResponseStatusCode(it, 201) - }.verifyComplete() - } - - def "Create if not exists directory with file permission"() { - expect: - StepVerifier.create(primaryDirectoryAsyncClient.createIfNotExistsWithResponse(new ShareDirectoryCreateOptions() - .setFilePermission(filePermission).setMetadata(testMetadata))) - .assertNext { - assert FileTestHelper.assertResponseStatusCode(it, 201) - assert it.getValue().getSmbProperties() - assert it.getValue().getSmbProperties().getFilePermissionKey() - assert it.getValue().getSmbProperties().getNtfsFileAttributes() - assert it.getValue().getSmbProperties().getFileLastWriteTime() - assert it.getValue().getSmbProperties().getFileCreationTime() - assert it.getValue().getSmbProperties().getFileChangeTime() - assert it.getValue().getSmbProperties().getParentId() - assert it.getValue().getSmbProperties().getFileId() - }.verifyComplete() - } - - def "Create if not exists dir with file perm key"() { - def filePermissionKey = shareClient.createPermission(filePermission) - smbProperties.setFileCreationTime(namer.getUtcNow()) - .setFileLastWriteTime(namer.getUtcNow()) - .setFilePermissionKey(filePermissionKey) - expect: - StepVerifier.create(primaryDirectoryAsyncClient.createIfNotExistsWithResponse(new ShareDirectoryCreateOptions().setSmbProperties(smbProperties))) - .assertNext { - assert FileTestHelper.assertResponseStatusCode(it, 201) - assert it.getValue().getSmbProperties() - assert it.getValue().getSmbProperties().getFilePermissionKey() - assert it.getValue().getSmbProperties().getNtfsFileAttributes() - assert it.getValue().getSmbProperties().getFileLastWriteTime() - assert it.getValue().getSmbProperties().getFileCreationTime() - assert it.getValue().getSmbProperties().getFileChangeTime() - assert it.getValue().getSmbProperties().getParentId() - assert it.getValue().getSmbProperties().getFileId() - }.verifyComplete() - } - def "Delete directory"() { given: primaryDirectoryAsyncClient.create().block() @@ -222,48 +143,6 @@ class DirectoryAsyncAPITests extends APISpec { } } - def "Delete if exists directory min"() { - given: - primaryDirectoryAsyncClient.create().block() - expect: - primaryDirectoryAsyncClient.deleteIfExists().block() - } - - def "Delete if exists directory"() { - given: - primaryDirectoryAsyncClient.create().block() - expect: - StepVerifier.create(primaryDirectoryAsyncClient.deleteIfExistsWithResponse()) - .assertNext { - assert FileTestHelper.assertResponseStatusCode(it, 202) - }.verifyComplete() - } - - def "Delete if exists directory that does not exist"() { - setup: - def client = primaryDirectoryAsyncClient.getDirectoryAsyncClient(generatePathName()) - - when: - def response = client.deleteIfExistsWithResponse(null).block() - - then: - response.getStatusCode() == 404 - !client.exists().block() - } - - def "Delete if exists directory that was already deleted"() { - setup: - primaryDirectoryAsyncClient.create().block() - - when: - def initialResponse = primaryDirectoryAsyncClient.deleteIfExistsWithResponse().block() - def secondResponse = primaryDirectoryAsyncClient.deleteIfExistsWithResponse().block() - - then: - initialResponse.getStatusCode() == 202 - secondResponse.getStatusCode() == 404 - } - def "Get properties"() { given: primaryDirectoryAsyncClient.create().block() @@ -586,92 +465,6 @@ class DirectoryAsyncAPITests extends APISpec { }.verifyComplete() } - def "Create if not exists sub directory"() { - given: - primaryDirectoryAsyncClient.create().block() - expect: - StepVerifier.create(primaryDirectoryAsyncClient.createSubdirectoryIfNotExistsWithResponse("testCreateSubDirectory", new ShareDirectoryCreateOptions())) - .assertNext { - assert FileTestHelper.assertResponseStatusCode(it, 201) - }.verifyComplete() - } - - def "Create if not exists sub directory invalid name"() { - given: - primaryDirectoryAsyncClient.create().block() - when: - def createDirErrorVerifier = StepVerifier.create(primaryDirectoryAsyncClient.createSubdirectoryIfNotExists("test/subdirectory")) - then: - createDirErrorVerifier.verifyErrorSatisfies { - assert FileTestHelper.assertExceptionStatusCodeAndMessage(it, 404, ShareErrorCode.PARENT_NOT_FOUND) - } - } - - def "Create if not exists subdirectory that already exists"() { - setup: - def subdirectoryName = generatePathName() - def client = primaryDirectoryAsyncClient.getDirectoryAsyncClient(generatePathName()) - client.create().block() - def initialResponse = client.createSubdirectoryIfNotExistsWithResponse(subdirectoryName, new ShareDirectoryCreateOptions()).block() - - when: - def secondResponse = client.createSubdirectoryIfNotExistsWithResponse(subdirectoryName, new ShareDirectoryCreateOptions()).block() - - then: - initialResponse != null - FileTestHelper.assertResponseStatusCode(initialResponse, 201) - FileTestHelper.assertResponseStatusCode(secondResponse, 409) - } - - def "Create if not exists sub directory metadata"() { - given: - primaryDirectoryAsyncClient.create().block() - expect: - StepVerifier.create(primaryDirectoryAsyncClient.createSubdirectoryIfNotExistsWithResponse("testCreateSubDirectory", - new ShareDirectoryCreateOptions().setMetadata(testMetadata))) - .assertNext { - assert FileTestHelper.assertResponseStatusCode(it, 201) - }.verifyComplete() - } - - def "Create if not exists sub directory metadata error"() { - given: - primaryDirectoryAsyncClient.create().block() - when: - def createDirErrorVerifier = StepVerifier.create(primaryDirectoryAsyncClient - .createSubdirectoryIfNotExistsWithResponse("testsubdirectory", new ShareDirectoryCreateOptions().setMetadata(Collections.singletonMap("", "value")))) - then: - createDirErrorVerifier.verifyErrorSatisfies { - assert FileTestHelper.assertExceptionStatusCodeAndMessage(it, 400, ShareErrorCode.EMPTY_METADATA_KEY) - } - } - - def "Create if not exists sub directory file permission"() { - given: - primaryDirectoryAsyncClient.create().block() - expect: - StepVerifier.create(primaryDirectoryAsyncClient.createSubdirectoryIfNotExistsWithResponse("testCreateSubDirectory", - new ShareDirectoryCreateOptions().setFilePermission(filePermission))) - .assertNext { - assert FileTestHelper.assertResponseStatusCode(it, 201) - }.verifyComplete() - } - - def "Create if not exists sub directory file perm key"() { - given: - def filePermissionKey = shareClient.createPermission(filePermission) - smbProperties.setFileCreationTime(namer.getUtcNow()) - .setFileLastWriteTime(namer.getUtcNow()) - .setFilePermissionKey(filePermissionKey) - primaryDirectoryAsyncClient.create().block() - expect: - StepVerifier.create(primaryDirectoryAsyncClient.createSubdirectoryIfNotExistsWithResponse("testCreateSubDirectory", - new ShareDirectoryCreateOptions().setSmbProperties(smbProperties))) - .assertNext { - assert FileTestHelper.assertResponseStatusCode(it, 201) - }.verifyComplete() - } - def "Delete sub directory"() { given: def subDirectoryName = "testSubCreateDirectory" @@ -695,41 +488,6 @@ class DirectoryAsyncAPITests extends APISpec { } } - def "Delete if exists sub directory"() { - given: - def subDirectoryName = "testSubCreateDirectory" - primaryDirectoryAsyncClient.create().block() - primaryDirectoryAsyncClient.createSubdirectory(subDirectoryName).block() - expect: - StepVerifier.create(primaryDirectoryAsyncClient.deleteSubdirectoryIfExistsWithResponse(subDirectoryName)) - .assertNext { - assert FileTestHelper.assertResponseStatusCode(it, 202) - }.verifyComplete() - } - - def "Delete if exists sub directory min"() { - given: - def subDirectoryName = "testSubCreateDirectory" - primaryDirectoryAsyncClient.create().block() - primaryDirectoryAsyncClient.createSubdirectory(subDirectoryName).block() - expect: - primaryDirectoryAsyncClient.deleteSubdirectoryIfExistsWithResponse(subDirectoryName) - } - - def "Delete if exists subdirectory that does not exist"() { - setup: - def subdirectoryName = generatePathName() - def client = primaryDirectoryAsyncClient.getDirectoryAsyncClient(generatePathName()) - client.create().block() - - when: - def response = client.deleteSubdirectoryIfExistsWithResponse(subdirectoryName, null).block() - - then: - response.getStatusCode() == 404 - !client.getSubdirectoryClient(subdirectoryName).exists().block() - } - def "Create file"() { given: primaryDirectoryAsyncClient.create().block() @@ -854,67 +612,6 @@ class DirectoryAsyncAPITests extends APISpec { .verifyError(ShareStorageException) } - def "Delete if exists file"() { - given: - def fileName = "testCreateFile" - primaryDirectoryAsyncClient.create().block() - primaryDirectoryAsyncClient.createFile(fileName, 1024).block() - expect: - StepVerifier.create(primaryDirectoryAsyncClient.deleteFileIfExistsWithResponse(fileName)) - .assertNext { - assert FileTestHelper.assertResponseStatusCode(it, 202) - }.verifyComplete() - } - - def "Delete if exists file min"() { - given: - def fileName = "testCreateFile" - primaryDirectoryAsyncClient.create().block() - primaryDirectoryAsyncClient.createFile(fileName, 1024).block() - expect: - primaryDirectoryAsyncClient.deleteFileIfExists(fileName).block() - } - - def "Delete if exists file lease"() { - given: - def fileName = "testCreateFile" - primaryDirectoryAsyncClient.create().block() - primaryDirectoryAsyncClient.createFile(fileName, 1024).block() - def leaseId = createLeaseClient(primaryDirectoryAsyncClient.getFileClient(fileName)).acquireLease().block() - - expect: - StepVerifier.create(primaryDirectoryAsyncClient.deleteFileIfExistsWithResponse(fileName, - new ShareDeleteOptions().setRequestConditions(new ShareRequestConditions().setLeaseId(leaseId)))) - .expectNextCount(1).verifyComplete() - } - - def "Delete if exists file lease fail"() { - given: - def fileName = "testCreateFile" - primaryDirectoryAsyncClient.create().block() - primaryDirectoryAsyncClient.createFile(fileName, 1024).block() - createLeaseClient(primaryDirectoryAsyncClient.getFileClient(fileName)).acquireLease().block() - - expect: - StepVerifier.create(primaryDirectoryAsyncClient.deleteFileIfExistsWithResponse(fileName, - new ShareDeleteOptions().setRequestConditions(new ShareRequestConditions() - .setLeaseId(namer.getRandomUuid())))).verifyError(ShareStorageException) - } - - def "Delete if exists file that does not exist"() { - setup: - def subdirectoryName = generatePathName() - def client = primaryDirectoryAsyncClient.getDirectoryAsyncClient(generatePathName()) - client.create().block() - - when: - def response = client.deleteFileIfExistsWithResponse(subdirectoryName, null).block() - - then: - response.getStatusCode() == 404 - !client.getSubdirectoryClient(subdirectoryName).exists().block() - } - def "Get snapshot id"() { given: def snapshot = OffsetDateTime.of(LocalDateTime.of(2000, 1, 1, @@ -934,5 +631,4 @@ class DirectoryAsyncAPITests extends APISpec { expect: directoryPath == primaryDirectoryAsyncClient.getDirectoryPath() } - } diff --git a/sdk/storage/azure-storage-file-share/src/test/java/com/azure/storage/file/share/FileAPITests.groovy b/sdk/storage/azure-storage-file-share/src/test/java/com/azure/storage/file/share/FileAPITests.groovy index 3417767cb4900..70d9f6b7af078 100644 --- a/sdk/storage/azure-storage-file-share/src/test/java/com/azure/storage/file/share/FileAPITests.groovy +++ b/sdk/storage/azure-storage-file-share/src/test/java/com/azure/storage/file/share/FileAPITests.groovy @@ -15,7 +15,6 @@ import com.azure.storage.common.test.shared.extensions.RequiredServiceVersion import com.azure.storage.common.test.shared.policy.MockFailureResponsePolicy import com.azure.storage.common.test.shared.policy.MockRetryRangeResponsePolicy import com.azure.storage.file.share.models.DownloadRetryOptions -import com.azure.storage.file.share.models.FileLastWrittenMode import com.azure.storage.file.share.models.NtfsFileAttributes import com.azure.storage.file.share.models.PermissionCopyModeType import com.azure.storage.file.share.models.ShareErrorCode @@ -23,16 +22,13 @@ import com.azure.storage.file.share.models.ShareFileCopyInfo import com.azure.storage.file.share.models.ShareFileHttpHeaders import com.azure.storage.file.share.models.ShareFileRange import com.azure.storage.file.share.models.ShareFileUploadOptions -import com.azure.storage.file.share.models.ShareFileUploadRangeFromUrlInfo import com.azure.storage.file.share.models.ShareFileUploadRangeOptions import com.azure.storage.file.share.models.ShareRequestConditions import com.azure.storage.file.share.models.ShareSnapshotInfo import com.azure.storage.file.share.models.ShareStorageException -import com.azure.storage.file.share.options.ShareFileCreateOptions import com.azure.storage.file.share.options.ShareFileDownloadOptions import com.azure.storage.file.share.options.ShareFileListRangesDiffOptions import com.azure.storage.file.share.options.ShareFileRenameOptions -import com.azure.storage.file.share.options.ShareFileUploadRangeFromUrlOptions import com.azure.storage.file.share.sas.ShareFileSasPermission import com.azure.storage.file.share.sas.ShareServiceSasSignatureValues import spock.lang.Ignore @@ -200,19 +196,6 @@ class FileAPITests extends APISpec { resp.getValue().getSmbProperties().getFileId() } - @RequiredServiceVersion(clazz = ShareServiceVersion.class, min = "V2021_06_08") - def "Create change time"() { - setup: - def changeTime = namer.getUtcNow() - - when: - primaryFileClient.createWithResponse(512, null, new FileSmbProperties().setFileChangeTime(changeTime), - null, null, null, null, null) - - then: - primaryFileClient.getProperties().getSmbProperties().getFileChangeTime() == changeTime - } - def "Create file with args error"() { when: primaryFileClient.createWithResponse(-1, null, null, null, testMetadata, null, null) @@ -871,33 +854,6 @@ class FileAPITests extends APISpec { deleteFileIfExists(testFolder.getPath(), downloadFile.getName()) } - @RequiredServiceVersion(clazz = ShareServiceVersion.class, min = "V2021_06_08") - @Unroll - def "Upload range preserve file last written on"() { - setup: - primaryFileClient.create(Constants.KB) - def initialProps = primaryFileClient.getProperties() - - when: - primaryFileClient.uploadRangeWithResponse(new ShareFileUploadRangeOptions - (new ByteArrayInputStream(getRandomBuffer(Constants.KB)), Constants.KB).setLastWrittenMode(mode), null, null) - def resultProps = primaryFileClient.getProperties() - - then: - if (mode.equals(FileLastWrittenMode.PRESERVE)) { - assert initialProps.getSmbProperties().getFileLastWriteTime() == resultProps.getSmbProperties() - .getFileLastWriteTime() - } else { - assert initialProps.getSmbProperties().getFileLastWriteTime() != resultProps.getSmbProperties() - .getFileLastWriteTime() - } - - where: - mode | _ - FileLastWrittenMode.NOW | _ - FileLastWrittenMode.PRESERVE | _ - } - @Unroll def "Upload range from URL"() { given: @@ -940,46 +896,6 @@ class FileAPITests extends APISpec { "ü1ü" || _ /* Something that needs to be url encoded. */ } - @RequiredServiceVersion(clazz = ShareServiceVersion.class, min = "V2021_06_08") - @Unroll - def "Upload range from Url preserve file last written on"() { - setup: - primaryFileClient.create(Constants.KB) - def destinationClient = shareClient.getFileClient(generatePathName()) - destinationClient.create(Constants.KB) - def initialProps = destinationClient.getProperties() - - primaryFileClient.uploadRange(new ByteArrayInputStream(getRandomBuffer(Constants.KB)), Constants.KB) - - def credential = StorageSharedKeyCredential.fromConnectionString(environment.primaryAccount.connectionString) - def sasToken = new ShareServiceSasSignatureValues() - .setExpiryTime(namer.getUtcNow().plusDays(1)) - .setPermissions(new ShareFileSasPermission().setReadPermission(true)) - .setShareName(primaryFileClient.getShareName()) - .setFilePath(primaryFileClient.getFilePath()) - .generateSasQueryParameters(credential) - .encode() - - when: - destinationClient.uploadRangeFromUrlWithResponse(new ShareFileUploadRangeFromUrlOptions(Constants.KB, - primaryFileClient.getFileUrl() + "?" + sasToken).setLastWrittenMode(mode), null, null) - def resultProps = destinationClient.getProperties() - - then: - if (mode.equals(FileLastWrittenMode.PRESERVE)) { - assert initialProps.getSmbProperties().getFileLastWriteTime() == resultProps.getSmbProperties() - .getFileLastWriteTime() - } else { - assert initialProps.getSmbProperties().getFileLastWriteTime() != resultProps.getSmbProperties() - .getFileLastWriteTime() - } - - where: - mode | _ - FileLastWrittenMode.NOW | _ - FileLastWrittenMode.PRESERVE | _ - } - @Unroll def "Start copy"() { given: @@ -1074,46 +990,6 @@ class FileAPITests extends APISpec { assertExceptionStatusCodeAndMessage(e, 404, ShareErrorCode.RESOURCE_NOT_FOUND) } - def "Delete if exists file"() { - given: - primaryFileClient.createWithResponse(1024, null, null, null, null, null, null) - - expect: - assertResponseStatusCode(primaryFileClient.deleteIfExistsWithResponse(null, null), 202) - } - - def "Delete if exists file min"() { - given: - primaryFileClient.createWithResponse(1024, null, null, null, null, null, null) - - expect: - primaryFileClient.deleteIfExists() - } - - def "Delete if exists file that does not exist"() { - def client = shareClient.getFileClient(generateShareName()) - - when: - def response = client.deleteIfExistsWithResponse(null, null) - - then: - response.getStatusCode() == 404 - !client.exists() - } - - def "Delete if exists file that was already deleted"() { - setup: - primaryFileClient.createWithResponse(1024, null, null, null, null, null, null) - - when: - def result1 = primaryFileClient.deleteIfExists() - def result2 = primaryFileClient.deleteIfExists() - - then: - result1 - !result2 - } - def "Get properties"() { given: primaryFileClient.create(1024) @@ -1192,19 +1068,6 @@ class FileAPITests extends APISpec { resp.getValue().getSmbProperties().getFileId() } - @RequiredServiceVersion(clazz = ShareServiceVersion.class, min = "V2021_06_08") - def "Set httpHeaders change time"() { - setup: - primaryFileClient.create(512) - def changeTime = namer.getUtcNow() - - when: - primaryFileClient.setProperties(512, null, new FileSmbProperties().setFileChangeTime(changeTime), null) - - then: - primaryFileClient.getProperties().getSmbProperties().getFileChangeTime() == changeTime - } - def "Set httpHeaders error"() { given: primaryFileClient.createWithResponse(1024, null, null, null, null, null, null) @@ -1614,9 +1477,9 @@ class FileAPITests extends APISpec { exception == !ignoreReadOnly where: - ignoreReadOnly | _ - true | _ - false | _ + ignoreReadOnly | _ + true | _ + false | _ } @RequiredServiceVersion(clazz = ShareServiceVersion.class, min = "V2021_04_10") @@ -1648,7 +1511,7 @@ class FileAPITests extends APISpec { thrown(ShareStorageException) // permission and key cannot both be set } - @RequiredServiceVersion(clazz = ShareServiceVersion.class, min = "V2021_06_08") + @RequiredServiceVersion(clazz = ShareServiceVersion.class, min = "V2021_04_10") def "Rename file smbProperties"() { setup: primaryFileClient.create(512) @@ -1656,13 +1519,11 @@ class FileAPITests extends APISpec { def permissionKey = shareClient.createPermission(filePermission) def fileCreationTime = namer.getUtcNow().minusDays(5) def fileLastWriteTime = namer.getUtcNow().minusYears(2) - def fileChangeTime = namer.getUtcNow() def smbProperties = new FileSmbProperties() .setFilePermissionKey(permissionKey) .setNtfsFileAttributes(EnumSet.of(NtfsFileAttributes.ARCHIVE, NtfsFileAttributes.READ_ONLY)) .setFileCreationTime(fileCreationTime) .setFileLastWriteTime(fileLastWriteTime) - .setFileChangeTime(fileChangeTime) when: def destClient = primaryFileClient.renameWithResponse(new ShareFileRenameOptions(generatePathName()) @@ -1673,7 +1534,6 @@ class FileAPITests extends APISpec { destProperties.getSmbProperties().getNtfsFileAttributes() == EnumSet.of(NtfsFileAttributes.ARCHIVE, NtfsFileAttributes.READ_ONLY) destProperties.getSmbProperties().getFileCreationTime() destProperties.getSmbProperties().getFileLastWriteTime() - destProperties.getSmbProperties().getFileChangeTime() == fileChangeTime } @RequiredServiceVersion(clazz = ShareServiceVersion.class, min = "V2021_04_10") @@ -1741,8 +1601,8 @@ class FileAPITests extends APISpec { thrown(ShareStorageException) where: - leaseID | _ - garbageLeaseID | _ + leaseID | _ + garbageLeaseID | _ } @RequiredServiceVersion(clazz = ShareServiceVersion.class, min = "V2021_04_10") @@ -1790,22 +1650,6 @@ class FileAPITests extends APISpec { garbageLeaseID | _ } - @RequiredServiceVersion(clazz = ShareServiceVersion.class, min = "V2021_06_08") - def "Rename content type"() { - setup: - primaryFileClient.create(512) - - when: - def resp = primaryFileClient.renameWithResponse(new ShareFileRenameOptions(generatePathName()) - .setContentType("mytype"), null, null) - - def renamedClient = resp.getValue() - def props = renamedClient.getProperties() - - then: - props.getContentType() == "mytype" - } - def "Get snapshot id"() { given: def snapshot = OffsetDateTime.of(LocalDateTime.of(2000, 1, 1, diff --git a/sdk/storage/azure-storage-file-share/src/test/java/com/azure/storage/file/share/FileAsyncAPITests.groovy b/sdk/storage/azure-storage-file-share/src/test/java/com/azure/storage/file/share/FileAsyncAPITests.groovy index 04df44b7762ea..32441aa3438dc 100644 --- a/sdk/storage/azure-storage-file-share/src/test/java/com/azure/storage/file/share/FileAsyncAPITests.groovy +++ b/sdk/storage/azure-storage-file-share/src/test/java/com/azure/storage/file/share/FileAsyncAPITests.groovy @@ -868,63 +868,6 @@ class FileAsyncAPITests extends APISpec { .verifyError(ShareStorageException) } - def "Delete if exists file"() { - given: - primaryFileAsyncClient.create(1024).block() - - expect: - StepVerifier.create(primaryFileAsyncClient.deleteIfExistsWithResponse()) - .assertNext { - assert assertResponseStatusCode(it, 202) - }.verifyComplete() - } - - def "Delete file that does not exist"() { - def client = primaryFileAsyncClient.getFileAsyncClient(generateShareName()) - - when: - def response = client.deleteIfExistsWithResponse(null, null).block() - - then: - response.getStatusCode() == 404 - !client.exists().block() - } - - def "Delete if exists file that was already deleted"() { - setup: - primaryFileAsyncClient.createWithResponse(1024, null, null, null, null, null, null).block() - - when: - def result1 = primaryFileAsyncClient.deleteIfExists().block() - def result2 = primaryFileAsyncClient.deleteIfExists().block() - - then: - result1 - !result2 - } - - def "Delete if exists file lease"() { - given: - primaryFileAsyncClient.create(1024).block() - def leaseId = createLeaseClient(primaryFileAsyncClient).acquireLease().block() - - expect: - StepVerifier.create(primaryFileAsyncClient.deleteIfExistsWithResponse(new ShareRequestConditions().setLeaseId(leaseId))) - .assertNext { - assert assertResponseStatusCode(it, 202) - }.verifyComplete() - } - - def "Delete if exists file lease fail"() { - given: - primaryFileAsyncClient.create(1024).block() - createLeaseClient(primaryFileAsyncClient).acquireLease().block() - - expect: - StepVerifier.create(primaryFileAsyncClient.deleteIfExistsWithResponse(new ShareRequestConditions().setLeaseId(namer.getRandomUuid()))) - .verifyError(ShareStorageException) - } - def "Get properties"() { given: primaryFileAsyncClient.create(1024).block() @@ -1322,5 +1265,4 @@ class FileAsyncAPITests extends APISpec { expect: filePath == primaryFileAsyncClient.getFilePath() } - } diff --git a/sdk/storage/azure-storage-file-share/src/test/java/com/azure/storage/file/share/ShareAPITests.groovy b/sdk/storage/azure-storage-file-share/src/test/java/com/azure/storage/file/share/ShareAPITests.groovy index 6c0439d27dbb2..18a5a0db853c8 100644 --- a/sdk/storage/azure-storage-file-share/src/test/java/com/azure/storage/file/share/ShareAPITests.groovy +++ b/sdk/storage/azure-storage-file-share/src/test/java/com/azure/storage/file/share/ShareAPITests.groovy @@ -23,14 +23,12 @@ import com.azure.storage.file.share.models.ShareSnapshotsDeleteOptionType import com.azure.storage.file.share.models.ShareStorageException import com.azure.storage.file.share.options.ShareCreateOptions import com.azure.storage.file.share.options.ShareDeleteOptions -import com.azure.storage.file.share.options.ShareDirectoryCreateOptions import com.azure.storage.file.share.options.ShareGetAccessPolicyOptions import com.azure.storage.file.share.options.ShareGetPropertiesOptions import com.azure.storage.file.share.options.ShareGetStatisticsOptions import com.azure.storage.file.share.options.ShareSetAccessPolicyOptions import com.azure.storage.file.share.options.ShareSetPropertiesOptions import com.azure.storage.file.share.options.ShareSetMetadataOptions -import reactor.test.StepVerifier import spock.lang.Unroll import java.time.LocalDateTime @@ -167,56 +165,6 @@ class ShareAPITests extends APISpec { testMetadata | 6000 | 400 | ShareErrorCode.INVALID_HEADER_VALUE } - def "Create if not exists share"() { - expect: - FileTestHelper.assertResponseStatusCode(primaryShareClient.createIfNotExistsWithResponse(null, null, null), 201) - } - - def "Create if not exists share that already exists"() { - setup: - def client = premiumFileServiceClient.getShareClient(generateShareName()) - def initialResponse = client.createIfNotExistsWithResponse(new ShareCreateOptions(), null, null) - - when: - def secondResponse = client.createIfNotExistsWithResponse(new ShareCreateOptions(), null, null) - - then: - initialResponse.getStatusCode() == 201 - secondResponse.getStatusCode() == 409 - } - - @RequiredServiceVersion(clazz = ShareServiceVersion.class, min = "V2019_12_12") - @Unroll - def "Create if not exists share with args"() { - expect: - FileTestHelper.assertResponseStatusCode(primaryShareClient.createIfNotExistsWithResponse(new ShareCreateOptions() - .setMetadata(metadata).setQuotaInGb(quota).setAccessTier(accessTier), null, null), 201) - - where: - metadata | quota | accessTier - null | null | null - null | 1 | null - testMetadata | null | null - null | null | ShareAccessTier.HOT - testMetadata | 1 | ShareAccessTier.HOT - } - - @Unroll - def "Create if not exists share with invalid args"() { - when: - primaryShareClient.createIfNotExistsWithResponse(new ShareCreateOptions().setMetadata(metadata).setQuotaInGb(quota), null, null) - - then: - def e = thrown(ShareStorageException) - FileTestHelper.assertExceptionStatusCodeAndMessage(e, statusCode, errMessage) - - where: - metadata | quota | statusCode | errMessage - Collections.singletonMap("", "value") | 1 | 400 | ShareErrorCode.EMPTY_METADATA_KEY - Collections.singletonMap("metadata!", "value") | 1 | 400 | ShareErrorCode.INVALID_METADATA - testMetadata | 6000 | 400 | ShareErrorCode.INVALID_HEADER_VALUE - } - def "Create snapshot"() { given: primaryShareClient.create() @@ -332,100 +280,6 @@ class ShareAPITests extends APISpec { FileTestHelper.assertExceptionStatusCodeAndMessage(e, 404, ShareErrorCode.SHARE_NOT_FOUND) } - def "Delete if exists share"() { - given: - primaryShareClient.create() - - expect: - FileTestHelper.assertResponseStatusCode(primaryShareClient.deleteIfExistsWithResponse(null, null), 202) - } - - def "Delete if exists share min"() { - given: - primaryShareClient.create() - - expect: - primaryShareClient.deleteIfExists() - } - - def "Delete if exists share delete snapshot options"() { - setup: - primaryShareClient.create() - def snap1 = primaryShareClient.createSnapshot().getSnapshot() - def snap2 = primaryShareClient.createSnapshot().getSnapshot() - - when: - primaryShareClient.deleteIfExistsWithResponse(new ShareDeleteOptions().setDeleteSnapshotsOptions(ShareSnapshotsDeleteOptionType.INCLUDE), null, null) - - then: - !primaryShareClient.getSnapshotClient(snap1).exists() - !primaryShareClient.getSnapshotClient(snap2).exists() - } - - def "Delete if exists share delete snapshot options error"() { - setup: - primaryShareClient.create() - primaryShareClient.createSnapshot().getSnapshot() - primaryShareClient.createSnapshot().getSnapshot() - - when: - primaryShareClient.deleteIfExistsWithResponse(new ShareDeleteOptions(), null, null) - - then: - thrown(ShareStorageException) - } - - @RequiredServiceVersion(clazz = ShareServiceVersion.class, min = "V2020_02_10") - def "Delete if exists share lease"() { - setup: - primaryShareClient.create() - def leaseID = setupShareLeaseCondition(primaryShareClient, receivedLeaseID) - - expect: - FileTestHelper.assertResponseStatusCode(primaryShareClient.deleteIfExistsWithResponse(new ShareDeleteOptions().setRequestConditions(new ShareRequestConditions().setLeaseId(leaseID)), null, null), 202) - } - - def "Delete if exists share lease error"() { - setup: - primaryShareClient.create() - def leaseID = setupShareLeaseCondition(primaryShareClient, garbageLeaseID) - - when: - primaryShareClient.deleteIfExistsWithResponse(new ShareDeleteOptions().setRequestConditions(new ShareRequestConditions().setLeaseId(leaseID)), null, null) - - then: - thrown(ShareStorageException) - } - - def "Delete if exists share that does not exists"() { - setup: - def client = premiumFileServiceClient.getShareClient(generateShareName()) - - when: - def response = client.deleteIfExistsWithResponse(null, null) - - then: - response.getStatusCode() == 404 - !client.exists() - } - - def "Delete if exists dir that was already deleted"() { - setup: - def client = premiumFileServiceClient.getShareClient(generateShareName()) - client.create() - - when: - def initialResponse = client.deleteIfExistsWithResponse(null, null, null) - // Calling delete again after garbage collection is completed - sleepIfRecord(45000) - def secondResponse = client.deleteIfExistsWithResponse(null, null, null) - - then: - initialResponse.getStatusCode() == 202 - secondResponse.getStatusCode() == 404 - } - - def "Get properties"() { given: primaryShareClient.createWithResponse(testMetadata, 1, null, null) @@ -909,82 +763,6 @@ class ShareAPITests extends APISpec { FileTestHelper.assertExceptionStatusCodeAndMessage(e, 400, ShareErrorCode.EMPTY_METADATA_KEY) } - def "Create if not exists directory"() { - given: - primaryShareClient.create() - - expect: - FileTestHelper.assertResponseStatusCode( - primaryShareClient.createDirectoryIfNotExistsWithResponse("testCreateDirectory", new ShareDirectoryCreateOptions(), null, null), 201) - } - - def "Create if not exists directory file permission"() { - given: - primaryShareClient.create() - expect: - FileTestHelper.assertResponseStatusCode( - primaryShareClient.createDirectoryIfNotExistsWithResponse("testCreateDirectory", new ShareDirectoryCreateOptions().setFilePermission(filePermission), null, null), 201) - } - - def "Create if not exist directory file permission key"() { - given: - primaryShareClient.create() - def filePermissionKey = primaryShareClient.createPermission(filePermission) - smbProperties.setFileCreationTime(namer.getUtcNow()) - .setFileLastWriteTime(namer.getUtcNow()) - .setFilePermissionKey(filePermissionKey) - expect: - FileTestHelper.assertResponseStatusCode( - primaryShareClient.createDirectoryIfNotExistsWithResponse("testCreateDirectory", new ShareDirectoryCreateOptions().setSmbProperties(smbProperties), null, null), 201) - } - - def "Create if not exists directory invalid name"() { - given: - primaryShareClient.create() - - when: - primaryShareClient.createDirectoryIfNotExists("test/directory") - - then: - def e = thrown(ShareStorageException) - FileTestHelper.assertExceptionStatusCodeAndMessage(e, 404, ShareErrorCode.PARENT_NOT_FOUND) - } - - def "Create if not exists directory metadata"() { - given: - primaryShareClient.create() - - expect: - FileTestHelper.assertResponseStatusCode( - primaryShareClient.createDirectoryIfNotExistsWithResponse("testCreateDirectory", new ShareDirectoryCreateOptions().setMetadata( testMetadata), null, null), 201) - } - - def "Create if not exists directory metadata error"() { - given: - primaryShareClient.create() - - when: - primaryShareClient.createDirectoryIfNotExistsWithResponse("testdirectory", new ShareDirectoryCreateOptions().setMetadata(Collections.singletonMap("", "value")), null, null) - - then: - def e = thrown(ShareStorageException) - FileTestHelper.assertExceptionStatusCodeAndMessage(e, 400, ShareErrorCode.EMPTY_METADATA_KEY) - } - - def "Create if not exists directory that already exists"() { - setup: - def client = premiumFileServiceClient.getShareClient(generateShareName()) - client.create() - def initialResponse = client.createDirectoryIfNotExistsWithResponse("testCreateDirectory", new ShareDirectoryCreateOptions(), null, null) - - when: - def secondResponse = client.createDirectoryIfNotExistsWithResponse("testCreateDirectory", new ShareDirectoryCreateOptions(), null, null) - - then: - initialResponse.getStatusCode() == 201 - secondResponse.getStatusCode() == 409 - } - def "Create file"() { given: primaryShareClient.create() @@ -1095,38 +873,6 @@ class ShareAPITests extends APISpec { FileTestHelper.assertExceptionStatusCodeAndMessage(e, 404, ShareErrorCode.RESOURCE_NOT_FOUND) } - def "Delete if exists directory"() { - given: - def directoryName = "testCreateDirectory" - primaryShareClient.create() - primaryShareClient.createDirectory(directoryName) - - expect: - assert FileTestHelper.assertResponseStatusCode(primaryShareClient.deleteDirectoryIfExistsWithResponse(directoryName, null, null), 202) - } - - def "Delete if exists directory min"() { - given: - def directoryName = "testCreateDirectory" - primaryShareClient.create() - primaryShareClient.createDirectory(directoryName) - - expect: - assert primaryShareClient.deleteDirectoryIfExists(directoryName) - } - - def "Delete if exists directory that does not exist"() { - given: - def directoryName = "testCreateDirectory" - primaryShareClient.create() - - when: - def response = primaryShareClient.deleteDirectoryIfExistsWithResponse(directoryName, null, null) - - then: - response.getStatusCode() == 404 - } - def "Delete file"() { given: def fileName = "testCreateFile" @@ -1150,38 +896,6 @@ class ShareAPITests extends APISpec { FileTestHelper.assertExceptionStatusCodeAndMessage(e, 404, ShareErrorCode.RESOURCE_NOT_FOUND) } - def "Delete if exists file"() { - given: - def fileName = "testCreateFile" - primaryShareClient.create() - primaryShareClient.createFile(fileName, 1024) - - expect: - FileTestHelper.assertResponseStatusCode( - primaryShareClient.deleteFileIfExistsWithResponse(fileName, null, null), 202) - } - - def "Delete if exists file min"() { - given: - def fileName = "testCreateFile" - primaryShareClient.create() - primaryShareClient.createFile(fileName, 1024) - - expect: - primaryShareClient.deleteFileIfExists(fileName) - } - - def "Delete if exists file that does not exist"() { - given: - primaryShareClient.create() - - when: - def response = primaryShareClient.deleteFileIfExistsWithResponse("testCreateFile", null, null) - - then: - response.getStatusCode() == 404 - } - def "Create permission"() { given: primaryShareClient.create() @@ -1271,5 +985,4 @@ class ShareAPITests extends APISpec { notThrown(ShareStorageException) response.getHeaders().getValue("x-ms-version") == "2017-11-09" } - } diff --git a/sdk/storage/azure-storage-file-share/src/test/java/com/azure/storage/file/share/ShareAsyncAPITests.groovy b/sdk/storage/azure-storage-file-share/src/test/java/com/azure/storage/file/share/ShareAsyncAPITests.groovy index 49cd23e3c4f84..c6d0537fd2d03 100644 --- a/sdk/storage/azure-storage-file-share/src/test/java/com/azure/storage/file/share/ShareAsyncAPITests.groovy +++ b/sdk/storage/azure-storage-file-share/src/test/java/com/azure/storage/file/share/ShareAsyncAPITests.groovy @@ -16,8 +16,6 @@ import com.azure.storage.file.share.models.ShareRequestConditions import com.azure.storage.file.share.models.ShareRootSquash import com.azure.storage.file.share.models.ShareStorageException import com.azure.storage.file.share.options.ShareCreateOptions -import com.azure.storage.file.share.options.ShareDeleteOptions -import com.azure.storage.file.share.options.ShareDirectoryCreateOptions import com.azure.storage.file.share.options.ShareSetPropertiesOptions import reactor.test.StepVerifier import spock.lang.Unroll @@ -158,58 +156,6 @@ class ShareAsyncAPITests extends APISpec { } } - def "Create if not exists share"() { - expect: - StepVerifier.create(primaryShareAsyncClient.createIfNotExistsWithResponse(null, null)) - .assertNext { - assert FileTestHelper.assertResponseStatusCode(it, 201) - }.verifyComplete() - } - - def "Create if not exists share that already exists"() { - setup: - def client = premiumFileServiceAsyncClient.getShareAsyncClient(generateShareName()) - def initialResponse = client.createIfNotExistsWithResponse(new ShareCreateOptions()).block() - - when: - def secondResponse = client.createIfNotExistsWithResponse(new ShareCreateOptions()).block() - - then: - initialResponse.getStatusCode() == 201 - secondResponse.getStatusCode() == 409 - } - - @Unroll - def "Create if not exists share with args"() { - expect: - StepVerifier.create(primaryShareAsyncClient.createIfNotExistsWithResponse(new ShareCreateOptions().setMetadata(metadata).setQuotaInGb(quota))) - .assertNext { - assert FileTestHelper.assertResponseStatusCode(it, 201) - }.verifyComplete() - where: - metadata | quota - null | null - null | 1 - testMetadata | null - testMetadata | 1 - } - - @Unroll - def "Create if not exists share with invalid args"() { - when: - def createShareVerifier = StepVerifier.create(primaryShareAsyncClient.createIfNotExistsWithResponse(new ShareCreateOptions().setMetadata(metadata).setQuotaInGb(quota))) - then: - createShareVerifier.verifyErrorSatisfies { - assert FileTestHelper.assertExceptionStatusCodeAndMessage(it, statusCode, errMessage) - } - - where: - metadata | quota | statusCode | errMessage - Collections.singletonMap("", "value") | 1 | 400 | ShareErrorCode.EMPTY_METADATA_KEY - Collections.singletonMap("metadata!", "value") | 1 | 400 | ShareErrorCode.INVALID_METADATA - testMetadata | 6000 | 400 | ShareErrorCode.INVALID_HEADER_VALUE - } - def "Delete share"() { given: primaryShareAsyncClient.create().block() @@ -228,44 +174,6 @@ class ShareAsyncAPITests extends APISpec { } } - def "Delete if exists share"() { - given: - primaryShareAsyncClient.create().block() - expect: - StepVerifier.create(primaryShareAsyncClient.deleteIfExistsWithResponse()) - .assertNext { - FileTestHelper.assertResponseStatusCode(it, 201) - } - } - - def "Delete if exists share that does not exists"() { - setup: - def client = premiumFileServiceAsyncClient.getShareAsyncClient(generateShareName()) - - when: - def response = client.deleteIfExistsWithResponse(null, null).block() - - then: - response.getStatusCode() == 404 - !client.exists().block() - } - - def "Delete if exists dir that was already deleted"() { - setup: - primaryShareAsyncClient.create().block() - - when: - def initialResponse = primaryShareAsyncClient.deleteIfExistsWithResponse(null, null).block() - sleepIfRecord(45000) - // Calling delete again after garbage collection is completed - def secondResponse = primaryShareAsyncClient.deleteIfExistsWithResponse(null, null).block() - - then: - initialResponse.getStatusCode() == 202 - secondResponse.getStatusCode() == 404 - } - - def "Get properties"() { given: primaryShareAsyncClient.createWithResponse(testMetadata, 1).block() @@ -496,86 +404,6 @@ class ShareAsyncAPITests extends APISpec { } } - def "Create if not exists directory"() { - given: - primaryShareAsyncClient.create().block() - expect: - StepVerifier.create(primaryShareAsyncClient.createDirectoryIfNotExistsWithResponse("testCreateDirectory", new ShareDirectoryCreateOptions())) - .assertNext { - assert FileTestHelper.assertResponseStatusCode(it, 201) - }.verifyComplete() - } - - def "Create if not exists directory that already exists"() { - setup: - def client = premiumFileServiceAsyncClient.getShareAsyncClient(generateShareName()) - client.create().block() - def initialResponse = client.createDirectoryIfNotExistsWithResponse("testCreateDirectory", new ShareDirectoryCreateOptions()).block() - - when: - def secondResponse = client.createDirectoryIfNotExistsWithResponse("testCreateDirectory", new ShareDirectoryCreateOptions()).block() - - then: - initialResponse.getStatusCode() == 201 - secondResponse.getStatusCode() == 409 - } - - def "Create if not exists directory invalid name"() { - given: - primaryShareAsyncClient.create().block() - when: - def createDirectoryVerifier = StepVerifier.create(primaryShareAsyncClient.createDirectoryIfNotExists("test/directory")) - then: - createDirectoryVerifier.verifyErrorSatisfies { - assert FileTestHelper.assertExceptionStatusCodeAndMessage(it, 404, ShareErrorCode.PARENT_NOT_FOUND) - } - } - - def "Create if not exists directory metadata"() { - given: - primaryShareAsyncClient.create().block() - expect: - StepVerifier.create(primaryShareAsyncClient.createDirectoryIfNotExistsWithResponse("testCreateDirectory", new ShareDirectoryCreateOptions().setMetadata(testMetadata))) - .assertNext { - assert FileTestHelper.assertResponseStatusCode(it, 201) - }.verifyComplete() - } - - def "Create if not exists directory file permission"() { - given: - primaryShareAsyncClient.create().block() - expect: - StepVerifier.create(primaryShareAsyncClient.createDirectoryIfNotExistsWithResponse("testCreateDirectory", new ShareDirectoryCreateOptions().setFilePermission(filePermission))) - .assertNext { - assert FileTestHelper.assertResponseStatusCode(it, 201) - }.verifyComplete() - } - - def "Create if not exists directory file permission key"() { - given: - primaryShareAsyncClient.create().block() - def permissionKey = primaryShareAsyncClient.createPermission(filePermission).block() - smbProperties.setFileCreationTime(namer.getUtcNow()) - .setFileLastWriteTime(namer.getUtcNow()) - .setFilePermissionKey(permissionKey) - expect: - StepVerifier.create(primaryShareAsyncClient.createDirectoryIfNotExistsWithResponse("testCreateDirectory", new ShareDirectoryCreateOptions().setSmbProperties(smbProperties))) - .assertNext { - assert FileTestHelper.assertResponseStatusCode(it, 201) - }.verifyComplete() - } - - def "Create if not exists directory metadata error"() { - given: - primaryShareAsyncClient.create().block() - when: - def createDirErrorVerifier = StepVerifier.create(primaryShareAsyncClient.createDirectoryIfNotExistsWithResponse("testdirectory", new ShareDirectoryCreateOptions().setMetadata(Collections.singletonMap("", "value")))) - then: - createDirErrorVerifier.verifyErrorSatisfies { - assert FileTestHelper.assertExceptionStatusCodeAndMessage(it, 400, ShareErrorCode.EMPTY_METADATA_KEY) - } - } - def "Create file"() { given: primaryShareAsyncClient.create().block() @@ -712,30 +540,6 @@ class ShareAsyncAPITests extends APISpec { } } - def "Delete if exists directory"() { - given: - def directoryName = "testCreateDirectory" - primaryShareAsyncClient.create().block() - primaryShareAsyncClient.createDirectory(directoryName).block() - expect: - StepVerifier.create(primaryShareAsyncClient.deleteDirectoryIfExistsWithResponse(directoryName)) - .assertNext { - assert FileTestHelper.assertResponseStatusCode(it, 202) - }.verifyComplete() - } - - def "Delete if exists directory that does not exist"() { - given: - def directoryName = "testCreateDirectory" - primaryShareAsyncClient.create().block() - - when: - def response = primaryShareAsyncClient.deleteDirectoryIfExistsWithResponse(directoryName).block() - - then: - response.getStatusCode() == 404 - } - def "Delete file"() { given: def fileName = "testCreateFile" @@ -786,57 +590,6 @@ class ShareAsyncAPITests extends APISpec { } } - def "Delete if exists file"() { - given: - def fileName = "testCreateFile" - primaryShareAsyncClient.create().block() - primaryShareAsyncClient.createFile(fileName, 1024).block() - expect: - StepVerifier.create(primaryShareAsyncClient.deleteFileIfExistsWithResponse(fileName)) - .assertNext { - assert FileTestHelper.assertResponseStatusCode(it, 202) - }.verifyComplete() - - } - - def "Delete if exists file lease"() { - given: - def fileName = "testCreateFile" - primaryShareAsyncClient.create().block() - primaryShareAsyncClient.createFile(fileName, 1024).block() - def leaseId = createLeaseClient(primaryShareAsyncClient.getFileClient(fileName)).acquireLease().block() - - expect: - StepVerifier.create(primaryShareAsyncClient.deleteFileIfExistsWithResponse(fileName, new ShareDeleteOptions() - .setRequestConditions(new ShareRequestConditions().setLeaseId(leaseId)))) - .expectNextCount(1).verifyComplete() - } - - def "Delete if exists file that does not exist"() { - given: - def fileName = "testCreateFile" - primaryShareAsyncClient.create().block() - - when: - def response = primaryShareAsyncClient.deleteFileIfExistsWithResponse(fileName).block() - - then: - response.getStatusCode() == 404 - } - - def "Delete if exists file lease fail"() { - given: - def fileName = "testCreateFile" - primaryShareAsyncClient.create().block() - primaryShareAsyncClient.createFile(fileName, 1024).block() - createLeaseClient(primaryShareAsyncClient.getFileClient(fileName)).acquireLease().block() - - expect: - StepVerifier.create(primaryShareAsyncClient.deleteFileIfExistsWithResponse(fileName, new ShareDeleteOptions() - .setRequestConditions(new ShareRequestConditions().setLeaseId(namer.getRandomUuid())))) - .verifyError(ShareStorageException) - } - def "Create permission"() { given: primaryShareAsyncClient.create().block() @@ -898,5 +651,4 @@ class ShareAsyncAPITests extends APISpec { expect: shareName == primaryShareAsyncClient.getShareName() } - } diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsCreateChangeTime.json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsCreateChangeTime.json deleted file mode 100644 index c40d780ef50db..0000000000000 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsCreateChangeTime.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/4ad6e18d4ad6e18dc31841328834f4416d8642309e?restype=share", - "Headers" : { - "x-ms-version" : "2021-06-08", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.13; Windows 10; 10.0)", - "x-ms-client-request-id" : "8c8267f8-d11b-4961-b07d-4bb0df6a8fc6" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-06-08", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA249C5EBD46D0", - "Last-Modified" : "Fri, 22 Apr 2022 20:12:04 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "e49d0e72-a01a-0070-6b85-566335000000", - "x-ms-client-request-id" : "8c8267f8-d11b-4961-b07d-4bb0df6a8fc6", - "Date" : "Fri, 22 Apr 2022 20:12:04 GMT" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/4ad6e18d4ad6e18dc31841328834f4416d8642309e/4ad6e18d4ad6e18dc3186055cf6d1941744343e2b3?restype=directory", - "Headers" : { - "x-ms-version" : "2021-06-08", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.13; Windows 10; 10.0)", - "x-ms-client-request-id" : "6644a1e7-45b6-4732-9d7c-6a47657eea0e" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-06-08", - "x-ms-file-permission-key" : "13502495874993983044*15256408171089631693", - "x-ms-file-id" : "13835128424026341376", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2022-04-22T20:12:05.3508611Z", - "Last-Modified" : "Fri, 22 Apr 2022 20:12:05 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Fri, 22 Apr 2022 20:12:04 GMT", - "x-ms-file-attributes" : "Directory", - "x-ms-file-change-time" : "2022-04-22T20:12:02.4055192Z", - "x-ms-file-parent-id" : "0", - "eTag" : "0x8DA249C5EFD6203", - "x-ms-request-id" : "e49d0e75-a01a-0070-6c85-566335000000", - "x-ms-client-request-id" : "6644a1e7-45b6-4732-9d7c-6a47657eea0e", - "x-ms-file-last-write-time" : "2022-04-22T20:12:05.3508611Z" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "http://REDACTED.file.core.windows.net/4ad6e18d4ad6e18dc31841328834f4416d8642309e/4ad6e18d4ad6e18dc3186055cf6d1941744343e2b3?restype=directory", - "Headers" : { - "x-ms-version" : "2021-06-08", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.13; Windows 10; 10.0)", - "x-ms-client-request-id" : "5100502e-5fe2-4acc-badb-575299d54a18" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-06-08", - "x-ms-file-permission-key" : "13502495874993983044*15256408171089631693", - "x-ms-file-id" : "13835128424026341376", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2022-04-22T20:12:05.3508611Z", - "Last-Modified" : "Fri, 22 Apr 2022 20:12:05 GMT", - "retry-after" : "0", - "StatusCode" : "200", - "Date" : "Fri, 22 Apr 2022 20:12:05 GMT", - "x-ms-server-encrypted" : "true", - "x-ms-file-attributes" : "Directory", - "x-ms-file-change-time" : "2022-04-22T20:12:02.4055192Z", - "x-ms-file-parent-id" : "0", - "eTag" : "0x8DA249C5EFD6203", - "x-ms-request-id" : "e49d0e77-a01a-0070-6d85-566335000000", - "x-ms-client-request-id" : "5100502e-5fe2-4acc-badb-575299d54a18", - "x-ms-file-last-write-time" : "2022-04-22T20:12:05.3508611Z" - }, - "Exception" : null - } ], - "variables" : [ "4ad6e18d4ad6e18dc31841328834f4416d8642309e", "4ad6e18d4ad6e18dc3186055cf6d1941744343e2b3", "2022-04-22T20:12:02.405519200Z" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsCreateIfNotExistsDirectory.json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsCreateIfNotExistsDirectory.json deleted file mode 100644 index fb3c35fe11515..0000000000000 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsCreateIfNotExistsDirectory.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.file.core.windows.net/07d6dfd207d6dfd25d526782c9afba147a87438d99?restype=share", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "fadfd421-cbe0-4dc8-b4a4-f45f25395567" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA1C5A2065D03E", - "Last-Modified" : "Tue, 12 Apr 2022 07:57:44 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "50155ab5-f01a-002c-4042-4efe57000000", - "x-ms-client-request-id" : "fadfd421-cbe0-4dc8-b4a4-f45f25395567", - "Date" : "Tue, 12 Apr 2022 07:57:44 GMT" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "https://REDACTED.file.core.windows.net/07d6dfd207d6dfd25d526782c9afba147a87438d99/07d6dfd207d6dfd25d5490275b7784057eb643b38a?restype=directory", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "2f35b87c-613d-4e2d-b8e3-336579adb6f6" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "x-ms-file-permission-key" : "13206157815093487607*16113479809698295934", - "x-ms-file-id" : "13835128424026341376", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2022-04-12T07:57:44.5712884Z", - "Last-Modified" : "Tue, 12 Apr 2022 07:57:44 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 12 Apr 2022 07:57:43 GMT", - "x-ms-file-attributes" : "Directory", - "x-ms-file-change-time" : "2022-04-12T07:57:44.5712884Z", - "x-ms-file-parent-id" : "0", - "eTag" : "0x8DA1C5A209677F4", - "x-ms-request-id" : "7d590c0c-e01a-006d-8042-4ea6b3000000", - "x-ms-client-request-id" : "2f35b87c-613d-4e2d-b8e3-336579adb6f6", - "x-ms-file-last-write-time" : "2022-04-12T07:57:44.5712884Z" - }, - "Exception" : null - } ], - "variables" : [ "07d6dfd207d6dfd25d526782c9afba147a87438d99", "07d6dfd207d6dfd25d5490275b7784057eb643b38a" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsCreateIfNotExistsDirectoryError.json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsCreateIfNotExistsDirectoryError.json deleted file mode 100644 index b11b85c7a01a9..0000000000000 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsCreateIfNotExistsDirectoryError.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.file.core.windows.net/d75bc9c6d75bc9c6af50115443980f40cc8d436880?restype=share", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "3fb1140e-b97f-4425-abae-523c0bbafe35" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA1C5A20693914", - "Last-Modified" : "Tue, 12 Apr 2022 07:57:44 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "9cc06196-c01a-0055-1142-4e0273000000", - "x-ms-client-request-id" : "3fb1140e-b97f-4425-abae-523c0bbafe35", - "Date" : "Tue, 12 Apr 2022 07:57:43 GMT" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "https://REDACTED.file.core.windows.net/d75bc9c6d75bc9c6af5735410fef4482fbb34adbb7/d75bc9c6d75bc9c6af5236666a1ba6bc8b9d46db85?restype=directory", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "66482f31-9bcb-4336-bbf1-8e1bc1de2556" - }, - "Response" : { - "content-length" : "217", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-error-code" : "ShareNotFound", - "retry-after" : "0", - "StatusCode" : "404", - "x-ms-request-id" : "2d6ba2dc-f01a-0003-4342-4ef39c000000", - "Body" : "ShareNotFoundThe specified share does not exist.\nRequestId:2d6ba2dc-f01a-0003-4342-4ef39c000000\nTime:2022-04-12T07:57:44.5633406Z", - "x-ms-client-request-id" : "66482f31-9bcb-4336-bbf1-8e1bc1de2556", - "Date" : "Tue, 12 Apr 2022 07:57:44 GMT", - "Content-Type" : "application/xml" - }, - "Exception" : null - } ], - "variables" : [ "d75bc9c6d75bc9c6af50115443980f40cc8d436880", "d75bc9c6d75bc9c6af5236666a1ba6bc8b9d46db85", "d75bc9c6d75bc9c6af5735410fef4482fbb34adbb7" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsCreateIfNotExistsDirectoryMin.json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsCreateIfNotExistsDirectoryMin.json deleted file mode 100644 index 085a8a38eb767..0000000000000 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsCreateIfNotExistsDirectoryMin.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.file.core.windows.net/7e2b14587e2b1458913223368c90df12c5f147a0a9?restype=share", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "c3d1e743-5947-458a-b75f-2e6084e59cb9" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA1C5A206907D3", - "Last-Modified" : "Tue, 12 Apr 2022 07:57:44 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "c10eaf72-801a-007b-6642-4e5064000000", - "x-ms-client-request-id" : "c3d1e743-5947-458a-b75f-2e6084e59cb9", - "Date" : "Tue, 12 Apr 2022 07:57:44 GMT" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "https://REDACTED.file.core.windows.net/7e2b14587e2b1458913223368c90df12c5f147a0a9/7e2b14587e2b145891359714ffbe764f856d4ae190?restype=directory", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "3596baba-c8e0-4e13-9c0d-ae2a03a4d477" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "x-ms-file-permission-key" : "13206157815093487607*16113479809698295934", - "x-ms-file-id" : "13835128424026341376", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2022-04-12T07:57:44.5702892Z", - "Last-Modified" : "Tue, 12 Apr 2022 07:57:44 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 12 Apr 2022 07:57:44 GMT", - "x-ms-file-attributes" : "Directory", - "x-ms-file-change-time" : "2022-04-12T07:57:44.5702892Z", - "x-ms-file-parent-id" : "0", - "eTag" : "0x8DA1C5A209650EC", - "x-ms-request-id" : "a43d679d-d01a-0082-6342-4e5346000000", - "x-ms-client-request-id" : "3596baba-c8e0-4e13-9c0d-ae2a03a4d477", - "x-ms-file-last-write-time" : "2022-04-12T07:57:44.5702892Z" - }, - "Exception" : null - } ], - "variables" : [ "7e2b14587e2b1458913223368c90df12c5f147a0a9", "7e2b14587e2b145891359714ffbe764f856d4ae190" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsCreateIfNotExistsDirectoryPermissionAndKeyError[0].json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsCreateIfNotExistsDirectoryPermissionAndKeyError[0].json deleted file mode 100644 index 1b20a813729c0..0000000000000 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsCreateIfNotExistsDirectoryPermissionAndKeyError[0].json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.file.core.windows.net/7fc9ac9a7fc9ac9a0533570623f901ac516b416fb7?restype=share", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "4cd47008-d306-45e8-a97d-6be3b81c9e0f" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA1C5A208706F9", - "Last-Modified" : "Tue, 12 Apr 2022 07:57:44 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f67f39bc-801a-0036-6742-4e9f88000000", - "x-ms-client-request-id" : "4cd47008-d306-45e8-a97d-6be3b81c9e0f", - "Date" : "Tue, 12 Apr 2022 07:57:44 GMT" - }, - "Exception" : null - } ], - "variables" : [ "7fc9ac9a7fc9ac9a0533570623f901ac516b416fb7", "7fc9ac9a7fc9ac9a05384054feca121c2bbb4f62a0" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsCreateIfNotExistsDirectoryPermissionAndKeyError[1].json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsCreateIfNotExistsDirectoryPermissionAndKeyError[1].json deleted file mode 100644 index f3cec9a1e84c9..0000000000000 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsCreateIfNotExistsDirectoryPermissionAndKeyError[1].json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.file.core.windows.net/66d29ddb66d29ddb974477991b3c2d7b75c5435f8d?restype=share", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "389ec5d7-cd8e-40b7-ae19-9ca597d42d0c" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA1C5A2068AC1A", - "Last-Modified" : "Tue, 12 Apr 2022 07:57:44 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "7d590c07-e01a-006d-7f42-4ea6b3000000", - "x-ms-client-request-id" : "389ec5d7-cd8e-40b7-ae19-9ca597d42d0c", - "Date" : "Tue, 12 Apr 2022 07:57:43 GMT" - }, - "Exception" : null - } ], - "variables" : [ "66d29ddb66d29ddb974477991b3c2d7b75c5435f8d", "66d29ddb66d29ddb97407854774f94188e2e412491" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsCreateIfNotExistsDirectoryThatAlreadyExists.json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsCreateIfNotExistsDirectoryThatAlreadyExists.json deleted file mode 100644 index 27bf1c2044dab..0000000000000 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsCreateIfNotExistsDirectoryThatAlreadyExists.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.file.core.windows.net/b51f340bb51f340b88360605b77080156f874e498e?restype=share", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "6e4b1192-9fe9-423f-8215-fd542416e38e" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA1C5A206CED4E", - "Last-Modified" : "Tue, 12 Apr 2022 07:57:44 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "be9dedd7-401a-0016-2a42-4ee42f000000", - "x-ms-client-request-id" : "6e4b1192-9fe9-423f-8215-fd542416e38e", - "Date" : "Tue, 12 Apr 2022 07:57:43 GMT" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "https://REDACTED.file.core.windows.net/b51f340bb51f340b88360605b77080156f874e498e/b51f340b0b51f340b88364115d9a230fca1e84615ad6?restype=directory", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "4fd91ec1-0f7e-410c-b274-86685fcf1300" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "x-ms-file-permission-key" : "13206157815093487607*16113479809698295934", - "x-ms-file-id" : "13835128424026341376", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2022-04-12T07:57:44.5682901Z", - "Last-Modified" : "Tue, 12 Apr 2022 07:57:44 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 12 Apr 2022 07:57:43 GMT", - "x-ms-file-attributes" : "Directory", - "x-ms-file-change-time" : "2022-04-12T07:57:44.5682901Z", - "x-ms-file-parent-id" : "0", - "eTag" : "0x8DA1C5A209602D5", - "x-ms-request-id" : "9cc06199-c01a-0055-1242-4e0273000000", - "x-ms-client-request-id" : "4fd91ec1-0f7e-410c-b274-86685fcf1300", - "x-ms-file-last-write-time" : "2022-04-12T07:57:44.5682901Z" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "https://REDACTED.file.core.windows.net/b51f340bb51f340b88360605b77080156f874e498e/b51f340b0b51f340b88364115d9a230fca1e84615ad6?restype=directory", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "5fccb054-d101-4935-9c16-adae7253a4c3" - }, - "Response" : { - "content-length" : "228", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-error-code" : "ResourceAlreadyExists", - "retry-after" : "0", - "StatusCode" : "409", - "x-ms-request-id" : "5ed9b4f2-b01a-0002-4642-4eac40000000", - "Body" : "ResourceAlreadyExistsThe specified resource already exists.\nRequestId:5ed9b4f2-b01a-0002-4642-4eac40000000\nTime:2022-04-12T07:57:44.6469184Z", - "x-ms-client-request-id" : "5fccb054-d101-4935-9c16-adae7253a4c3", - "Date" : "Tue, 12 Apr 2022 07:57:43 GMT", - "Content-Type" : "application/xml" - }, - "Exception" : null - } ], - "variables" : [ "b51f340bb51f340b88360605b77080156f874e498e", "b51f340bb51f340b8831444218ca4a021ff94371a9", "b51f340b0b51f340b88364115d9a230fca1e84615ad6" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsCreateIfNotExistsDirectoryWithFilePermission.json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsCreateIfNotExistsDirectoryWithFilePermission.json deleted file mode 100644 index cf30dd365ade7..0000000000000 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsCreateIfNotExistsDirectoryWithFilePermission.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.file.core.windows.net/a34c24d6a34c24d679a138413b59031de9fd4d8081?restype=share", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "6b7c3c60-c122-4576-baef-bae962164320" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA1C5A20689605", - "Last-Modified" : "Tue, 12 Apr 2022 07:57:44 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "a43d679a-d01a-0082-6242-4e5346000000", - "x-ms-client-request-id" : "6b7c3c60-c122-4576-baef-bae962164320", - "Date" : "Tue, 12 Apr 2022 07:57:43 GMT" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "https://REDACTED.file.core.windows.net/a34c24d6a34c24d679a138413b59031de9fd4d8081/a34c24d6a34c24d679a09000d961e1d5e23d4bbd80?restype=directory", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "7ea51c7b-f52f-4844-8389-f339e0caf1b7" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "x-ms-file-permission-key" : "4445907346579170507*16113479809698295934", - "x-ms-file-id" : "13835128424026341376", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2022-04-12T07:57:44.5672906Z", - "Last-Modified" : "Tue, 12 Apr 2022 07:57:44 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 12 Apr 2022 07:57:43 GMT", - "x-ms-file-attributes" : "Directory", - "x-ms-file-change-time" : "2022-04-12T07:57:44.5672906Z", - "x-ms-file-parent-id" : "0", - "eTag" : "0x8DA1C5A2095DBCA", - "x-ms-request-id" : "ffcb9515-601a-0073-6e42-4e4a6b000000", - "x-ms-client-request-id" : "7ea51c7b-f52f-4844-8389-f339e0caf1b7", - "x-ms-file-last-write-time" : "2022-04-12T07:57:44.5672906Z" - }, - "Exception" : null - } ], - "variables" : [ "a34c24d6a34c24d679a138413b59031de9fd4d8081", "a34c24d6a34c24d679a09000d961e1d5e23d4bbd80" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsCreateIfNotExistsDirectoryWithFilePermissionKey.json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsCreateIfNotExistsDirectoryWithFilePermissionKey.json deleted file mode 100644 index 65cf74775cf56..0000000000000 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsCreateIfNotExistsDirectoryWithFilePermissionKey.json +++ /dev/null @@ -1,75 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.file.core.windows.net/b55b4875b55b4875eca63215b03bd3ac37e7405dbc?restype=share", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "828c6c66-bf91-47c9-8fb3-50c1967d1457" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA1C5A2068CA91", - "Last-Modified" : "Tue, 12 Apr 2022 07:57:44 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "ffcb9512-601a-0073-6d42-4e4a6b000000", - "x-ms-client-request-id" : "828c6c66-bf91-47c9-8fb3-50c1967d1457", - "Date" : "Tue, 12 Apr 2022 07:57:43 GMT" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "https://REDACTED.file.core.windows.net/b55b4875b55b4875eca63215b03bd3ac37e7405dbc?restype=share&comp=filepermission", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "d59403b4-17cc-463a-ba81-7b1b38dbcbd7", - "Content-Type" : "application/json" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2021-04-10", - "x-ms-file-permission-key" : "8672059509846091151*16113479809698295934", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "c10eaf78-801a-007b-6742-4e5064000000", - "x-ms-client-request-id" : "d59403b4-17cc-463a-ba81-7b1b38dbcbd7", - "Date" : "Tue, 12 Apr 2022 07:57:44 GMT" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "https://REDACTED.file.core.windows.net/b55b4875b55b4875eca63215b03bd3ac37e7405dbc/b55b4875b55b4875eca19992a2436bbff5ea46689e?restype=directory", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "091697c9-25a8-43ec-ac2c-5a7b91f0fcf5" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "x-ms-file-permission-key" : "4445907346579170507*16113479809698295934", - "x-ms-file-id" : "13835128424026341376", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2022-04-12T07:57:45.2214371Z", - "Last-Modified" : "Tue, 12 Apr 2022 07:57:45 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 12 Apr 2022 07:57:44 GMT", - "x-ms-file-attributes" : "Directory", - "x-ms-file-change-time" : "2022-04-12T07:57:45.2214371Z", - "x-ms-file-parent-id" : "0", - "eTag" : "0x8DA1C5A20F9AC63", - "x-ms-request-id" : "c10eaf7a-801a-007b-6842-4e5064000000", - "x-ms-client-request-id" : "091697c9-25a8-43ec-ac2c-5a7b91f0fcf5", - "x-ms-file-last-write-time" : "2022-04-12T07:57:45.2214371Z" - }, - "Exception" : null - } ], - "variables" : [ "b55b4875b55b4875eca63215b03bd3ac37e7405dbc", "b55b4875b55b4875eca19992a2436bbff5ea46689e", "2022-04-12T07:57:45.221437100Z", "2022-04-12T07:57:45.221437100Z" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsCreateIfNotExistsDirectoryWithMetadata.json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsCreateIfNotExistsDirectoryWithMetadata.json deleted file mode 100644 index df6dc94df3c15..0000000000000 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsCreateIfNotExistsDirectoryWithMetadata.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.file.core.windows.net/c9b877edc9b877ed6cf38421b851dc23decc4bdcbb?restype=share", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "bce6750b-9d9d-41c6-90cc-182d797ac617" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA1C5A20686BC2", - "Last-Modified" : "Tue, 12 Apr 2022 07:57:44 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "2d6ba2d7-f01a-0003-4242-4ef39c000000", - "x-ms-client-request-id" : "bce6750b-9d9d-41c6-90cc-182d797ac617", - "Date" : "Tue, 12 Apr 2022 07:57:43 GMT" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "https://REDACTED.file.core.windows.net/c9b877edc9b877ed6cf38421b851dc23decc4bdcbb/c9b877edc9b877ed6cf8978263087281918944c7ac?restype=directory", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "7f1b067e-679c-4ade-8e29-d4f503c4c66b" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "x-ms-file-permission-key" : "13206157815093487607*16113479809698295934", - "x-ms-file-id" : "13835128424026341376", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2022-04-12T07:57:44.6522428Z", - "Last-Modified" : "Tue, 12 Apr 2022 07:57:44 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 12 Apr 2022 07:57:44 GMT", - "x-ms-file-attributes" : "Directory", - "x-ms-file-change-time" : "2022-04-12T07:57:44.6522428Z", - "x-ms-file-parent-id" : "0", - "eTag" : "0x8DA1C5A20A2D23C", - "x-ms-request-id" : "be9deddb-401a-0016-2c42-4ee42f000000", - "x-ms-client-request-id" : "7f1b067e-679c-4ade-8e29-d4f503c4c66b", - "x-ms-file-last-write-time" : "2022-04-12T07:57:44.6522428Z" - }, - "Exception" : null - } ], - "variables" : [ "c9b877edc9b877ed6cf38421b851dc23decc4bdcbb", "c9b877edc9b877ed6cf8978263087281918944c7ac" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsCreateIfNotExistsDirectoryWithNtfsAttributes.json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsCreateIfNotExistsDirectoryWithNtfsAttributes.json deleted file mode 100644 index d215309f86667..0000000000000 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsCreateIfNotExistsDirectoryWithNtfsAttributes.json +++ /dev/null @@ -1,75 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.file.core.windows.net/1e9816771e9816779dc48388d29c13ab94f74cc594?restype=share", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "95c90acf-32ee-4eb1-b8c1-02d4fa04cf54" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA1C5A20680EE3", - "Last-Modified" : "Tue, 12 Apr 2022 07:57:44 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "5ed9b4ef-b01a-0002-4542-4eac40000000", - "x-ms-client-request-id" : "95c90acf-32ee-4eb1-b8c1-02d4fa04cf54", - "Date" : "Tue, 12 Apr 2022 07:57:43 GMT" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "https://REDACTED.file.core.windows.net/1e9816771e9816779dc48388d29c13ab94f74cc594?restype=share&comp=filepermission", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "a9a8a7d9-4209-4e58-9929-8d4133507a36", - "Content-Type" : "application/json" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2021-04-10", - "x-ms-file-permission-key" : "8672059509846091151*16113479809698295934", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "50155ab8-f01a-002c-4142-4efe57000000", - "x-ms-client-request-id" : "a9a8a7d9-4209-4e58-9929-8d4133507a36", - "Date" : "Tue, 12 Apr 2022 07:57:44 GMT" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "https://REDACTED.file.core.windows.net/1e9816771e9816779dc48388d29c13ab94f74cc594/1e9816771e9816779dc89608c3ba4de81ef74d24b0?restype=directory", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "820a9c18-7dc9-4b47-a1e8-033d014d79ba" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "x-ms-file-permission-key" : "4445907346579170507*16113479809698295934", - "x-ms-file-id" : "13835128424026341376", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2022-04-12T07:57:45.2214371Z", - "Last-Modified" : "Tue, 12 Apr 2022 07:57:45 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 12 Apr 2022 07:57:43 GMT", - "x-ms-file-attributes" : "Hidden | Directory", - "x-ms-file-change-time" : "2022-04-12T07:57:45.2214371Z", - "x-ms-file-parent-id" : "0", - "eTag" : "0x8DA1C5A20F9AC63", - "x-ms-request-id" : "ffcb9517-601a-0073-6f42-4e4a6b000000", - "x-ms-client-request-id" : "820a9c18-7dc9-4b47-a1e8-033d014d79ba", - "x-ms-file-last-write-time" : "2022-04-12T07:57:45.2214371Z" - }, - "Exception" : null - } ], - "variables" : [ "1e9816771e9816779dc48388d29c13ab94f74cc594", "1e9816771e9816779dc89608c3ba4de81ef74d24b0", "2022-04-12T07:57:45.221437100Z", "2022-04-12T07:57:45.221437100Z" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsCreateIfNotExistsSubDirectory.json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsCreateIfNotExistsSubDirectory.json deleted file mode 100644 index 194bca86ae7cd..0000000000000 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsCreateIfNotExistsSubDirectory.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.file.core.windows.net/fd2ee187fd2ee18786e4545608d14e61918a42d983?restype=share", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "be851e54-4083-441b-b928-0ef0848866d8" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA1C5AB8149291", - "Last-Modified" : "Tue, 12 Apr 2022 08:01:58 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "fa997a9f-001a-0028-3343-4e7350000000", - "x-ms-client-request-id" : "be851e54-4083-441b-b928-0ef0848866d8", - "Date" : "Tue, 12 Apr 2022 08:01:58 GMT" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "https://REDACTED.file.core.windows.net/fd2ee187fd2ee18786e4545608d14e61918a42d983/fd2ee187fd2ee18786e931794033bd7c50d04b48ac?restype=directory", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "35eee3ab-4282-43ab-90ec-9a8706f35472" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "x-ms-file-permission-key" : "13206157815093487607*16113479809698295934", - "x-ms-file-id" : "13835128424026341376", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2022-04-12T08:01:58.8357853Z", - "Last-Modified" : "Tue, 12 Apr 2022 08:01:58 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 12 Apr 2022 08:01:58 GMT", - "x-ms-file-attributes" : "Directory", - "x-ms-file-change-time" : "2022-04-12T08:01:58.8357853Z", - "x-ms-file-parent-id" : "0", - "eTag" : "0x8DA1C5AB82426DD", - "x-ms-request-id" : "fa997aa2-001a-0028-3443-4e7350000000", - "x-ms-client-request-id" : "35eee3ab-4282-43ab-90ec-9a8706f35472", - "x-ms-file-last-write-time" : "2022-04-12T08:01:58.8357853Z" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "https://REDACTED.file.core.windows.net/fd2ee187fd2ee18786e4545608d14e61918a42d983/fd2ee187fd2ee18786e931794033bd7c50d04b48ac%2FtestCreateSubDirectory?restype=directory", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "931b8a46-52ef-47b3-aa85-eefdd27b7646" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "x-ms-file-permission-key" : "13206157815093487607*16113479809698295934", - "x-ms-file-id" : "13835093239654252544", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2022-04-12T08:01:58.8947523Z", - "Last-Modified" : "Tue, 12 Apr 2022 08:01:58 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 12 Apr 2022 08:01:58 GMT", - "x-ms-file-attributes" : "Directory", - "x-ms-file-change-time" : "2022-04-12T08:01:58.8947523Z", - "x-ms-file-parent-id" : "13835128424026341376", - "eTag" : "0x8DA1C5AB82D2643", - "x-ms-request-id" : "2b99d32a-301a-0023-5243-4e883b000000", - "x-ms-client-request-id" : "931b8a46-52ef-47b3-aa85-eefdd27b7646", - "x-ms-file-last-write-time" : "2022-04-12T08:01:58.8947523Z" - }, - "Exception" : null - } ], - "variables" : [ "fd2ee187fd2ee18786e4545608d14e61918a42d983", "fd2ee187fd2ee18786e931794033bd7c50d04b48ac" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsCreateIfNotExistsSubDirectoryFilePermission.json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsCreateIfNotExistsSubDirectoryFilePermission.json deleted file mode 100644 index a0dad3fba6535..0000000000000 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsCreateIfNotExistsSubDirectoryFilePermission.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.file.core.windows.net/8705b6aa8705b6aa9f841674823332d059a54276a9?restype=share", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "51a18bf8-a672-4da8-9308-4e70fa970ee2" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA1C5AB7F24204", - "Last-Modified" : "Tue, 12 Apr 2022 08:01:58 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "dc2a2e0d-601a-005c-4543-4e47a0000000", - "x-ms-client-request-id" : "51a18bf8-a672-4da8-9308-4e70fa970ee2", - "Date" : "Tue, 12 Apr 2022 08:01:58 GMT" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "https://REDACTED.file.core.windows.net/8705b6aa8705b6aa9f841674823332d059a54276a9/8705b6aa8705b6aa9f85308219715ddd47584f9b8e?restype=directory", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "e6070763-1950-4744-a1bc-7602e0b30e56" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "x-ms-file-permission-key" : "13206157815093487607*16113479809698295934", - "x-ms-file-id" : "13835128424026341376", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2022-04-12T08:01:58.7178520Z", - "Last-Modified" : "Tue, 12 Apr 2022 08:01:58 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 12 Apr 2022 08:01:58 GMT", - "x-ms-file-attributes" : "Directory", - "x-ms-file-change-time" : "2022-04-12T08:01:58.7178520Z", - "x-ms-file-parent-id" : "0", - "eTag" : "0x8DA1C5AB8122818", - "x-ms-request-id" : "c5f684e1-701a-0032-1b43-4e128f000000", - "x-ms-client-request-id" : "e6070763-1950-4744-a1bc-7602e0b30e56", - "x-ms-file-last-write-time" : "2022-04-12T08:01:58.7178520Z" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "https://REDACTED.file.core.windows.net/8705b6aa8705b6aa9f841674823332d059a54276a9/8705b6aa8705b6aa9f85308219715ddd47584f9b8e%2FtestCreateSubDirectory?restype=directory", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "fb9ef35e-541c-4fae-bf4f-3ce4a0f5d5aa" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "x-ms-file-permission-key" : "4445907346579170507*16113479809698295934", - "x-ms-file-id" : "13835093239654252544", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2022-04-12T08:01:58.7978073Z", - "Last-Modified" : "Tue, 12 Apr 2022 08:01:58 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 12 Apr 2022 08:01:58 GMT", - "x-ms-file-attributes" : "Directory", - "x-ms-file-change-time" : "2022-04-12T08:01:58.7978073Z", - "x-ms-file-parent-id" : "13835128424026341376", - "eTag" : "0x8DA1C5AB81E5B59", - "x-ms-request-id" : "2b99d328-301a-0023-5143-4e883b000000", - "x-ms-client-request-id" : "fb9ef35e-541c-4fae-bf4f-3ce4a0f5d5aa", - "x-ms-file-last-write-time" : "2022-04-12T08:01:58.7978073Z" - }, - "Exception" : null - } ], - "variables" : [ "8705b6aa8705b6aa9f841674823332d059a54276a9", "8705b6aa8705b6aa9f85308219715ddd47584f9b8e" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsCreateIfNotExistsSubDirectoryFilePermissionKey.json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsCreateIfNotExistsSubDirectoryFilePermissionKey.json deleted file mode 100644 index 6d92f6f587b27..0000000000000 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsCreateIfNotExistsSubDirectoryFilePermissionKey.json +++ /dev/null @@ -1,104 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.file.core.windows.net/a4c7c8c9a4c7c8c9ed496503996ea467f36e402fb6?restype=share", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "29bc7a4e-048b-41b3-a9eb-4b3692e3ec48" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA1C5AB7F2214F", - "Last-Modified" : "Tue, 12 Apr 2022 08:01:58 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "2a596ed3-e01a-0020-6b43-4e695f000000", - "x-ms-client-request-id" : "29bc7a4e-048b-41b3-a9eb-4b3692e3ec48", - "Date" : "Tue, 12 Apr 2022 08:01:57 GMT" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "https://REDACTED.file.core.windows.net/a4c7c8c9a4c7c8c9ed496503996ea467f36e402fb6/a4c7c8c9a4c7c8c9ed43769985e2d290103142598f?restype=directory", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "77a08893-f0a7-4b99-8b4b-6533efc4aea7" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "x-ms-file-permission-key" : "13206157815093487607*16113479809698295934", - "x-ms-file-id" : "13835128424026341376", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2022-04-12T08:01:58.7178520Z", - "Last-Modified" : "Tue, 12 Apr 2022 08:01:58 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 12 Apr 2022 08:01:57 GMT", - "x-ms-file-attributes" : "Directory", - "x-ms-file-change-time" : "2022-04-12T08:01:58.7178520Z", - "x-ms-file-parent-id" : "0", - "eTag" : "0x8DA1C5AB8122818", - "x-ms-request-id" : "2a596ed6-e01a-0020-6c43-4e695f000000", - "x-ms-client-request-id" : "77a08893-f0a7-4b99-8b4b-6533efc4aea7", - "x-ms-file-last-write-time" : "2022-04-12T08:01:58.7178520Z" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "https://REDACTED.file.core.windows.net/a4c7c8c9a4c7c8c9ed496503996ea467f36e402fb6?restype=share&comp=filepermission", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "406c7a83-7f57-48f6-b8a9-fb057177c885", - "Content-Type" : "application/json" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2021-04-10", - "x-ms-file-permission-key" : "8672059509846091151*16113479809698295934", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "dc2a2e13-601a-005c-4843-4e47a0000000", - "x-ms-client-request-id" : "406c7a83-7f57-48f6-b8a9-fb057177c885", - "Date" : "Tue, 12 Apr 2022 08:01:58 GMT" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "https://REDACTED.file.core.windows.net/a4c7c8c9a4c7c8c9ed496503996ea467f36e402fb6/a4c7c8c9a4c7c8c9ed43769985e2d290103142598f%2FtestCreateSubDirectory?restype=directory", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "d0654dad-2c5f-4e25-92de-d170319a3cac" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "x-ms-file-permission-key" : "4445907346579170507*16113479809698295934", - "x-ms-file-id" : "11529285414812647424", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2022-04-12T08:01:59.4714302Z", - "Last-Modified" : "Tue, 12 Apr 2022 08:01:59 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 12 Apr 2022 08:01:57 GMT", - "x-ms-file-attributes" : "Directory", - "x-ms-file-change-time" : "2022-04-12T08:01:59.4714302Z", - "x-ms-file-parent-id" : "13835128424026341376", - "eTag" : "0x8DA1C5AB88524BE", - "x-ms-request-id" : "2a596eda-e01a-0020-6e43-4e695f000000", - "x-ms-client-request-id" : "d0654dad-2c5f-4e25-92de-d170319a3cac", - "x-ms-file-last-write-time" : "2022-04-12T08:01:59.4714302Z" - }, - "Exception" : null - } ], - "variables" : [ "a4c7c8c9a4c7c8c9ed496503996ea467f36e402fb6", "a4c7c8c9a4c7c8c9ed43769985e2d290103142598f", "2022-04-12T08:01:59.471430200Z", "2022-04-12T08:01:59.471430200Z" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsCreateIfNotExistsSubDirectoryInvalidName.json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsCreateIfNotExistsSubDirectoryInvalidName.json deleted file mode 100644 index 68fa5506d28da..0000000000000 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsCreateIfNotExistsSubDirectoryInvalidName.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.file.core.windows.net/eef9016ceef9016cba1319354e53702c2c294e75aa?restype=share", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "e347985a-98a2-4096-bb90-6627a9b0b141" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA1C5AB7EFFB42", - "Last-Modified" : "Tue, 12 Apr 2022 08:01:58 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "7370ef24-301a-007e-5843-4e82bf000000", - "x-ms-client-request-id" : "e347985a-98a2-4096-bb90-6627a9b0b141", - "Date" : "Tue, 12 Apr 2022 08:01:58 GMT" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "https://REDACTED.file.core.windows.net/eef9016ceef9016cba1319354e53702c2c294e75aa/eef9016ceef9016cba117538b40e81ed113c4e599d?restype=directory", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "0e022a83-7c03-4dbc-9eb8-3b4780721a3a" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "x-ms-file-permission-key" : "13206157815093487607*16113479809698295934", - "x-ms-file-id" : "13835128424026341376", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2022-04-12T08:01:58.7238484Z", - "Last-Modified" : "Tue, 12 Apr 2022 08:01:58 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 12 Apr 2022 08:01:58 GMT", - "x-ms-file-attributes" : "Directory", - "x-ms-file-change-time" : "2022-04-12T08:01:58.7238484Z", - "x-ms-file-parent-id" : "0", - "eTag" : "0x8DA1C5AB8131254", - "x-ms-request-id" : "2b99d325-301a-0023-5043-4e883b000000", - "x-ms-client-request-id" : "0e022a83-7c03-4dbc-9eb8-3b4780721a3a", - "x-ms-file-last-write-time" : "2022-04-12T08:01:58.7238484Z" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "https://REDACTED.file.core.windows.net/eef9016ceef9016cba1319354e53702c2c294e75aa/eef9016ceef9016cba117538b40e81ed113c4e599d%2Ftest%2Fsubdirectory?restype=directory", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "84bba143-db99-41e2-8c58-32ad43e10a45" - }, - "Response" : { - "content-length" : "224", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-error-code" : "ParentNotFound", - "retry-after" : "0", - "StatusCode" : "404", - "x-ms-request-id" : "be6758eb-701a-0050-5a43-4ed0a8000000", - "Body" : "ParentNotFoundThe specified parent path does not exist.\nRequestId:be6758eb-701a-0050-5a43-4ed0a8000000\nTime:2022-04-12T08:01:58.7980627Z", - "x-ms-client-request-id" : "84bba143-db99-41e2-8c58-32ad43e10a45", - "Date" : "Tue, 12 Apr 2022 08:01:58 GMT", - "Content-Type" : "application/xml" - }, - "Exception" : null - } ], - "variables" : [ "eef9016ceef9016cba1319354e53702c2c294e75aa", "eef9016ceef9016cba117538b40e81ed113c4e599d" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsCreateIfNotExistsSubDirectoryMetadata.json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsCreateIfNotExistsSubDirectoryMetadata.json deleted file mode 100644 index df740386c4cd9..0000000000000 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsCreateIfNotExistsSubDirectoryMetadata.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.file.core.windows.net/c7498788c7498788b7593775090adf89e3a44d6c90?restype=share", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "f3e75c19-8e63-47c0-937e-614f9b08a9e6" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA1C5AB7F2AA19", - "Last-Modified" : "Tue, 12 Apr 2022 08:01:58 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "c5f684dc-701a-0032-1843-4e128f000000", - "x-ms-client-request-id" : "f3e75c19-8e63-47c0-937e-614f9b08a9e6", - "Date" : "Tue, 12 Apr 2022 08:01:58 GMT" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "https://REDACTED.file.core.windows.net/c7498788c7498788b7593775090adf89e3a44d6c90/c7498788c7498788b75127530abd6cbd76804a8b9e?restype=directory", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "0e0c9ab4-f475-421e-904a-ae17aec8edff" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "x-ms-file-permission-key" : "13206157815093487607*16113479809698295934", - "x-ms-file-id" : "13835128424026341376", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2022-04-12T08:01:58.7218499Z", - "Last-Modified" : "Tue, 12 Apr 2022 08:01:58 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 12 Apr 2022 08:01:58 GMT", - "x-ms-file-attributes" : "Directory", - "x-ms-file-change-time" : "2022-04-12T08:01:58.7218499Z", - "x-ms-file-parent-id" : "0", - "eTag" : "0x8DA1C5AB812C443", - "x-ms-request-id" : "7370ef27-301a-007e-5943-4e82bf000000", - "x-ms-client-request-id" : "0e0c9ab4-f475-421e-904a-ae17aec8edff", - "x-ms-file-last-write-time" : "2022-04-12T08:01:58.7218499Z" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "https://REDACTED.file.core.windows.net/c7498788c7498788b7593775090adf89e3a44d6c90/c7498788c7498788b75127530abd6cbd76804a8b9e%2FtestCreateSubDirectory?restype=directory", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "3e461b7b-6d5c-4887-b5f1-32f02f121dcc" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "x-ms-file-permission-key" : "13206157815093487607*16113479809698295934", - "x-ms-file-id" : "13835093239654252544", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2022-04-12T08:01:58.7968077Z", - "Last-Modified" : "Tue, 12 Apr 2022 08:01:58 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 12 Apr 2022 08:01:58 GMT", - "x-ms-file-attributes" : "Directory", - "x-ms-file-change-time" : "2022-04-12T08:01:58.7968077Z", - "x-ms-file-parent-id" : "13835128424026341376", - "eTag" : "0x8DA1C5AB81E344D", - "x-ms-request-id" : "c5f684e4-701a-0032-1c43-4e128f000000", - "x-ms-client-request-id" : "3e461b7b-6d5c-4887-b5f1-32f02f121dcc", - "x-ms-file-last-write-time" : "2022-04-12T08:01:58.7968077Z" - }, - "Exception" : null - } ], - "variables" : [ "c7498788c7498788b7593775090adf89e3a44d6c90", "c7498788c7498788b75127530abd6cbd76804a8b9e" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsCreateIfNotExistsSubDirectoryMetadataError.json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsCreateIfNotExistsSubDirectoryMetadataError.json deleted file mode 100644 index d66f413a033bc..0000000000000 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsCreateIfNotExistsSubDirectoryMetadataError.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.file.core.windows.net/96f4116296f41162bf801274485fc55c5ef04adb85?restype=share", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "66ad66f0-9d48-4f6c-aa92-299b708fa163" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA1C5AB7EED043", - "Last-Modified" : "Tue, 12 Apr 2022 08:01:58 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "2b99d322-301a-0023-4f43-4e883b000000", - "x-ms-client-request-id" : "66ad66f0-9d48-4f6c-aa92-299b708fa163", - "Date" : "Tue, 12 Apr 2022 08:01:58 GMT" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "https://REDACTED.file.core.windows.net/96f4116296f41162bf801274485fc55c5ef04adb85/96f4116296f41162bf884244ff21b539f95041afbc?restype=directory", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "be8f3536-db67-4c2d-8ace-4d828474bcfb" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "x-ms-file-permission-key" : "13206157815093487607*16113479809698295934", - "x-ms-file-id" : "13835128424026341376", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2022-04-12T08:01:58.7258474Z", - "Last-Modified" : "Tue, 12 Apr 2022 08:01:58 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 12 Apr 2022 08:01:58 GMT", - "x-ms-file-attributes" : "Directory", - "x-ms-file-change-time" : "2022-04-12T08:01:58.7258474Z", - "x-ms-file-parent-id" : "0", - "eTag" : "0x8DA1C5AB813606A", - "x-ms-request-id" : "dc2a2e11-601a-005c-4743-4e47a0000000", - "x-ms-client-request-id" : "be8f3536-db67-4c2d-8ace-4d828474bcfb", - "x-ms-file-last-write-time" : "2022-04-12T08:01:58.7258474Z" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "https://REDACTED.file.core.windows.net/96f4116296f41162bf801274485fc55c5ef04adb85/96f4116296f41162bf884244ff21b539f95041afbc%2Ftestsubdirectory?restype=directory", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "c6a36034-09de-4e79-b9fb-8e36cdf90e40" - }, - "Response" : { - "content-length" : "278", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-error-code" : "EmptyMetadataKey", - "retry-after" : "0", - "StatusCode" : "400", - "x-ms-request-id" : "7370ef29-301a-007e-5a43-4e82bf000000", - "Body" : "EmptyMetadataKeyThe key for one of the metadata key-value pairs is empty.\nRequestId:7370ef29-301a-007e-5a43-4e82bf000000\nTime:2022-04-12T08:01:58.7956965Zvalue", - "x-ms-client-request-id" : "c6a36034-09de-4e79-b9fb-8e36cdf90e40", - "Date" : "Tue, 12 Apr 2022 08:01:58 GMT", - "Content-Type" : "application/xml" - }, - "Exception" : null - } ], - "variables" : [ "96f4116296f41162bf801274485fc55c5ef04adb85", "96f4116296f41162bf884244ff21b539f95041afbc" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsCreateIfNotExistsSubdirectoryThatAlreadyExists.json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsCreateIfNotExistsSubdirectoryThatAlreadyExists.json deleted file mode 100644 index ac8849d37525f..0000000000000 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsCreateIfNotExistsSubdirectoryThatAlreadyExists.json +++ /dev/null @@ -1,105 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.file.core.windows.net/6990475b6990475b3486484663d0bebc79e94027aa?restype=share", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "6006322c-ca31-4ee9-b9e6-8c7e3bceec50" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA1C5AB812F554", - "Last-Modified" : "Tue, 12 Apr 2022 08:01:58 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "be6758e8-701a-0050-5943-4ed0a8000000", - "x-ms-client-request-id" : "6006322c-ca31-4ee9-b9e6-8c7e3bceec50", - "Date" : "Tue, 12 Apr 2022 08:01:58 GMT" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "https://REDACTED.file.core.windows.net/6990475b6990475b3486484663d0bebc79e94027aa/6990475b16990475b348848832e4f99e118de415cb6f?restype=directory", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "2c34ce16-c976-4c77-ae1f-53da00cd4f38" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "x-ms-file-permission-key" : "13206157815093487607*16113479809698295934", - "x-ms-file-id" : "13835128424026341376", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2022-04-12T08:01:58.8227930Z", - "Last-Modified" : "Tue, 12 Apr 2022 08:01:58 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 12 Apr 2022 08:01:57 GMT", - "x-ms-file-attributes" : "Directory", - "x-ms-file-change-time" : "2022-04-12T08:01:58.8227930Z", - "x-ms-file-parent-id" : "0", - "eTag" : "0x8DA1C5AB8222B5A", - "x-ms-request-id" : "2a596ed8-e01a-0020-6d43-4e695f000000", - "x-ms-client-request-id" : "2c34ce16-c976-4c77-ae1f-53da00cd4f38", - "x-ms-file-last-write-time" : "2022-04-12T08:01:58.8227930Z" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "https://REDACTED.file.core.windows.net/6990475b6990475b3486484663d0bebc79e94027aa/6990475b16990475b348848832e4f99e118de415cb6f%2F6990475b06990475b34847804492f8792a2da41a087d?restype=directory", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "fd398a85-88fc-46bb-9c03-bde80e2de730" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "x-ms-file-permission-key" : "13206157815093487607*16113479809698295934", - "x-ms-file-id" : "13835093239654252544", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2022-04-12T08:01:58.8727645Z", - "Last-Modified" : "Tue, 12 Apr 2022 08:01:58 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 12 Apr 2022 08:01:58 GMT", - "x-ms-file-attributes" : "Directory", - "x-ms-file-change-time" : "2022-04-12T08:01:58.8727645Z", - "x-ms-file-parent-id" : "13835128424026341376", - "eTag" : "0x8DA1C5AB829CB5D", - "x-ms-request-id" : "c5f684e5-701a-0032-1d43-4e128f000000", - "x-ms-client-request-id" : "fd398a85-88fc-46bb-9c03-bde80e2de730", - "x-ms-file-last-write-time" : "2022-04-12T08:01:58.8727645Z" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "https://REDACTED.file.core.windows.net/6990475b6990475b3486484663d0bebc79e94027aa/6990475b16990475b348848832e4f99e118de415cb6f%2F6990475b06990475b34847804492f8792a2da41a087d?restype=directory", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "d486a696-03e6-4ede-b84e-0baa7ada32d0" - }, - "Response" : { - "content-length" : "228", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-error-code" : "ResourceAlreadyExists", - "retry-after" : "0", - "StatusCode" : "409", - "x-ms-request-id" : "fa997aa4-001a-0028-3543-4e7350000000", - "Body" : "ResourceAlreadyExistsThe specified resource already exists.\nRequestId:fa997aa4-001a-0028-3543-4e7350000000\nTime:2022-04-12T08:01:58.9245747Z", - "x-ms-client-request-id" : "d486a696-03e6-4ede-b84e-0baa7ada32d0", - "Date" : "Tue, 12 Apr 2022 08:01:58 GMT", - "Content-Type" : "application/xml" - }, - "Exception" : null - } ], - "variables" : [ "6990475b6990475b3486484663d0bebc79e94027aa", "6990475b6990475b34846315594e8e5e8d5a4561be", "6990475b06990475b34847804492f8792a2da41a087d", "6990475b16990475b348848832e4f99e118de415cb6f" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsDeleteIfExistsDirectory.json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsDeleteIfExistsDirectory.json deleted file mode 100644 index 9d8f304286643..0000000000000 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsDeleteIfExistsDirectory.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/23e8e6a123e8e6a1d3717329912b6e43dd024911b9?restype=share", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "5753b935-e7ed-4834-929a-9ca2bd832fb2" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA1F8200B2E942", - "Last-Modified" : "Sat, 16 Apr 2022 08:20:44 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "0bec262f-c01a-006a-706a-51cad0000000", - "x-ms-client-request-id" : "5753b935-e7ed-4834-929a-9ca2bd832fb2", - "Date" : "Sat, 16 Apr 2022 08:20:44 GMT" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/23e8e6a123e8e6a1d3717329912b6e43dd024911b9/23e8e6a123e8e6a1d37772736a5b0558f931434593?restype=directory", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "197b44d3-6db2-45da-abf8-87aaf6b7384c" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "x-ms-file-permission-key" : "13206157815093487607*16113479809698295934", - "x-ms-file-id" : "13835128424026341376", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2022-04-16T08:20:44.6363222Z", - "Last-Modified" : "Sat, 16 Apr 2022 08:20:44 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Sat, 16 Apr 2022 08:20:44 GMT", - "x-ms-file-attributes" : "Directory", - "x-ms-file-change-time" : "2022-04-16T08:20:44.6363222Z", - "x-ms-file-parent-id" : "0", - "eTag" : "0x8DA1F8200D2AE56", - "x-ms-request-id" : "aa0647bd-f01a-005e-686a-51f918000000", - "x-ms-client-request-id" : "197b44d3-6db2-45da-abf8-87aaf6b7384c", - "x-ms-file-last-write-time" : "2022-04-16T08:20:44.6363222Z" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "http://REDACTED.file.core.windows.net/23e8e6a123e8e6a1d3717329912b6e43dd024911b9/23e8e6a123e8e6a1d37772736a5b0558f931434593?restype=directory", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "7863dc27-323d-4a93-821a-376a5a747034" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "0bec2634-c01a-006a-726a-51cad0000000", - "x-ms-client-request-id" : "7863dc27-323d-4a93-821a-376a5a747034", - "Date" : "Sat, 16 Apr 2022 08:20:44 GMT" - }, - "Exception" : null - } ], - "variables" : [ "23e8e6a123e8e6a1d3717329912b6e43dd024911b9", "23e8e6a123e8e6a1d37772736a5b0558f931434593" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsDeleteIfExistsDirectoryMin.json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsDeleteIfExistsDirectoryMin.json deleted file mode 100644 index 1e85629b2f373..0000000000000 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsDeleteIfExistsDirectoryMin.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/e7795264e779526406e0220940bd331134c1407a90?restype=share", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "7505acc8-8956-45c5-8eed-adb376589e77" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA1F8200A208C2", - "Last-Modified" : "Sat, 16 Apr 2022 08:20:44 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "aa0647b8-f01a-005e-666a-51f918000000", - "x-ms-client-request-id" : "7505acc8-8956-45c5-8eed-adb376589e77", - "Date" : "Sat, 16 Apr 2022 08:20:44 GMT" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/e7795264e779526406e0220940bd331134c1407a90/e7795264e779526406e81552893962846051434cb2?restype=directory", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "6f91ebb5-346e-432c-aed7-c036d52ef28c" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "x-ms-file-permission-key" : "13206157815093487607*16113479809698295934", - "x-ms-file-id" : "13835128424026341376", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2022-04-16T08:20:44.6822956Z", - "Last-Modified" : "Sat, 16 Apr 2022 08:20:44 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Sat, 16 Apr 2022 08:20:44 GMT", - "x-ms-file-attributes" : "Directory", - "x-ms-file-change-time" : "2022-04-16T08:20:44.6822956Z", - "x-ms-file-parent-id" : "0", - "eTag" : "0x8DA1F8200D9B22C", - "x-ms-request-id" : "0bec2632-c01a-006a-716a-51cad0000000", - "x-ms-client-request-id" : "6f91ebb5-346e-432c-aed7-c036d52ef28c", - "x-ms-file-last-write-time" : "2022-04-16T08:20:44.6822956Z" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "http://REDACTED.file.core.windows.net/e7795264e779526406e0220940bd331134c1407a90/e7795264e779526406e81552893962846051434cb2?restype=directory", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "69f496a5-f04d-47a9-afc8-8636f21d44df" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "6c192334-b01a-005f-166a-51a6c4000000", - "x-ms-client-request-id" : "69f496a5-f04d-47a9-afc8-8636f21d44df", - "Date" : "Sat, 16 Apr 2022 08:20:44 GMT" - }, - "Exception" : null - } ], - "variables" : [ "e7795264e779526406e0220940bd331134c1407a90", "e7795264e779526406e81552893962846051434cb2" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsDeleteIfExistsDirectoryThatDoesNotExist.json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsDeleteIfExistsDirectoryThatDoesNotExist.json deleted file mode 100644 index e6dd3aca9b9fe..0000000000000 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsDeleteIfExistsDirectoryThatDoesNotExist.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/1a464c4f1a464c4f3a78030814edf375b4de4acd81?restype=share", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "16d89e97-0892-4c81-8b50-05a02584524c" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA1F8200A347CE", - "Last-Modified" : "Sat, 16 Apr 2022 08:20:44 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "6c192330-b01a-005f-146a-51a6c4000000", - "x-ms-client-request-id" : "16d89e97-0892-4c81-8b50-05a02584524c", - "Date" : "Sat, 16 Apr 2022 08:20:44 GMT" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "http://REDACTED.file.core.windows.net/1a464c4f1a464c4f3a78030814edf375b4de4acd81/1a464c4f01a464c4f3a7987164e3e14584c724a0fae9?restype=directory", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "b9c8fbe1-b6fd-4568-9787-0ea29ad643ee" - }, - "Response" : { - "content-length" : "223", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-error-code" : "ResourceNotFound", - "retry-after" : "0", - "StatusCode" : "404", - "x-ms-request-id" : "6c192333-b01a-005f-156a-51a6c4000000", - "Body" : "ResourceNotFoundThe specified resource does not exist.\nRequestId:6c192333-b01a-005f-156a-51a6c4000000\nTime:2022-04-16T08:20:44.6564874Z", - "x-ms-client-request-id" : "b9c8fbe1-b6fd-4568-9787-0ea29ad643ee", - "Date" : "Sat, 16 Apr 2022 08:20:44 GMT", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "http://REDACTED.file.core.windows.net/1a464c4f1a464c4f3a78030814edf375b4de4acd81/1a464c4f01a464c4f3a7987164e3e14584c724a0fae9?restype=directory", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "451d6ea7-9ae0-46bc-9b74-89cdacb53bb7" - }, - "Response" : { - "content-length" : "223", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "x-ms-error-code" : "ResourceNotFound", - "retry-after" : "0", - "StatusCode" : "404", - "x-ms-request-id" : "aa0647c0-f01a-005e-696a-51f918000000", - "Body" : "ResourceNotFoundThe specified resource does not exist.\nRequestId:aa0647c0-f01a-005e-696a-51f918000000\nTime:2022-04-16T08:20:44.8771952Z", - "x-ms-client-request-id" : "451d6ea7-9ae0-46bc-9b74-89cdacb53bb7", - "Date" : "Sat, 16 Apr 2022 08:20:44 GMT", - "Content-Type" : "application/xml" - }, - "Exception" : null - } ], - "variables" : [ "1a464c4f1a464c4f3a78030814edf375b4de4acd81", "1a464c4f1a464c4f3a770635719dc32f1bab436a8b", "1a464c4f01a464c4f3a7987164e3e14584c724a0fae9" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsDeleteIfExistsDirectoryThatWasAlreadyDeleted.json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsDeleteIfExistsDirectoryThatWasAlreadyDeleted.json deleted file mode 100644 index 2ceabdfcc2798..0000000000000 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsDeleteIfExistsDirectoryThatWasAlreadyDeleted.json +++ /dev/null @@ -1,95 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/ebdd2cacebdd2cacb633961920f2c066876e414985?restype=share", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "2d6c49c4-2679-4b61-b477-d364e280a733" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA1F8200B548CB", - "Last-Modified" : "Sat, 16 Apr 2022 08:20:44 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "281065cd-401a-0039-3d6a-51e9e4000000", - "x-ms-client-request-id" : "2d6c49c4-2679-4b61-b477-d364e280a733", - "Date" : "Sat, 16 Apr 2022 08:20:44 GMT" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/ebdd2cacebdd2cacb633961920f2c066876e414985/ebdd2cacebdd2cacb63347835af50d4fdc84426c91?restype=directory", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "7f5a8d0d-6058-48fd-9174-9da9727b5956" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "x-ms-file-permission-key" : "13206157815093487607*16113479809698295934", - "x-ms-file-id" : "13835128424026341376", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2022-04-16T08:20:44.7442605Z", - "Last-Modified" : "Sat, 16 Apr 2022 08:20:44 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Sat, 16 Apr 2022 08:20:44 GMT", - "x-ms-file-attributes" : "Directory", - "x-ms-file-change-time" : "2022-04-16T08:20:44.7442605Z", - "x-ms-file-parent-id" : "0", - "eTag" : "0x8DA1F8200E326AD", - "x-ms-request-id" : "281065d0-401a-0039-3e6a-51e9e4000000", - "x-ms-client-request-id" : "7f5a8d0d-6058-48fd-9174-9da9727b5956", - "x-ms-file-last-write-time" : "2022-04-16T08:20:44.7442605Z" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "http://REDACTED.file.core.windows.net/ebdd2cacebdd2cacb633961920f2c066876e414985/ebdd2cacebdd2cacb63347835af50d4fdc84426c91?restype=directory", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "82eb65bc-ce7b-4eab-9ee9-643126c1a138" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "281065d3-401a-0039-3f6a-51e9e4000000", - "x-ms-client-request-id" : "82eb65bc-ce7b-4eab-9ee9-643126c1a138", - "Date" : "Sat, 16 Apr 2022 08:20:44 GMT" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "http://REDACTED.file.core.windows.net/ebdd2cacebdd2cacb633961920f2c066876e414985/ebdd2cacebdd2cacb63347835af50d4fdc84426c91?restype=directory", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "719997dc-7ed8-4e69-a4ba-fa39ed10df1b" - }, - "Response" : { - "content-length" : "223", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-error-code" : "ResourceNotFound", - "retry-after" : "0", - "StatusCode" : "404", - "x-ms-request-id" : "aa0647c2-f01a-005e-6a6a-51f918000000", - "Body" : "ResourceNotFoundThe specified resource does not exist.\nRequestId:aa0647c2-f01a-005e-6a6a-51f918000000\nTime:2022-04-16T08:20:44.9801374Z", - "x-ms-client-request-id" : "719997dc-7ed8-4e69-a4ba-fa39ed10df1b", - "Date" : "Sat, 16 Apr 2022 08:20:44 GMT", - "Content-Type" : "application/xml" - }, - "Exception" : null - } ], - "variables" : [ "ebdd2cacebdd2cacb633961920f2c066876e414985", "ebdd2cacebdd2cacb63347835af50d4fdc84426c91" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsDeleteIfExistsFile.json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsDeleteIfExistsFile.json deleted file mode 100644 index e0731b5d28de7..0000000000000 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsDeleteIfExistsFile.json +++ /dev/null @@ -1,102 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/0effe2ec0effe2ec7db58695c30e03d652b64ebaa8?restype=share", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "538744d0-dc97-4843-8229-51bc0265effe" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA1F82DA17241A", - "Last-Modified" : "Sat, 16 Apr 2022 08:26:49 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "c2a802fe-401a-0016-286b-51e42f000000", - "x-ms-client-request-id" : "538744d0-dc97-4843-8229-51bc0265effe", - "Date" : "Sat, 16 Apr 2022 08:26:48 GMT" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/0effe2ec0effe2ec7db58695c30e03d652b64ebaa8/0effe2ec0effe2ec7db351261629dacf78db4c759b?restype=directory", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "97cfbdaa-fa6d-45bf-a485-ed2b29ce3e4c" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "x-ms-file-permission-key" : "13206157815093487607*16113479809698295934", - "x-ms-file-id" : "13835128424026341376", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2022-04-16T08:26:49.4763258Z", - "Last-Modified" : "Sat, 16 Apr 2022 08:26:49 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Sat, 16 Apr 2022 08:26:48 GMT", - "x-ms-file-attributes" : "Directory", - "x-ms-file-change-time" : "2022-04-16T08:26:49.4763258Z", - "x-ms-file-parent-id" : "0", - "eTag" : "0x8DA1F82DA48D8FA", - "x-ms-request-id" : "c2a80301-401a-0016-296b-51e42f000000", - "x-ms-client-request-id" : "97cfbdaa-fa6d-45bf-a485-ed2b29ce3e4c", - "x-ms-file-last-write-time" : "2022-04-16T08:26:49.4763258Z" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/0effe2ec0effe2ec7db58695c30e03d652b64ebaa8/0effe2ec0effe2ec7db351261629dacf78db4c759b%2FtestCreateFile", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "c3b8a9a5-1319-4804-8db2-46ed90c48382" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "x-ms-file-permission-key" : "8592442312075974896*16113479809698295934", - "x-ms-file-id" : "11529285414812647424", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2022-04-16T08:26:49.7001988Z", - "Last-Modified" : "Sat, 16 Apr 2022 08:26:49 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Sat, 16 Apr 2022 08:26:48 GMT", - "x-ms-file-attributes" : "Archive", - "x-ms-file-change-time" : "2022-04-16T08:26:49.7001988Z", - "x-ms-file-parent-id" : "13835128424026341376", - "eTag" : "0x8DA1F82DA6B0204", - "x-ms-request-id" : "c2a80304-401a-0016-2a6b-51e42f000000", - "x-ms-client-request-id" : "c3b8a9a5-1319-4804-8db2-46ed90c48382", - "x-ms-file-last-write-time" : "2022-04-16T08:26:49.7001988Z" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "http://REDACTED.file.core.windows.net/0effe2ec0effe2ec7db58695c30e03d652b64ebaa8/0effe2ec0effe2ec7db351261629dacf78db4c759b%2FtestCreateFile", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "5a42ed8b-1cc1-43af-8980-c132d93b0ec8" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "c2a80305-401a-0016-2b6b-51e42f000000", - "x-ms-client-request-id" : "5a42ed8b-1cc1-43af-8980-c132d93b0ec8", - "Date" : "Sat, 16 Apr 2022 08:26:49 GMT" - }, - "Exception" : null - } ], - "variables" : [ "0effe2ec0effe2ec7db58695c30e03d652b64ebaa8", "0effe2ec0effe2ec7db351261629dacf78db4c759b" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsDeleteIfExistsFileMin.json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsDeleteIfExistsFileMin.json deleted file mode 100644 index c55a6c97b2e28..0000000000000 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsDeleteIfExistsFileMin.json +++ /dev/null @@ -1,102 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/78840c1978840c1965a57407f7f5e0f5ebe9472f9f?restype=share", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "9264b7e7-a073-47fb-b9ed-628349260a1f" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA1F82DA148A41", - "Last-Modified" : "Sat, 16 Apr 2022 08:26:49 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "6af43719-401a-0029-676b-512c8c000000", - "x-ms-client-request-id" : "9264b7e7-a073-47fb-b9ed-628349260a1f", - "Date" : "Sat, 16 Apr 2022 08:26:48 GMT" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/78840c1978840c1965a57407f7f5e0f5ebe9472f9f/78840c1978840c1965a008706d9a98e36044460298?restype=directory", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "d9098442-7f25-4e24-bda3-776674c20331" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "x-ms-file-permission-key" : "13206157815093487607*16113479809698295934", - "x-ms-file-id" : "13835128424026341376", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2022-04-16T08:26:49.5742700Z", - "Last-Modified" : "Sat, 16 Apr 2022 08:26:49 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Sat, 16 Apr 2022 08:26:48 GMT", - "x-ms-file-attributes" : "Directory", - "x-ms-file-change-time" : "2022-04-16T08:26:49.5742700Z", - "x-ms-file-parent-id" : "0", - "eTag" : "0x8DA1F82DA57CAEC", - "x-ms-request-id" : "e81d6b07-801a-0019-726b-519243000000", - "x-ms-client-request-id" : "d9098442-7f25-4e24-bda3-776674c20331", - "x-ms-file-last-write-time" : "2022-04-16T08:26:49.5742700Z" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/78840c1978840c1965a57407f7f5e0f5ebe9472f9f/78840c1978840c1965a008706d9a98e36044460298%2FtestCreateFile", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "a3c78ceb-bb7f-4702-96ac-e5e138c15213" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "x-ms-file-permission-key" : "8592442312075974896*16113479809698295934", - "x-ms-file-id" : "11529285414812647424", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2022-04-16T08:26:49.7221862Z", - "Last-Modified" : "Sat, 16 Apr 2022 08:26:49 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Sat, 16 Apr 2022 08:26:48 GMT", - "x-ms-file-attributes" : "Archive", - "x-ms-file-change-time" : "2022-04-16T08:26:49.7221862Z", - "x-ms-file-parent-id" : "13835128424026341376", - "eTag" : "0x8DA1F82DA6E5CE6", - "x-ms-request-id" : "e81d6b0a-801a-0019-736b-519243000000", - "x-ms-client-request-id" : "a3c78ceb-bb7f-4702-96ac-e5e138c15213", - "x-ms-file-last-write-time" : "2022-04-16T08:26:49.7221862Z" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "http://REDACTED.file.core.windows.net/78840c1978840c1965a57407f7f5e0f5ebe9472f9f/78840c1978840c1965a008706d9a98e36044460298%2FtestCreateFile", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "271d738e-cc6d-4287-890f-58a50fdf8ad3" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "e81d6b0b-801a-0019-746b-519243000000", - "x-ms-client-request-id" : "271d738e-cc6d-4287-890f-58a50fdf8ad3", - "Date" : "Sat, 16 Apr 2022 08:26:49 GMT" - }, - "Exception" : null - } ], - "variables" : [ "78840c1978840c1965a57407f7f5e0f5ebe9472f9f", "78840c1978840c1965a008706d9a98e36044460298" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsDeleteIfExistsFileThatDoesNotExist.json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsDeleteIfExistsFileThatDoesNotExist.json deleted file mode 100644 index 04339f91bb4a6..0000000000000 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsDeleteIfExistsFileThatDoesNotExist.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/402320a8402320a83e091235ccb48d95ada44427a8?restype=share", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "7f88f2dd-4951-4c8a-81ec-de18d6de9838" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA1F82DA1B24CD", - "Last-Modified" : "Sat, 16 Apr 2022 08:26:49 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "e81d6b04-801a-0019-716b-519243000000", - "x-ms-client-request-id" : "7f88f2dd-4951-4c8a-81ec-de18d6de9838", - "Date" : "Sat, 16 Apr 2022 08:26:48 GMT" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/402320a8402320a83e091235ccb48d95ada44427a8/402320a8402320a83e082898db73a27063844244b4?restype=directory", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "1ea2bf48-9f3d-4f90-9532-dc71b27db7d0" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "x-ms-file-permission-key" : "13206157815093487607*16113479809698295934", - "x-ms-file-id" : "13835128424026341376", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2022-04-16T08:26:49.4773252Z", - "Last-Modified" : "Sat, 16 Apr 2022 08:26:49 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Sat, 16 Apr 2022 08:26:49 GMT", - "x-ms-file-attributes" : "Directory", - "x-ms-file-change-time" : "2022-04-16T08:26:49.4773252Z", - "x-ms-file-parent-id" : "0", - "eTag" : "0x8DA1F82DA490004", - "x-ms-request-id" : "6af4371e-401a-0029-686b-512c8c000000", - "x-ms-client-request-id" : "1ea2bf48-9f3d-4f90-9532-dc71b27db7d0", - "x-ms-file-last-write-time" : "2022-04-16T08:26:49.4773252Z" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "http://REDACTED.file.core.windows.net/402320a8402320a83e091235ccb48d95ada44427a8/402320a8402320a83e082898db73a27063844244b4%2Ftestfile", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "f9ae9652-e71a-40a4-9714-315f8c930894" - }, - "Response" : { - "content-length" : "223", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-error-code" : "ResourceNotFound", - "retry-after" : "0", - "StatusCode" : "404", - "x-ms-request-id" : "6af43721-401a-0029-696b-512c8c000000", - "Body" : "ResourceNotFoundThe specified resource does not exist.\nRequestId:6af43721-401a-0029-696b-512c8c000000\nTime:2022-04-16T08:26:49.6302369Z", - "x-ms-client-request-id" : "f9ae9652-e71a-40a4-9714-315f8c930894", - "Date" : "Sat, 16 Apr 2022 08:26:49 GMT", - "Content-Type" : "application/xml" - }, - "Exception" : null - } ], - "variables" : [ "402320a8402320a83e091235ccb48d95ada44427a8", "402320a8402320a83e082898db73a27063844244b4" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsDeleteIfExistsSubDirectory.json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsDeleteIfExistsSubDirectory.json deleted file mode 100644 index e7a877e399c05..0000000000000 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsDeleteIfExistsSubDirectory.json +++ /dev/null @@ -1,102 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/647ca7bb647ca7bbc4a595067e09aa55c49d4b03bf?restype=share", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "21de7072-8ed2-47f0-8939-79a073e39228" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA1F8239932C62", - "Last-Modified" : "Sat, 16 Apr 2022 08:22:19 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "0bec2718-c01a-006a-306b-51cad0000000", - "x-ms-client-request-id" : "21de7072-8ed2-47f0-8939-79a073e39228", - "Date" : "Sat, 16 Apr 2022 08:22:19 GMT" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/647ca7bb647ca7bbc4a595067e09aa55c49d4b03bf/647ca7bb647ca7bbc4a329098d59b5d0258d4f799e?restype=directory", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "b0d16807-2e3a-46b9-baf6-77b354fdb7c4" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "x-ms-file-permission-key" : "13206157815093487607*16113479809698295934", - "x-ms-file-id" : "13835128424026341376", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2022-04-16T08:22:20.1159292Z", - "Last-Modified" : "Sat, 16 Apr 2022 08:22:20 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Sat, 16 Apr 2022 08:22:19 GMT", - "x-ms-file-attributes" : "Directory", - "x-ms-file-change-time" : "2022-04-16T08:22:20.1159292Z", - "x-ms-file-parent-id" : "0", - "eTag" : "0x8DA1F8239BBB67C", - "x-ms-request-id" : "0bec271a-c01a-006a-316b-51cad0000000", - "x-ms-client-request-id" : "b0d16807-2e3a-46b9-baf6-77b354fdb7c4", - "x-ms-file-last-write-time" : "2022-04-16T08:22:20.1159292Z" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/647ca7bb647ca7bbc4a595067e09aa55c49d4b03bf/647ca7bb647ca7bbc4a329098d59b5d0258d4f799e%2FtestSubCreateDirectory?restype=directory", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "04e77bdf-84f3-4592-afc5-01d339ee03f5" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "x-ms-file-permission-key" : "13206157815093487607*16113479809698295934", - "x-ms-file-id" : "11529285414812647424", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2022-04-16T08:22:20.2558495Z", - "Last-Modified" : "Sat, 16 Apr 2022 08:22:20 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Sat, 16 Apr 2022 08:22:19 GMT", - "x-ms-file-attributes" : "Directory", - "x-ms-file-change-time" : "2022-04-16T08:22:20.2558495Z", - "x-ms-file-parent-id" : "13835128424026341376", - "eTag" : "0x8DA1F8239D1101F", - "x-ms-request-id" : "0bec271b-c01a-006a-326b-51cad0000000", - "x-ms-client-request-id" : "04e77bdf-84f3-4592-afc5-01d339ee03f5", - "x-ms-file-last-write-time" : "2022-04-16T08:22:20.2558495Z" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "http://REDACTED.file.core.windows.net/647ca7bb647ca7bbc4a595067e09aa55c49d4b03bf/647ca7bb647ca7bbc4a329098d59b5d0258d4f799e%2FtestSubCreateDirectory?restype=directory", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "fce74af9-9e66-4516-8a6c-52e47b2e2d06" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "281066b1-401a-0039-7c6b-51e9e4000000", - "x-ms-client-request-id" : "fce74af9-9e66-4516-8a6c-52e47b2e2d06", - "Date" : "Sat, 16 Apr 2022 08:22:20 GMT" - }, - "Exception" : null - } ], - "variables" : [ "647ca7bb647ca7bbc4a595067e09aa55c49d4b03bf", "647ca7bb647ca7bbc4a329098d59b5d0258d4f799e" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsDeleteIfExistsSubDirectoryMin.json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsDeleteIfExistsSubDirectoryMin.json deleted file mode 100644 index f7ba8119bef29..0000000000000 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsDeleteIfExistsSubDirectoryMin.json +++ /dev/null @@ -1,102 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/e8c85d9ce8c85d9c9aa106482ab9df9d6a564b2ca3?restype=share", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "3d5d347f-a2a0-412c-816f-c3e4a5c0e5a9" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA1F8239920197", - "Last-Modified" : "Sat, 16 Apr 2022 08:22:19 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "aa064895-f01a-005e-226b-51f918000000", - "x-ms-client-request-id" : "3d5d347f-a2a0-412c-816f-c3e4a5c0e5a9", - "Date" : "Sat, 16 Apr 2022 08:22:19 GMT" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/e8c85d9ce8c85d9c9aa106482ab9df9d6a564b2ca3/e8c85d9ce8c85d9c9aa91920ca1c4f4105714c349f?restype=directory", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "da7f789e-4e70-455f-b7b7-eea6983bca4b" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "x-ms-file-permission-key" : "13206157815093487607*16113479809698295934", - "x-ms-file-id" : "13835128424026341376", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2022-04-16T08:22:20.1159292Z", - "Last-Modified" : "Sat, 16 Apr 2022 08:22:20 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Sat, 16 Apr 2022 08:22:19 GMT", - "x-ms-file-attributes" : "Directory", - "x-ms-file-change-time" : "2022-04-16T08:22:20.1159292Z", - "x-ms-file-parent-id" : "0", - "eTag" : "0x8DA1F8239BBB67C", - "x-ms-request-id" : "281066ae-401a-0039-7a6b-51e9e4000000", - "x-ms-client-request-id" : "da7f789e-4e70-455f-b7b7-eea6983bca4b", - "x-ms-file-last-write-time" : "2022-04-16T08:22:20.1159292Z" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/e8c85d9ce8c85d9c9aa106482ab9df9d6a564b2ca3/e8c85d9ce8c85d9c9aa91920ca1c4f4105714c349f%2FtestSubCreateDirectory?restype=directory", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "3af0593f-d5f7-44f3-b7bd-949759d4e30b" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "x-ms-file-permission-key" : "13206157815093487607*16113479809698295934", - "x-ms-file-id" : "11529285414812647424", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2022-04-16T08:22:20.2588483Z", - "Last-Modified" : "Sat, 16 Apr 2022 08:22:20 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Sat, 16 Apr 2022 08:22:20 GMT", - "x-ms-file-attributes" : "Directory", - "x-ms-file-change-time" : "2022-04-16T08:22:20.2588483Z", - "x-ms-file-parent-id" : "13835128424026341376", - "eTag" : "0x8DA1F8239D18543", - "x-ms-request-id" : "281066b0-401a-0039-7b6b-51e9e4000000", - "x-ms-client-request-id" : "3af0593f-d5f7-44f3-b7bd-949759d4e30b", - "x-ms-file-last-write-time" : "2022-04-16T08:22:20.2588483Z" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "http://REDACTED.file.core.windows.net/e8c85d9ce8c85d9c9aa106482ab9df9d6a564b2ca3/e8c85d9ce8c85d9c9aa91920ca1c4f4105714c349f%2FtestSubCreateDirectory?restype=directory", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "9900e195-e0b4-4353-8580-aad5b8bb1b9d" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "0bec271c-c01a-006a-336b-51cad0000000", - "x-ms-client-request-id" : "9900e195-e0b4-4353-8580-aad5b8bb1b9d", - "Date" : "Sat, 16 Apr 2022 08:22:20 GMT" - }, - "Exception" : null - } ], - "variables" : [ "e8c85d9ce8c85d9c9aa106482ab9df9d6a564b2ca3", "e8c85d9ce8c85d9c9aa91920ca1c4f4105714c349f" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsDeleteIfExistsSubDirectoryThatDoesNotExist.json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsDeleteIfExistsSubDirectoryThatDoesNotExist.json deleted file mode 100644 index f5b78d191a252..0000000000000 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsDeleteIfExistsSubDirectoryThatDoesNotExist.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/4741a30e4741a30ed0d7921306d1ff8df3a24606bc?restype=share", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "0029725f-3b5a-4fca-a8df-f06777e0f588" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA1F82399306BC", - "Last-Modified" : "Sat, 16 Apr 2022 08:22:19 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "281066ac-401a-0039-796b-51e9e4000000", - "x-ms-client-request-id" : "0029725f-3b5a-4fca-a8df-f06777e0f588", - "Date" : "Sat, 16 Apr 2022 08:22:19 GMT" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "http://REDACTED.file.core.windows.net/4741a30e4741a30ed0d7921306d1ff8df3a24606bc/4741a30e4741a30ed0d33488fd6e2cee5588453983%2Ftestsubdirectory?restype=directory", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "90642ce3-5745-4c67-93c4-2d853b5dc9d0" - }, - "Response" : { - "content-length" : "224", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-error-code" : "ParentNotFound", - "retry-after" : "0", - "StatusCode" : "404", - "x-ms-request-id" : "aa064897-f01a-005e-236b-51f918000000", - "Body" : "ParentNotFoundThe specified parent path does not exist.\nRequestId:aa064897-f01a-005e-236b-51f918000000\nTime:2022-04-16T08:22:20.1134468Z", - "x-ms-client-request-id" : "90642ce3-5745-4c67-93c4-2d853b5dc9d0", - "Date" : "Sat, 16 Apr 2022 08:22:19 GMT", - "Content-Type" : "application/xml" - }, - "Exception" : null - } ], - "variables" : [ "4741a30e4741a30ed0d7921306d1ff8df3a24606bc", "4741a30e4741a30ed0d33488fd6e2cee5588453983" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsRenameFileSmbProperties.json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsRenameFileSmbProperties.json index c12b0368e1fdb..313057c459de4 100644 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsRenameFileSmbProperties.json +++ b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsRenameFileSmbProperties.json @@ -1,133 +1,128 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/454962034549620342513030bb56d9b32ed544b298?restype=share", + "Uri" : "https://REDACTED.file.preprod.core.windows.net/454962034549620324a10451d918b5bc2de44da5ac?restype=share", "Headers" : { - "x-ms-version" : "2021-06-08", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.13; Windows 10; 10.0)", - "x-ms-client-request-id" : "12ee3e11-93a5-492c-a9b5-f7e1dbc53b0f" + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-file-share/12.12.0-beta.2 (11.0.10; Windows 10; 10.0)", + "x-ms-client-request-id" : "d886b166-c7cf-46db-b4de-ee72d629fb60" }, "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-06-08", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA24A7C54C1D0A", - "Last-Modified" : "Fri, 22 Apr 2022 21:33:41 GMT", + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2021-04-10", + "eTag" : "0x8D9BFDC12A59E5E", + "Last-Modified" : "Wed, 15 Dec 2021 15:03:37 GMT", "retry-after" : "0", "StatusCode" : "201", - "x-ms-request-id" : "b62f97aa-701a-002e-4e90-5688d5000000", - "x-ms-client-request-id" : "12ee3e11-93a5-492c-a9b5-f7e1dbc53b0f", - "Date" : "Fri, 22 Apr 2022 21:33:41 GMT" + "x-ms-request-id" : "888e7119-a01a-0005-68c4-f1f0c9000000", + "x-ms-client-request-id" : "d886b166-c7cf-46db-b4de-ee72d629fb60", + "Date" : "Wed, 15 Dec 2021 15:03:37 GMT" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/454962034549620342513030bb56d9b32ed544b298/4549620345496203425266212999124a1a6449bc88?restype=directory", + "Uri" : "https://REDACTED.file.preprod.core.windows.net/454962034549620324a10451d918b5bc2de44da5ac/454962034549620324a75628b748edf9553842b780?restype=directory", "Headers" : { - "x-ms-version" : "2021-06-08", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.13; Windows 10; 10.0)", - "x-ms-client-request-id" : "509465e0-76d5-464e-9326-15701e7de764" + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-file-share/12.12.0-beta.2 (11.0.10; Windows 10; 10.0)", + "x-ms-client-request-id" : "a4f75e99-cfcf-4252-8f41-02d71dda1cfb" }, "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-06-08", - "x-ms-file-permission-key" : "13502495874993983044*15256408171089631693", + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2021-04-10", + "x-ms-file-permission-key" : "11335661366610323900*1292734777967284221", "x-ms-file-id" : "13835128424026341376", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2022-04-22T21:33:41.7524059Z", - "Last-Modified" : "Fri, 22 Apr 2022 21:33:41 GMT", + "x-ms-file-creation-time" : "2021-12-15T15:03:39.0758163Z", + "Last-Modified" : "Wed, 15 Dec 2021 15:03:39 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Fri, 22 Apr 2022 21:33:41 GMT", + "Date" : "Wed, 15 Dec 2021 15:03:38 GMT", "x-ms-file-attributes" : "Directory", - "x-ms-file-change-time" : "2022-04-22T21:33:41.7524059Z", + "x-ms-file-change-time" : "2021-12-15T15:03:39.0758163Z", "x-ms-file-parent-id" : "0", - "eTag" : "0x8DA24A7C578F75B", - "x-ms-request-id" : "b62f97ae-701a-002e-4f90-5688d5000000", - "x-ms-client-request-id" : "509465e0-76d5-464e-9326-15701e7de764", - "x-ms-file-last-write-time" : "2022-04-22T21:33:41.7524059Z" + "eTag" : "0x8D9BFDC1383E913", + "x-ms-request-id" : "888e711c-a01a-0005-69c4-f1f0c9000000", + "x-ms-client-request-id" : "a4f75e99-cfcf-4252-8f41-02d71dda1cfb", + "x-ms-file-last-write-time" : "2021-12-15T15:03:39.0758163Z" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/454962034549620342513030bb56d9b32ed544b298?restype=share&comp=filepermission", + "Uri" : "https://REDACTED.file.preprod.core.windows.net/454962034549620324a10451d918b5bc2de44da5ac?restype=share&comp=filepermission", "Headers" : { - "x-ms-version" : "2021-06-08", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.13; Windows 10; 10.0)", - "x-ms-client-request-id" : "f4771bd0-d582-44e8-838c-9127da3bb2ed", + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-file-share/12.12.0-beta.2 (11.0.10; Windows 10; 10.0)", + "x-ms-client-request-id" : "2147e97a-d001-443a-847c-201f4d96e627", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2021-06-08", - "x-ms-file-permission-key" : "8394264165664443452*15256408171089631693", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-version" : "2021-04-10", + "x-ms-file-permission-key" : "13130099305578420748*1292734777967284221", "retry-after" : "0", "StatusCode" : "201", - "x-ms-request-id" : "b62f97b0-701a-002e-5190-5688d5000000", - "x-ms-client-request-id" : "f4771bd0-d582-44e8-838c-9127da3bb2ed", - "Date" : "Fri, 22 Apr 2022 21:33:41 GMT" + "x-ms-request-id" : "888e711e-a01a-0005-6ac4-f1f0c9000000", + "x-ms-client-request-id" : "2147e97a-d001-443a-847c-201f4d96e627", + "Date" : "Wed, 15 Dec 2021 15:03:39 GMT" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/454962034549620342513030bb56d9b32ed544b298/45496203045496203425939661fb2e90522a145bd995?restype=directory&comp=rename", + "Uri" : "https://REDACTED.file.preprod.core.windows.net/454962034549620324a10451d918b5bc2de44da5ac/4549620304549620324a30705a90a1e9c9d6f4137911?restype=directory&comp=rename", "Headers" : { - "x-ms-version" : "2021-06-08", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.13; Windows 10; 10.0)", - "x-ms-client-request-id" : "0e1a2c2b-37f3-4177-82e4-e969b1e672f0" + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-file-share/12.12.0-beta.2 (11.0.10; Windows 10; 10.0)", + "x-ms-client-request-id" : "6826bf4e-1ff3-42c6-95d2-075f8b69e527" }, "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-06-08", - "x-ms-file-permission-key" : "8394264165664443452*15256408171089631693", + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2021-04-10", + "x-ms-file-permission-key" : "13130099305578420748*1292734777967284221", "x-ms-file-id" : "13835128424026341376", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2022-04-17T21:33:39.2003737Z", - "Last-Modified" : "Fri, 22 Apr 2022 21:33:42 GMT", + "x-ms-file-creation-time" : "2021-12-10T15:03:38.9374151Z", + "Last-Modified" : "Wed, 15 Dec 2021 15:03:39 GMT", "retry-after" : "0", "StatusCode" : "200", "x-ms-request-server-encrypted" : "true", - "Date" : "Fri, 22 Apr 2022 21:33:41 GMT", + "Date" : "Wed, 15 Dec 2021 15:03:39 GMT", "x-ms-file-attributes" : "Directory", - "x-ms-file-change-time" : "2022-04-22T21:33:39.2003737Z", + "x-ms-file-change-time" : "2021-12-15T15:03:39.5628465Z", "x-ms-file-parent-id" : "0", - "eTag" : "0x8DA24A7C5AE0956", - "x-ms-request-id" : "b62f97b1-701a-002e-5290-5688d5000000", - "x-ms-client-request-id" : "0e1a2c2b-37f3-4177-82e4-e969b1e672f0", - "x-ms-file-last-write-time" : "2020-04-22T21:33:39.2073725Z" + "eTag" : "0x8D9BFDC13CE39B1", + "x-ms-request-id" : "888e711f-a01a-0005-6bc4-f1f0c9000000", + "x-ms-client-request-id" : "6826bf4e-1ff3-42c6-95d2-075f8b69e527", + "x-ms-file-last-write-time" : "2019-12-15T15:03:38.9573986Z" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "http://REDACTED.file.core.windows.net/454962034549620342513030bb56d9b32ed544b298/45496203045496203425939661fb2e90522a145bd995?restype=directory", + "Uri" : "https://REDACTED.file.preprod.core.windows.net/454962034549620324a10451d918b5bc2de44da5ac/4549620304549620324a30705a90a1e9c9d6f4137911?restype=directory", "Headers" : { - "x-ms-version" : "2021-06-08", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.13; Windows 10; 10.0)", - "x-ms-client-request-id" : "6e23d895-eeab-4135-8865-cff2827b284e" + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-file-share/12.12.0-beta.2 (11.0.10; Windows 10; 10.0)", + "x-ms-client-request-id" : "054f5a2f-0377-4a4d-b3e5-f85b5be1db19" }, "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-06-08", - "x-ms-file-permission-key" : "8394264165664443452*15256408171089631693", + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2021-04-10", + "x-ms-file-permission-key" : "13130099305578420748*1292734777967284221", "x-ms-file-id" : "13835128424026341376", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2022-04-17T21:33:39.2003737Z", - "Last-Modified" : "Fri, 22 Apr 2022 21:33:42 GMT", + "x-ms-file-creation-time" : "2021-12-10T15:03:38.9374151Z", + "Last-Modified" : "Wed, 15 Dec 2021 15:03:39 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Fri, 22 Apr 2022 21:33:41 GMT", + "Date" : "Wed, 15 Dec 2021 15:03:39 GMT", "x-ms-server-encrypted" : "true", "x-ms-file-attributes" : "Directory", - "x-ms-file-change-time" : "2022-04-22T21:33:39.2003737Z", + "x-ms-file-change-time" : "2021-12-15T15:03:39.5628465Z", "x-ms-file-parent-id" : "0", - "eTag" : "0x8DA24A7C5AE0956", - "x-ms-request-id" : "b62f97b2-701a-002e-5390-5688d5000000", - "x-ms-client-request-id" : "6e23d895-eeab-4135-8865-cff2827b284e", - "x-ms-file-last-write-time" : "2020-04-22T21:33:39.2073725Z" + "eTag" : "0x8D9BFDC13CE39B1", + "x-ms-request-id" : "888e7120-a01a-0005-6cc4-f1f0c9000000", + "x-ms-client-request-id" : "054f5a2f-0377-4a4d-b3e5-f85b5be1db19", + "x-ms-file-last-write-time" : "2019-12-15T15:03:38.9573986Z" }, "Exception" : null } ], - "variables" : [ "454962034549620342513030bb56d9b32ed544b298", "4549620345496203425266212999124a1a6449bc88", "2022-04-22T21:33:39.200373700Z", "2022-04-22T21:33:39.200373700Z", "2022-04-22T21:33:39.207372500Z", "45496203045496203425939661fb2e90522a145bd995" ] + "variables" : [ "454962034549620324a10451d918b5bc2de44da5ac", "454962034549620324a75628b748edf9553842b780", "2021-12-15T15:03:38.937415100Z", "2021-12-15T15:03:38.957398600Z", "4549620304549620324a30705a90a1e9c9d6f4137911" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsSetHttpHeadersChangeTime.json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsSetHttpHeadersChangeTime.json deleted file mode 100644 index d5ab24389fb46..0000000000000 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAPITestsSetHttpHeadersChangeTime.json +++ /dev/null @@ -1,133 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/bc4f2910bc4f29107108652907bb25a1f4644db3a6?restype=share", - "Headers" : { - "x-ms-version" : "2021-06-08", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.13; Windows 10; 10.0)", - "x-ms-client-request-id" : "df2b6fa0-3035-493f-a91c-7690955e8600" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-06-08", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA24A321262937", - "Last-Modified" : "Fri, 22 Apr 2022 21:00:28 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "6967bed4-201a-0041-378b-568226000000", - "x-ms-client-request-id" : "df2b6fa0-3035-493f-a91c-7690955e8600", - "Date" : "Fri, 22 Apr 2022 21:00:27 GMT" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/bc4f2910bc4f29107108652907bb25a1f4644db3a6/bc4f2910bc4f29107102128475bb02d02b2f4038be?restype=directory", - "Headers" : { - "x-ms-version" : "2021-06-08", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.13; Windows 10; 10.0)", - "x-ms-client-request-id" : "7901721d-edfc-4928-8ed3-03104436e656" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-06-08", - "x-ms-file-permission-key" : "13502495874993983044*15256408171089631693", - "x-ms-file-id" : "13835128424026341376", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2022-04-22T21:00:28.3745440Z", - "Last-Modified" : "Fri, 22 Apr 2022 21:00:28 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Fri, 22 Apr 2022 21:00:27 GMT", - "x-ms-file-attributes" : "Directory", - "x-ms-file-change-time" : "2022-04-22T21:00:28.3745440Z", - "x-ms-file-parent-id" : "0", - "eTag" : "0x8DA24A32153A4A0", - "x-ms-request-id" : "6967bed7-201a-0041-388b-568226000000", - "x-ms-client-request-id" : "7901721d-edfc-4928-8ed3-03104436e656", - "x-ms-file-last-write-time" : "2022-04-22T21:00:28.3745440Z" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/bc4f2910bc4f29107108652907bb25a1f4644db3a6?restype=share&comp=filepermission", - "Headers" : { - "x-ms-version" : "2021-06-08", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.13; Windows 10; 10.0)", - "x-ms-client-request-id" : "2ac98093-8302-47e6-99e2-5c4fbfa89b49", - "Content-Type" : "application/json" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2021-06-08", - "x-ms-file-permission-key" : "8394264165664443452*15256408171089631693", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "6967bed8-201a-0041-398b-568226000000", - "x-ms-client-request-id" : "2ac98093-8302-47e6-99e2-5c4fbfa89b49", - "Date" : "Fri, 22 Apr 2022 21:00:28 GMT" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/bc4f2910bc4f29107108652907bb25a1f4644db3a6/bc4f2910bc4f29107102128475bb02d02b2f4038be?restype=directory&comp=properties", - "Headers" : { - "x-ms-version" : "2021-06-08", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.13; Windows 10; 10.0)", - "x-ms-client-request-id" : "ae5f84cd-04fa-4548-9410-417107b97b91" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-06-08", - "x-ms-file-permission-key" : "13502495874993983044*15256408171089631693", - "x-ms-file-id" : "13835128424026341376", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2022-04-22T21:00:28.3745440Z", - "Last-Modified" : "Fri, 22 Apr 2022 21:00:28 GMT", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-server-encrypted" : "true", - "Date" : "Fri, 22 Apr 2022 21:00:28 GMT", - "x-ms-file-attributes" : "Directory", - "x-ms-file-change-time" : "2022-04-22T21:00:25.8533191Z", - "x-ms-file-parent-id" : "0", - "eTag" : "0x8DA24A321870928", - "x-ms-request-id" : "6967bed9-201a-0041-3a8b-568226000000", - "x-ms-client-request-id" : "ae5f84cd-04fa-4548-9410-417107b97b91", - "x-ms-file-last-write-time" : "2022-04-22T21:00:28.3745440Z" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "http://REDACTED.file.core.windows.net/bc4f2910bc4f29107108652907bb25a1f4644db3a6/bc4f2910bc4f29107102128475bb02d02b2f4038be?restype=directory", - "Headers" : { - "x-ms-version" : "2021-06-08", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.13; Windows 10; 10.0)", - "x-ms-client-request-id" : "cbd865da-2ea0-4f17-b5df-cb25e654cb77" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-06-08", - "x-ms-file-permission-key" : "13502495874993983044*15256408171089631693", - "x-ms-file-id" : "13835128424026341376", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2022-04-22T21:00:28.3745440Z", - "Last-Modified" : "Fri, 22 Apr 2022 21:00:28 GMT", - "retry-after" : "0", - "StatusCode" : "200", - "Date" : "Fri, 22 Apr 2022 21:00:28 GMT", - "x-ms-server-encrypted" : "true", - "x-ms-file-attributes" : "Directory", - "x-ms-file-change-time" : "2022-04-22T21:00:25.8533191Z", - "x-ms-file-parent-id" : "0", - "eTag" : "0x8DA24A321870928", - "x-ms-request-id" : "6967beda-201a-0041-3b8b-568226000000", - "x-ms-client-request-id" : "cbd865da-2ea0-4f17-b5df-cb25e654cb77", - "x-ms-file-last-write-time" : "2022-04-22T21:00:28.3745440Z" - }, - "Exception" : null - } ], - "variables" : [ "bc4f2910bc4f29107108652907bb25a1f4644db3a6", "bc4f2910bc4f29107102128475bb02d02b2f4038be", "2022-04-22T21:00:25.853319100Z", "2022-04-22T21:00:25.854327200Z" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAsyncAPITestsCreateIfNotExistsDirWithFilePermKey.json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAsyncAPITestsCreateIfNotExistsDirWithFilePermKey.json deleted file mode 100644 index 3ebdc2b1af10f..0000000000000 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAsyncAPITestsCreateIfNotExistsDirWithFilePermKey.json +++ /dev/null @@ -1,75 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.file.core.windows.net/c8c93c1fc8c93c1fab37367800f0c0c0fb894daba4?restype=share", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "525a3573-953c-4d6d-b492-389d45a13552" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA1C5B1DDCAE5F", - "Last-Modified" : "Tue, 12 Apr 2022 08:04:49 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "0cd76939-e01a-0030-7343-4eac37000000", - "x-ms-client-request-id" : "525a3573-953c-4d6d-b492-389d45a13552", - "Date" : "Tue, 12 Apr 2022 08:04:48 GMT" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "https://REDACTED.file.core.windows.net/c8c93c1fc8c93c1fab37367800f0c0c0fb894daba4?restype=share&comp=filepermission", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "daaeff5f-b1c2-4aff-a588-52ff4e1e0c44", - "Content-Type" : "application/json" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2021-04-10", - "x-ms-file-permission-key" : "8672059509846091151*16113479809698295934", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "827db154-401a-0029-2c43-4e2c8c000000", - "x-ms-client-request-id" : "daaeff5f-b1c2-4aff-a588-52ff4e1e0c44", - "Date" : "Tue, 12 Apr 2022 08:04:49 GMT" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "https://REDACTED.file.core.windows.net/c8c93c1fc8c93c1fab37367800f0c0c0fb894daba4/c8c93c1fc8c93c1fab3725215a93090c5eb34837ba?restype=directory", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "58487ee2-3c0a-4419-afbc-8b8865152aaa" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "x-ms-file-permission-key" : "4445907346579170507*16113479809698295934", - "x-ms-file-id" : "13835128424026341376", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2022-04-12T08:04:50.3151493Z", - "Last-Modified" : "Tue, 12 Apr 2022 08:04:50 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 12 Apr 2022 08:04:49 GMT", - "x-ms-file-attributes" : "Directory", - "x-ms-file-change-time" : "2022-04-12T08:04:50.3151493Z", - "x-ms-file-parent-id" : "0", - "eTag" : "0x8DA1C5B1E59D385", - "x-ms-request-id" : "827db157-401a-0029-2d43-4e2c8c000000", - "x-ms-client-request-id" : "58487ee2-3c0a-4419-afbc-8b8865152aaa", - "x-ms-file-last-write-time" : "2022-04-12T08:04:50.3151493Z" - }, - "Exception" : null - } ], - "variables" : [ "c8c93c1fc8c93c1fab37367800f0c0c0fb894daba4", "c8c93c1fc8c93c1fab3725215a93090c5eb34837ba", "2022-04-12T08:04:50.315149300Z", "2022-04-12T08:04:50.315149300Z" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAsyncAPITestsCreateIfNotExistsDirectory.json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAsyncAPITestsCreateIfNotExistsDirectory.json deleted file mode 100644 index 631c205d01959..0000000000000 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAsyncAPITestsCreateIfNotExistsDirectory.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.file.core.windows.net/46212894462128947ad820151de3f0823d28445cb0?restype=share", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "74be5e58-a9f7-4589-89a8-76d96f9b5695" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA1C5B1DCEDDC6", - "Last-Modified" : "Tue, 12 Apr 2022 08:04:49 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "827db150-401a-0029-2b43-4e2c8c000000", - "x-ms-client-request-id" : "74be5e58-a9f7-4589-89a8-76d96f9b5695", - "Date" : "Tue, 12 Apr 2022 08:04:48 GMT" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "https://REDACTED.file.core.windows.net/46212894462128947ad820151de3f0823d28445cb0/46212894462128947ad72545ab714ac49da343a8b9?restype=directory", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "d834c817-02c0-4d7c-b07c-b09cbb673f1a" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "x-ms-file-permission-key" : "13206157815093487607*16113479809698295934", - "x-ms-file-id" : "13835128424026341376", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2022-04-12T08:04:49.7382436Z", - "Last-Modified" : "Tue, 12 Apr 2022 08:04:49 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 12 Apr 2022 08:04:48 GMT", - "x-ms-file-attributes" : "Directory", - "x-ms-file-change-time" : "2022-04-12T08:04:49.7382436Z", - "x-ms-file-parent-id" : "0", - "eTag" : "0x8DA1C5B1E01CC24", - "x-ms-request-id" : "6effd552-d01a-002b-1543-4e9234000000", - "x-ms-client-request-id" : "d834c817-02c0-4d7c-b07c-b09cbb673f1a", - "x-ms-file-last-write-time" : "2022-04-12T08:04:49.7382436Z" - }, - "Exception" : null - } ], - "variables" : [ "46212894462128947ad820151de3f0823d28445cb0", "46212894462128947ad72545ab714ac49da343a8b9" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAsyncAPITestsCreateIfNotExistsDirectoryError.json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAsyncAPITestsCreateIfNotExistsDirectoryError.json deleted file mode 100644 index 0d9f91eccb247..0000000000000 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAsyncAPITestsCreateIfNotExistsDirectoryError.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.file.core.windows.net/42b0512042b05120cb472803c57f2a38d31a48e897?restype=share", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "65f10fd0-98fd-4a17-bf04-d88f3ba8c631" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA1C5B1DCDE6AA", - "Last-Modified" : "Tue, 12 Apr 2022 08:04:49 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f284b4b5-501a-0025-2143-4ebb84000000", - "x-ms-client-request-id" : "65f10fd0-98fd-4a17-bf04-d88f3ba8c631", - "Date" : "Tue, 12 Apr 2022 08:04:48 GMT" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "https://REDACTED.file.core.windows.net/42b0512042b05120cb45227655d05710349143f9a5/42b0512042b05120cb4321038d2d6eb1c5334ca0a7?restype=directory", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "96f9fbab-9fbb-4e63-92f4-97ebd0f803da" - }, - "Response" : { - "content-length" : "217", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-error-code" : "ShareNotFound", - "retry-after" : "0", - "StatusCode" : "404", - "x-ms-request-id" : "0cd7693c-e01a-0030-7443-4eac37000000", - "Body" : "ShareNotFoundThe specified share does not exist.\nRequestId:0cd7693c-e01a-0030-7443-4eac37000000\nTime:2022-04-12T08:04:49.7418555Z", - "x-ms-client-request-id" : "96f9fbab-9fbb-4e63-92f4-97ebd0f803da", - "Date" : "Tue, 12 Apr 2022 08:04:49 GMT", - "Content-Type" : "application/xml" - }, - "Exception" : null - } ], - "variables" : [ "42b0512042b05120cb472803c57f2a38d31a48e897", "42b0512042b05120cb4321038d2d6eb1c5334ca0a7", "42b0512042b05120cb45227655d05710349143f9a5" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAsyncAPITestsCreateIfNotExistsDirectoryThatAlreadyExists.json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAsyncAPITestsCreateIfNotExistsDirectoryThatAlreadyExists.json deleted file mode 100644 index cf9a529249271..0000000000000 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAsyncAPITestsCreateIfNotExistsDirectoryThatAlreadyExists.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.file.core.windows.net/3e6373e53e6373e54e886538ec1a050534e645008e?restype=share", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "2a8c7613-110c-45f2-89d0-a2b239c88188" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA1C5B1DCEB7AE", - "Last-Modified" : "Tue, 12 Apr 2022 08:04:49 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "fee4ed83-301a-001c-6a43-4e4098000000", - "x-ms-client-request-id" : "2a8c7613-110c-45f2-89d0-a2b239c88188", - "Date" : "Tue, 12 Apr 2022 08:04:49 GMT" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "https://REDACTED.file.core.windows.net/3e6373e53e6373e54e886538ec1a050534e645008e/3e6373e503e6373e54e8607224150e933952e48e5963?restype=directory", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "b9574526-d300-4930-81cf-79b5f203de4f" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "x-ms-file-permission-key" : "13206157815093487607*16113479809698295934", - "x-ms-file-id" : "13835128424026341376", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2022-04-12T08:04:49.7252513Z", - "Last-Modified" : "Tue, 12 Apr 2022 08:04:49 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 12 Apr 2022 08:04:49 GMT", - "x-ms-file-attributes" : "Directory", - "x-ms-file-change-time" : "2022-04-12T08:04:49.7252513Z", - "x-ms-file-parent-id" : "0", - "eTag" : "0x8DA1C5B1DFFD0A1", - "x-ms-request-id" : "fee4ed86-301a-001c-6b43-4e4098000000", - "x-ms-client-request-id" : "b9574526-d300-4930-81cf-79b5f203de4f", - "x-ms-file-last-write-time" : "2022-04-12T08:04:49.7252513Z" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "https://REDACTED.file.core.windows.net/3e6373e53e6373e54e886538ec1a050534e645008e/3e6373e503e6373e54e8607224150e933952e48e5963?restype=directory", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "ae9be00a-03f5-4813-9093-ef24372f41d6" - }, - "Response" : { - "content-length" : "228", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-error-code" : "ResourceAlreadyExists", - "retry-after" : "0", - "StatusCode" : "409", - "x-ms-request-id" : "fee4ed88-301a-001c-6c43-4e4098000000", - "Body" : "ResourceAlreadyExistsThe specified resource already exists.\nRequestId:fee4ed88-301a-001c-6c43-4e4098000000\nTime:2022-04-12T08:04:49.7902632Z", - "x-ms-client-request-id" : "ae9be00a-03f5-4813-9093-ef24372f41d6", - "Date" : "Tue, 12 Apr 2022 08:04:49 GMT", - "Content-Type" : "application/xml" - }, - "Exception" : null - } ], - "variables" : [ "3e6373e53e6373e54e886538ec1a050534e645008e", "3e6373e53e6373e54e8706197eaf87f05c7e44e388", "3e6373e503e6373e54e8607224150e933952e48e5963" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAsyncAPITestsCreateIfNotExistsDirectoryWithFilePermission.json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAsyncAPITestsCreateIfNotExistsDirectoryWithFilePermission.json deleted file mode 100644 index 3ccfe57710014..0000000000000 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAsyncAPITestsCreateIfNotExistsDirectoryWithFilePermission.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.file.core.windows.net/e47597eee47597eeca04251936c1401f1c154f1c8f?restype=share", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "54fd0d30-451d-4ac7-a5f9-6a4fa5407585" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA1C5B1DCF0D14", - "Last-Modified" : "Tue, 12 Apr 2022 08:04:49 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "6effd54f-d01a-002b-1443-4e9234000000", - "x-ms-client-request-id" : "54fd0d30-451d-4ac7-a5f9-6a4fa5407585", - "Date" : "Tue, 12 Apr 2022 08:04:48 GMT" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "https://REDACTED.file.core.windows.net/e47597eee47597eeca04251936c1401f1c154f1c8f/e47597eee47597eeca0505626518452a18494047bf?restype=directory", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "fb5f1666-446b-4666-8e6e-c5c76c07f57f" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "x-ms-file-permission-key" : "4445907346579170507*16113479809698295934", - "x-ms-file-id" : "13835128424026341376", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2022-04-12T08:04:49.7382436Z", - "Last-Modified" : "Tue, 12 Apr 2022 08:04:49 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 12 Apr 2022 08:04:49 GMT", - "x-ms-file-attributes" : "Directory", - "x-ms-file-change-time" : "2022-04-12T08:04:49.7382436Z", - "x-ms-file-parent-id" : "0", - "eTag" : "0x8DA1C5B1E01CC24", - "x-ms-request-id" : "4c8d064d-a01a-0043-7743-4ef4a4000000", - "x-ms-client-request-id" : "fb5f1666-446b-4666-8e6e-c5c76c07f57f", - "x-ms-file-last-write-time" : "2022-04-12T08:04:49.7382436Z" - }, - "Exception" : null - } ], - "variables" : [ "e47597eee47597eeca04251936c1401f1c154f1c8f", "e47597eee47597eeca0505626518452a18494047bf" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAsyncAPITestsCreateIfNotExistsDirectoryWithMetadata.json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAsyncAPITestsCreateIfNotExistsDirectoryWithMetadata.json deleted file mode 100644 index f1cea82756e52..0000000000000 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAsyncAPITestsCreateIfNotExistsDirectoryWithMetadata.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.file.core.windows.net/8d6797b68d6797b6eaf604310cfd7127f2414e5c97?restype=share", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "ab3efd0f-a14e-4775-bfb3-01876d0320ff" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA1C5B1DCED082", - "Last-Modified" : "Tue, 12 Apr 2022 08:04:49 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "4c8d064a-a01a-0043-7643-4ef4a4000000", - "x-ms-client-request-id" : "ab3efd0f-a14e-4775-bfb3-01876d0320ff", - "Date" : "Tue, 12 Apr 2022 08:04:49 GMT" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "https://REDACTED.file.core.windows.net/8d6797b68d6797b6eaf604310cfd7127f2414e5c97/8d6797b68d6797b6eaf207483b751733fd94453ab7?restype=directory", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "35c58fe1-7998-4463-9d31-c9b75e04518d" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "x-ms-file-permission-key" : "13206157815093487607*16113479809698295934", - "x-ms-file-id" : "13835128424026341376", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2022-04-12T08:04:49.7422416Z", - "Last-Modified" : "Tue, 12 Apr 2022 08:04:49 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 12 Apr 2022 08:04:49 GMT", - "x-ms-file-attributes" : "Directory", - "x-ms-file-change-time" : "2022-04-12T08:04:49.7422416Z", - "x-ms-file-parent-id" : "0", - "eTag" : "0x8DA1C5B1E026850", - "x-ms-request-id" : "f284b4b9-501a-0025-2243-4ebb84000000", - "x-ms-client-request-id" : "35c58fe1-7998-4463-9d31-c9b75e04518d", - "x-ms-file-last-write-time" : "2022-04-12T08:04:49.7422416Z" - }, - "Exception" : null - } ], - "variables" : [ "8d6797b68d6797b6eaf604310cfd7127f2414e5c97", "8d6797b68d6797b6eaf207483b751733fd94453ab7" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAsyncAPITestsCreateIfNotExistsSubDirectory.json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAsyncAPITestsCreateIfNotExistsSubDirectory.json deleted file mode 100644 index d7fc5982930b7..0000000000000 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAsyncAPITestsCreateIfNotExistsSubDirectory.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.file.core.windows.net/f11d0071f11d0071c2899205dfa46055f7004a4ead?restype=share", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "7770c209-0913-4df9-b511-27edd0603a47" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA1C5B4B4F2E6E", - "Last-Modified" : "Tue, 12 Apr 2022 08:06:05 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "3e2907ac-601a-0063-3a44-4e8f03000000", - "x-ms-client-request-id" : "7770c209-0913-4df9-b511-27edd0603a47", - "Date" : "Tue, 12 Apr 2022 08:06:05 GMT" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "https://REDACTED.file.core.windows.net/f11d0071f11d0071c2899205dfa46055f7004a4ead/f11d0071f11d0071c289705378ce870ff056423081?restype=directory", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "3ca9866d-375a-442c-b43b-b7b603085f86" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "x-ms-file-permission-key" : "13206157815093487607*16113479809698295934", - "x-ms-file-id" : "13835128424026341376", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2022-04-12T08:06:06.0611192Z", - "Last-Modified" : "Tue, 12 Apr 2022 08:06:06 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 12 Apr 2022 08:06:05 GMT", - "x-ms-file-attributes" : "Directory", - "x-ms-file-change-time" : "2022-04-12T08:06:06.0611192Z", - "x-ms-file-parent-id" : "0", - "eTag" : "0x8DA1C5B4B7FBE78", - "x-ms-request-id" : "3e2907af-601a-0063-3b44-4e8f03000000", - "x-ms-client-request-id" : "3ca9866d-375a-442c-b43b-b7b603085f86", - "x-ms-file-last-write-time" : "2022-04-12T08:06:06.0611192Z" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "https://REDACTED.file.core.windows.net/f11d0071f11d0071c2899205dfa46055f7004a4ead/f11d0071f11d0071c289705378ce870ff056423081%2FtestCreateSubDirectory?restype=directory", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "9ccc7011-0932-4153-9593-582281e57c31" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "x-ms-file-permission-key" : "13206157815093487607*16113479809698295934", - "x-ms-file-id" : "13835093239654252544", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2022-04-12T08:06:06.1710564Z", - "Last-Modified" : "Tue, 12 Apr 2022 08:06:06 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 12 Apr 2022 08:06:06 GMT", - "x-ms-file-attributes" : "Directory", - "x-ms-file-change-time" : "2022-04-12T08:06:06.1710564Z", - "x-ms-file-parent-id" : "13835128424026341376", - "eTag" : "0x8DA1C5B4B9084E4", - "x-ms-request-id" : "fad908e7-001a-0075-6c44-4e79d4000000", - "x-ms-client-request-id" : "9ccc7011-0932-4153-9593-582281e57c31", - "x-ms-file-last-write-time" : "2022-04-12T08:06:06.1710564Z" - }, - "Exception" : null - } ], - "variables" : [ "f11d0071f11d0071c2899205dfa46055f7004a4ead", "f11d0071f11d0071c289705378ce870ff056423081" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAsyncAPITestsCreateIfNotExistsSubDirectoryFilePermKey.json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAsyncAPITestsCreateIfNotExistsSubDirectoryFilePermKey.json deleted file mode 100644 index 62f13b219a803..0000000000000 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAsyncAPITestsCreateIfNotExistsSubDirectoryFilePermKey.json +++ /dev/null @@ -1,104 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.file.core.windows.net/7718722077187220eed78453503de177edf14805bf?restype=share", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "63719524-844c-4a81-b75e-4fddf539beee" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA1C5B4B535A51", - "Last-Modified" : "Tue, 12 Apr 2022 08:06:05 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "6fe5d684-f01a-0013-0d44-4e36f4000000", - "x-ms-client-request-id" : "63719524-844c-4a81-b75e-4fddf539beee", - "Date" : "Tue, 12 Apr 2022 08:06:05 GMT" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "https://REDACTED.file.core.windows.net/7718722077187220eed78453503de177edf14805bf?restype=share&comp=filepermission", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "4bca2c68-6e15-419e-9312-b1f0cc03a50d", - "Content-Type" : "application/json" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2021-04-10", - "x-ms-file-permission-key" : "8672059509846091151*16113479809698295934", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "4f5bd634-101a-0034-2c44-4e2130000000", - "x-ms-client-request-id" : "4bca2c68-6e15-419e-9312-b1f0cc03a50d", - "Date" : "Tue, 12 Apr 2022 08:06:05 GMT" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "https://REDACTED.file.core.windows.net/7718722077187220eed78453503de177edf14805bf/7718722077187220eed400152f49c89011654a90b1?restype=directory", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "6fe6a96f-e570-4b97-97cc-c79b86240dbc" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "x-ms-file-permission-key" : "13206157815093487607*16113479809698295934", - "x-ms-file-id" : "13835128424026341376", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2022-04-12T08:06:06.1390744Z", - "Last-Modified" : "Tue, 12 Apr 2022 08:06:06 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 12 Apr 2022 08:06:05 GMT", - "x-ms-file-attributes" : "Directory", - "x-ms-file-change-time" : "2022-04-12T08:06:06.1390744Z", - "x-ms-file-parent-id" : "0", - "eTag" : "0x8DA1C5B4B8BA398", - "x-ms-request-id" : "42112412-801a-006b-7244-4e950c000000", - "x-ms-client-request-id" : "6fe6a96f-e570-4b97-97cc-c79b86240dbc", - "x-ms-file-last-write-time" : "2022-04-12T08:06:06.1390744Z" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "https://REDACTED.file.core.windows.net/7718722077187220eed78453503de177edf14805bf/7718722077187220eed400152f49c89011654a90b1%2FtestCreateSubDirectory?restype=directory", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "205b1d71-9c8b-44b7-a206-8b427f18f158" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "x-ms-file-permission-key" : "4445907346579170507*16113479809698295934", - "x-ms-file-id" : "11529285414812647424", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2022-04-12T08:06:06.6901172Z", - "Last-Modified" : "Tue, 12 Apr 2022 08:06:06 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 12 Apr 2022 08:06:05 GMT", - "x-ms-file-attributes" : "Directory", - "x-ms-file-change-time" : "2022-04-12T08:06:06.6901172Z", - "x-ms-file-parent-id" : "13835128424026341376", - "eTag" : "0x8DA1C5B4BDFB8B4", - "x-ms-request-id" : "42112414-801a-006b-7344-4e950c000000", - "x-ms-client-request-id" : "205b1d71-9c8b-44b7-a206-8b427f18f158", - "x-ms-file-last-write-time" : "2022-04-12T08:06:06.6901172Z" - }, - "Exception" : null - } ], - "variables" : [ "7718722077187220eed78453503de177edf14805bf", "7718722077187220eed400152f49c89011654a90b1", "2022-04-12T08:06:06.690117200Z", "2022-04-12T08:06:06.690117200Z" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAsyncAPITestsCreateIfNotExistsSubDirectoryFilePermission.json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAsyncAPITestsCreateIfNotExistsSubDirectoryFilePermission.json deleted file mode 100644 index 548ffadc60cd4..0000000000000 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAsyncAPITestsCreateIfNotExistsSubDirectoryFilePermission.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.file.core.windows.net/0c79f1440c79f1441af91019738f82874de34aec9d?restype=share", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "be33a3c7-de64-46f8-ba54-e90c64fbd466" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA1C5B4B4D1AA8", - "Last-Modified" : "Tue, 12 Apr 2022 08:06:05 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "4211240a-801a-006b-7044-4e950c000000", - "x-ms-client-request-id" : "be33a3c7-de64-46f8-ba54-e90c64fbd466", - "Date" : "Tue, 12 Apr 2022 08:06:04 GMT" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "https://REDACTED.file.core.windows.net/0c79f1440c79f1441af91019738f82874de34aec9d/0c79f1440c79f1441af65409a98d3edcc62f4bd799?restype=directory", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "4b96b8de-4523-4ee6-89ad-ea264bb0b417" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "x-ms-file-permission-key" : "13206157815093487607*16113479809698295934", - "x-ms-file-id" : "13835128424026341376", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2022-04-12T08:06:06.0631175Z", - "Last-Modified" : "Tue, 12 Apr 2022 08:06:06 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 12 Apr 2022 08:06:05 GMT", - "x-ms-file-attributes" : "Directory", - "x-ms-file-change-time" : "2022-04-12T08:06:06.0631175Z", - "x-ms-file-parent-id" : "0", - "eTag" : "0x8DA1C5B4B800C87", - "x-ms-request-id" : "890b104d-301a-0041-1544-4e4a1c000000", - "x-ms-client-request-id" : "4b96b8de-4523-4ee6-89ad-ea264bb0b417", - "x-ms-file-last-write-time" : "2022-04-12T08:06:06.0631175Z" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "https://REDACTED.file.core.windows.net/0c79f1440c79f1441af91019738f82874de34aec9d/0c79f1440c79f1441af65409a98d3edcc62f4bd799%2FtestCreateSubDirectory?restype=directory", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "ffaea210-fd74-4f0e-a2a1-65fe92802889" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "x-ms-file-permission-key" : "4445907346579170507*16113479809698295934", - "x-ms-file-id" : "11529285414812647424", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2022-04-12T08:06:06.1690575Z", - "Last-Modified" : "Tue, 12 Apr 2022 08:06:06 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 12 Apr 2022 08:06:05 GMT", - "x-ms-file-attributes" : "Directory", - "x-ms-file-change-time" : "2022-04-12T08:06:06.1690575Z", - "x-ms-file-parent-id" : "13835128424026341376", - "eTag" : "0x8DA1C5B4B9036CF", - "x-ms-request-id" : "890b1050-301a-0041-1644-4e4a1c000000", - "x-ms-client-request-id" : "ffaea210-fd74-4f0e-a2a1-65fe92802889", - "x-ms-file-last-write-time" : "2022-04-12T08:06:06.1690575Z" - }, - "Exception" : null - } ], - "variables" : [ "0c79f1440c79f1441af91019738f82874de34aec9d", "0c79f1440c79f1441af65409a98d3edcc62f4bd799" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAsyncAPITestsCreateIfNotExistsSubDirectoryInvalidName.json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAsyncAPITestsCreateIfNotExistsSubDirectoryInvalidName.json deleted file mode 100644 index ee9b41724cff1..0000000000000 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAsyncAPITestsCreateIfNotExistsSubDirectoryInvalidName.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.file.core.windows.net/17bc235417bc2354819345970f35bee357ec4a82b5?restype=share", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "5ef5b26c-d912-42da-8dcc-bccd22ea9b23" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA1C5B4B4F0823", - "Last-Modified" : "Tue, 12 Apr 2022 08:06:05 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "fad908e1-001a-0075-6a44-4e79d4000000", - "x-ms-client-request-id" : "5ef5b26c-d912-42da-8dcc-bccd22ea9b23", - "Date" : "Tue, 12 Apr 2022 08:06:05 GMT" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "https://REDACTED.file.core.windows.net/17bc235417bc2354819345970f35bee357ec4a82b5/17bc235417bc2354819476109693ce2b75a24930a3?restype=directory", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "13339ade-074f-4570-b24c-63883e904fcd" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "x-ms-file-permission-key" : "13206157815093487607*16113479809698295934", - "x-ms-file-id" : "13835128424026341376", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2022-04-12T08:06:06.0591202Z", - "Last-Modified" : "Tue, 12 Apr 2022 08:06:06 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 12 Apr 2022 08:06:05 GMT", - "x-ms-file-attributes" : "Directory", - "x-ms-file-change-time" : "2022-04-12T08:06:06.0591202Z", - "x-ms-file-parent-id" : "0", - "eTag" : "0x8DA1C5B4B7F7062", - "x-ms-request-id" : "fad908e5-001a-0075-6b44-4e79d4000000", - "x-ms-client-request-id" : "13339ade-074f-4570-b24c-63883e904fcd", - "x-ms-file-last-write-time" : "2022-04-12T08:06:06.0591202Z" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "https://REDACTED.file.core.windows.net/17bc235417bc2354819345970f35bee357ec4a82b5/17bc235417bc2354819476109693ce2b75a24930a3%2Ftest%2Fsubdirectory?restype=directory", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "5c434c14-8c99-403b-89ca-d99245527b5e" - }, - "Response" : { - "content-length" : "224", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-error-code" : "ParentNotFound", - "retry-after" : "0", - "StatusCode" : "404", - "x-ms-request-id" : "578f55d1-901a-0083-3044-4e0c9a000000", - "Body" : "ParentNotFoundThe specified parent path does not exist.\nRequestId:578f55d1-901a-0083-3044-4e0c9a000000\nTime:2022-04-12T08:06:06.1732203Z", - "x-ms-client-request-id" : "5c434c14-8c99-403b-89ca-d99245527b5e", - "Date" : "Tue, 12 Apr 2022 08:06:05 GMT", - "Content-Type" : "application/xml" - }, - "Exception" : null - } ], - "variables" : [ "17bc235417bc2354819345970f35bee357ec4a82b5", "17bc235417bc2354819476109693ce2b75a24930a3" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAsyncAPITestsCreateIfNotExistsSubDirectoryMetadata.json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAsyncAPITestsCreateIfNotExistsSubDirectoryMetadata.json deleted file mode 100644 index f23977e711638..0000000000000 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAsyncAPITestsCreateIfNotExistsSubDirectoryMetadata.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.file.core.windows.net/1c84afe41c84afe4870036784abe908a641248ca84?restype=share", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "1b030d6e-91ea-4a9f-a27f-9ff50c4f8497" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA1C5B4B4FC870", - "Last-Modified" : "Tue, 12 Apr 2022 08:06:05 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "4f5bd631-101a-0034-2b44-4e2130000000", - "x-ms-client-request-id" : "1b030d6e-91ea-4a9f-a27f-9ff50c4f8497", - "Date" : "Tue, 12 Apr 2022 08:06:05 GMT" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "https://REDACTED.file.core.windows.net/1c84afe41c84afe4870036784abe908a641248ca84/1c84afe41c84afe48707680849ccd6f275c84e98b1?restype=directory", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "158cf5ae-ab87-4c0f-be68-806c48843b44" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "x-ms-file-permission-key" : "13206157815093487607*16113479809698295934", - "x-ms-file-id" : "13835128424026341376", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2022-04-12T08:06:06.1510675Z", - "Last-Modified" : "Tue, 12 Apr 2022 08:06:06 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 12 Apr 2022 08:06:05 GMT", - "x-ms-file-attributes" : "Directory", - "x-ms-file-change-time" : "2022-04-12T08:06:06.1510675Z", - "x-ms-file-parent-id" : "0", - "eTag" : "0x8DA1C5B4B8D7813", - "x-ms-request-id" : "6fe5d687-f01a-0013-0e44-4e36f4000000", - "x-ms-client-request-id" : "158cf5ae-ab87-4c0f-be68-806c48843b44", - "x-ms-file-last-write-time" : "2022-04-12T08:06:06.1510675Z" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "https://REDACTED.file.core.windows.net/1c84afe41c84afe4870036784abe908a641248ca84/1c84afe41c84afe48707680849ccd6f275c84e98b1%2FtestCreateSubDirectory?restype=directory", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "d42c3561-7a3e-4108-99a1-c8c14c498d95" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "x-ms-file-permission-key" : "13206157815093487607*16113479809698295934", - "x-ms-file-id" : "11529285414812647424", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2022-04-12T08:06:06.2220270Z", - "Last-Modified" : "Tue, 12 Apr 2022 08:06:06 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 12 Apr 2022 08:06:05 GMT", - "x-ms-file-attributes" : "Directory", - "x-ms-file-change-time" : "2022-04-12T08:06:06.2220270Z", - "x-ms-file-parent-id" : "13835128424026341376", - "eTag" : "0x8DA1C5B4B984BEE", - "x-ms-request-id" : "6fe5d68a-f01a-0013-0f44-4e36f4000000", - "x-ms-client-request-id" : "d42c3561-7a3e-4108-99a1-c8c14c498d95", - "x-ms-file-last-write-time" : "2022-04-12T08:06:06.2220270Z" - }, - "Exception" : null - } ], - "variables" : [ "1c84afe41c84afe4870036784abe908a641248ca84", "1c84afe41c84afe48707680849ccd6f275c84e98b1" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAsyncAPITestsCreateIfNotExistsSubDirectoryMetadataError.json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAsyncAPITestsCreateIfNotExistsSubDirectoryMetadataError.json deleted file mode 100644 index 497df134a7802..0000000000000 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAsyncAPITestsCreateIfNotExistsSubDirectoryMetadataError.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.file.core.windows.net/540b1538540b1538f4a81266d1cc53904c7b49b8b9?restype=share", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "d8651cdb-eeb2-4559-a9ca-70de0cc8e67d" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA1C5B4B4ED1B3", - "Last-Modified" : "Tue, 12 Apr 2022 08:06:05 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "578f55cd-901a-0083-2e44-4e0c9a000000", - "x-ms-client-request-id" : "d8651cdb-eeb2-4559-a9ca-70de0cc8e67d", - "Date" : "Tue, 12 Apr 2022 08:06:05 GMT" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "https://REDACTED.file.core.windows.net/540b1538540b1538f4a81266d1cc53904c7b49b8b9/540b1538540b1538f4a61479e5477a0855434eaf9b?restype=directory", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "7068f1de-9a9f-4bde-9e6b-67b24616b654" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "x-ms-file-permission-key" : "13206157815093487607*16113479809698295934", - "x-ms-file-id" : "13835128424026341376", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2022-04-12T08:06:06.0601193Z", - "Last-Modified" : "Tue, 12 Apr 2022 08:06:06 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 12 Apr 2022 08:06:05 GMT", - "x-ms-file-attributes" : "Directory", - "x-ms-file-change-time" : "2022-04-12T08:06:06.0601193Z", - "x-ms-file-parent-id" : "0", - "eTag" : "0x8DA1C5B4B7F9769", - "x-ms-request-id" : "578f55d0-901a-0083-2f44-4e0c9a000000", - "x-ms-client-request-id" : "7068f1de-9a9f-4bde-9e6b-67b24616b654", - "x-ms-file-last-write-time" : "2022-04-12T08:06:06.0601193Z" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "https://REDACTED.file.core.windows.net/540b1538540b1538f4a81266d1cc53904c7b49b8b9/540b1538540b1538f4a61479e5477a0855434eaf9b%2Ftestsubdirectory?restype=directory", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "b44deccf-66eb-4553-8afe-d6fbd4cc1df6" - }, - "Response" : { - "content-length" : "278", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-error-code" : "EmptyMetadataKey", - "retry-after" : "0", - "StatusCode" : "400", - "x-ms-request-id" : "4f5bd637-101a-0034-2d44-4e2130000000", - "Body" : "EmptyMetadataKeyThe key for one of the metadata key-value pairs is empty.\nRequestId:4f5bd637-101a-0034-2d44-4e2130000000\nTime:2022-04-12T08:06:06.1695549Zvalue", - "x-ms-client-request-id" : "b44deccf-66eb-4553-8afe-d6fbd4cc1df6", - "Date" : "Tue, 12 Apr 2022 08:06:06 GMT", - "Content-Type" : "application/xml" - }, - "Exception" : null - } ], - "variables" : [ "540b1538540b1538f4a81266d1cc53904c7b49b8b9", "540b1538540b1538f4a61479e5477a0855434eaf9b" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAsyncAPITestsCreateIfNotExistsSubdirectoryThatAlreadyExists.json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAsyncAPITestsCreateIfNotExistsSubdirectoryThatAlreadyExists.json deleted file mode 100644 index 9c1e0a4f2c43e..0000000000000 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAsyncAPITestsCreateIfNotExistsSubdirectoryThatAlreadyExists.json +++ /dev/null @@ -1,105 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.file.core.windows.net/2c675eaf2c675eaf51869274c08173e0b38a42878d?restype=share", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "c4fd32d9-a765-472c-8df4-90636a9927ff" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA1C5B4B4F53CB", - "Last-Modified" : "Tue, 12 Apr 2022 08:06:05 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "890b104a-301a-0041-1444-4e4a1c000000", - "x-ms-client-request-id" : "c4fd32d9-a765-472c-8df4-90636a9927ff", - "Date" : "Tue, 12 Apr 2022 08:06:05 GMT" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "https://REDACTED.file.core.windows.net/2c675eaf2c675eaf51869274c08173e0b38a42878d/2c675eaf12c675eaf51810277d4d326dd1a96406a8dc?restype=directory", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "13527004-4d52-46b9-be12-d3cba33bc471" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "x-ms-file-permission-key" : "13206157815093487607*16113479809698295934", - "x-ms-file-id" : "13835128424026341376", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2022-04-12T08:06:06.0591202Z", - "Last-Modified" : "Tue, 12 Apr 2022 08:06:06 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 12 Apr 2022 08:06:05 GMT", - "x-ms-file-attributes" : "Directory", - "x-ms-file-change-time" : "2022-04-12T08:06:06.0591202Z", - "x-ms-file-parent-id" : "0", - "eTag" : "0x8DA1C5B4B7F7062", - "x-ms-request-id" : "4211240f-801a-006b-7144-4e950c000000", - "x-ms-client-request-id" : "13527004-4d52-46b9-be12-d3cba33bc471", - "x-ms-file-last-write-time" : "2022-04-12T08:06:06.0591202Z" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "https://REDACTED.file.core.windows.net/2c675eaf2c675eaf51869274c08173e0b38a42878d/2c675eaf12c675eaf51810277d4d326dd1a96406a8dc%2F2c675eaf02c675eaf5183846100d01721814d42709d0?restype=directory", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "6594e796-b701-4b43-ab68-b9d443ba3248" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "x-ms-file-permission-key" : "13206157815093487607*16113479809698295934", - "x-ms-file-id" : "13835093239654252544", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2022-04-12T08:06:06.1380753Z", - "Last-Modified" : "Tue, 12 Apr 2022 08:06:06 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 12 Apr 2022 08:06:05 GMT", - "x-ms-file-attributes" : "Directory", - "x-ms-file-change-time" : "2022-04-12T08:06:06.1380753Z", - "x-ms-file-parent-id" : "13835128424026341376", - "eTag" : "0x8DA1C5B4B8B7C91", - "x-ms-request-id" : "3e2907b1-601a-0063-3c44-4e8f03000000", - "x-ms-client-request-id" : "6594e796-b701-4b43-ab68-b9d443ba3248", - "x-ms-file-last-write-time" : "2022-04-12T08:06:06.1380753Z" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "https://REDACTED.file.core.windows.net/2c675eaf2c675eaf51869274c08173e0b38a42878d/2c675eaf12c675eaf51810277d4d326dd1a96406a8dc%2F2c675eaf02c675eaf5183846100d01721814d42709d0?restype=directory", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "8763cc74-8a1e-4f70-bd95-29e7afeb9714" - }, - "Response" : { - "content-length" : "228", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-error-code" : "ResourceAlreadyExists", - "retry-after" : "0", - "StatusCode" : "409", - "x-ms-request-id" : "3e2907b3-601a-0063-3d44-4e8f03000000", - "Body" : "ResourceAlreadyExistsThe specified resource already exists.\nRequestId:3e2907b3-601a-0063-3d44-4e8f03000000\nTime:2022-04-12T08:06:06.1896009Z", - "x-ms-client-request-id" : "8763cc74-8a1e-4f70-bd95-29e7afeb9714", - "Date" : "Tue, 12 Apr 2022 08:06:05 GMT", - "Content-Type" : "application/xml" - }, - "Exception" : null - } ], - "variables" : [ "2c675eaf2c675eaf51869274c08173e0b38a42878d", "2c675eaf2c675eaf51828565abadf9b2cfb3480d80", "2c675eaf02c675eaf5183846100d01721814d42709d0", "2c675eaf12c675eaf51810277d4d326dd1a96406a8dc" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAsyncAPITestsDeleteIfExistsDirectory.json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAsyncAPITestsDeleteIfExistsDirectory.json deleted file mode 100644 index 5a80ddcae09be..0000000000000 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAsyncAPITestsDeleteIfExistsDirectory.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/1ad208c81ad208c8a4358671a9b431fffb824baeaa?restype=share", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "47c80f2b-a535-4c1c-94c8-001f3ff71dc2" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA1F8592DE12D7", - "Last-Modified" : "Sat, 16 Apr 2022 08:46:18 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "8d1aa060-901a-0015-346e-51054b000000", - "x-ms-client-request-id" : "47c80f2b-a535-4c1c-94c8-001f3ff71dc2", - "Date" : "Sat, 16 Apr 2022 08:46:17 GMT" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/1ad208c81ad208c8a4358671a9b431fffb824baeaa/1ad208c81ad208c8a43633942deafa997ca24dd3b9?restype=directory", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "e4ce249f-ef6e-46a7-8fe3-185c9d199e9f" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "x-ms-file-permission-key" : "13206157815093487607*16113479809698295934", - "x-ms-file-id" : "13835128424026341376", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2022-04-16T08:46:18.4670629Z", - "Last-Modified" : "Sat, 16 Apr 2022 08:46:18 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Sat, 16 Apr 2022 08:46:17 GMT", - "x-ms-file-attributes" : "Directory", - "x-ms-file-change-time" : "2022-04-16T08:46:18.4670629Z", - "x-ms-file-parent-id" : "0", - "eTag" : "0x8DA1F85930EADA5", - "x-ms-request-id" : "6db6825e-b01a-002d-246e-51a18b000000", - "x-ms-client-request-id" : "e4ce249f-ef6e-46a7-8fe3-185c9d199e9f", - "x-ms-file-last-write-time" : "2022-04-16T08:46:18.4670629Z" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "http://REDACTED.file.core.windows.net/1ad208c81ad208c8a4358671a9b431fffb824baeaa/1ad208c81ad208c8a43633942deafa997ca24dd3b9?restype=directory", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "2df7e343-6814-4326-ae50-e21c91475048" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "8d1aa066-901a-0015-366e-51054b000000", - "x-ms-client-request-id" : "2df7e343-6814-4326-ae50-e21c91475048", - "Date" : "Sat, 16 Apr 2022 08:46:17 GMT" - }, - "Exception" : null - } ], - "variables" : [ "1ad208c81ad208c8a4358671a9b431fffb824baeaa", "1ad208c81ad208c8a43633942deafa997ca24dd3b9" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAsyncAPITestsDeleteIfExistsDirectoryMin.json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAsyncAPITestsDeleteIfExistsDirectoryMin.json deleted file mode 100644 index b5e6853804057..0000000000000 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAsyncAPITestsDeleteIfExistsDirectoryMin.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/a68ea522a68ea522dfd02200b007f8c336194658a3?restype=share", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "f4c7fcae-8157-4ba0-9c49-0fcae29b1695" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA1F8592DE2A87", - "Last-Modified" : "Sat, 16 Apr 2022 08:46:18 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "0fe372ae-101a-000b-016e-51e993000000", - "x-ms-client-request-id" : "f4c7fcae-8157-4ba0-9c49-0fcae29b1695", - "Date" : "Sat, 16 Apr 2022 08:46:18 GMT" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/a68ea522a68ea522dfd02200b007f8c336194658a3/a68ea522a68ea522dfd560500a632186a3414f20b7?restype=directory", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "6eec3e0b-61e4-421f-9986-0907d7a63a40" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "x-ms-file-permission-key" : "13206157815093487607*16113479809698295934", - "x-ms-file-id" : "13835128424026341376", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2022-04-16T08:46:18.4660639Z", - "Last-Modified" : "Sat, 16 Apr 2022 08:46:18 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Sat, 16 Apr 2022 08:46:18 GMT", - "x-ms-file-attributes" : "Directory", - "x-ms-file-change-time" : "2022-04-16T08:46:18.4660639Z", - "x-ms-file-parent-id" : "0", - "eTag" : "0x8DA1F85930E869F", - "x-ms-request-id" : "0fe372b1-101a-000b-026e-51e993000000", - "x-ms-client-request-id" : "6eec3e0b-61e4-421f-9986-0907d7a63a40", - "x-ms-file-last-write-time" : "2022-04-16T08:46:18.4660639Z" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "http://REDACTED.file.core.windows.net/a68ea522a68ea522dfd02200b007f8c336194658a3/a68ea522a68ea522dfd560500a632186a3414f20b7?restype=directory", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "0e5e3d40-0bdf-48ad-9629-bb12001b5b6b" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "0fe372b2-101a-000b-036e-51e993000000", - "x-ms-client-request-id" : "0e5e3d40-0bdf-48ad-9629-bb12001b5b6b", - "Date" : "Sat, 16 Apr 2022 08:46:18 GMT" - }, - "Exception" : null - } ], - "variables" : [ "a68ea522a68ea522dfd02200b007f8c336194658a3", "a68ea522a68ea522dfd560500a632186a3414f20b7" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAsyncAPITestsDeleteIfExistsDirectoryThatDoesNotExist.json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAsyncAPITestsDeleteIfExistsDirectoryThatDoesNotExist.json deleted file mode 100644 index 9342a9e8f80c5..0000000000000 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAsyncAPITestsDeleteIfExistsDirectoryThatDoesNotExist.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/e6bb1bd3e6bb1bd3e5d48285a0adf1d7be904da7bf?restype=share", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "2be3ccf7-a13f-4e1b-9dd2-00b88208f2c0" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA1F8592DDE809", - "Last-Modified" : "Sat, 16 Apr 2022 08:46:18 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "6db6825a-b01a-002d-236e-51a18b000000", - "x-ms-client-request-id" : "2be3ccf7-a13f-4e1b-9dd2-00b88208f2c0", - "Date" : "Sat, 16 Apr 2022 08:46:17 GMT" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "http://REDACTED.file.core.windows.net/e6bb1bd3e6bb1bd3e5d48285a0adf1d7be904da7bf/e6bb1bd30e6bb1bd3e5d9868852a3cbb9c1d5462181d?restype=directory", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "114df261-5510-40a9-8bd4-a9b0c00970ef" - }, - "Response" : { - "content-length" : "223", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-error-code" : "ResourceNotFound", - "retry-after" : "0", - "StatusCode" : "404", - "x-ms-request-id" : "04dc4198-101a-001b-546e-512cfb000000", - "Body" : "ResourceNotFoundThe specified resource does not exist.\nRequestId:04dc4198-101a-001b-546e-512cfb000000\nTime:2022-04-16T08:46:18.4795864Z", - "x-ms-client-request-id" : "114df261-5510-40a9-8bd4-a9b0c00970ef", - "Date" : "Sat, 16 Apr 2022 08:46:17 GMT", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "http://REDACTED.file.core.windows.net/e6bb1bd3e6bb1bd3e5d48285a0adf1d7be904da7bf/e6bb1bd30e6bb1bd3e5d9868852a3cbb9c1d5462181d?restype=directory", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "537edd12-0a84-46ae-83bc-8b008bf1a64b" - }, - "Response" : { - "content-length" : "223", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "x-ms-error-code" : "ResourceNotFound", - "retry-after" : "0", - "StatusCode" : "404", - "x-ms-request-id" : "04dc419a-101a-001b-556e-512cfb000000", - "Body" : "ResourceNotFoundThe specified resource does not exist.\nRequestId:04dc419a-101a-001b-556e-512cfb000000\nTime:2022-04-16T08:46:18.7934057Z", - "x-ms-client-request-id" : "537edd12-0a84-46ae-83bc-8b008bf1a64b", - "Date" : "Sat, 16 Apr 2022 08:46:17 GMT", - "Content-Type" : "application/xml" - }, - "Exception" : null - } ], - "variables" : [ "e6bb1bd3e6bb1bd3e5d48285a0adf1d7be904da7bf", "e6bb1bd3e6bb1bd3e5d204591ca57514c7814875a7", "e6bb1bd30e6bb1bd3e5d9868852a3cbb9c1d5462181d" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAsyncAPITestsDeleteIfExistsDirectoryThatWasAlreadyDeleted.json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAsyncAPITestsDeleteIfExistsDirectoryThatWasAlreadyDeleted.json deleted file mode 100644 index f43653c8d3d54..0000000000000 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAsyncAPITestsDeleteIfExistsDirectoryThatWasAlreadyDeleted.json +++ /dev/null @@ -1,95 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/ace49f94ace49f94ea99787990d0ac38efc943bc83?restype=share", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "49c31462-4fd9-4694-bab0-721097cca584" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA1F8592D91439", - "Last-Modified" : "Sat, 16 Apr 2022 08:46:18 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "04dc4195-101a-001b-536e-512cfb000000", - "x-ms-client-request-id" : "49c31462-4fd9-4694-bab0-721097cca584", - "Date" : "Sat, 16 Apr 2022 08:46:17 GMT" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/ace49f94ace49f94ea99787990d0ac38efc943bc83/ace49f94ace49f94ea994592c2d65f77632947dc9a?restype=directory", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "52f06a4a-25c4-4c3a-a5c6-e2bf18919a32" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "x-ms-file-permission-key" : "13206157815093487607*16113479809698295934", - "x-ms-file-id" : "13835128424026341376", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2022-04-16T08:46:18.4670629Z", - "Last-Modified" : "Sat, 16 Apr 2022 08:46:18 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Sat, 16 Apr 2022 08:46:17 GMT", - "x-ms-file-attributes" : "Directory", - "x-ms-file-change-time" : "2022-04-16T08:46:18.4670629Z", - "x-ms-file-parent-id" : "0", - "eTag" : "0x8DA1F85930EADA5", - "x-ms-request-id" : "8d1aa063-901a-0015-356e-51054b000000", - "x-ms-client-request-id" : "52f06a4a-25c4-4c3a-a5c6-e2bf18919a32", - "x-ms-file-last-write-time" : "2022-04-16T08:46:18.4670629Z" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "http://REDACTED.file.core.windows.net/ace49f94ace49f94ea99787990d0ac38efc943bc83/ace49f94ace49f94ea994592c2d65f77632947dc9a?restype=directory", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "5a5a5886-4e7a-469d-935f-2b7e838532a6" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "6db68260-b01a-002d-256e-51a18b000000", - "x-ms-client-request-id" : "5a5a5886-4e7a-469d-935f-2b7e838532a6", - "Date" : "Sat, 16 Apr 2022 08:46:17 GMT" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "http://REDACTED.file.core.windows.net/ace49f94ace49f94ea99787990d0ac38efc943bc83/ace49f94ace49f94ea994592c2d65f77632947dc9a?restype=directory", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "6e806447-add2-49f4-ba60-bd22e5b5ec39" - }, - "Response" : { - "content-length" : "223", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-error-code" : "ResourceNotFound", - "retry-after" : "0", - "StatusCode" : "404", - "x-ms-request-id" : "6db68262-b01a-002d-266e-51a18b000000", - "Body" : "ResourceNotFoundThe specified resource does not exist.\nRequestId:6db68262-b01a-002d-266e-51a18b000000\nTime:2022-04-16T08:46:18.6671359Z", - "x-ms-client-request-id" : "6e806447-add2-49f4-ba60-bd22e5b5ec39", - "Date" : "Sat, 16 Apr 2022 08:46:18 GMT", - "Content-Type" : "application/xml" - }, - "Exception" : null - } ], - "variables" : [ "ace49f94ace49f94ea99787990d0ac38efc943bc83", "ace49f94ace49f94ea994592c2d65f77632947dc9a" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAsyncAPITestsDeleteIfExistsFile.json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAsyncAPITestsDeleteIfExistsFile.json deleted file mode 100644 index d5f3124622068..0000000000000 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAsyncAPITestsDeleteIfExistsFile.json +++ /dev/null @@ -1,102 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/81053a8f81053a8f41704997c1a7d1f364cf465e88?restype=share", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "dada7854-e6ff-4fb8-a97c-927351b7f99a" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA1F86151B41E8", - "Last-Modified" : "Sat, 16 Apr 2022 08:49:56 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "54bda1e2-501a-0047-356e-5179a3000000", - "x-ms-client-request-id" : "dada7854-e6ff-4fb8-a97c-927351b7f99a", - "Date" : "Sat, 16 Apr 2022 08:49:56 GMT" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/81053a8f81053a8f41704997c1a7d1f364cf465e88/81053a8f81053a8f41763739dcf49a20c65242dc95?restype=directory", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "92ebe28d-7982-4831-b89c-f2bae0e69159" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "x-ms-file-permission-key" : "13206157815093487607*16113479809698295934", - "x-ms-file-id" : "13835128424026341376", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2022-04-16T08:49:57.0007746Z", - "Last-Modified" : "Sat, 16 Apr 2022 08:49:57 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Sat, 16 Apr 2022 08:49:56 GMT", - "x-ms-file-attributes" : "Directory", - "x-ms-file-change-time" : "2022-04-16T08:49:57.0007746Z", - "x-ms-file-parent-id" : "0", - "eTag" : "0x8DA1F86155046C2", - "x-ms-request-id" : "0fe374fd-101a-000b-346e-51e993000000", - "x-ms-client-request-id" : "92ebe28d-7982-4831-b89c-f2bae0e69159", - "x-ms-file-last-write-time" : "2022-04-16T08:49:57.0007746Z" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/81053a8f81053a8f41704997c1a7d1f364cf465e88/81053a8f81053a8f41763739dcf49a20c65242dc95%2FtestCreateFile", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "53e133b4-bfb6-4278-85d9-ee9a1cac75a6" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "x-ms-file-permission-key" : "8592442312075974896*16113479809698295934", - "x-ms-file-id" : "13835093239654252544", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2022-04-16T08:49:57.2146515Z", - "Last-Modified" : "Sat, 16 Apr 2022 08:49:57 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Sat, 16 Apr 2022 08:49:56 GMT", - "x-ms-file-attributes" : "Archive", - "x-ms-file-change-time" : "2022-04-16T08:49:57.2146515Z", - "x-ms-file-parent-id" : "13835128424026341376", - "eTag" : "0x8DA1F861570E953", - "x-ms-request-id" : "8d1aa2b6-901a-0015-656e-51054b000000", - "x-ms-client-request-id" : "53e133b4-bfb6-4278-85d9-ee9a1cac75a6", - "x-ms-file-last-write-time" : "2022-04-16T08:49:57.2146515Z" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "http://REDACTED.file.core.windows.net/81053a8f81053a8f41704997c1a7d1f364cf465e88/81053a8f81053a8f41763739dcf49a20c65242dc95%2FtestCreateFile", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "76a1c166-5e99-4fb6-8682-bcde24ed4394" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "8d1aa2b9-901a-0015-676e-51054b000000", - "x-ms-client-request-id" : "76a1c166-5e99-4fb6-8682-bcde24ed4394", - "Date" : "Sat, 16 Apr 2022 08:49:56 GMT" - }, - "Exception" : null - } ], - "variables" : [ "81053a8f81053a8f41704997c1a7d1f364cf465e88", "81053a8f81053a8f41763739dcf49a20c65242dc95" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAsyncAPITestsDeleteIfExistsFileLease.json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAsyncAPITestsDeleteIfExistsFileLease.json deleted file mode 100644 index f2933dc28ad60..0000000000000 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAsyncAPITestsDeleteIfExistsFileLease.json +++ /dev/null @@ -1,124 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/af750ff6af750ff6c302392808b66fb9061e4cb680?restype=share", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "a6b31be3-1d3f-4309-bcb7-c4eace343e9c" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA1F86151B1C14", - "Last-Modified" : "Sat, 16 Apr 2022 08:49:56 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "04dc43d4-101a-001b-736e-512cfb000000", - "x-ms-client-request-id" : "a6b31be3-1d3f-4309-bcb7-c4eace343e9c", - "Date" : "Sat, 16 Apr 2022 08:49:56 GMT" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/af750ff6af750ff6c302392808b66fb9061e4cb680/af750ff6af750ff6c303472150dc3748df774693ae?restype=directory", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "014e0059-507d-43d9-bbbe-5be0b72c599e" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "x-ms-file-permission-key" : "13206157815093487607*16113479809698295934", - "x-ms-file-id" : "13835128424026341376", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2022-04-16T08:49:56.9947770Z", - "Last-Modified" : "Sat, 16 Apr 2022 08:49:56 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Sat, 16 Apr 2022 08:49:56 GMT", - "x-ms-file-attributes" : "Directory", - "x-ms-file-change-time" : "2022-04-16T08:49:56.9947770Z", - "x-ms-file-parent-id" : "0", - "eTag" : "0x8DA1F86154F5C7A", - "x-ms-request-id" : "54bda1e5-501a-0047-366e-5179a3000000", - "x-ms-client-request-id" : "014e0059-507d-43d9-bbbe-5be0b72c599e", - "x-ms-file-last-write-time" : "2022-04-16T08:49:56.9947770Z" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/af750ff6af750ff6c302392808b66fb9061e4cb680/af750ff6af750ff6c303472150dc3748df774693ae%2FtestCreateFile", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "b4210501-7a06-4262-8c2b-1f8666012354" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "x-ms-file-permission-key" : "8592442312075974896*16113479809698295934", - "x-ms-file-id" : "13835093239654252544", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2022-04-16T08:49:57.2206486Z", - "Last-Modified" : "Sat, 16 Apr 2022 08:49:57 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Sat, 16 Apr 2022 08:49:56 GMT", - "x-ms-file-attributes" : "Archive", - "x-ms-file-change-time" : "2022-04-16T08:49:57.2206486Z", - "x-ms-file-parent-id" : "13835128424026341376", - "eTag" : "0x8DA1F861571D396", - "x-ms-request-id" : "0fe374ff-101a-000b-356e-51e993000000", - "x-ms-client-request-id" : "b4210501-7a06-4262-8c2b-1f8666012354", - "x-ms-file-last-write-time" : "2022-04-16T08:49:57.2206486Z" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/af750ff6af750ff6c302392808b66fb9061e4cb680/af750ff6af750ff6c303472150dc3748df774693ae%2FtestCreateFile?comp=lease", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "924cd2e3-c4b4-448d-af97-b1367b3377c1" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-lease-id" : "c53f9b58-7570-4de7-b3c4-909772c51e7c", - "eTag" : "0x8DA1F861571D396", - "Last-Modified" : "Sat, 16 Apr 2022 08:49:57 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "54bda1ee-501a-0047-3a6e-5179a3000000", - "x-ms-client-request-id" : "924cd2e3-c4b4-448d-af97-b1367b3377c1", - "Date" : "Sat, 16 Apr 2022 08:49:57 GMT" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "http://REDACTED.file.core.windows.net/af750ff6af750ff6c302392808b66fb9061e4cb680/af750ff6af750ff6c303472150dc3748df774693ae%2FtestCreateFile", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "d3eae77d-b228-490f-8e9e-7bb4cd33b2c2" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "8d1aa2ba-901a-0015-686e-51054b000000", - "x-ms-client-request-id" : "d3eae77d-b228-490f-8e9e-7bb4cd33b2c2", - "Date" : "Sat, 16 Apr 2022 08:49:56 GMT" - }, - "Exception" : null - } ], - "variables" : [ "af750ff6af750ff6c302392808b66fb9061e4cb680", "af750ff6af750ff6c303472150dc3748df774693ae" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAsyncAPITestsDeleteIfExistsFileLeaseFail.json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAsyncAPITestsDeleteIfExistsFileLeaseFail.json deleted file mode 100644 index 11389558c9f39..0000000000000 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAsyncAPITestsDeleteIfExistsFileLeaseFail.json +++ /dev/null @@ -1,127 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/9a65b9fb9a65b9fb0e6945170dcc2a7dded8491bbb?restype=share", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "33dabe0c-faeb-4954-ae2d-00873ffe8f3f" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA1F86151AF837", - "Last-Modified" : "Sat, 16 Apr 2022 08:49:56 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "8d1aa2af-901a-0015-636e-51054b000000", - "x-ms-client-request-id" : "33dabe0c-faeb-4954-ae2d-00873ffe8f3f", - "Date" : "Sat, 16 Apr 2022 08:49:55 GMT" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/9a65b9fb9a65b9fb0e6945170dcc2a7dded8491bbb/9a65b9fb9a65b9fb0e61627286715805f0454545b8?restype=directory", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "a999f22b-8ebb-4a75-abc6-ec52915d89d2" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "x-ms-file-permission-key" : "13206157815093487607*16113479809698295934", - "x-ms-file-id" : "13835128424026341376", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2022-04-16T08:49:56.9947770Z", - "Last-Modified" : "Sat, 16 Apr 2022 08:49:56 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Sat, 16 Apr 2022 08:49:56 GMT", - "x-ms-file-attributes" : "Directory", - "x-ms-file-change-time" : "2022-04-16T08:49:56.9947770Z", - "x-ms-file-parent-id" : "0", - "eTag" : "0x8DA1F86154F5C7A", - "x-ms-request-id" : "6c1932c8-b01a-005f-3f6e-51a6c4000000", - "x-ms-client-request-id" : "a999f22b-8ebb-4a75-abc6-ec52915d89d2", - "x-ms-file-last-write-time" : "2022-04-16T08:49:56.9947770Z" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/9a65b9fb9a65b9fb0e6945170dcc2a7dded8491bbb/9a65b9fb9a65b9fb0e61627286715805f0454545b8%2FtestCreateFile", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "099fbab0-f10e-442c-8f38-4b6dddb517f0" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "x-ms-file-permission-key" : "8592442312075974896*16113479809698295934", - "x-ms-file-id" : "13835093239654252544", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2022-04-16T08:49:57.2146515Z", - "Last-Modified" : "Sat, 16 Apr 2022 08:49:57 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Sat, 16 Apr 2022 08:49:57 GMT", - "x-ms-file-attributes" : "Archive", - "x-ms-file-change-time" : "2022-04-16T08:49:57.2146515Z", - "x-ms-file-parent-id" : "13835128424026341376", - "eTag" : "0x8DA1F861570E953", - "x-ms-request-id" : "04dc43da-101a-001b-756e-512cfb000000", - "x-ms-client-request-id" : "099fbab0-f10e-442c-8f38-4b6dddb517f0", - "x-ms-file-last-write-time" : "2022-04-16T08:49:57.2146515Z" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/9a65b9fb9a65b9fb0e6945170dcc2a7dded8491bbb/9a65b9fb9a65b9fb0e61627286715805f0454545b8%2FtestCreateFile?comp=lease", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "7a039bde-bab0-4285-ada7-28eb551c831b" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-lease-id" : "73e5d049-536e-431f-a247-8dcd3ab3847a", - "eTag" : "0x8DA1F861570E953", - "Last-Modified" : "Sat, 16 Apr 2022 08:49:57 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "0fe37501-101a-000b-366e-51e993000000", - "x-ms-client-request-id" : "7a039bde-bab0-4285-ada7-28eb551c831b", - "Date" : "Sat, 16 Apr 2022 08:49:57 GMT" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "http://REDACTED.file.core.windows.net/9a65b9fb9a65b9fb0e6945170dcc2a7dded8491bbb/9a65b9fb9a65b9fb0e61627286715805f0454545b8%2FtestCreateFile", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "8209fee6-b528-43ac-88c9-fb1ed3070c75" - }, - "Response" : { - "content-length" : "264", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-error-code" : "LeaseIdMismatchWithFileOperation", - "retry-after" : "0", - "StatusCode" : "412", - "x-ms-request-id" : "0fe37503-101a-000b-376e-51e993000000", - "Body" : "LeaseIdMismatchWithFileOperationThe lease ID specified did not match the lease ID for the file.\nRequestId:0fe37503-101a-000b-376e-51e993000000\nTime:2022-04-16T08:49:57.6317045Z", - "x-ms-client-request-id" : "8209fee6-b528-43ac-88c9-fb1ed3070c75", - "Date" : "Sat, 16 Apr 2022 08:49:57 GMT", - "Content-Type" : "application/xml" - }, - "Exception" : null - } ], - "variables" : [ "9a65b9fb9a65b9fb0e6945170dcc2a7dded8491bbb", "9a65b9fb9a65b9fb0e61627286715805f0454545b8", "48581aa4-37cc-405e-bc30-fe16bb028985" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAsyncAPITestsDeleteIfExistsFileMin.json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAsyncAPITestsDeleteIfExistsFileMin.json deleted file mode 100644 index b7520413271c9..0000000000000 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAsyncAPITestsDeleteIfExistsFileMin.json +++ /dev/null @@ -1,102 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/269c2dfa269c2dfa919292818689fb7b1d2c4cf085?restype=share", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "0dea7736-f72d-4972-87c2-f196626f8b60" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA1F86151B2C69", - "Last-Modified" : "Sat, 16 Apr 2022 08:49:56 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "6c1932c5-b01a-005f-3e6e-51a6c4000000", - "x-ms-client-request-id" : "0dea7736-f72d-4972-87c2-f196626f8b60", - "Date" : "Sat, 16 Apr 2022 08:49:55 GMT" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/269c2dfa269c2dfa919292818689fb7b1d2c4cf085/269c2dfa269c2dfa919647539b38002b98e840e795?restype=directory", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "b0d10910-a57d-43c9-af8b-4a018d766552" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "x-ms-file-permission-key" : "13206157815093487607*16113479809698295934", - "x-ms-file-id" : "13835128424026341376", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2022-04-16T08:49:57.0007746Z", - "Last-Modified" : "Sat, 16 Apr 2022 08:49:57 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Sat, 16 Apr 2022 08:49:56 GMT", - "x-ms-file-attributes" : "Directory", - "x-ms-file-change-time" : "2022-04-16T08:49:57.0007746Z", - "x-ms-file-parent-id" : "0", - "eTag" : "0x8DA1F86155046C2", - "x-ms-request-id" : "8d1aa2b4-901a-0015-646e-51054b000000", - "x-ms-client-request-id" : "b0d10910-a57d-43c9-af8b-4a018d766552", - "x-ms-file-last-write-time" : "2022-04-16T08:49:57.0007746Z" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/269c2dfa269c2dfa919292818689fb7b1d2c4cf085/269c2dfa269c2dfa919647539b38002b98e840e795%2FtestCreateFile", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "e3ac0fed-f168-46ce-a765-2d98d068794b" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "x-ms-file-permission-key" : "8592442312075974896*16113479809698295934", - "x-ms-file-id" : "13835093239654252544", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2022-04-16T08:49:57.2156516Z", - "Last-Modified" : "Sat, 16 Apr 2022 08:49:57 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Sat, 16 Apr 2022 08:49:56 GMT", - "x-ms-file-attributes" : "Archive", - "x-ms-file-change-time" : "2022-04-16T08:49:57.2156516Z", - "x-ms-file-parent-id" : "13835128424026341376", - "eTag" : "0x8DA1F8615711064", - "x-ms-request-id" : "6c1932cb-b01a-005f-416e-51a6c4000000", - "x-ms-client-request-id" : "e3ac0fed-f168-46ce-a765-2d98d068794b", - "x-ms-file-last-write-time" : "2022-04-16T08:49:57.2156516Z" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "http://REDACTED.file.core.windows.net/269c2dfa269c2dfa919292818689fb7b1d2c4cf085/269c2dfa269c2dfa919647539b38002b98e840e795%2FtestCreateFile", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "d683e6bf-c95e-4f3d-907e-baa83c850040" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "04dc43dc-101a-001b-766e-512cfb000000", - "x-ms-client-request-id" : "d683e6bf-c95e-4f3d-907e-baa83c850040", - "Date" : "Sat, 16 Apr 2022 08:49:57 GMT" - }, - "Exception" : null - } ], - "variables" : [ "269c2dfa269c2dfa919292818689fb7b1d2c4cf085", "269c2dfa269c2dfa919647539b38002b98e840e795" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAsyncAPITestsDeleteIfExistsFileThatDoesNotExist.json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAsyncAPITestsDeleteIfExistsFileThatDoesNotExist.json deleted file mode 100644 index ed20ed7f38d83..0000000000000 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAsyncAPITestsDeleteIfExistsFileThatDoesNotExist.json +++ /dev/null @@ -1,99 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/630cb7cd630cb7cde4822345d957be8ca04b417f87?restype=share", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "c960f2e0-50aa-4357-83f0-908c7de532fd" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA1F86151AF209", - "Last-Modified" : "Sat, 16 Apr 2022 08:49:56 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "0fe374f8-101a-000b-336e-51e993000000", - "x-ms-client-request-id" : "c960f2e0-50aa-4357-83f0-908c7de532fd", - "Date" : "Sat, 16 Apr 2022 08:49:56 GMT" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/630cb7cd630cb7cde4822345d957be8ca04b417f87/630cb7cd1630cb7cde48176045d3b62f665e84f62b27?restype=directory", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "a94727e3-ca3a-4b75-997d-7b8c63ba8585" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "x-ms-file-permission-key" : "13206157815093487607*16113479809698295934", - "x-ms-file-id" : "13835128424026341376", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2022-04-16T08:49:57.0017733Z", - "Last-Modified" : "Sat, 16 Apr 2022 08:49:57 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Sat, 16 Apr 2022 08:49:56 GMT", - "x-ms-file-attributes" : "Directory", - "x-ms-file-change-time" : "2022-04-16T08:49:57.0017733Z", - "x-ms-file-parent-id" : "0", - "eTag" : "0x8DA1F8615506DC5", - "x-ms-request-id" : "04dc43d7-101a-001b-746e-512cfb000000", - "x-ms-client-request-id" : "a94727e3-ca3a-4b75-997d-7b8c63ba8585", - "x-ms-file-last-write-time" : "2022-04-16T08:49:57.0017733Z" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "http://REDACTED.file.core.windows.net/630cb7cd630cb7cde4822345d957be8ca04b417f87/630cb7cd1630cb7cde48176045d3b62f665e84f62b27%2F630cb7cd0630cb7cde48147225c84f849bf444011a64", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "fa30bf1b-d435-4490-9b31-78b5a844f726" - }, - "Response" : { - "content-length" : "223", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-error-code" : "ResourceNotFound", - "retry-after" : "0", - "StatusCode" : "404", - "x-ms-request-id" : "54bda1e8-501a-0047-376e-5179a3000000", - "Body" : "ResourceNotFoundThe specified resource does not exist.\nRequestId:54bda1e8-501a-0047-376e-5179a3000000\nTime:2022-04-16T08:49:57.2129885Z", - "x-ms-client-request-id" : "fa30bf1b-d435-4490-9b31-78b5a844f726", - "Date" : "Sat, 16 Apr 2022 08:49:57 GMT", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "http://REDACTED.file.core.windows.net/630cb7cd630cb7cde4822345d957be8ca04b417f87/630cb7cd1630cb7cde48176045d3b62f665e84f62b27%2F630cb7cd0630cb7cde48147225c84f849bf444011a64?restype=directory", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "1abdef36-2100-43aa-a791-1f98e3701682" - }, - "Response" : { - "content-length" : "223", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "x-ms-error-code" : "ResourceNotFound", - "retry-after" : "0", - "StatusCode" : "404", - "x-ms-request-id" : "6c1932cc-b01a-005f-426e-51a6c4000000", - "Body" : "ResourceNotFoundThe specified resource does not exist.\nRequestId:6c1932cc-b01a-005f-426e-51a6c4000000\nTime:2022-04-16T08:49:57.4193149Z", - "x-ms-client-request-id" : "1abdef36-2100-43aa-a791-1f98e3701682", - "Date" : "Sat, 16 Apr 2022 08:49:56 GMT", - "Content-Type" : "application/xml" - }, - "Exception" : null - } ], - "variables" : [ "630cb7cd630cb7cde4822345d957be8ca04b417f87", "630cb7cd630cb7cde485324017ba41a22faf46d8bf", "630cb7cd0630cb7cde48147225c84f849bf444011a64", "630cb7cd1630cb7cde48176045d3b62f665e84f62b27" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAsyncAPITestsDeleteIfExistsSubDirectory.json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAsyncAPITestsDeleteIfExistsSubDirectory.json deleted file mode 100644 index 14bfc0a33b6c9..0000000000000 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAsyncAPITestsDeleteIfExistsSubDirectory.json +++ /dev/null @@ -1,102 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/258b50fd258b50fd23e14454e9e21dca02a841ca99?restype=share", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "f5fc9a12-b424-4170-9081-13b3d6536cca" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA1F85E466F148", - "Last-Modified" : "Sat, 16 Apr 2022 08:48:34 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "0fe37411-101a-000b-6e6e-51e993000000", - "x-ms-client-request-id" : "f5fc9a12-b424-4170-9081-13b3d6536cca", - "Date" : "Sat, 16 Apr 2022 08:48:34 GMT" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/258b50fd258b50fd23e14454e9e21dca02a841ca99/258b50fd258b50fd23e50714e7ebd4b5216c4d1690?restype=directory", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "e33b8357-62a2-4c37-acd0-f1311a9a7382" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "x-ms-file-permission-key" : "13206157815093487607*16113479809698295934", - "x-ms-file-id" : "13835128424026341376", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2022-04-16T08:48:35.5251353Z", - "Last-Modified" : "Sat, 16 Apr 2022 08:48:35 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Sat, 16 Apr 2022 08:48:34 GMT", - "x-ms-file-attributes" : "Directory", - "x-ms-file-change-time" : "2022-04-16T08:48:35.5251353Z", - "x-ms-file-parent-id" : "0", - "eTag" : "0x8DA1F85E4C01499", - "x-ms-request-id" : "8d1aa1cb-901a-0015-1b6e-51054b000000", - "x-ms-client-request-id" : "e33b8357-62a2-4c37-acd0-f1311a9a7382", - "x-ms-file-last-write-time" : "2022-04-16T08:48:35.5251353Z" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/258b50fd258b50fd23e14454e9e21dca02a841ca99/258b50fd258b50fd23e50714e7ebd4b5216c4d1690%2FtestSubCreateDirectory?restype=directory", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "92a92f08-f539-4132-9873-cf4d99b84592" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "x-ms-file-permission-key" : "13206157815093487607*16113479809698295934", - "x-ms-file-id" : "13835093239654252544", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2022-04-16T08:48:35.6500640Z", - "Last-Modified" : "Sat, 16 Apr 2022 08:48:35 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Sat, 16 Apr 2022 08:48:35 GMT", - "x-ms-file-attributes" : "Directory", - "x-ms-file-change-time" : "2022-04-16T08:48:35.6500640Z", - "x-ms-file-parent-id" : "13835128424026341376", - "eTag" : "0x8DA1F85E4D324A0", - "x-ms-request-id" : "0fe37417-101a-000b-716e-51e993000000", - "x-ms-client-request-id" : "92a92f08-f539-4132-9873-cf4d99b84592", - "x-ms-file-last-write-time" : "2022-04-16T08:48:35.6500640Z" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "http://REDACTED.file.core.windows.net/258b50fd258b50fd23e14454e9e21dca02a841ca99/258b50fd258b50fd23e50714e7ebd4b5216c4d1690%2FtestSubCreateDirectory?restype=directory", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "2f7a3e31-07c3-4803-bd2e-87a25c6e79fe" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "04dc4307-101a-001b-3f6e-512cfb000000", - "x-ms-client-request-id" : "2f7a3e31-07c3-4803-bd2e-87a25c6e79fe", - "Date" : "Sat, 16 Apr 2022 08:48:34 GMT" - }, - "Exception" : null - } ], - "variables" : [ "258b50fd258b50fd23e14454e9e21dca02a841ca99", "258b50fd258b50fd23e50714e7ebd4b5216c4d1690" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAsyncAPITestsDeleteIfExistsSubDirectoryMin.json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAsyncAPITestsDeleteIfExistsSubDirectoryMin.json deleted file mode 100644 index fed7e1efadba3..0000000000000 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAsyncAPITestsDeleteIfExistsSubDirectoryMin.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/e4fbbc6ae4fbbc6a342687314b32842140f04c8e9a?restype=share", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "dd3b0373-a816-4ff9-8b97-2991ae644d08" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA1F85E466FD4E", - "Last-Modified" : "Sat, 16 Apr 2022 08:48:34 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "04dc4300-101a-001b-3c6e-512cfb000000", - "x-ms-client-request-id" : "dd3b0373-a816-4ff9-8b97-2991ae644d08", - "Date" : "Sat, 16 Apr 2022 08:48:33 GMT" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/e4fbbc6ae4fbbc6a342687314b32842140f04c8e9a/e4fbbc6ae4fbbc6a34242537c62bcd9c0dd04fdc9e?restype=directory", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "4d597e80-f902-4864-b3fd-172cd48df773" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "x-ms-file-permission-key" : "13206157815093487607*16113479809698295934", - "x-ms-file-id" : "13835128424026341376", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2022-04-16T08:48:35.5311319Z", - "Last-Modified" : "Sat, 16 Apr 2022 08:48:35 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Sat, 16 Apr 2022 08:48:35 GMT", - "x-ms-file-attributes" : "Directory", - "x-ms-file-change-time" : "2022-04-16T08:48:35.5311319Z", - "x-ms-file-parent-id" : "0", - "eTag" : "0x8DA1F85E4C0FED7", - "x-ms-request-id" : "0fe37414-101a-000b-6f6e-51e993000000", - "x-ms-client-request-id" : "4d597e80-f902-4864-b3fd-172cd48df773", - "x-ms-file-last-write-time" : "2022-04-16T08:48:35.5311319Z" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/e4fbbc6ae4fbbc6a342687314b32842140f04c8e9a/e4fbbc6ae4fbbc6a34242537c62bcd9c0dd04fdc9e%2FtestSubCreateDirectory?restype=directory", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "3fe1cd7d-7431-4458-9a8e-ca325b90daac" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "x-ms-file-permission-key" : "13206157815093487607*16113479809698295934", - "x-ms-file-id" : "13835093239654252544", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2022-04-16T08:48:35.6500640Z", - "Last-Modified" : "Sat, 16 Apr 2022 08:48:35 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Sat, 16 Apr 2022 08:48:34 GMT", - "x-ms-file-attributes" : "Directory", - "x-ms-file-change-time" : "2022-04-16T08:48:35.6500640Z", - "x-ms-file-parent-id" : "13835128424026341376", - "eTag" : "0x8DA1F85E4D324A0", - "x-ms-request-id" : "8d1aa1cd-901a-0015-1c6e-51054b000000", - "x-ms-client-request-id" : "3fe1cd7d-7431-4458-9a8e-ca325b90daac", - "x-ms-file-last-write-time" : "2022-04-16T08:48:35.6500640Z" - }, - "Exception" : null - } ], - "variables" : [ "e4fbbc6ae4fbbc6a342687314b32842140f04c8e9a", "e4fbbc6ae4fbbc6a34242537c62bcd9c0dd04fdc9e" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAsyncAPITestsDeleteIfExistsSubdirectoryThatDoesNotExist.json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAsyncAPITestsDeleteIfExistsSubdirectoryThatDoesNotExist.json deleted file mode 100644 index d4829e427367c..0000000000000 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/DirectoryAsyncAPITestsDeleteIfExistsSubdirectoryThatDoesNotExist.json +++ /dev/null @@ -1,99 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/3590e9883590e988804531081657247b734c43eaa7?restype=share", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "4cc1c500-8151-4916-83d9-4c20327c1e86" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA1F85E466FAE6", - "Last-Modified" : "Sat, 16 Apr 2022 08:48:34 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "8d1aa1c8-901a-0015-1a6e-51054b000000", - "x-ms-client-request-id" : "4cc1c500-8151-4916-83d9-4c20327c1e86", - "Date" : "Sat, 16 Apr 2022 08:48:34 GMT" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/3590e9883590e988804531081657247b734c43eaa7/3590e98813590e98880471405384df179bc9a49929af?restype=directory", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "dde1e279-a3bc-47a3-8d19-d85b708d8da3" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "x-ms-file-permission-key" : "13206157815093487607*16113479809698295934", - "x-ms-file-id" : "13835128424026341376", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2022-04-16T08:48:35.5251353Z", - "Last-Modified" : "Sat, 16 Apr 2022 08:48:35 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Sat, 16 Apr 2022 08:48:34 GMT", - "x-ms-file-attributes" : "Directory", - "x-ms-file-change-time" : "2022-04-16T08:48:35.5251353Z", - "x-ms-file-parent-id" : "0", - "eTag" : "0x8DA1F85E4C01499", - "x-ms-request-id" : "04dc4303-101a-001b-3d6e-512cfb000000", - "x-ms-client-request-id" : "dde1e279-a3bc-47a3-8d19-d85b708d8da3", - "x-ms-file-last-write-time" : "2022-04-16T08:48:35.5251353Z" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "http://REDACTED.file.core.windows.net/3590e9883590e988804531081657247b734c43eaa7/3590e98813590e98880471405384df179bc9a49929af%2F3590e98803590e98880459808821dcb6bc5274ed298f?restype=directory", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "732fa11b-714d-49f4-9494-4ad109f85079" - }, - "Response" : { - "content-length" : "223", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-error-code" : "ResourceNotFound", - "retry-after" : "0", - "StatusCode" : "404", - "x-ms-request-id" : "04dc4306-101a-001b-3e6e-512cfb000000", - "Body" : "ResourceNotFoundThe specified resource does not exist.\nRequestId:04dc4306-101a-001b-3e6e-512cfb000000\nTime:2022-04-16T08:48:35.6778460Z", - "x-ms-client-request-id" : "732fa11b-714d-49f4-9494-4ad109f85079", - "Date" : "Sat, 16 Apr 2022 08:48:34 GMT", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "http://REDACTED.file.core.windows.net/3590e9883590e988804531081657247b734c43eaa7/3590e98813590e98880471405384df179bc9a49929af%2F3590e98803590e98880459808821dcb6bc5274ed298f?restype=directory", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "fe950a75-c96e-4e3f-a99e-61ace29d342b" - }, - "Response" : { - "content-length" : "223", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "x-ms-error-code" : "ResourceNotFound", - "retry-after" : "0", - "StatusCode" : "404", - "x-ms-request-id" : "8d1aa1d1-901a-0015-1f6e-51054b000000", - "Body" : "ResourceNotFoundThe specified resource does not exist.\nRequestId:8d1aa1d1-901a-0015-1f6e-51054b000000\nTime:2022-04-16T08:48:35.9336381Z", - "x-ms-client-request-id" : "fe950a75-c96e-4e3f-a99e-61ace29d342b", - "Date" : "Sat, 16 Apr 2022 08:48:35 GMT", - "Content-Type" : "application/xml" - }, - "Exception" : null - } ], - "variables" : [ "3590e9883590e988804531081657247b734c43eaa7", "3590e9883590e988804019455289ff225dc94bc7b0", "3590e98803590e98880459808821dcb6bc5274ed298f", "3590e98813590e98880471405384df179bc9a49929af" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/FileAPITestsCreateChangeTime.json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/FileAPITestsCreateChangeTime.json deleted file mode 100644 index e0a26709df0fd..0000000000000 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/FileAPITestsCreateChangeTime.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/f097eab9f097eab9c225308677c81a984edb40cb95?restype=share", - "Headers" : { - "x-ms-version" : "2021-06-08", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.13; Windows 10; 10.0)", - "x-ms-client-request-id" : "d4cd35dd-616f-4d22-bfe6-f344af63d98a" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-06-08", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA249A6567F9AE", - "Last-Modified" : "Fri, 22 Apr 2022 19:57:57 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "1e7aa105-b01a-0088-5883-563fcb000000", - "x-ms-client-request-id" : "d4cd35dd-616f-4d22-bfe6-f344af63d98a", - "Date" : "Fri, 22 Apr 2022 19:57:56 GMT" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/f097eab9f097eab9c225308677c81a984edb40cb95/f097eab9f097eab9c225736192e728c3c538403fbd", - "Headers" : { - "x-ms-version" : "2021-06-08", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.13; Windows 10; 10.0)", - "x-ms-client-request-id" : "df806592-3366-489c-8ae0-2b6f8914d43c" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-06-08", - "x-ms-file-permission-key" : "8870206874218656067*15256408171089631693", - "x-ms-file-id" : "13835128424026341376", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2022-04-22T19:57:57.5487328Z", - "Last-Modified" : "Fri, 22 Apr 2022 19:57:57 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Fri, 22 Apr 2022 19:57:56 GMT", - "x-ms-file-attributes" : "Archive", - "x-ms-file-change-time" : "2022-04-22T19:57:54.6391573Z", - "x-ms-file-parent-id" : "0", - "eTag" : "0x8DA249A65A90B60", - "x-ms-request-id" : "1e7aa108-b01a-0088-5983-563fcb000000", - "x-ms-client-request-id" : "df806592-3366-489c-8ae0-2b6f8914d43c", - "x-ms-file-last-write-time" : "2022-04-22T19:57:57.5487328Z" - }, - "Exception" : null - }, { - "Method" : "HEAD", - "Uri" : "http://REDACTED.file.core.windows.net/f097eab9f097eab9c225308677c81a984edb40cb95/f097eab9f097eab9c225736192e728c3c538403fbd", - "Headers" : { - "x-ms-version" : "2021-06-08", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.13; Windows 10; 10.0)", - "x-ms-client-request-id" : "4d05015a-e320-48e6-aac6-9a75682abb7c" - }, - "Response" : { - "content-length" : "512", - "x-ms-version" : "2021-06-08", - "x-ms-lease-status" : "unlocked", - "x-ms-file-permission-key" : "8870206874218656067*15256408171089631693", - "x-ms-file-id" : "13835128424026341376", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2022-04-22T19:57:57.5487328Z", - "x-ms-lease-state" : "available", - "Last-Modified" : "Fri, 22 Apr 2022 19:57:57 GMT", - "retry-after" : "0", - "StatusCode" : "200", - "Date" : "Fri, 22 Apr 2022 19:57:56 GMT", - "x-ms-server-encrypted" : "true", - "x-ms-type" : "File", - "x-ms-file-attributes" : "Archive", - "x-ms-file-change-time" : "2022-04-22T19:57:54.6391573Z", - "x-ms-file-parent-id" : "0", - "eTag" : "0x8DA249A65A90B60", - "x-ms-request-id" : "1e7aa109-b01a-0088-5a83-563fcb000000", - "x-ms-client-request-id" : "4d05015a-e320-48e6-aac6-9a75682abb7c", - "x-ms-file-last-write-time" : "2022-04-22T19:57:57.5487328Z", - "Content-Type" : "application/octet-stream" - }, - "Exception" : null - } ], - "variables" : [ "f097eab9f097eab9c225308677c81a984edb40cb95", "f097eab9f097eab9c225736192e728c3c538403fbd", "2022-04-22T19:57:54.639157300Z" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/FileAPITestsDeleteIfExistsFile.json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/FileAPITestsDeleteIfExistsFile.json deleted file mode 100644 index e3431f25b4d09..0000000000000 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/FileAPITestsDeleteIfExistsFile.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/220772d2220772d220223647358493bd14bb4a0d97?restype=share", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "ecacf95e-8a1a-4d12-9b8a-089e5a5e8e1e" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA1F87F76E6733", - "Last-Modified" : "Sat, 16 Apr 2022 09:03:25 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "4f81dd7c-401a-0074-5170-512608000000", - "x-ms-client-request-id" : "ecacf95e-8a1a-4d12-9b8a-089e5a5e8e1e", - "Date" : "Sat, 16 Apr 2022 09:03:25 GMT" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/220772d2220772d220223647358493bd14bb4a0d97/220772d2220772d220242541aa653c5ad68a45e48a", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "0a80f7fc-baeb-4947-b9c6-4a93bae833fb" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "x-ms-file-permission-key" : "8592442312075974896*16113479809698295934", - "x-ms-file-id" : "13835128424026341376", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2022-04-16T09:03:26.2529950Z", - "Last-Modified" : "Sat, 16 Apr 2022 09:03:26 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Sat, 16 Apr 2022 09:03:26 GMT", - "x-ms-file-attributes" : "Archive", - "x-ms-file-change-time" : "2022-04-16T09:03:26.2529950Z", - "x-ms-file-parent-id" : "0", - "eTag" : "0x8DA1F87F7AA5D9E", - "x-ms-request-id" : "4fe3a069-c01a-0008-0170-5108f7000000", - "x-ms-client-request-id" : "0a80f7fc-baeb-4947-b9c6-4a93bae833fb", - "x-ms-file-last-write-time" : "2022-04-16T09:03:26.2529950Z" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "http://REDACTED.file.core.windows.net/220772d2220772d220223647358493bd14bb4a0d97/220772d2220772d220242541aa653c5ad68a45e48a", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "7caef0ad-6d6e-4eb9-8c14-ebde94c6f3d1" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "4fe3a076-c01a-0008-0270-5108f7000000", - "x-ms-client-request-id" : "7caef0ad-6d6e-4eb9-8c14-ebde94c6f3d1", - "Date" : "Sat, 16 Apr 2022 09:03:26 GMT" - }, - "Exception" : null - } ], - "variables" : [ "220772d2220772d220223647358493bd14bb4a0d97", "220772d2220772d220242541aa653c5ad68a45e48a" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/FileAPITestsDeleteIfExistsFileMin.json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/FileAPITestsDeleteIfExistsFileMin.json deleted file mode 100644 index df1d4b610c57f..0000000000000 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/FileAPITestsDeleteIfExistsFileMin.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/9456349b9456349b67198933ef6615192ba040299a?restype=share", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "ed938ae6-e877-483d-96af-f348f9a660a7" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA1F87F76AA66D", - "Last-Modified" : "Sat, 16 Apr 2022 09:03:25 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "13c27658-d01a-0066-0370-515dd8000000", - "x-ms-client-request-id" : "ed938ae6-e877-483d-96af-f348f9a660a7", - "Date" : "Sat, 16 Apr 2022 09:03:25 GMT" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/9456349b9456349b67198933ef6615192ba040299a/9456349b9456349b67104811845f5624aa6642648e", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "8cc92d16-33e2-41d9-8111-57bf419089c6" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "x-ms-file-permission-key" : "8592442312075974896*16113479809698295934", - "x-ms-file-id" : "13835128424026341376", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2022-04-16T09:03:26.2559929Z", - "Last-Modified" : "Sat, 16 Apr 2022 09:03:26 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Sat, 16 Apr 2022 09:03:25 GMT", - "x-ms-file-attributes" : "Archive", - "x-ms-file-change-time" : "2022-04-16T09:03:26.2559929Z", - "x-ms-file-parent-id" : "0", - "eTag" : "0x8DA1F87F7AAD2B9", - "x-ms-request-id" : "7d6afc55-b01a-0012-3970-516928000000", - "x-ms-client-request-id" : "8cc92d16-33e2-41d9-8111-57bf419089c6", - "x-ms-file-last-write-time" : "2022-04-16T09:03:26.2559929Z" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "http://REDACTED.file.core.windows.net/9456349b9456349b67198933ef6615192ba040299a/9456349b9456349b67104811845f5624aa6642648e", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "7c3914da-b3d5-4531-b0d0-ff885275ccb1" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "7d6afc58-b01a-0012-3a70-516928000000", - "x-ms-client-request-id" : "7c3914da-b3d5-4531-b0d0-ff885275ccb1", - "Date" : "Sat, 16 Apr 2022 09:03:25 GMT" - }, - "Exception" : null - } ], - "variables" : [ "9456349b9456349b67198933ef6615192ba040299a", "9456349b9456349b67104811845f5624aa6642648e" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/FileAPITestsDeleteIfExistsFileThatDoesNotExist.json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/FileAPITestsDeleteIfExistsFileThatDoesNotExist.json deleted file mode 100644 index 2f3cdf7f204e6..0000000000000 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/FileAPITestsDeleteIfExistsFileThatDoesNotExist.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/e8dd4c8be8dd4c8b9da52541099d6af4e1614c3cba?restype=share", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "adcce2e0-c7eb-49b9-8af5-bc6881c6a790" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA1F87F76D248A", - "Last-Modified" : "Sat, 16 Apr 2022 09:03:25 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "4fe3a066-c01a-0008-8070-5108f7000000", - "x-ms-client-request-id" : "adcce2e0-c7eb-49b9-8af5-bc6881c6a790", - "Date" : "Sat, 16 Apr 2022 09:03:25 GMT" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "http://REDACTED.file.core.windows.net/e8dd4c8be8dd4c8b9da52541099d6af4e1614c3cba/e8dd4c8b0e8dd4c8b9da194154581cf4698aa412fbdd", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "e0558389-dd93-4ffd-a6cf-4d3ab3a3ec3f" - }, - "Response" : { - "content-length" : "223", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-error-code" : "ResourceNotFound", - "retry-after" : "0", - "StatusCode" : "404", - "x-ms-request-id" : "13c27661-d01a-0066-0870-515dd8000000", - "Body" : "ResourceNotFoundThe specified resource does not exist.\nRequestId:13c27661-d01a-0066-0870-515dd8000000\nTime:2022-04-16T09:03:26.3281444Z", - "x-ms-client-request-id" : "e0558389-dd93-4ffd-a6cf-4d3ab3a3ec3f", - "Date" : "Sat, 16 Apr 2022 09:03:26 GMT", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "HEAD", - "Uri" : "http://REDACTED.file.core.windows.net/e8dd4c8be8dd4c8b9da52541099d6af4e1614c3cba/e8dd4c8b0e8dd4c8b9da194154581cf4698aa412fbdd", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "6637aab0-f4e6-4248-89af-51fade574836" - }, - "Response" : { - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "x-ms-error-code" : "ResourceNotFound", - "retry-after" : "0", - "StatusCode" : "404", - "x-ms-request-id" : "7d6afc59-b01a-0012-3b70-516928000000", - "x-ms-client-request-id" : "6637aab0-f4e6-4248-89af-51fade574836", - "Date" : "Sat, 16 Apr 2022 09:03:26 GMT" - }, - "Exception" : null - } ], - "variables" : [ "e8dd4c8be8dd4c8b9da52541099d6af4e1614c3cba", "e8dd4c8be8dd4c8b9da431393f2c319e4e3a432eb1", "e8dd4c8b0e8dd4c8b9da194154581cf4698aa412fbdd" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/FileAPITestsDeleteIfExistsFileThatWasAlreadyDeleted.json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/FileAPITestsDeleteIfExistsFileThatWasAlreadyDeleted.json deleted file mode 100644 index 936799dca9015..0000000000000 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/FileAPITestsDeleteIfExistsFileThatWasAlreadyDeleted.json +++ /dev/null @@ -1,95 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/2084b6992084b699aaa30964527cc21ee42b4d3eb8?restype=share", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "ed75405f-1b3d-43d4-b3a4-efa9452f879a" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA1F87F778ED97", - "Last-Modified" : "Sat, 16 Apr 2022 09:03:25 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "7d6afc50-b01a-0012-3870-516928000000", - "x-ms-client-request-id" : "ed75405f-1b3d-43d4-b3a4-efa9452f879a", - "Date" : "Sat, 16 Apr 2022 09:03:25 GMT" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/2084b6992084b699aaa30964527cc21ee42b4d3eb8/2084b6992084b699aaa37705f95661f6002c461cbb", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "3a7ff83c-1d05-4062-a270-5996b9709a85" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "x-ms-file-permission-key" : "8592442312075974896*16113479809698295934", - "x-ms-file-id" : "13835128424026341376", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2022-04-16T09:03:26.2499965Z", - "Last-Modified" : "Sat, 16 Apr 2022 09:03:26 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Sat, 16 Apr 2022 09:03:25 GMT", - "x-ms-file-attributes" : "Archive", - "x-ms-file-change-time" : "2022-04-16T09:03:26.2499965Z", - "x-ms-file-parent-id" : "0", - "eTag" : "0x8DA1F87F7A9E87D", - "x-ms-request-id" : "4f81dd7f-401a-0074-5270-512608000000", - "x-ms-client-request-id" : "3a7ff83c-1d05-4062-a270-5996b9709a85", - "x-ms-file-last-write-time" : "2022-04-16T09:03:26.2499965Z" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "http://REDACTED.file.core.windows.net/2084b6992084b699aaa30964527cc21ee42b4d3eb8/2084b6992084b699aaa37705f95661f6002c461cbb", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "677ba2a4-77d9-4c08-a489-ad81ac15ba5f" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "4f81dd82-401a-0074-5370-512608000000", - "x-ms-client-request-id" : "677ba2a4-77d9-4c08-a489-ad81ac15ba5f", - "Date" : "Sat, 16 Apr 2022 09:03:25 GMT" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "http://REDACTED.file.core.windows.net/2084b6992084b699aaa30964527cc21ee42b4d3eb8/2084b6992084b699aaa37705f95661f6002c461cbb", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "d3d760eb-eaae-42eb-86cb-03fe4287d374" - }, - "Response" : { - "content-length" : "223", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-error-code" : "ResourceNotFound", - "retry-after" : "0", - "StatusCode" : "404", - "x-ms-request-id" : "4f81dd83-401a-0074-5470-512608000000", - "Body" : "ResourceNotFoundThe specified resource does not exist.\nRequestId:4f81dd83-401a-0074-5470-512608000000\nTime:2022-04-16T09:03:26.5176464Z", - "x-ms-client-request-id" : "d3d760eb-eaae-42eb-86cb-03fe4287d374", - "Date" : "Sat, 16 Apr 2022 09:03:25 GMT", - "Content-Type" : "application/xml" - }, - "Exception" : null - } ], - "variables" : [ "2084b6992084b699aaa30964527cc21ee42b4d3eb8", "2084b6992084b699aaa37705f95661f6002c461cbb" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/FileAPITestsRenameContentType.json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/FileAPITestsRenameContentType.json deleted file mode 100644 index 9dc7eade402ba..0000000000000 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/FileAPITestsRenameContentType.json +++ /dev/null @@ -1,117 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.file.core.windows.net/f98482e0f98482e0c7c1349396f857a7ab2543a5a1?restype=share", - "Headers" : { - "x-ms-version" : "2021-06-08", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.13; Windows 10; 10.0)", - "x-ms-client-request-id" : "c50be472-effc-479e-a0f5-dc825462680c" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-06-08", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA23B3A52AC1BF", - "Last-Modified" : "Thu, 21 Apr 2022 16:26:10 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "9ac27333-101a-0065-059c-557486000000", - "x-ms-client-request-id" : "c50be472-effc-479e-a0f5-dc825462680c", - "Date" : "Thu, 21 Apr 2022 16:26:09 GMT" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "https://REDACTED.file.core.windows.net/f98482e0f98482e0c7c1349396f857a7ab2543a5a1/f98482e0f98482e0c7c5934286ea9a4d734e40189c", - "Headers" : { - "x-ms-version" : "2021-06-08", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.13; Windows 10; 10.0)", - "x-ms-client-request-id" : "4e3b68ed-b420-4ddb-89d0-6a52b647f1c4" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-06-08", - "x-ms-file-permission-key" : "8870206874218656067*15256408171089631693", - "x-ms-file-id" : "13835128424026341376", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2022-04-21T16:26:10.6744610Z", - "Last-Modified" : "Thu, 21 Apr 2022 16:26:10 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Thu, 21 Apr 2022 16:26:10 GMT", - "x-ms-file-attributes" : "Archive", - "x-ms-file-change-time" : "2022-04-21T16:26:10.6744610Z", - "x-ms-file-parent-id" : "0", - "eTag" : "0x8DA23B3A55C2722", - "x-ms-request-id" : "9ac27336-101a-0065-069c-557486000000", - "x-ms-client-request-id" : "4e3b68ed-b420-4ddb-89d0-6a52b647f1c4", - "x-ms-file-last-write-time" : "2022-04-21T16:26:10.6744610Z" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "https://REDACTED.file.core.windows.net/f98482e0f98482e0c7c1349396f857a7ab2543a5a1/f98482e00f98482e0c7c28149eeb79934f4354422928?comp=rename", - "Headers" : { - "x-ms-version" : "2021-06-08", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.13; Windows 10; 10.0)", - "x-ms-client-request-id" : "3f03232f-5537-4f08-8e96-894924eb156a" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-06-08", - "x-ms-file-permission-key" : "8870206874218656067*15256408171089631693", - "x-ms-file-id" : "13835128424026341376", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2022-04-21T16:26:10.6744610Z", - "Last-Modified" : "Thu, 21 Apr 2022 16:26:10 GMT", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-server-encrypted" : "true", - "Date" : "Thu, 21 Apr 2022 16:26:10 GMT", - "x-ms-file-attributes" : "Archive", - "x-ms-file-change-time" : "2022-04-21T16:26:10.9263166Z", - "x-ms-file-parent-id" : "0", - "eTag" : "0x8DA23B3A582953E", - "x-ms-request-id" : "9ac2733c-101a-0065-0a9c-557486000000", - "x-ms-client-request-id" : "3f03232f-5537-4f08-8e96-894924eb156a", - "x-ms-file-last-write-time" : "2022-04-21T16:26:10.6744610Z" - }, - "Exception" : null - }, { - "Method" : "HEAD", - "Uri" : "https://REDACTED.file.core.windows.net/f98482e0f98482e0c7c1349396f857a7ab2543a5a1/f98482e00f98482e0c7c28149eeb79934f4354422928", - "Headers" : { - "x-ms-version" : "2021-06-08", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.13; Windows 10; 10.0)", - "x-ms-client-request-id" : "2cc3077f-df20-4e68-8820-9af79a86d2e2" - }, - "Response" : { - "content-length" : "512", - "x-ms-version" : "2021-06-08", - "x-ms-lease-status" : "unlocked", - "x-ms-file-permission-key" : "8870206874218656067*15256408171089631693", - "x-ms-file-id" : "13835128424026341376", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2022-04-21T16:26:10.6744610Z", - "x-ms-lease-state" : "available", - "Last-Modified" : "Thu, 21 Apr 2022 16:26:10 GMT", - "retry-after" : "0", - "StatusCode" : "200", - "Date" : "Thu, 21 Apr 2022 16:26:10 GMT", - "x-ms-server-encrypted" : "true", - "x-ms-type" : "File", - "x-ms-file-attributes" : "Archive", - "x-ms-file-change-time" : "2022-04-21T16:26:10.9263166Z", - "x-ms-file-parent-id" : "0", - "eTag" : "0x8DA23B3A582953E", - "x-ms-request-id" : "9ac2733f-101a-0065-0d9c-557486000000", - "Body" : "", - "x-ms-client-request-id" : "2cc3077f-df20-4e68-8820-9af79a86d2e2", - "x-ms-file-last-write-time" : "2022-04-21T16:26:10.6744610Z", - "Content-Type" : "mytype" - }, - "Exception" : null - } ], - "variables" : [ "f98482e0f98482e0c7c1349396f857a7ab2543a5a1", "f98482e0f98482e0c7c5934286ea9a4d734e40189c", "f98482e00f98482e0c7c28149eeb79934f4354422928" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/FileAPITestsRenameFileSmbProperties.json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/FileAPITestsRenameFileSmbProperties.json index 76e926b7b6c30..6bc7e419e06d6 100644 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/FileAPITestsRenameFileSmbProperties.json +++ b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/FileAPITestsRenameFileSmbProperties.json @@ -1,137 +1,132 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/64fecc8664fecc86de668453007f9102d7fc4b838f?restype=share", + "Uri" : "https://REDACTED.file.preprod.core.windows.net/64fecc8664fecc864907696602b13dca13ac423fa6?restype=share", "Headers" : { - "x-ms-version" : "2021-06-08", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.13; Windows 10; 10.0)", - "x-ms-client-request-id" : "6fbb85b0-84ce-4fb4-a60b-349dee5a2171" + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-file-share/12.12.0-beta.2 (11.0.10; Windows 10; 10.0)", + "x-ms-client-request-id" : "fbcdf9d1-45f2-4702-9c0e-95a14bb8ab63" }, "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-06-08", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA24A75AFAAA71", - "Last-Modified" : "Fri, 22 Apr 2022 21:30:43 GMT", + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2021-04-10", + "eTag" : "0x8D9BF72DA543A8D", + "Last-Modified" : "Wed, 15 Dec 2021 02:30:25 GMT", "retry-after" : "0", "StatusCode" : "201", - "x-ms-request-id" : "b62f93b8-701a-002e-0290-5688d5000000", - "x-ms-client-request-id" : "6fbb85b0-84ce-4fb4-a60b-349dee5a2171", - "Date" : "Fri, 22 Apr 2022 21:30:42 GMT" + "x-ms-request-id" : "1bc0c2b7-b01a-0009-4a5b-f13c4a000000", + "x-ms-client-request-id" : "fbcdf9d1-45f2-4702-9c0e-95a14bb8ab63", + "Date" : "Wed, 15 Dec 2021 02:30:25 GMT" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/64fecc8664fecc86de668453007f9102d7fc4b838f/64fecc8664fecc86de67237185bfc75d76464e54a6", + "Uri" : "https://REDACTED.file.preprod.core.windows.net/64fecc8664fecc864907696602b13dca13ac423fa6/64fecc8664fecc8649085990c52ed17145a843129f", "Headers" : { - "x-ms-version" : "2021-06-08", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.13; Windows 10; 10.0)", - "x-ms-client-request-id" : "dd4cce75-161c-4dc6-acad-ab43cfdf9689" + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-file-share/12.12.0-beta.2 (11.0.10; Windows 10; 10.0)", + "x-ms-client-request-id" : "34ff56a3-3912-4b4e-8438-97f5bf404c9e" }, "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-06-08", - "x-ms-file-permission-key" : "8870206874218656067*15256408171089631693", + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2021-04-10", + "x-ms-file-permission-key" : "17566099191294621851*1292734777967284221", "x-ms-file-id" : "13835128424026341376", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2022-04-22T21:30:43.4416920Z", - "Last-Modified" : "Fri, 22 Apr 2022 21:30:43 GMT", + "x-ms-file-creation-time" : "2021-12-15T02:30:26.3779577Z", + "Last-Modified" : "Wed, 15 Dec 2021 02:30:26 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Fri, 22 Apr 2022 21:30:43 GMT", + "Date" : "Wed, 15 Dec 2021 02:30:25 GMT", "x-ms-file-attributes" : "Archive", - "x-ms-file-change-time" : "2022-04-22T21:30:43.4416920Z", + "x-ms-file-change-time" : "2021-12-15T02:30:26.3779577Z", "x-ms-file-parent-id" : "0", - "eTag" : "0x8DA24A75B30E918", - "x-ms-request-id" : "b62f93ca-701a-002e-0590-5688d5000000", - "x-ms-client-request-id" : "dd4cce75-161c-4dc6-acad-ab43cfdf9689", - "x-ms-file-last-write-time" : "2022-04-22T21:30:43.4416920Z" + "eTag" : "0x8D9BF72DA9178F9", + "x-ms-request-id" : "1bc0c2ba-b01a-0009-4b5b-f13c4a000000", + "x-ms-client-request-id" : "34ff56a3-3912-4b4e-8438-97f5bf404c9e", + "x-ms-file-last-write-time" : "2021-12-15T02:30:26.3779577Z" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/64fecc8664fecc86de668453007f9102d7fc4b838f?restype=share&comp=filepermission", + "Uri" : "https://REDACTED.file.preprod.core.windows.net/64fecc8664fecc864907696602b13dca13ac423fa6?restype=share&comp=filepermission", "Headers" : { - "x-ms-version" : "2021-06-08", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.13; Windows 10; 10.0)", - "x-ms-client-request-id" : "08e9cf07-e36b-4b70-9a6a-f633976a519b", + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-file-share/12.12.0-beta.2 (11.0.10; Windows 10; 10.0)", + "x-ms-client-request-id" : "ec39b608-ac1f-41fe-9bea-60f7f44da0c4", "Content-Type" : "application/json" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2021-06-08", - "x-ms-file-permission-key" : "8394264165664443452*15256408171089631693", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-version" : "2021-04-10", + "x-ms-file-permission-key" : "13130099305578420748*1292734777967284221", "retry-after" : "0", "StatusCode" : "201", - "x-ms-request-id" : "b62f93cb-701a-002e-0690-5688d5000000", - "x-ms-client-request-id" : "08e9cf07-e36b-4b70-9a6a-f633976a519b", - "Date" : "Fri, 22 Apr 2022 21:30:43 GMT" + "x-ms-request-id" : "1bc0c2bc-b01a-0009-4c5b-f13c4a000000", + "x-ms-client-request-id" : "ec39b608-ac1f-41fe-9bea-60f7f44da0c4", + "Date" : "Wed, 15 Dec 2021 02:30:25 GMT" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/64fecc8664fecc86de668453007f9102d7fc4b838f/64fecc86064fecc86de675413131422e8757c4d96855?comp=rename", + "Uri" : "https://REDACTED.file.preprod.core.windows.net/64fecc8664fecc864907696602b13dca13ac423fa6/64fecc86064fecc8649096736d759bca4f875421fb3e?comp=rename", "Headers" : { - "x-ms-version" : "2021-06-08", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.13; Windows 10; 10.0)", - "x-ms-client-request-id" : "ecc3bfed-2e12-43a5-9523-f6c9b061cfe4" + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-file-share/12.12.0-beta.2 (11.0.10; Windows 10; 10.0)", + "x-ms-client-request-id" : "c6d76206-e1dd-43c1-9911-b0c37db9c588" }, "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-06-08", - "x-ms-file-permission-key" : "8394264165664443452*15256408171089631693", + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2021-04-10", + "x-ms-file-permission-key" : "13130099305578420748*1292734777967284221", "x-ms-file-id" : "13835128424026341376", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2022-04-17T21:30:40.9085845Z", - "Last-Modified" : "Fri, 22 Apr 2022 21:30:43 GMT", + "x-ms-file-creation-time" : "2021-12-10T02:30:26.6047006Z", + "Last-Modified" : "Wed, 15 Dec 2021 02:30:26 GMT", "retry-after" : "0", "StatusCode" : "200", "x-ms-request-server-encrypted" : "true", - "Date" : "Fri, 22 Apr 2022 21:30:43 GMT", + "Date" : "Wed, 15 Dec 2021 02:30:26 GMT", "x-ms-file-attributes" : "ReadOnly | Archive", - "x-ms-file-change-time" : "2022-04-22T21:30:40.9176528Z", + "x-ms-file-change-time" : "2021-12-15T02:30:26.7729842Z", "x-ms-file-parent-id" : "0", - "eTag" : "0x8DA24A75B6F4873", - "x-ms-request-id" : "b62f93cc-701a-002e-0790-5688d5000000", - "x-ms-client-request-id" : "ecc3bfed-2e12-43a5-9523-f6c9b061cfe4", - "x-ms-file-last-write-time" : "2020-04-22T21:30:40.9176528Z" + "eTag" : "0x8D9BF72DACDBFB2", + "x-ms-request-id" : "1bc0c2bd-b01a-0009-4d5b-f13c4a000000", + "x-ms-client-request-id" : "c6d76206-e1dd-43c1-9911-b0c37db9c588", + "x-ms-file-last-write-time" : "2019-12-15T02:30:26.6236992Z" }, "Exception" : null }, { "Method" : "HEAD", - "Uri" : "http://REDACTED.file.core.windows.net/64fecc8664fecc86de668453007f9102d7fc4b838f/64fecc86064fecc86de675413131422e8757c4d96855", + "Uri" : "https://REDACTED.file.preprod.core.windows.net/64fecc8664fecc864907696602b13dca13ac423fa6/64fecc86064fecc8649096736d759bca4f875421fb3e", "Headers" : { - "x-ms-version" : "2021-06-08", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.13; Windows 10; 10.0)", - "x-ms-client-request-id" : "aaba9e94-9b3e-4ec9-9404-0924f11b9ec9" + "x-ms-version" : "2021-04-10", + "User-Agent" : "azsdk-java-azure-storage-file-share/12.12.0-beta.2 (11.0.10; Windows 10; 10.0)", + "x-ms-client-request-id" : "d6addc94-dce3-4e8d-bd5f-ecf81276b808" }, "Response" : { "content-length" : "512", - "x-ms-version" : "2021-06-08", + "x-ms-version" : "2021-04-10", "x-ms-lease-status" : "unlocked", - "x-ms-file-permission-key" : "8394264165664443452*15256408171089631693", + "x-ms-file-permission-key" : "13130099305578420748*1292734777967284221", "x-ms-file-id" : "13835128424026341376", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2022-04-17T21:30:40.9085845Z", + "x-ms-file-creation-time" : "2021-12-10T02:30:26.6047006Z", "x-ms-lease-state" : "available", - "Last-Modified" : "Fri, 22 Apr 2022 21:30:43 GMT", + "Last-Modified" : "Wed, 15 Dec 2021 02:30:26 GMT", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Fri, 22 Apr 2022 21:30:43 GMT", + "Date" : "Wed, 15 Dec 2021 02:30:26 GMT", "x-ms-server-encrypted" : "true", "x-ms-type" : "File", "x-ms-file-attributes" : "ReadOnly | Archive", - "x-ms-file-change-time" : "2022-04-22T21:30:40.9176528Z", + "x-ms-file-change-time" : "2021-12-15T02:30:26.7729842Z", "x-ms-file-parent-id" : "0", - "eTag" : "0x8DA24A75B6F4873", - "x-ms-request-id" : "b62f93ce-701a-002e-0990-5688d5000000", - "x-ms-client-request-id" : "aaba9e94-9b3e-4ec9-9404-0924f11b9ec9", - "x-ms-file-last-write-time" : "2020-04-22T21:30:40.9176528Z", + "eTag" : "0x8D9BF72DACDBFB2", + "x-ms-request-id" : "1bc0c2be-b01a-0009-4e5b-f13c4a000000", + "x-ms-client-request-id" : "d6addc94-dce3-4e8d-bd5f-ecf81276b808", + "x-ms-file-last-write-time" : "2019-12-15T02:30:26.6236992Z", "Content-Type" : "application/octet-stream" }, "Exception" : null } ], - "variables" : [ "64fecc8664fecc86de668453007f9102d7fc4b838f", "64fecc8664fecc86de67237185bfc75d76464e54a6", "2022-04-22T21:30:40.908584500Z", "2022-04-22T21:30:40.917652800Z", "2022-04-22T21:30:40.917652800Z", "64fecc86064fecc86de675413131422e8757c4d96855" ] + "variables" : [ "64fecc8664fecc864907696602b13dca13ac423fa6", "64fecc8664fecc8649085990c52ed17145a843129f", "2021-12-15T02:30:26.604700600Z", "2021-12-15T02:30:26.623699200Z", "64fecc86064fecc8649096736d759bca4f875421fb3e" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/FileAPITestsRenameHeadersIllegal.json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/FileAPITestsRenameHeadersIllegal.json deleted file mode 100644 index 1c9cb2d08eb39..0000000000000 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/FileAPITestsRenameHeadersIllegal.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.file.core.windows.net/d98fb423d98fb4239f300527ac5e48573a814ee8a2?restype=share", - "Headers" : { - "x-ms-version" : "2021-06-08", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.13; Windows 10; 10.0)", - "x-ms-client-request-id" : "b90c6590-5b56-452a-8742-85dc60f2494b" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-06-08", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA27D7EC2679A0", - "Last-Modified" : "Tue, 26 Apr 2022 22:55:55 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f9d9cd45-601a-007f-55c0-591559000000", - "x-ms-client-request-id" : "b90c6590-5b56-452a-8742-85dc60f2494b", - "Date" : "Tue, 26 Apr 2022 22:55:55 GMT" - }, - "Exception" : null - } ], - "variables" : [ "d98fb423d98fb4239f300527ac5e48573a814ee8a2", "d98fb423d98fb4239f386405bf5652227a4644dfa4" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/FileAPITestsSetHttpHeadersChangeTime.json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/FileAPITestsSetHttpHeadersChangeTime.json deleted file mode 100644 index f540330a9c37f..0000000000000 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/FileAPITestsSetHttpHeadersChangeTime.json +++ /dev/null @@ -1,116 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/21bce91121bce911c2e2998442d3723c86674b95a8?restype=share", - "Headers" : { - "x-ms-version" : "2021-06-08", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.13; Windows 10; 10.0)", - "x-ms-client-request-id" : "b9772d82-9c14-4b6f-96e7-9b051cfb06ec" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-06-08", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA249B1494A650", - "Last-Modified" : "Fri, 22 Apr 2022 20:02:51 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "b62f0d6e-701a-002e-3d83-5688d5000000", - "x-ms-client-request-id" : "b9772d82-9c14-4b6f-96e7-9b051cfb06ec", - "Date" : "Fri, 22 Apr 2022 20:02:50 GMT" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/21bce91121bce911c2e2998442d3723c86674b95a8/21bce91121bce911c2e41190725567dd222b43d1b8", - "Headers" : { - "x-ms-version" : "2021-06-08", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.13; Windows 10; 10.0)", - "x-ms-client-request-id" : "93ac7501-3ffa-4d88-b1cc-b0390b517cdb" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-06-08", - "x-ms-file-permission-key" : "8870206874218656067*15256408171089631693", - "x-ms-file-id" : "13835128424026341376", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2022-04-22T20:02:51.3794080Z", - "Last-Modified" : "Fri, 22 Apr 2022 20:02:51 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Fri, 22 Apr 2022 20:02:51 GMT", - "x-ms-file-attributes" : "Archive", - "x-ms-file-change-time" : "2022-04-22T20:02:51.3794080Z", - "x-ms-file-parent-id" : "0", - "eTag" : "0x8DA249B14CC0C20", - "x-ms-request-id" : "b62f0d74-701a-002e-3f83-5688d5000000", - "x-ms-client-request-id" : "93ac7501-3ffa-4d88-b1cc-b0390b517cdb", - "x-ms-file-last-write-time" : "2022-04-22T20:02:51.3794080Z" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/21bce91121bce911c2e2998442d3723c86674b95a8/21bce91121bce911c2e41190725567dd222b43d1b8?comp=properties", - "Headers" : { - "x-ms-version" : "2021-06-08", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.13; Windows 10; 10.0)", - "x-ms-client-request-id" : "85dd751b-f501-4092-a206-d6f199de9614" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-06-08", - "x-ms-file-permission-key" : "8870206874218656067*15256408171089631693", - "x-ms-file-id" : "13835128424026341376", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2022-04-22T20:02:51.3794080Z", - "Last-Modified" : "Fri, 22 Apr 2022 20:02:51 GMT", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-server-encrypted" : "true", - "Date" : "Fri, 22 Apr 2022 20:02:51 GMT", - "x-ms-file-attributes" : "Archive", - "x-ms-file-change-time" : "2022-04-22T20:02:49.0071090Z", - "x-ms-file-parent-id" : "0", - "eTag" : "0x8DA249B151677A6", - "x-ms-request-id" : "b62f0d76-701a-002e-4083-5688d5000000", - "x-ms-client-request-id" : "85dd751b-f501-4092-a206-d6f199de9614", - "x-ms-file-last-write-time" : "2022-04-22T20:02:51.8671270Z" - }, - "Exception" : null - }, { - "Method" : "HEAD", - "Uri" : "http://REDACTED.file.core.windows.net/21bce91121bce911c2e2998442d3723c86674b95a8/21bce91121bce911c2e41190725567dd222b43d1b8", - "Headers" : { - "x-ms-version" : "2021-06-08", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.13; Windows 10; 10.0)", - "x-ms-client-request-id" : "fca6caaa-4f11-43ee-90a2-8bc8bda69d7a" - }, - "Response" : { - "content-length" : "512", - "x-ms-version" : "2021-06-08", - "x-ms-lease-status" : "unlocked", - "x-ms-file-permission-key" : "8870206874218656067*15256408171089631693", - "x-ms-file-id" : "13835128424026341376", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2022-04-22T20:02:51.3794080Z", - "x-ms-lease-state" : "available", - "Last-Modified" : "Fri, 22 Apr 2022 20:02:51 GMT", - "retry-after" : "0", - "StatusCode" : "200", - "Date" : "Fri, 22 Apr 2022 20:02:51 GMT", - "x-ms-server-encrypted" : "true", - "x-ms-type" : "File", - "x-ms-file-attributes" : "Archive", - "x-ms-file-change-time" : "2022-04-22T20:02:49.0071090Z", - "x-ms-file-parent-id" : "0", - "eTag" : "0x8DA249B151677A6", - "x-ms-request-id" : "b62f0d78-701a-002e-4283-5688d5000000", - "x-ms-client-request-id" : "fca6caaa-4f11-43ee-90a2-8bc8bda69d7a", - "x-ms-file-last-write-time" : "2022-04-22T20:02:51.8671270Z", - "Content-Type" : "application/octet-stream" - }, - "Exception" : null - } ], - "variables" : [ "21bce91121bce911c2e2998442d3723c86674b95a8", "21bce91121bce911c2e41190725567dd222b43d1b8", "2022-04-22T20:02:49.007109Z" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/FileAPITestsUploadRangeFromUrlPreserveFileLastWrittenOn[0].json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/FileAPITestsUploadRangeFromUrlPreserveFileLastWrittenOn[0].json deleted file mode 100644 index 9c61732ae9dcf..0000000000000 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/FileAPITestsUploadRangeFromUrlPreserveFileLastWrittenOn[0].json +++ /dev/null @@ -1,198 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/77a7a7b477a7a7b4f21457676498344e34f547e499?restype=share", - "Headers" : { - "x-ms-version" : "2021-06-08", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.13; Windows 10; 10.0)", - "x-ms-client-request-id" : "a2280202-ee19-467e-aec0-5344c43c6c22" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-06-08", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA23B0B43EEAB9", - "Last-Modified" : "Thu, 21 Apr 2022 16:05:07 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "3443692a-a01a-004f-5c99-55ab96000000", - "x-ms-client-request-id" : "a2280202-ee19-467e-aec0-5344c43c6c22", - "Date" : "Thu, 21 Apr 2022 16:05:06 GMT" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/77a7a7b477a7a7b4f21457676498344e34f547e499/77a7a7b477a7a7b4f21103968255d5b8c5d34f4585", - "Headers" : { - "x-ms-version" : "2021-06-08", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.13; Windows 10; 10.0)", - "x-ms-client-request-id" : "ab2d4fdf-729c-48c7-9ff1-1d886fd02f52" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-06-08", - "x-ms-file-permission-key" : "8870206874218656067*15256408171089631693", - "x-ms-file-id" : "13835128424026341376", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2022-04-21T16:05:07.5590914Z", - "Last-Modified" : "Thu, 21 Apr 2022 16:05:07 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Thu, 21 Apr 2022 16:05:07 GMT", - "x-ms-file-attributes" : "Archive", - "x-ms-file-change-time" : "2022-04-21T16:05:07.5590914Z", - "x-ms-file-parent-id" : "0", - "eTag" : "0x8DA23B0B47C0B02", - "x-ms-request-id" : "3443692d-a01a-004f-5d99-55ab96000000", - "x-ms-client-request-id" : "ab2d4fdf-729c-48c7-9ff1-1d886fd02f52", - "x-ms-file-last-write-time" : "2022-04-21T16:05:07.5590914Z" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/77a7a7b477a7a7b4f21457676498344e34f547e499/77a7a7b4077a7a7b4f21172558e04cf5836ae40f291a", - "Headers" : { - "x-ms-version" : "2021-06-08", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.13; Windows 10; 10.0)", - "x-ms-client-request-id" : "de389b70-3dbd-4cdc-bd30-a16f2b4053cd" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-06-08", - "x-ms-file-permission-key" : "8870206874218656067*15256408171089631693", - "x-ms-file-id" : "11529285414812647424", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2022-04-21T16:05:07.7529802Z", - "Last-Modified" : "Thu, 21 Apr 2022 16:05:07 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Thu, 21 Apr 2022 16:05:07 GMT", - "x-ms-file-attributes" : "Archive", - "x-ms-file-change-time" : "2022-04-21T16:05:07.7529802Z", - "x-ms-file-parent-id" : "0", - "eTag" : "0x8DA23B0B499A0CA", - "x-ms-request-id" : "34436930-a01a-004f-5e99-55ab96000000", - "x-ms-client-request-id" : "de389b70-3dbd-4cdc-bd30-a16f2b4053cd", - "x-ms-file-last-write-time" : "2022-04-21T16:05:07.7529802Z" - }, - "Exception" : null - }, { - "Method" : "HEAD", - "Uri" : "http://REDACTED.file.core.windows.net/77a7a7b477a7a7b4f21457676498344e34f547e499/77a7a7b4077a7a7b4f21172558e04cf5836ae40f291a", - "Headers" : { - "x-ms-version" : "2021-06-08", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.13; Windows 10; 10.0)", - "x-ms-client-request-id" : "16713dc2-000d-4a33-affd-7d1f64574522" - }, - "Response" : { - "content-length" : "1024", - "x-ms-version" : "2021-06-08", - "x-ms-lease-status" : "unlocked", - "x-ms-file-permission-key" : "8870206874218656067*15256408171089631693", - "x-ms-file-id" : "11529285414812647424", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2022-04-21T16:05:07.7529802Z", - "x-ms-lease-state" : "available", - "Last-Modified" : "Thu, 21 Apr 2022 16:05:07 GMT", - "retry-after" : "0", - "StatusCode" : "200", - "Date" : "Thu, 21 Apr 2022 16:05:07 GMT", - "x-ms-server-encrypted" : "true", - "x-ms-type" : "File", - "x-ms-file-attributes" : "Archive", - "x-ms-file-change-time" : "2022-04-21T16:05:07.7529802Z", - "x-ms-file-parent-id" : "0", - "eTag" : "0x8DA23B0B499A0CA", - "x-ms-request-id" : "34436931-a01a-004f-5f99-55ab96000000", - "x-ms-client-request-id" : "16713dc2-000d-4a33-affd-7d1f64574522", - "x-ms-file-last-write-time" : "2022-04-21T16:05:07.7529802Z", - "Content-Type" : "application/octet-stream" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/77a7a7b477a7a7b4f21457676498344e34f547e499/77a7a7b477a7a7b4f21103968255d5b8c5d34f4585?comp=range", - "Headers" : { - "x-ms-version" : "2021-06-08", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.13; Windows 10; 10.0)", - "x-ms-client-request-id" : "b36bd557-47d2-4ae1-997e-377d470b8488", - "Content-Type" : "application/octet-stream" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-06-08", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "Last-Modified" : "Thu, 21 Apr 2022 16:05:08 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Thu, 21 Apr 2022 16:05:08 GMT", - "Content-MD5" : "e0EvXyJZ+/kVjlaihE17Bg==", - "eTag" : "0x8DA23B0B4E1E9CE", - "x-ms-request-id" : "161a57c7-301a-0086-2799-55167b000000", - "x-ms-client-request-id" : "b36bd557-47d2-4ae1-997e-377d470b8488", - "x-ms-file-last-write-time" : "2022-04-21T16:05:08.2267086Z" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/77a7a7b477a7a7b4f21457676498344e34f547e499/77a7a7b4077a7a7b4f21172558e04cf5836ae40f291a?comp=range", - "Headers" : { - "x-ms-version" : "2021-06-08", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.13; Windows 10; 10.0)", - "x-ms-client-request-id" : "51d3f818-730a-4190-af28-bae2c6615ba1" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-06-08", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-content-crc64" : "SYI3baH7jDE=", - "Last-Modified" : "Thu, 21 Apr 2022 16:05:09 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Thu, 21 Apr 2022 16:05:08 GMT", - "eTag" : "0x8DA23B0B5684429", - "x-ms-request-id" : "161a57c9-301a-0086-2899-55167b000000", - "x-ms-client-request-id" : "51d3f818-730a-4190-af28-bae2c6615ba1", - "x-ms-file-last-write-time" : "2022-04-21T16:05:09.1072041Z" - }, - "Exception" : null - }, { - "Method" : "HEAD", - "Uri" : "http://REDACTED.file.core.windows.net/77a7a7b477a7a7b4f21457676498344e34f547e499/77a7a7b4077a7a7b4f21172558e04cf5836ae40f291a", - "Headers" : { - "x-ms-version" : "2021-06-08", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.13; Windows 10; 10.0)", - "x-ms-client-request-id" : "c3c4f967-40d2-4019-802a-7c9de7732b23" - }, - "Response" : { - "content-length" : "1024", - "x-ms-version" : "2021-06-08", - "x-ms-lease-status" : "unlocked", - "x-ms-file-permission-key" : "8870206874218656067*15256408171089631693", - "x-ms-file-id" : "11529285414812647424", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2022-04-21T16:05:07.7529802Z", - "x-ms-lease-state" : "available", - "Last-Modified" : "Thu, 21 Apr 2022 16:05:09 GMT", - "retry-after" : "0", - "StatusCode" : "200", - "Date" : "Thu, 21 Apr 2022 16:05:09 GMT", - "x-ms-server-encrypted" : "true", - "x-ms-type" : "File", - "x-ms-file-attributes" : "Archive", - "x-ms-file-change-time" : "2022-04-21T16:05:09.1072041Z", - "x-ms-file-parent-id" : "0", - "eTag" : "0x8DA23B0B5684429", - "x-ms-request-id" : "161a57cb-301a-0086-2a99-55167b000000", - "x-ms-client-request-id" : "c3c4f967-40d2-4019-802a-7c9de7732b23", - "x-ms-file-last-write-time" : "2022-04-21T16:05:09.1072041Z", - "Content-Type" : "application/octet-stream" - }, - "Exception" : null - } ], - "variables" : [ "77a7a7b477a7a7b4f21457676498344e34f547e499", "77a7a7b477a7a7b4f21103968255d5b8c5d34f4585", "77a7a7b4077a7a7b4f21172558e04cf5836ae40f291a", "2022-04-21T16:05:07.347904Z" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/FileAPITestsUploadRangeFromUrlPreserveFileLastWrittenOn[1].json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/FileAPITestsUploadRangeFromUrlPreserveFileLastWrittenOn[1].json deleted file mode 100644 index 53bcb0337b396..0000000000000 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/FileAPITestsUploadRangeFromUrlPreserveFileLastWrittenOn[1].json +++ /dev/null @@ -1,198 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/6ebc96f56ebc96f52c99391982fa008b9fd8487685?restype=share", - "Headers" : { - "x-ms-version" : "2021-06-08", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.13; Windows 10; 10.0)", - "x-ms-client-request-id" : "bf3b78b5-f780-4190-aaf6-162b79f29758" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-06-08", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA23B0B43FBC8B", - "Last-Modified" : "Thu, 21 Apr 2022 16:05:07 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "161a57be-301a-0086-2399-55167b000000", - "x-ms-client-request-id" : "bf3b78b5-f780-4190-aaf6-162b79f29758", - "Date" : "Thu, 21 Apr 2022 16:05:07 GMT" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/6ebc96f56ebc96f52c99391982fa008b9fd8487685/6ebc96f56ebc96f52c9242205d2cf7ac34044ffa9c", - "Headers" : { - "x-ms-version" : "2021-06-08", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.13; Windows 10; 10.0)", - "x-ms-client-request-id" : "22b55370-d94d-4362-a171-390d11827b52" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-06-08", - "x-ms-file-permission-key" : "8870206874218656067*15256408171089631693", - "x-ms-file-id" : "13835128424026341376", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2022-04-21T16:05:07.5530945Z", - "Last-Modified" : "Thu, 21 Apr 2022 16:05:07 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Thu, 21 Apr 2022 16:05:07 GMT", - "x-ms-file-attributes" : "Archive", - "x-ms-file-change-time" : "2022-04-21T16:05:07.5530945Z", - "x-ms-file-parent-id" : "0", - "eTag" : "0x8DA23B0B47B20C1", - "x-ms-request-id" : "161a57c1-301a-0086-2499-55167b000000", - "x-ms-client-request-id" : "22b55370-d94d-4362-a171-390d11827b52", - "x-ms-file-last-write-time" : "2022-04-21T16:05:07.5530945Z" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/6ebc96f56ebc96f52c99391982fa008b9fd8487685/6ebc96f506ebc96f52c99141820b331ab9ca04708aa4", - "Headers" : { - "x-ms-version" : "2021-06-08", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.13; Windows 10; 10.0)", - "x-ms-client-request-id" : "36531f83-0696-4e5f-914f-e3ede718dd59" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-06-08", - "x-ms-file-permission-key" : "8870206874218656067*15256408171089631693", - "x-ms-file-id" : "11529285414812647424", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2022-04-21T16:05:07.7529802Z", - "Last-Modified" : "Thu, 21 Apr 2022 16:05:07 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Thu, 21 Apr 2022 16:05:07 GMT", - "x-ms-file-attributes" : "Archive", - "x-ms-file-change-time" : "2022-04-21T16:05:07.7529802Z", - "x-ms-file-parent-id" : "0", - "eTag" : "0x8DA23B0B499A0CA", - "x-ms-request-id" : "161a57c5-301a-0086-2599-55167b000000", - "x-ms-client-request-id" : "36531f83-0696-4e5f-914f-e3ede718dd59", - "x-ms-file-last-write-time" : "2022-04-21T16:05:07.7529802Z" - }, - "Exception" : null - }, { - "Method" : "HEAD", - "Uri" : "http://REDACTED.file.core.windows.net/6ebc96f56ebc96f52c99391982fa008b9fd8487685/6ebc96f506ebc96f52c99141820b331ab9ca04708aa4", - "Headers" : { - "x-ms-version" : "2021-06-08", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.13; Windows 10; 10.0)", - "x-ms-client-request-id" : "bb10d503-436e-4474-929c-d6c4e5fd7be1" - }, - "Response" : { - "content-length" : "1024", - "x-ms-version" : "2021-06-08", - "x-ms-lease-status" : "unlocked", - "x-ms-file-permission-key" : "8870206874218656067*15256408171089631693", - "x-ms-file-id" : "11529285414812647424", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2022-04-21T16:05:07.7529802Z", - "x-ms-lease-state" : "available", - "Last-Modified" : "Thu, 21 Apr 2022 16:05:07 GMT", - "retry-after" : "0", - "StatusCode" : "200", - "Date" : "Thu, 21 Apr 2022 16:05:07 GMT", - "x-ms-server-encrypted" : "true", - "x-ms-type" : "File", - "x-ms-file-attributes" : "Archive", - "x-ms-file-change-time" : "2022-04-21T16:05:07.7529802Z", - "x-ms-file-parent-id" : "0", - "eTag" : "0x8DA23B0B499A0CA", - "x-ms-request-id" : "161a57c6-301a-0086-2699-55167b000000", - "x-ms-client-request-id" : "bb10d503-436e-4474-929c-d6c4e5fd7be1", - "x-ms-file-last-write-time" : "2022-04-21T16:05:07.7529802Z", - "Content-Type" : "application/octet-stream" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/6ebc96f56ebc96f52c99391982fa008b9fd8487685/6ebc96f56ebc96f52c9242205d2cf7ac34044ffa9c?comp=range", - "Headers" : { - "x-ms-version" : "2021-06-08", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.13; Windows 10; 10.0)", - "x-ms-client-request-id" : "2031d201-7705-46b0-9663-52f4ae2fd8a8", - "Content-Type" : "application/octet-stream" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-06-08", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "Last-Modified" : "Thu, 21 Apr 2022 16:05:08 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Thu, 21 Apr 2022 16:05:07 GMT", - "Content-MD5" : "29YxzVjZs/noaw1oCQ4e6A==", - "eTag" : "0x8DA23B0B4E1C2C8", - "x-ms-request-id" : "34436932-a01a-004f-6099-55ab96000000", - "x-ms-client-request-id" : "2031d201-7705-46b0-9663-52f4ae2fd8a8", - "x-ms-file-last-write-time" : "2022-04-21T16:05:08.2257096Z" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/6ebc96f56ebc96f52c99391982fa008b9fd8487685/6ebc96f506ebc96f52c99141820b331ab9ca04708aa4?comp=range", - "Headers" : { - "x-ms-version" : "2021-06-08", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.13; Windows 10; 10.0)", - "x-ms-client-request-id" : "9abb122d-e2c1-4af8-8bab-cf5d183aea76" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-06-08", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-content-crc64" : "/S/rMGkKaNM=", - "Last-Modified" : "Thu, 21 Apr 2022 16:05:09 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Thu, 21 Apr 2022 16:05:09 GMT", - "eTag" : "0x8DA23B0B5C46067", - "x-ms-request-id" : "34436934-a01a-004f-6199-55ab96000000", - "x-ms-client-request-id" : "9abb122d-e2c1-4af8-8bab-cf5d183aea76", - "x-ms-file-last-write-time" : "2022-04-21T16:05:07.7529802Z" - }, - "Exception" : null - }, { - "Method" : "HEAD", - "Uri" : "http://REDACTED.file.core.windows.net/6ebc96f56ebc96f52c99391982fa008b9fd8487685/6ebc96f506ebc96f52c99141820b331ab9ca04708aa4", - "Headers" : { - "x-ms-version" : "2021-06-08", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.13; Windows 10; 10.0)", - "x-ms-client-request-id" : "be469844-7916-4f57-abaa-a24ab4b6e14e" - }, - "Response" : { - "content-length" : "1024", - "x-ms-version" : "2021-06-08", - "x-ms-lease-status" : "unlocked", - "x-ms-file-permission-key" : "8870206874218656067*15256408171089631693", - "x-ms-file-id" : "11529285414812647424", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2022-04-21T16:05:07.7529802Z", - "x-ms-lease-state" : "available", - "Last-Modified" : "Thu, 21 Apr 2022 16:05:09 GMT", - "retry-after" : "0", - "StatusCode" : "200", - "Date" : "Thu, 21 Apr 2022 16:05:09 GMT", - "x-ms-server-encrypted" : "true", - "x-ms-type" : "File", - "x-ms-file-attributes" : "Archive", - "x-ms-file-change-time" : "2022-04-21T16:05:09.7108583Z", - "x-ms-file-parent-id" : "0", - "eTag" : "0x8DA23B0B5C46067", - "x-ms-request-id" : "34436936-a01a-004f-6399-55ab96000000", - "x-ms-client-request-id" : "be469844-7916-4f57-abaa-a24ab4b6e14e", - "x-ms-file-last-write-time" : "2022-04-21T16:05:07.7529802Z", - "Content-Type" : "application/octet-stream" - }, - "Exception" : null - } ], - "variables" : [ "6ebc96f56ebc96f52c99391982fa008b9fd8487685", "6ebc96f56ebc96f52c9242205d2cf7ac34044ffa9c", "6ebc96f506ebc96f52c99141820b331ab9ca04708aa4", "2022-04-21T16:05:07.347904Z" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/FileAPITestsUploadRangePreserveFileLastWrittenOn[0].json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/FileAPITestsUploadRangePreserveFileLastWrittenOn[0].json deleted file mode 100644 index 456018411d17f..0000000000000 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/FileAPITestsUploadRangePreserveFileLastWrittenOn[0].json +++ /dev/null @@ -1,145 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.file.core.windows.net/dfc43dfadfc43dfa8d7728201a3fb69074164585ae?restype=share", - "Headers" : { - "x-ms-version" : "2021-06-08", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.13; Windows 10; 10.0)", - "x-ms-client-request-id" : "5f3872cc-6acc-4b69-90b6-540eb97c885b" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-06-08", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA23D2B3D85862", - "Last-Modified" : "Thu, 21 Apr 2022 20:08:29 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "d5074927-b01a-0098-76bb-55faa3000000", - "x-ms-client-request-id" : "5f3872cc-6acc-4b69-90b6-540eb97c885b", - "Date" : "Thu, 21 Apr 2022 20:08:29 GMT" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "https://REDACTED.file.core.windows.net/dfc43dfadfc43dfa8d7728201a3fb69074164585ae/dfc43dfadfc43dfa8d76586096bd49b126b648e380", - "Headers" : { - "x-ms-version" : "2021-06-08", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.13; Windows 10; 10.0)", - "x-ms-client-request-id" : "fdeb9115-8d43-4847-a124-96d2a3c25f76" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-06-08", - "x-ms-file-permission-key" : "8870206874218656067*15256408171089631693", - "x-ms-file-id" : "13835128424026341376", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2022-04-21T20:08:29.6191622Z", - "Last-Modified" : "Thu, 21 Apr 2022 20:08:29 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Thu, 21 Apr 2022 20:08:29 GMT", - "x-ms-file-attributes" : "Archive", - "x-ms-file-change-time" : "2022-04-21T20:08:29.6191622Z", - "x-ms-file-parent-id" : "0", - "eTag" : "0x8DA23D2B3FD9686", - "x-ms-request-id" : "ef58f8f5-a01a-0012-41bb-55a112000000", - "x-ms-client-request-id" : "fdeb9115-8d43-4847-a124-96d2a3c25f76", - "x-ms-file-last-write-time" : "2022-04-21T20:08:29.6191622Z" - }, - "Exception" : null - }, { - "Method" : "HEAD", - "Uri" : "https://REDACTED.file.core.windows.net/dfc43dfadfc43dfa8d7728201a3fb69074164585ae/dfc43dfadfc43dfa8d76586096bd49b126b648e380", - "Headers" : { - "x-ms-version" : "2021-06-08", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.13; Windows 10; 10.0)", - "x-ms-client-request-id" : "3ed460f9-3a51-44c2-81f0-a02e7550ee5d" - }, - "Response" : { - "content-length" : "1024", - "x-ms-version" : "2021-06-08", - "x-ms-lease-status" : "unlocked", - "x-ms-file-permission-key" : "8870206874218656067*15256408171089631693", - "x-ms-file-id" : "13835128424026341376", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2022-04-21T20:08:29.6191622Z", - "x-ms-lease-state" : "available", - "Last-Modified" : "Thu, 21 Apr 2022 20:08:29 GMT", - "retry-after" : "0", - "StatusCode" : "200", - "Date" : "Thu, 21 Apr 2022 20:08:29 GMT", - "x-ms-server-encrypted" : "true", - "x-ms-type" : "File", - "x-ms-file-attributes" : "Archive", - "x-ms-file-change-time" : "2022-04-21T20:08:29.6191622Z", - "x-ms-file-parent-id" : "0", - "eTag" : "0x8DA23D2B3FD9686", - "x-ms-request-id" : "ef58f8f7-a01a-0012-42bb-55a112000000", - "x-ms-client-request-id" : "3ed460f9-3a51-44c2-81f0-a02e7550ee5d", - "x-ms-file-last-write-time" : "2022-04-21T20:08:29.6191622Z", - "Content-Type" : "application/octet-stream" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "https://REDACTED.file.core.windows.net/dfc43dfadfc43dfa8d7728201a3fb69074164585ae/dfc43dfadfc43dfa8d76586096bd49b126b648e380?comp=range", - "Headers" : { - "x-ms-version" : "2021-06-08", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.13; Windows 10; 10.0)", - "x-ms-client-request-id" : "32b38418-9748-4f2d-abf3-31471ec38d73", - "Content-Type" : "application/octet-stream" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-06-08", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "Last-Modified" : "Thu, 21 Apr 2022 20:08:30 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Thu, 21 Apr 2022 20:08:29 GMT", - "Content-MD5" : "nbRcEvPFHxAA7AzyV4Mscw==", - "eTag" : "0x8DA23D2B4478D05", - "x-ms-request-id" : "d5074930-b01a-0098-7cbb-55faa3000000", - "x-ms-client-request-id" : "32b38418-9748-4f2d-abf3-31471ec38d73", - "x-ms-file-last-write-time" : "2022-04-21T20:08:30.1038853Z" - }, - "Exception" : null - }, { - "Method" : "HEAD", - "Uri" : "https://REDACTED.file.core.windows.net/dfc43dfadfc43dfa8d7728201a3fb69074164585ae/dfc43dfadfc43dfa8d76586096bd49b126b648e380", - "Headers" : { - "x-ms-version" : "2021-06-08", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.13; Windows 10; 10.0)", - "x-ms-client-request-id" : "a3b8ad33-7ba2-458c-84f4-922d0d88bd81" - }, - "Response" : { - "content-length" : "1024", - "x-ms-version" : "2021-06-08", - "x-ms-lease-status" : "unlocked", - "x-ms-file-permission-key" : "8870206874218656067*15256408171089631693", - "x-ms-file-id" : "13835128424026341376", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2022-04-21T20:08:29.6191622Z", - "x-ms-lease-state" : "available", - "Last-Modified" : "Thu, 21 Apr 2022 20:08:30 GMT", - "retry-after" : "0", - "StatusCode" : "200", - "Date" : "Thu, 21 Apr 2022 20:08:29 GMT", - "x-ms-server-encrypted" : "true", - "x-ms-type" : "File", - "x-ms-file-attributes" : "Archive", - "x-ms-file-change-time" : "2022-04-21T20:08:30.1038853Z", - "x-ms-file-parent-id" : "0", - "eTag" : "0x8DA23D2B4478D05", - "x-ms-request-id" : "ef58f8f9-a01a-0012-44bb-55a112000000", - "x-ms-client-request-id" : "a3b8ad33-7ba2-458c-84f4-922d0d88bd81", - "x-ms-file-last-write-time" : "2022-04-21T20:08:30.1038853Z", - "Content-Type" : "application/octet-stream" - }, - "Exception" : null - } ], - "variables" : [ "dfc43dfadfc43dfa8d7728201a3fb69074164585ae", "dfc43dfadfc43dfa8d76586096bd49b126b648e380" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/FileAPITestsUploadRangePreserveFileLastWrittenOn[1].json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/FileAPITestsUploadRangePreserveFileLastWrittenOn[1].json deleted file mode 100644 index 62e57a670b997..0000000000000 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/FileAPITestsUploadRangePreserveFileLastWrittenOn[1].json +++ /dev/null @@ -1,145 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.file.core.windows.net/c6df0cbbc6df0cbbc3b054714f3e8571633d474da9?restype=share", - "Headers" : { - "x-ms-version" : "2021-06-08", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.13; Windows 10; 10.0)", - "x-ms-client-request-id" : "a9098103-03ad-439f-b7a0-03b8bb4f0fb5" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-06-08", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA23D2B3C81417", - "Last-Modified" : "Thu, 21 Apr 2022 20:08:29 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "ef58f8f2-a01a-0012-40bb-55a112000000", - "x-ms-client-request-id" : "a9098103-03ad-439f-b7a0-03b8bb4f0fb5", - "Date" : "Thu, 21 Apr 2022 20:08:28 GMT" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "https://REDACTED.file.core.windows.net/c6df0cbbc6df0cbbc3b054714f3e8571633d474da9/c6df0cbbc6df0cbbc3b20482e5d370eee77944daaf", - "Headers" : { - "x-ms-version" : "2021-06-08", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.13; Windows 10; 10.0)", - "x-ms-client-request-id" : "0de3ada8-6714-46aa-85f0-4d19d54ff126" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-06-08", - "x-ms-file-permission-key" : "8870206874218656067*15256408171089631693", - "x-ms-file-id" : "13835128424026341376", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2022-04-21T20:08:29.6191622Z", - "Last-Modified" : "Thu, 21 Apr 2022 20:08:29 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Thu, 21 Apr 2022 20:08:29 GMT", - "x-ms-file-attributes" : "Archive", - "x-ms-file-change-time" : "2022-04-21T20:08:29.6191622Z", - "x-ms-file-parent-id" : "0", - "eTag" : "0x8DA23D2B3FD9686", - "x-ms-request-id" : "d507492d-b01a-0098-7abb-55faa3000000", - "x-ms-client-request-id" : "0de3ada8-6714-46aa-85f0-4d19d54ff126", - "x-ms-file-last-write-time" : "2022-04-21T20:08:29.6191622Z" - }, - "Exception" : null - }, { - "Method" : "HEAD", - "Uri" : "https://REDACTED.file.core.windows.net/c6df0cbbc6df0cbbc3b054714f3e8571633d474da9/c6df0cbbc6df0cbbc3b20482e5d370eee77944daaf", - "Headers" : { - "x-ms-version" : "2021-06-08", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.13; Windows 10; 10.0)", - "x-ms-client-request-id" : "150baad6-50f1-44e8-a09d-26c164e059d5" - }, - "Response" : { - "content-length" : "1024", - "x-ms-version" : "2021-06-08", - "x-ms-lease-status" : "unlocked", - "x-ms-file-permission-key" : "8870206874218656067*15256408171089631693", - "x-ms-file-id" : "13835128424026341376", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2022-04-21T20:08:29.6191622Z", - "x-ms-lease-state" : "available", - "Last-Modified" : "Thu, 21 Apr 2022 20:08:29 GMT", - "retry-after" : "0", - "StatusCode" : "200", - "Date" : "Thu, 21 Apr 2022 20:08:29 GMT", - "x-ms-server-encrypted" : "true", - "x-ms-type" : "File", - "x-ms-file-attributes" : "Archive", - "x-ms-file-change-time" : "2022-04-21T20:08:29.6191622Z", - "x-ms-file-parent-id" : "0", - "eTag" : "0x8DA23D2B3FD9686", - "x-ms-request-id" : "d507492f-b01a-0098-7bbb-55faa3000000", - "x-ms-client-request-id" : "150baad6-50f1-44e8-a09d-26c164e059d5", - "x-ms-file-last-write-time" : "2022-04-21T20:08:29.6191622Z", - "Content-Type" : "application/octet-stream" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "https://REDACTED.file.core.windows.net/c6df0cbbc6df0cbbc3b054714f3e8571633d474da9/c6df0cbbc6df0cbbc3b20482e5d370eee77944daaf?comp=range", - "Headers" : { - "x-ms-version" : "2021-06-08", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.13; Windows 10; 10.0)", - "x-ms-client-request-id" : "b7e26419-c8b2-45f4-94bd-2df4cab38b9a", - "Content-Type" : "application/octet-stream" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-06-08", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "Last-Modified" : "Thu, 21 Apr 2022 20:08:30 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Thu, 21 Apr 2022 20:08:29 GMT", - "Content-MD5" : "LRzw5lFT76k1xmM64DHrwQ==", - "eTag" : "0x8DA23D2B4478D05", - "x-ms-request-id" : "ef58f8f8-a01a-0012-43bb-55a112000000", - "x-ms-client-request-id" : "b7e26419-c8b2-45f4-94bd-2df4cab38b9a", - "x-ms-file-last-write-time" : "2022-04-21T20:08:29.6191622Z" - }, - "Exception" : null - }, { - "Method" : "HEAD", - "Uri" : "https://REDACTED.file.core.windows.net/c6df0cbbc6df0cbbc3b054714f3e8571633d474da9/c6df0cbbc6df0cbbc3b20482e5d370eee77944daaf", - "Headers" : { - "x-ms-version" : "2021-06-08", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.13; Windows 10; 10.0)", - "x-ms-client-request-id" : "9b428e71-18df-4bb3-9889-0176108ec398" - }, - "Response" : { - "content-length" : "1024", - "x-ms-version" : "2021-06-08", - "x-ms-lease-status" : "unlocked", - "x-ms-file-permission-key" : "8870206874218656067*15256408171089631693", - "x-ms-file-id" : "13835128424026341376", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2022-04-21T20:08:29.6191622Z", - "x-ms-lease-state" : "available", - "Last-Modified" : "Thu, 21 Apr 2022 20:08:30 GMT", - "retry-after" : "0", - "StatusCode" : "200", - "Date" : "Thu, 21 Apr 2022 20:08:30 GMT", - "x-ms-server-encrypted" : "true", - "x-ms-type" : "File", - "x-ms-file-attributes" : "Archive", - "x-ms-file-change-time" : "2022-04-21T20:08:30.1038853Z", - "x-ms-file-parent-id" : "0", - "eTag" : "0x8DA23D2B4478D05", - "x-ms-request-id" : "d5074943-b01a-0098-0ebb-55faa3000000", - "x-ms-client-request-id" : "9b428e71-18df-4bb3-9889-0176108ec398", - "x-ms-file-last-write-time" : "2022-04-21T20:08:29.6191622Z", - "Content-Type" : "application/octet-stream" - }, - "Exception" : null - } ], - "variables" : [ "c6df0cbbc6df0cbbc3b054714f3e8571633d474da9", "c6df0cbbc6df0cbbc3b20482e5d370eee77944daaf" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/FileAsyncAPITestsDeleteFileThatDoesNotExist.json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/FileAsyncAPITestsDeleteFileThatDoesNotExist.json deleted file mode 100644 index 5441f06b98a2b..0000000000000 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/FileAsyncAPITestsDeleteFileThatDoesNotExist.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/76b37d7576b37d751cf88528c93d41ab49c64d50b9?restype=share", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "d0514e46-3209-4179-804f-ebfb9da242f3" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA1F88244C960C", - "Last-Modified" : "Sat, 16 Apr 2022 09:04:41 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "4f81de2b-401a-0074-7371-512608000000", - "x-ms-client-request-id" : "d0514e46-3209-4179-804f-ebfb9da242f3", - "Date" : "Sat, 16 Apr 2022 09:04:40 GMT" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "http://REDACTED.file.core.windows.net/76b37d7576b37d751cf88528c93d41ab49c64d50b9/76b37d75076b37d751cf32926a30f52c2a86f4486b08", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "68841e1e-2aa0-4dd6-965a-f27f42b89804" - }, - "Response" : { - "content-length" : "223", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-error-code" : "ResourceNotFound", - "retry-after" : "0", - "StatusCode" : "404", - "x-ms-request-id" : "53e3192b-801a-0036-7571-519f88000000", - "Body" : "ResourceNotFoundThe specified resource does not exist.\nRequestId:53e3192b-801a-0036-7571-519f88000000\nTime:2022-04-16T09:04:41.4649439Z", - "x-ms-client-request-id" : "68841e1e-2aa0-4dd6-965a-f27f42b89804", - "Date" : "Sat, 16 Apr 2022 09:04:40 GMT", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "HEAD", - "Uri" : "http://REDACTED.file.core.windows.net/76b37d7576b37d751cf88528c93d41ab49c64d50b9/76b37d75076b37d751cf32926a30f52c2a86f4486b08", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "8a381fd4-43f7-40ee-bd76-45bf4ed00942" - }, - "Response" : { - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "x-ms-error-code" : "ResourceNotFound", - "retry-after" : "0", - "StatusCode" : "404", - "x-ms-request-id" : "53e3192d-801a-0036-7671-519f88000000", - "x-ms-client-request-id" : "8a381fd4-43f7-40ee-bd76-45bf4ed00942", - "Date" : "Sat, 16 Apr 2022 09:04:40 GMT" - }, - "Exception" : null - } ], - "variables" : [ "76b37d7576b37d751cf88528c93d41ab49c64d50b9", "76b37d7576b37d751cf84636ccc1c75335144d2ab1", "76b37d75076b37d751cf32926a30f52c2a86f4486b08" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/FileAsyncAPITestsDeleteIfExistsFile.json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/FileAsyncAPITestsDeleteIfExistsFile.json deleted file mode 100644 index b50f8b8517f0c..0000000000000 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/FileAsyncAPITestsDeleteIfExistsFile.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/a0b2940aa0b2940a58a556541754b69b46c04ca7ac?restype=share", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "e9c21f7c-ed54-4b91-85b4-e0ce19b49220" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA1F88244B7B3F", - "Last-Modified" : "Sat, 16 Apr 2022 09:04:41 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "4fe3a113-c01a-0008-1f71-5108f7000000", - "x-ms-client-request-id" : "e9c21f7c-ed54-4b91-85b4-e0ce19b49220", - "Date" : "Sat, 16 Apr 2022 09:04:40 GMT" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/a0b2940aa0b2940a58a556541754b69b46c04ca7ac/a0b2940aa0b2940a58a12987e3d2d1fc0f9440d88f", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "5286332d-83c5-4cc8-b041-4d8b155399e3" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "x-ms-file-permission-key" : "8592442312075974896*16113479809698295934", - "x-ms-file-id" : "13835128424026341376", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2022-04-16T09:04:41.4752329Z", - "Last-Modified" : "Sat, 16 Apr 2022 09:04:41 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Sat, 16 Apr 2022 09:04:40 GMT", - "x-ms-file-attributes" : "Archive", - "x-ms-file-change-time" : "2022-04-16T09:04:41.4752329Z", - "x-ms-file-parent-id" : "0", - "eTag" : "0x8DA1F8824805E49", - "x-ms-request-id" : "7d6afd02-b01a-0012-5871-516928000000", - "x-ms-client-request-id" : "5286332d-83c5-4cc8-b041-4d8b155399e3", - "x-ms-file-last-write-time" : "2022-04-16T09:04:41.4752329Z" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "http://REDACTED.file.core.windows.net/a0b2940aa0b2940a58a556541754b69b46c04ca7ac/a0b2940aa0b2940a58a12987e3d2d1fc0f9440d88f", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "08c547de-b659-4aae-8814-2d29e6fb8dfa" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "4fe3a118-c01a-0008-2171-5108f7000000", - "x-ms-client-request-id" : "08c547de-b659-4aae-8814-2d29e6fb8dfa", - "Date" : "Sat, 16 Apr 2022 09:04:41 GMT" - }, - "Exception" : null - } ], - "variables" : [ "a0b2940aa0b2940a58a556541754b69b46c04ca7ac", "a0b2940aa0b2940a58a12987e3d2d1fc0f9440d88f" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/FileAsyncAPITestsDeleteIfExistsFileLease.json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/FileAsyncAPITestsDeleteIfExistsFileLease.json deleted file mode 100644 index 939620ac72c79..0000000000000 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/FileAsyncAPITestsDeleteIfExistsFileLease.json +++ /dev/null @@ -1,95 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/3749a3543749a35465769709cd81b155401440b8b4?restype=share", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "8198b415-faf8-490b-9c62-729993b24036" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA1F8824490544", - "Last-Modified" : "Sat, 16 Apr 2022 09:04:41 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "7d6afcfe-b01a-0012-5771-516928000000", - "x-ms-client-request-id" : "8198b415-faf8-490b-9c62-729993b24036", - "Date" : "Sat, 16 Apr 2022 09:04:40 GMT" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/3749a3543749a35465769709cd81b155401440b8b4/3749a3543749a35465745077456527e3349945fd89", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "a0c52171-505e-46f5-a576-f1085b52938f" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "x-ms-file-permission-key" : "8592442312075974896*16113479809698295934", - "x-ms-file-id" : "13835128424026341376", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2022-04-16T09:04:41.4692362Z", - "Last-Modified" : "Sat, 16 Apr 2022 09:04:41 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Sat, 16 Apr 2022 09:04:40 GMT", - "x-ms-file-attributes" : "Archive", - "x-ms-file-change-time" : "2022-04-16T09:04:41.4692362Z", - "x-ms-file-parent-id" : "0", - "eTag" : "0x8DA1F88247F740A", - "x-ms-request-id" : "4f81de2f-401a-0074-7471-512608000000", - "x-ms-client-request-id" : "a0c52171-505e-46f5-a576-f1085b52938f", - "x-ms-file-last-write-time" : "2022-04-16T09:04:41.4692362Z" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/3749a3543749a35465769709cd81b155401440b8b4/3749a3543749a35465745077456527e3349945fd89?comp=lease", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "c2050311-37be-455b-8218-fa9674309c87" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-lease-id" : "5b034791-fef5-44ca-b444-848b58445916", - "eTag" : "0x8DA1F88247F740A", - "Last-Modified" : "Sat, 16 Apr 2022 09:04:41 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "4f81de32-401a-0074-7571-512608000000", - "x-ms-client-request-id" : "c2050311-37be-455b-8218-fa9674309c87", - "Date" : "Sat, 16 Apr 2022 09:04:40 GMT" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "http://REDACTED.file.core.windows.net/3749a3543749a35465769709cd81b155401440b8b4/3749a3543749a35465745077456527e3349945fd89", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "4fe5d8e8-2e33-4416-8f43-f6ced3dfae6a" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "7d6afd07-b01a-0012-5a71-516928000000", - "x-ms-client-request-id" : "4fe5d8e8-2e33-4416-8f43-f6ced3dfae6a", - "Date" : "Sat, 16 Apr 2022 09:04:41 GMT" - }, - "Exception" : null - } ], - "variables" : [ "3749a3543749a35465769709cd81b155401440b8b4", "3749a3543749a35465745077456527e3349945fd89" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/FileAsyncAPITestsDeleteIfExistsFileLeaseFail.json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/FileAsyncAPITestsDeleteIfExistsFileLeaseFail.json deleted file mode 100644 index 7c223464cf8b3..0000000000000 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/FileAsyncAPITestsDeleteIfExistsFileLeaseFail.json +++ /dev/null @@ -1,98 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/2042aef82042aef8ac5901995c828b8c753a431e85?restype=share", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "3398e98b-3201-4db4-b8e2-6de7868379b1" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA1F88245BB3EE", - "Last-Modified" : "Sat, 16 Apr 2022 09:04:41 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "53e31927-801a-0036-7471-519f88000000", - "x-ms-client-request-id" : "3398e98b-3201-4db4-b8e2-6de7868379b1", - "Date" : "Sat, 16 Apr 2022 09:04:40 GMT" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/2042aef82042aef8ac5901995c828b8c753a431e85/2042aef82042aef8ac529765805451b161c840269c", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "5ed931c6-4c83-49fc-976d-2dc2dd57185e" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "x-ms-file-permission-key" : "8592442312075974896*16113479809698295934", - "x-ms-file-id" : "13835128424026341376", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2022-04-16T09:04:41.4672372Z", - "Last-Modified" : "Sat, 16 Apr 2022 09:04:41 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Sat, 16 Apr 2022 09:04:41 GMT", - "x-ms-file-attributes" : "Archive", - "x-ms-file-change-time" : "2022-04-16T09:04:41.4672372Z", - "x-ms-file-parent-id" : "0", - "eTag" : "0x8DA1F88247F25F4", - "x-ms-request-id" : "4fe3a116-c01a-0008-2071-5108f7000000", - "x-ms-client-request-id" : "5ed931c6-4c83-49fc-976d-2dc2dd57185e", - "x-ms-file-last-write-time" : "2022-04-16T09:04:41.4672372Z" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/2042aef82042aef8ac5901995c828b8c753a431e85/2042aef82042aef8ac529765805451b161c840269c?comp=lease", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "c77fa2b0-da55-4ba4-a5b1-52d8d2fced83" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-lease-id" : "8f213890-70b0-45db-a25f-7c0ba353ce02", - "eTag" : "0x8DA1F88247F25F4", - "Last-Modified" : "Sat, 16 Apr 2022 09:04:41 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "7d6afd05-b01a-0012-5971-516928000000", - "x-ms-client-request-id" : "c77fa2b0-da55-4ba4-a5b1-52d8d2fced83", - "Date" : "Sat, 16 Apr 2022 09:04:41 GMT" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "http://REDACTED.file.core.windows.net/2042aef82042aef8ac5901995c828b8c753a431e85/2042aef82042aef8ac529765805451b161c840269c", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "7db06ec5-87a0-47a6-beab-3ee8eb2de0a1" - }, - "Response" : { - "content-length" : "264", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-error-code" : "LeaseIdMismatchWithFileOperation", - "retry-after" : "0", - "StatusCode" : "412", - "x-ms-request-id" : "4f81de33-401a-0074-7671-512608000000", - "Body" : "LeaseIdMismatchWithFileOperationThe lease ID specified did not match the lease ID for the file.\nRequestId:4f81de33-401a-0074-7671-512608000000\nTime:2022-04-16T09:04:41.6715673Z", - "x-ms-client-request-id" : "7db06ec5-87a0-47a6-beab-3ee8eb2de0a1", - "Date" : "Sat, 16 Apr 2022 09:04:40 GMT", - "Content-Type" : "application/xml" - }, - "Exception" : null - } ], - "variables" : [ "2042aef82042aef8ac5901995c828b8c753a431e85", "2042aef82042aef8ac529765805451b161c840269c", "95e2d21d-598a-4f18-80d2-73d2fa10708c" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/FileAsyncAPITestsDeleteIfExistsFileThatWasAlreadyDeleted.json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/FileAsyncAPITestsDeleteIfExistsFileThatWasAlreadyDeleted.json deleted file mode 100644 index c9516dd1f641a..0000000000000 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/FileAsyncAPITestsDeleteIfExistsFileThatWasAlreadyDeleted.json +++ /dev/null @@ -1,95 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/72f4c54372f4c543c0e261674f3f09ad2cbc4dc2bf?restype=share", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "f075b322-9993-4e9f-ba91-e864ec7362e8" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA1F88244BB1BD", - "Last-Modified" : "Sat, 16 Apr 2022 09:04:41 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "13c2773f-d01a-0066-5671-515dd8000000", - "x-ms-client-request-id" : "f075b322-9993-4e9f-ba91-e864ec7362e8", - "Date" : "Sat, 16 Apr 2022 09:04:41 GMT" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/72f4c54372f4c543c0e261674f3f09ad2cbc4dc2bf/72f4c54372f4c543c0e086546d9bcfc5c66d4b4b8c", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "7e52e2e6-20ea-4eea-afb9-57ebbd6b2271" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "x-ms-file-permission-key" : "8592442312075974896*16113479809698295934", - "x-ms-file-id" : "13835128424026341376", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2022-04-16T09:04:41.4712354Z", - "Last-Modified" : "Sat, 16 Apr 2022 09:04:41 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Sat, 16 Apr 2022 09:04:41 GMT", - "x-ms-file-attributes" : "Archive", - "x-ms-file-change-time" : "2022-04-16T09:04:41.4712354Z", - "x-ms-file-parent-id" : "0", - "eTag" : "0x8DA1F88247FC222", - "x-ms-request-id" : "13c27742-d01a-0066-5771-515dd8000000", - "x-ms-client-request-id" : "7e52e2e6-20ea-4eea-afb9-57ebbd6b2271", - "x-ms-file-last-write-time" : "2022-04-16T09:04:41.4712354Z" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "http://REDACTED.file.core.windows.net/72f4c54372f4c543c0e261674f3f09ad2cbc4dc2bf/72f4c54372f4c543c0e086546d9bcfc5c66d4b4b8c", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "5447ab1a-7e39-4d1d-bb1a-05c1fd3b05a3" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "13c27744-d01a-0066-5871-515dd8000000", - "x-ms-client-request-id" : "5447ab1a-7e39-4d1d-bb1a-05c1fd3b05a3", - "Date" : "Sat, 16 Apr 2022 09:04:41 GMT" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "http://REDACTED.file.core.windows.net/72f4c54372f4c543c0e261674f3f09ad2cbc4dc2bf/72f4c54372f4c543c0e086546d9bcfc5c66d4b4b8c", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "bc345591-1a9a-4969-81f0-b07d7cd3035e" - }, - "Response" : { - "content-length" : "223", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-error-code" : "ResourceNotFound", - "retry-after" : "0", - "StatusCode" : "404", - "x-ms-request-id" : "13c27745-d01a-0066-5971-515dd8000000", - "Body" : "ResourceNotFoundThe specified resource does not exist.\nRequestId:13c27745-d01a-0066-5971-515dd8000000\nTime:2022-04-16T09:04:41.6197469Z", - "x-ms-client-request-id" : "bc345591-1a9a-4969-81f0-b07d7cd3035e", - "Date" : "Sat, 16 Apr 2022 09:04:41 GMT", - "Content-Type" : "application/xml" - }, - "Exception" : null - } ], - "variables" : [ "72f4c54372f4c543c0e261674f3f09ad2cbc4dc2bf", "72f4c54372f4c543c0e086546d9bcfc5c66d4b4b8c" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/FileSASTestsAccountSASNetworkAccountSasTokenOnEndpoint.json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/FileSASTestsAccountSASNetworkAccountSasTokenOnEndpoint.json index b0ebce232aac2..fafa0ac37665d 100644 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/FileSASTestsAccountSASNetworkAccountSasTokenOnEndpoint.json +++ b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/FileSASTestsAccountSASNetworkAccountSasTokenOnEndpoint.json @@ -1,7 +1,7 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.file.core.windows.net/d046471ad046471aae520858956f6ea6164743b6b6?restype=share&sv=2021-06-08&se=2021-05-15T21%3A18%3A14Z&sp=rc&sig=REDACTED&ss=f&srt=sco", + "Uri" : "https://REDACTED.file.core.windows.net/d046471ad046471aae520858956f6ea6164743b6b6?restype=share&sv=2021-04-10&se=2021-05-15T21%3A18%3A14Z&sp=rc&sig=REDACTED&ss=f&srt=sco", "Headers" : { "x-ms-version" : "2020-10-02", "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.2 (11.0.7; Windows 10; 10.0)", @@ -22,7 +22,7 @@ "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.file.core.windows.net/d046471ad046471aae520858956f6ea6164743b6b6/d046471ad046471aae573874fb5fc5641e734c5aa9?sv=2021-06-08&se=2021-05-15T21%3A18%3A14Z&sp=rc&sig=REDACTED&ss=f&srt=sco", + "Uri" : "https://REDACTED.file.core.windows.net/d046471ad046471aae520858956f6ea6164743b6b6/d046471ad046471aae573874fb5fc5641e734c5aa9?sv=2021-04-10&se=2021-05-15T21%3A18%3A14Z&sp=rc&sig=REDACTED&ss=f&srt=sco", "Headers" : { "x-ms-version" : "2020-10-02", "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.2 (11.0.7; Windows 10; 10.0)", @@ -51,7 +51,7 @@ "Exception" : null }, { "Method" : "GET", - "Uri" : "https://REDACTED.file.core.windows.net/d046471ad046471aae520858956f6ea6164743b6b6/d046471ad046471aae573874fb5fc5641e734c5aa9?sv=2021-06-08&se=2021-05-15T21%3A18%3A14Z&sp=rc&sig=REDACTED&ss=f&srt=sco", + "Uri" : "https://REDACTED.file.core.windows.net/d046471ad046471aae520858956f6ea6164743b6b6/d046471ad046471aae573874fb5fc5641e734c5aa9?sv=2021-04-10&se=2021-05-15T21%3A18%3A14Z&sp=rc&sig=REDACTED&ss=f&srt=sco", "Headers" : { "x-ms-version" : "2020-10-02", "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.2 (11.0.7; Windows 10; 10.0)", diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/FileSASTestsAccountSASNetworkCreateDeleteShare.json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/FileSASTestsAccountSASNetworkCreateDeleteShare.json index b89af911aa601..8f0e27f941d2d 100644 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/FileSASTestsAccountSASNetworkCreateDeleteShare.json +++ b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/FileSASTestsAccountSASNetworkCreateDeleteShare.json @@ -1,7 +1,7 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.file.core.windows.net/b05e8148b05e814866f324032060c79f1cd34b5b8d?restype=share&sv=2021-06-08&ss=f&srt=sco&se=2021-05-15T21%3A18%3A14Z&sp=rdc&sig=REDACTED", + "Uri" : "https://REDACTED.file.core.windows.net/b05e8148b05e814866f324032060c79f1cd34b5b8d?restype=share&sv=2021-04-10&ss=f&srt=sco&se=2021-05-15T21%3A18%3A14Z&sp=rdc&sig=REDACTED", "Headers" : { "x-ms-version" : "2020-10-02", "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.2 (11.0.7; Windows 10; 10.0)", @@ -22,7 +22,7 @@ "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.file.core.windows.net/b05e8148b05e814866f324032060c79f1cd34b5b8d?restype=share&sv=2021-06-08&ss=f&srt=sco&se=2021-05-15T21%3A18%3A14Z&sp=rdc&sig=REDACTED", + "Uri" : "https://REDACTED.file.core.windows.net/b05e8148b05e814866f324032060c79f1cd34b5b8d?restype=share&sv=2021-04-10&ss=f&srt=sco&se=2021-05-15T21%3A18%3A14Z&sp=rdc&sig=REDACTED", "Headers" : { "x-ms-version" : "2020-10-02", "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.2 (11.0.7; Windows 10; 10.0)", diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/FileSASTestsCanUseSasToAuthenticate.json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/FileSASTestsCanUseSasToAuthenticate.json index 4cd2992ee3b41..80d6e6aa0d4e5 100644 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/FileSASTestsCanUseSasToAuthenticate.json +++ b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/FileSASTestsCanUseSasToAuthenticate.json @@ -51,7 +51,7 @@ "Exception" : null }, { "Method" : "GET", - "Uri" : "https://REDACTED.file.core.windows.net/13693885136938858a78332336b882503ef449af97?restype=share&sv=2021-06-08&ss=f&srt=sco&se=2021-05-15T21%3A18%3A14Z&sp=r&sig=REDACTED", + "Uri" : "https://REDACTED.file.core.windows.net/13693885136938858a78332336b882503ef449af97?restype=share&sv=2021-04-10&ss=f&srt=sco&se=2021-05-15T21%3A18%3A14Z&sp=r&sig=REDACTED", "Headers" : { "x-ms-version" : "2020-10-02", "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.2 (11.0.7; Windows 10; 10.0)", @@ -79,7 +79,7 @@ "Exception" : null }, { "Method" : "GET", - "Uri" : "https://REDACTED.file.core.windows.net/13693885136938858a78332336b882503ef449af97?restype=share&sv=2021-06-08&ss=f&srt=sco&se=2021-05-15T21%3A18%3A14Z&sp=r&sig=REDACTED", + "Uri" : "https://REDACTED.file.core.windows.net/13693885136938858a78332336b882503ef449af97?restype=share&sv=2021-04-10&ss=f&srt=sco&se=2021-05-15T21%3A18%3A14Z&sp=r&sig=REDACTED", "Headers" : { "x-ms-version" : "2020-10-02", "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.2 (11.0.7; Windows 10; 10.0)", @@ -107,7 +107,7 @@ "Exception" : null }, { "Method" : "GET", - "Uri" : "https://REDACTED.file.core.windows.net/13693885136938858a78332336b882503ef449af97?restype=share&sv=2021-06-08&se=2021-05-15T21%3A18%3A14Z&sp=r&sig=REDACTED&ss=f&srt=sco", + "Uri" : "https://REDACTED.file.core.windows.net/13693885136938858a78332336b882503ef449af97?restype=share&sv=2021-04-10&se=2021-05-15T21%3A18%3A14Z&sp=r&sig=REDACTED&ss=f&srt=sco", "Headers" : { "x-ms-version" : "2020-10-02", "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.2 (11.0.7; Windows 10; 10.0)", @@ -135,7 +135,7 @@ "Exception" : null }, { "Method" : "GET", - "Uri" : "https://REDACTED.file.core.windows.net/13693885136938858a78332336b882503ef449af97/136938850136938858a7369264534c3c590ed4456965?restype=directory&sv=2021-06-08&ss=f&srt=sco&se=2021-05-15T21%3A18%3A14Z&sp=r&sig=REDACTED", + "Uri" : "https://REDACTED.file.core.windows.net/13693885136938858a78332336b882503ef449af97/136938850136938858a7369264534c3c590ed4456965?restype=directory&sv=2021-04-10&ss=f&srt=sco&se=2021-05-15T21%3A18%3A14Z&sp=r&sig=REDACTED", "Headers" : { "x-ms-version" : "2020-10-02", "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.2 (11.0.7; Windows 10; 10.0)", @@ -164,7 +164,7 @@ "Exception" : null }, { "Method" : "GET", - "Uri" : "https://REDACTED.file.core.windows.net/13693885136938858a78332336b882503ef449af97/136938850136938858a7369264534c3c590ed4456965?restype=directory&sv=2021-06-08&ss=f&srt=sco&se=2021-05-15T21%3A18%3A14Z&sp=r&sig=REDACTED", + "Uri" : "https://REDACTED.file.core.windows.net/13693885136938858a78332336b882503ef449af97/136938850136938858a7369264534c3c590ed4456965?restype=directory&sv=2021-04-10&ss=f&srt=sco&se=2021-05-15T21%3A18%3A14Z&sp=r&sig=REDACTED", "Headers" : { "x-ms-version" : "2020-10-02", "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.2 (11.0.7; Windows 10; 10.0)", @@ -193,7 +193,7 @@ "Exception" : null }, { "Method" : "GET", - "Uri" : "https://REDACTED.file.core.windows.net/13693885136938858a78332336b882503ef449af97/136938850136938858a7369264534c3c590ed4456965?restype=directory&sv=2021-06-08&se=2021-05-15T21%3A18%3A14Z&sp=r&sig=REDACTED&ss=f&srt=sco", + "Uri" : "https://REDACTED.file.core.windows.net/13693885136938858a78332336b882503ef449af97/136938850136938858a7369264534c3c590ed4456965?restype=directory&sv=2021-04-10&se=2021-05-15T21%3A18%3A14Z&sp=r&sig=REDACTED&ss=f&srt=sco", "Headers" : { "x-ms-version" : "2020-10-02", "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.2 (11.0.7; Windows 10; 10.0)", @@ -222,7 +222,7 @@ "Exception" : null }, { "Method" : "GET", - "Uri" : "https://REDACTED.file.core.windows.net?restype=service&comp=properties&sv=2021-06-08&ss=f&srt=sco&se=2021-05-15T21%3A18%3A14Z&sp=r&sig=REDACTED", + "Uri" : "https://REDACTED.file.core.windows.net?restype=service&comp=properties&sv=2021-04-10&ss=f&srt=sco&se=2021-05-15T21%3A18%3A14Z&sp=r&sig=REDACTED", "Headers" : { "x-ms-version" : "2020-10-02", "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.2 (11.0.7; Windows 10; 10.0)", @@ -243,7 +243,7 @@ "Exception" : null }, { "Method" : "GET", - "Uri" : "https://REDACTED.file.core.windows.net?restype=service&comp=properties&sv=2021-06-08&ss=f&srt=sco&se=2021-05-15T21%3A18%3A14Z&sp=r&sig=REDACTED", + "Uri" : "https://REDACTED.file.core.windows.net?restype=service&comp=properties&sv=2021-04-10&ss=f&srt=sco&se=2021-05-15T21%3A18%3A14Z&sp=r&sig=REDACTED", "Headers" : { "x-ms-version" : "2020-10-02", "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.2 (11.0.7; Windows 10; 10.0)", @@ -264,7 +264,7 @@ "Exception" : null }, { "Method" : "GET", - "Uri" : "https://REDACTED.file.core.windows.net?restype=service&comp=properties&sv=2021-06-08&se=2021-05-15T21%3A18%3A14Z&sp=r&sig=REDACTED&ss=f&srt=sco", + "Uri" : "https://REDACTED.file.core.windows.net?restype=service&comp=properties&sv=2021-04-10&se=2021-05-15T21%3A18%3A14Z&sp=r&sig=REDACTED&ss=f&srt=sco", "Headers" : { "x-ms-version" : "2020-10-02", "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.2 (11.0.7; Windows 10; 10.0)", diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/FileSASTestsFileSASNetworkTestDownloadUpload.json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/FileSASTestsFileSASNetworkTestDownloadUpload.json index 95f1808faa649..9945022bc288e 100644 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/FileSASTestsFileSASNetworkTestDownloadUpload.json +++ b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/FileSASTestsFileSASNetworkTestDownloadUpload.json @@ -75,7 +75,7 @@ "Exception" : null }, { "Method" : "GET", - "Uri" : "https://REDACTED.file.core.windows.net/3b7fd51c3b7fd51c8fe02217515300f27caf453bab/filename?sv=2021-06-08&spr=https%2Chttp&st=2021-05-13T21%3A18%3A18Z&se=2021-05-15T21%3A18%3A18Z&sr=f&sp=rcwd&sig=REDACTED&rscc=cache&rscd=disposition&rsce=encoding&rscl=language&rsct=type", + "Uri" : "https://REDACTED.file.core.windows.net/3b7fd51c3b7fd51c8fe02217515300f27caf453bab/filename?sv=2021-04-10&spr=https%2Chttp&st=2021-05-13T21%3A18%3A18Z&se=2021-05-15T21%3A18%3A18Z&sr=f&sp=rcwd&sig=REDACTED&rscc=cache&rscd=disposition&rsce=encoding&rscl=language&rsct=type", "Headers" : { "x-ms-version" : "2020-10-02", "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.2 (11.0.7; Windows 10; 10.0)", @@ -114,7 +114,7 @@ "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.file.core.windows.net/3b7fd51c3b7fd51c8fe02217515300f27caf453bab/filename?comp=range&sv=2021-06-08&spr=https%2Chttp&st=2021-05-13T21%3A18%3A18Z&se=2021-05-15T21%3A18%3A18Z&sr=f&sp=rcwd&sig=REDACTED&rscc=cache&rscd=disposition&rsce=encoding&rscl=language&rsct=type", + "Uri" : "https://REDACTED.file.core.windows.net/3b7fd51c3b7fd51c8fe02217515300f27caf453bab/filename?comp=range&sv=2021-04-10&spr=https%2Chttp&st=2021-05-13T21%3A18%3A18Z&se=2021-05-15T21%3A18%3A18Z&sr=f&sp=rcwd&sig=REDACTED&rscc=cache&rscd=disposition&rsce=encoding&rscl=language&rsct=type", "Headers" : { "x-ms-version" : "2020-10-02", "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.2 (11.0.7; Windows 10; 10.0)", diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/FileSASTestsFileSASNetworkTestUploadFails.json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/FileSASTestsFileSASNetworkTestUploadFails.json index cfb4f31e30584..ccfbc069df7d2 100644 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/FileSASTestsFileSASNetworkTestUploadFails.json +++ b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/FileSASTestsFileSASNetworkTestUploadFails.json @@ -51,7 +51,7 @@ "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.file.core.windows.net/05bff12205bff122ffa8391528d659a3507b4697b1/filename?comp=range&sv=2021-06-08&spr=https%2Chttp&st=2021-05-13T21%3A18%3A18Z&se=2021-05-15T21%3A18%3A18Z&sr=f&sp=rcd&sig=REDACTED&rscc=cache&rscd=disposition&rsce=encoding&rscl=language&rsct=type", + "Uri" : "https://REDACTED.file.core.windows.net/05bff12205bff122ffa8391528d659a3507b4697b1/filename?comp=range&sv=2021-04-10&spr=https%2Chttp&st=2021-05-13T21%3A18%3A18Z&se=2021-05-15T21%3A18%3A18Z&sr=f&sp=rcd&sig=REDACTED&rscc=cache&rscd=disposition&rsce=encoding&rscl=language&rsct=type", "Headers" : { "x-ms-version" : "2020-10-02", "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.2 (11.0.7; Windows 10; 10.0)", @@ -74,7 +74,7 @@ "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.file.core.windows.net/05bff12205bff122ffa8391528d659a3507b4697b1/filename?sv=2021-06-08&spr=https%2Chttp&st=2021-05-13T21%3A18%3A18Z&se=2021-05-15T21%3A18%3A18Z&sr=f&sp=rcd&sig=REDACTED&rscc=cache&rscd=disposition&rsce=encoding&rscl=language&rsct=type", + "Uri" : "https://REDACTED.file.core.windows.net/05bff12205bff122ffa8391528d659a3507b4697b1/filename?sv=2021-04-10&spr=https%2Chttp&st=2021-05-13T21%3A18%3A18Z&se=2021-05-15T21%3A18%3A18Z&sr=f&sp=rcd&sig=REDACTED&rscc=cache&rscd=disposition&rsce=encoding&rscl=language&rsct=type", "Headers" : { "x-ms-version" : "2020-10-02", "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.2 (11.0.7; Windows 10; 10.0)", diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/FileSASTestsParseProtocol.json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/FileSASTestsParseProtocol.json index 1567eb6f7cc4b..717443eb95743 100644 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/FileSASTestsParseProtocol.json +++ b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/FileSASTestsParseProtocol.json @@ -51,7 +51,7 @@ "Exception" : null }, { "Method" : "HEAD", - "Uri" : "https://REDACTED.file.core.windows.net/62716b1b62716b1ba6f37397aa883bb04ff94551b3/filename?sv=2021-06-08&spr=https%2Chttp&se=2021-05-15T21%3A18%3A18Z&sp=r&sig=REDACTED&ss=f&srt=sco", + "Uri" : "https://REDACTED.file.core.windows.net/62716b1b62716b1ba6f37397aa883bb04ff94551b3/filename?sv=2021-04-10&spr=https%2Chttp&se=2021-05-15T21%3A18%3A18Z&sp=r&sig=REDACTED&ss=f&srt=sco", "Headers" : { "x-ms-version" : "2020-10-02", "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.2 (11.0.7; Windows 10; 10.0)", @@ -84,7 +84,7 @@ "Exception" : null }, { "Method" : "GET", - "Uri" : "https://REDACTED.file.core.windows.net/62716b1b62716b1ba6f37397aa883bb04ff94551b3?restype=share&sv=2021-06-08&spr=https%2Chttp&se=2021-05-15T21%3A18%3A18Z&sp=r&sig=REDACTED&ss=f&srt=sco", + "Uri" : "https://REDACTED.file.core.windows.net/62716b1b62716b1ba6f37397aa883bb04ff94551b3?restype=share&sv=2021-04-10&spr=https%2Chttp&se=2021-05-15T21%3A18%3A18Z&sp=r&sig=REDACTED&ss=f&srt=sco", "Headers" : { "x-ms-version" : "2020-10-02", "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.2 (11.0.7; Windows 10; 10.0)", @@ -112,7 +112,7 @@ "Exception" : null }, { "Method" : "GET", - "Uri" : "https://REDACTED.file.core.windows.net?restype=service&comp=properties&sv=2021-06-08&spr=https%2Chttp&se=2021-05-15T21%3A18%3A18Z&sp=r&sig=REDACTED&ss=f&srt=sco", + "Uri" : "https://REDACTED.file.core.windows.net?restype=service&comp=properties&sv=2021-04-10&spr=https%2Chttp&se=2021-05-15T21%3A18%3A18Z&sp=r&sig=REDACTED&ss=f&srt=sco", "Headers" : { "x-ms-version" : "2020-10-02", "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.2 (11.0.7; Windows 10; 10.0)", diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/FileSASTestsShareSASNetworkIdentifierPermissions.json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/FileSASTestsShareSASNetworkIdentifierPermissions.json index 7ad5d60688c53..0e501c0115ebd 100644 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/FileSASTestsShareSASNetworkIdentifierPermissions.json +++ b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/FileSASTestsShareSASNetworkIdentifierPermissions.json @@ -44,7 +44,7 @@ "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.file.core.windows.net/80399d5580399d554b4349600ed6255e16b14ca08f/80399d5580399d554b485341c461a17e20a74b8a95?restype=directory&sv=2021-06-08&si=0000&sr=s&sig=REDACTED", + "Uri" : "https://REDACTED.file.core.windows.net/80399d5580399d554b4349600ed6255e16b14ca08f/80399d5580399d554b485341c461a17e20a74b8a95?restype=directory&sv=2021-04-10&si=0000&sr=s&sig=REDACTED", "Headers" : { "x-ms-version" : "2020-10-02", "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.2 (11.0.7; Windows 10; 10.0)", @@ -73,7 +73,7 @@ "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.file.core.windows.net/80399d5580399d554b4349600ed6255e16b14ca08f/80399d5580399d554b485341c461a17e20a74b8a95?restype=directory&sv=2021-06-08&si=0000&sr=s&sig=REDACTED", + "Uri" : "https://REDACTED.file.core.windows.net/80399d5580399d554b4349600ed6255e16b14ca08f/80399d5580399d554b485341c461a17e20a74b8a95?restype=directory&sv=2021-04-10&si=0000&sr=s&sig=REDACTED", "Headers" : { "x-ms-version" : "2020-10-02", "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.2 (11.0.7; Windows 10; 10.0)", @@ -92,7 +92,7 @@ "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.file.core.windows.net/80399d5580399d554b4349600ed6255e16b14ca08f/80399d5580399d554b4147882cca8fc0fe57403395?restype=directory&sv=2021-06-08&se=2021-05-15T21%3A18%3A18Z&sr=s&sp=rcwdl&sig=REDACTED", + "Uri" : "https://REDACTED.file.core.windows.net/80399d5580399d554b4349600ed6255e16b14ca08f/80399d5580399d554b4147882cca8fc0fe57403395?restype=directory&sv=2021-04-10&se=2021-05-15T21%3A18%3A18Z&sr=s&sp=rcwdl&sig=REDACTED", "Headers" : { "x-ms-version" : "2020-10-02", "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.2 (11.0.7; Windows 10; 10.0)", @@ -121,7 +121,7 @@ "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.file.core.windows.net/80399d5580399d554b4349600ed6255e16b14ca08f/80399d5580399d554b4147882cca8fc0fe57403395?restype=directory&sv=2021-06-08&se=2021-05-15T21%3A18%3A18Z&sr=s&sp=rcwdl&sig=REDACTED", + "Uri" : "https://REDACTED.file.core.windows.net/80399d5580399d554b4349600ed6255e16b14ca08f/80399d5580399d554b4147882cca8fc0fe57403395?restype=directory&sv=2021-04-10&se=2021-05-15T21%3A18%3A18Z&sr=s&sp=rcwdl&sig=REDACTED", "Headers" : { "x-ms-version" : "2020-10-02", "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.2 (11.0.7; Windows 10; 10.0)", diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/FileSasClientTestsAccountSASNetworkCreateDeleteShare.json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/FileSasClientTestsAccountSASNetworkCreateDeleteShare.json index 3e7efd2ec2ef3..30761e118e608 100644 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/FileSasClientTestsAccountSASNetworkCreateDeleteShare.json +++ b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/FileSasClientTestsAccountSASNetworkCreateDeleteShare.json @@ -51,7 +51,7 @@ "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.file.core.windows.net/create?restype=share&sv=2021-06-08&ss=f&srt=sco&se=2021-05-15T21%3A20%3A06Z&sp=rdc&sig=REDACTED", + "Uri" : "https://REDACTED.file.core.windows.net/create?restype=share&sv=2021-04-10&ss=f&srt=sco&se=2021-05-15T21%3A20%3A06Z&sp=rdc&sig=REDACTED", "Headers" : { "x-ms-version" : "2020-10-02", "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.2 (11.0.7; Windows 10; 10.0)", @@ -72,7 +72,7 @@ "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.file.core.windows.net/create?restype=share&sv=2021-06-08&ss=f&srt=sco&se=2021-05-15T21%3A20%3A06Z&sp=rdc&sig=REDACTED", + "Uri" : "https://REDACTED.file.core.windows.net/create?restype=share&sv=2021-04-10&ss=f&srt=sco&se=2021-05-15T21%3A20%3A06Z&sp=rdc&sig=REDACTED", "Headers" : { "x-ms-version" : "2020-10-02", "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.2 (11.0.7; Windows 10; 10.0)", diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/FileSasClientTestsFileSASNetworkTestDownloadUpload.json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/FileSasClientTestsFileSASNetworkTestDownloadUpload.json index 79b3ea62c3223..f435123cbbfbf 100644 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/FileSasClientTestsFileSASNetworkTestDownloadUpload.json +++ b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/FileSasClientTestsFileSASNetworkTestDownloadUpload.json @@ -75,7 +75,7 @@ "Exception" : null }, { "Method" : "GET", - "Uri" : "https://REDACTED.file.core.windows.net/cc2a41fecc2a41fe95238268fc8f834bf6354c78b7/filename?sv=2021-06-08&spr=https%2Chttp&st=2021-05-13T21%3A20%3A07Z&se=2021-05-15T21%3A20%3A07Z&sr=f&sp=rcwd&sig=REDACTED&rscc=cache&rscd=disposition&rsce=encoding&rscl=language&rsct=type", + "Uri" : "https://REDACTED.file.core.windows.net/cc2a41fecc2a41fe95238268fc8f834bf6354c78b7/filename?sv=2021-04-10&spr=https%2Chttp&st=2021-05-13T21%3A20%3A07Z&se=2021-05-15T21%3A20%3A07Z&sr=f&sp=rcwd&sig=REDACTED&rscc=cache&rscd=disposition&rsce=encoding&rscl=language&rsct=type", "Headers" : { "x-ms-version" : "2020-10-02", "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.2 (11.0.7; Windows 10; 10.0)", @@ -114,7 +114,7 @@ "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.file.core.windows.net/cc2a41fecc2a41fe95238268fc8f834bf6354c78b7/filename?comp=range&sv=2021-06-08&spr=https%2Chttp&st=2021-05-13T21%3A20%3A07Z&se=2021-05-15T21%3A20%3A07Z&sr=f&sp=rcwd&sig=REDACTED&rscc=cache&rscd=disposition&rsce=encoding&rscl=language&rsct=type", + "Uri" : "https://REDACTED.file.core.windows.net/cc2a41fecc2a41fe95238268fc8f834bf6354c78b7/filename?comp=range&sv=2021-04-10&spr=https%2Chttp&st=2021-05-13T21%3A20%3A07Z&se=2021-05-15T21%3A20%3A07Z&sr=f&sp=rcwd&sig=REDACTED&rscc=cache&rscd=disposition&rsce=encoding&rscl=language&rsct=type", "Headers" : { "x-ms-version" : "2020-10-02", "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.2 (11.0.7; Windows 10; 10.0)", diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/FileSasClientTestsFileSASNetworkTestUploadFails.json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/FileSasClientTestsFileSASNetworkTestUploadFails.json index a04bb8f318c20..cc6c530b759c2 100644 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/FileSasClientTestsFileSASNetworkTestUploadFails.json +++ b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/FileSasClientTestsFileSASNetworkTestUploadFails.json @@ -51,7 +51,7 @@ "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.file.core.windows.net/807e6177807e6177d5d67884e845f6d95048419c83/filename?comp=range&sv=2021-06-08&spr=https%2Chttp&st=2021-05-13T21%3A20%3A07Z&se=2021-05-15T21%3A20%3A07Z&sr=f&sp=rcd&sig=REDACTED&rscc=cache&rscd=disposition&rsce=encoding&rscl=language&rsct=type", + "Uri" : "https://REDACTED.file.core.windows.net/807e6177807e6177d5d67884e845f6d95048419c83/filename?comp=range&sv=2021-04-10&spr=https%2Chttp&st=2021-05-13T21%3A20%3A07Z&se=2021-05-15T21%3A20%3A07Z&sr=f&sp=rcd&sig=REDACTED&rscc=cache&rscd=disposition&rsce=encoding&rscl=language&rsct=type", "Headers" : { "x-ms-version" : "2020-10-02", "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.2 (11.0.7; Windows 10; 10.0)", @@ -74,7 +74,7 @@ "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.file.core.windows.net/807e6177807e6177d5d67884e845f6d95048419c83/filename?sv=2021-06-08&spr=https%2Chttp&st=2021-05-13T21%3A20%3A07Z&se=2021-05-15T21%3A20%3A07Z&sr=f&sp=rcd&sig=REDACTED&rscc=cache&rscd=disposition&rsce=encoding&rscl=language&rsct=type", + "Uri" : "https://REDACTED.file.core.windows.net/807e6177807e6177d5d67884e845f6d95048419c83/filename?sv=2021-04-10&spr=https%2Chttp&st=2021-05-13T21%3A20%3A07Z&se=2021-05-15T21%3A20%3A07Z&sr=f&sp=rcd&sig=REDACTED&rscc=cache&rscd=disposition&rsce=encoding&rscl=language&rsct=type", "Headers" : { "x-ms-version" : "2020-10-02", "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.2 (11.0.7; Windows 10; 10.0)", diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/FileSasClientTestsShareSASNetworkIdentifierPermissions.json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/FileSasClientTestsShareSASNetworkIdentifierPermissions.json index 8fadd9a4221d4..709f6ec605515 100644 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/FileSasClientTestsShareSASNetworkIdentifierPermissions.json +++ b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/FileSasClientTestsShareSASNetworkIdentifierPermissions.json @@ -73,7 +73,7 @@ "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.file.core.windows.net/e240ca64e240ca64fa812765b7c9466e41434f0e85/dir?restype=directory&sv=2021-06-08&si=0000&sr=s&sig=REDACTED", + "Uri" : "https://REDACTED.file.core.windows.net/e240ca64e240ca64fa812765b7c9466e41434f0e85/dir?restype=directory&sv=2021-04-10&si=0000&sr=s&sig=REDACTED", "Headers" : { "x-ms-version" : "2020-10-02", "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.2 (11.0.7; Windows 10; 10.0)", @@ -102,7 +102,7 @@ "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.file.core.windows.net/e240ca64e240ca64fa812765b7c9466e41434f0e85/dir?restype=directory&sv=2021-06-08&si=0000&sr=s&sig=REDACTED", + "Uri" : "https://REDACTED.file.core.windows.net/e240ca64e240ca64fa812765b7c9466e41434f0e85/dir?restype=directory&sv=2021-04-10&si=0000&sr=s&sig=REDACTED", "Headers" : { "x-ms-version" : "2020-10-02", "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.2 (11.0.7; Windows 10; 10.0)", @@ -121,7 +121,7 @@ "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.file.core.windows.net/e240ca64e240ca64fa812765b7c9466e41434f0e85/dir?restype=directory&sv=2021-06-08&se=2021-05-15T21%3A20%3A37Z&sr=s&sp=rcwdl&sig=REDACTED", + "Uri" : "https://REDACTED.file.core.windows.net/e240ca64e240ca64fa812765b7c9466e41434f0e85/dir?restype=directory&sv=2021-04-10&se=2021-05-15T21%3A20%3A37Z&sr=s&sp=rcwdl&sig=REDACTED", "Headers" : { "x-ms-version" : "2020-10-02", "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.2 (11.0.7; Windows 10; 10.0)", @@ -150,7 +150,7 @@ "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.file.core.windows.net/e240ca64e240ca64fa812765b7c9466e41434f0e85/dir?restype=directory&sv=2021-06-08&se=2021-05-15T21%3A20%3A37Z&sr=s&sp=rcwdl&sig=REDACTED", + "Uri" : "https://REDACTED.file.core.windows.net/e240ca64e240ca64fa812765b7c9466e41434f0e85/dir?restype=directory&sv=2021-04-10&se=2021-05-15T21%3A20%3A37Z&sr=s&sp=rcwdl&sig=REDACTED", "Headers" : { "x-ms-version" : "2020-10-02", "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.2 (11.0.7; Windows 10; 10.0)", diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/PageBlobAPITestCreateIfNotExistsTags[0].json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/PageBlobAPITestCreateIfNotExistsTags[0].json deleted file mode 100644 index f1289f19bbd7d..0000000000000 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/PageBlobAPITestCreateIfNotExistsTags[0].json +++ /dev/null @@ -1,90 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "http://REDACTED.blob.core.windows.net/fbd6e4810fbd6e481513552500784af5563824fbfbd9?restype=container", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.16.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "86da34ac-fd2d-493f-b652-ad78110c8c70" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA16A05215BF3C", - "Last-Modified" : "Tue, 05 Apr 2022 01:05:05 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "0f32da39-e01e-0050-1689-484bdc000000", - "x-ms-client-request-id" : "86da34ac-fd2d-493f-b652-ad78110c8c70", - "Date" : "Tue, 05 Apr 2022 01:05:05 GMT" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "http://REDACTED.blob.core.windows.net/fbd6e4810fbd6e481513552500784af5563824fbfbd9/fbd6e4811fbd6e481513993318c1f52f0887242e7871", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.16.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "6978ad93-c5b5-4faf-b930-e07d771a769a" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA16A0523A9289", - "Last-Modified" : "Tue, 05 Apr 2022 01:05:05 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "a14aec45-701e-00f4-4389-487138000000", - "x-ms-request-server-encrypted" : "true", - "x-ms-client-request-id" : "6978ad93-c5b5-4faf-b930-e07d771a769a", - "Date" : "Tue, 05 Apr 2022 01:05:05 GMT" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "http://REDACTED.blob.core.windows.net/fbd6e4810fbd6e481513552500784af5563824fbfbd9/fbd6e4812fbd6e48151305046e299cd42228243f8a57", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.16.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "114afc33-9270-44e8-9d54-bdea476a005a" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA16A0524A95BA", - "Last-Modified" : "Tue, 05 Apr 2022 01:05:05 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "0f32da46-e01e-0050-1f89-484bdc000000", - "x-ms-request-server-encrypted" : "true", - "x-ms-client-request-id" : "114afc33-9270-44e8-9d54-bdea476a005a", - "Date" : "Tue, 05 Apr 2022 01:05:05 GMT" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "http://REDACTED.blob.core.windows.net/fbd6e4810fbd6e481513552500784af5563824fbfbd9/fbd6e4812fbd6e48151305046e299cd42228243f8a57?comp=tags", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.16.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "e1e604c8-a892-4402-86d4-fa7148edc167" - }, - "Response" : { - "content-length" : "64", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "0f32da4b-e01e-0050-2189-484bdc000000", - "Body" : "\n", - "x-ms-client-request-id" : "e1e604c8-a892-4402-86d4-fa7148edc167", - "Date" : "Tue, 05 Apr 2022 01:05:05 GMT", - "Content-Type" : "application/xml" - }, - "Exception" : null - } ], - "variables" : [ "fbd6e4810fbd6e481513552500784af5563824fbfbd9", "fbd6e4811fbd6e481513993318c1f52f0887242e7871", "fbd6e4812fbd6e48151305046e299cd42228243f8a57" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/PageBlobAPITestCreateIfNotExistsTags[1].json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/PageBlobAPITestCreateIfNotExistsTags[1].json deleted file mode 100644 index d37475739f63c..0000000000000 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/PageBlobAPITestCreateIfNotExistsTags[1].json +++ /dev/null @@ -1,90 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "http://REDACTED.blob.core.windows.net/e2cdd5c00e2cdd5c0eab2765326db04267ded479cbc9?restype=container", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.16.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "8789e212-4f4d-45a1-a3de-15f97431b1cd" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA16A0521734CC", - "Last-Modified" : "Tue, 05 Apr 2022 01:05:05 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "e90d69b3-201e-0020-4989-483818000000", - "x-ms-client-request-id" : "8789e212-4f4d-45a1-a3de-15f97431b1cd", - "Date" : "Tue, 05 Apr 2022 01:05:04 GMT" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "http://REDACTED.blob.core.windows.net/e2cdd5c00e2cdd5c0eab2765326db04267ded479cbc9/e2cdd5c01e2cdd5c0eab24973ccbb6b60d6bf4ed2811", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.16.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "6a79e8c4-04f8-4aa8-aa26-0882125708a2" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA16A0523A9289", - "Last-Modified" : "Tue, 05 Apr 2022 01:05:05 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "0f32da43-e01e-0050-1c89-484bdc000000", - "x-ms-request-server-encrypted" : "true", - "x-ms-client-request-id" : "6a79e8c4-04f8-4aa8-aa26-0882125708a2", - "Date" : "Tue, 05 Apr 2022 01:05:05 GMT" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "http://REDACTED.blob.core.windows.net/e2cdd5c00e2cdd5c0eab2765326db04267ded479cbc9/e2cdd5c02e2cdd5c0eab8526588f3836060d547edab2", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.16.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "a89cc367-a386-4708-b844-0e3f44cdc71a" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA16A0524C9141", - "Last-Modified" : "Tue, 05 Apr 2022 01:05:05 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "e90d69c1-201e-0020-5589-483818000000", - "x-ms-request-server-encrypted" : "true", - "x-ms-client-request-id" : "a89cc367-a386-4708-b844-0e3f44cdc71a", - "Date" : "Tue, 05 Apr 2022 01:05:05 GMT" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "http://REDACTED.blob.core.windows.net/e2cdd5c00e2cdd5c0eab2765326db04267ded479cbc9/e2cdd5c02e2cdd5c0eab8526588f3836060d547edab2?comp=tags", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.16.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "865ca458-411c-4eac-a51b-f4630d18dfef" - }, - "Response" : { - "content-length" : "160", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "e90d69c5-201e-0020-5989-483818000000", - "Body" : "\nfizzbuzzfoobar", - "x-ms-client-request-id" : "865ca458-411c-4eac-a51b-f4630d18dfef", - "Date" : "Tue, 05 Apr 2022 01:05:05 GMT", - "Content-Type" : "application/xml" - }, - "Exception" : null - } ], - "variables" : [ "e2cdd5c00e2cdd5c0eab2765326db04267ded479cbc9", "e2cdd5c01e2cdd5c0eab24973ccbb6b60d6bf4ed2811", "e2cdd5c02e2cdd5c0eab8526588f3836060d547edab2" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/PageBlobAPITestCreateIfNotExistsTags[2].json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/PageBlobAPITestCreateIfNotExistsTags[2].json deleted file mode 100644 index 3e05e289322f8..0000000000000 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/PageBlobAPITestCreateIfNotExistsTags[2].json +++ /dev/null @@ -1,90 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "http://REDACTED.blob.core.windows.net/c9e086030c9e086033880720372afee9b3f1e4223808?restype=container", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.16.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "037a16c4-50df-4cdf-bb28-77d01fc6c757" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA16A052184D72", - "Last-Modified" : "Tue, 05 Apr 2022 01:05:05 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "a14aec3c-701e-00f4-3d89-487138000000", - "x-ms-client-request-id" : "037a16c4-50df-4cdf-bb28-77d01fc6c757", - "Date" : "Tue, 05 Apr 2022 01:05:05 GMT" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "http://REDACTED.blob.core.windows.net/c9e086030c9e086033880720372afee9b3f1e4223808/c9e086031c9e08603388369058a810c9a2a8446728d0", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.16.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "61f43fa8-cb33-4899-a433-68e52fbc1581" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA16A0523A9289", - "Last-Modified" : "Tue, 05 Apr 2022 01:05:05 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "e90d69be-201e-0020-5289-483818000000", - "x-ms-request-server-encrypted" : "true", - "x-ms-client-request-id" : "61f43fa8-cb33-4899-a433-68e52fbc1581", - "Date" : "Tue, 05 Apr 2022 01:05:04 GMT" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "http://REDACTED.blob.core.windows.net/c9e086030c9e086033880720372afee9b3f1e4223808/c9e086032c9e0860338800799c8ad9c0a8da3451c9f9", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.16.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "19d044b7-cad4-4eed-9d3a-d8b258fe44b2" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA16A0524C9141", - "Last-Modified" : "Tue, 05 Apr 2022 01:05:05 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "a14aec49-701e-00f4-4789-487138000000", - "x-ms-request-server-encrypted" : "true", - "x-ms-client-request-id" : "19d044b7-cad4-4eed-9d3a-d8b258fe44b2", - "Date" : "Tue, 05 Apr 2022 01:05:05 GMT" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "http://REDACTED.blob.core.windows.net/c9e086030c9e086033880720372afee9b3f1e4223808/c9e086032c9e0860338800799c8ad9c0a8da3451c9f9?comp=tags", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-blob/12.16.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "7bb8106a-46a9-49f7-8967-79e6d59858cc" - }, - "Response" : { - "content-length" : "134", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "200", - "x-ms-request-id" : "a14aec4c-701e-00f4-4a89-487138000000", - "Body" : "\n +-./:=_ +-./:=_ +-./:=_", - "x-ms-client-request-id" : "7bb8106a-46a9-49f7-8967-79e6d59858cc", - "Date" : "Tue, 05 Apr 2022 01:05:05 GMT", - "Content-Type" : "application/xml" - }, - "Exception" : null - } ], - "variables" : [ "c9e086030c9e086033880720372afee9b3f1e4223808", "c9e086031c9e08603388369058a810c9a2a8446728d0", "c9e086032c9e0860338800799c8ad9c0a8da3451c9f9" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAPITestsCreateIfNotExistDirectoryFilePermissionKey.json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAPITestsCreateIfNotExistDirectoryFilePermissionKey.json deleted file mode 100644 index e39009b1d9b9e..0000000000000 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAPITestsCreateIfNotExistDirectoryFilePermissionKey.json +++ /dev/null @@ -1,75 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/99cff5e399cff5e3ed313847b9aed6840bb7465e97?restype=share", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "7fbc7b4a-4b99-4aa0-8c2a-08faa9d2d9d8" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA1F7BFCEFD01B", - "Last-Modified" : "Sat, 16 Apr 2022 07:37:41 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "5b7009b2-101a-0034-2f64-512130000000", - "x-ms-client-request-id" : "7fbc7b4a-4b99-4aa0-8c2a-08faa9d2d9d8", - "Date" : "Sat, 16 Apr 2022 07:37:40 GMT" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/99cff5e399cff5e3ed313847b9aed6840bb7465e97?restype=share&comp=filepermission", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "a424befb-581a-4c4b-999a-622e88341f75", - "Content-Type" : "application/json" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2021-04-10", - "x-ms-file-permission-key" : "8672059509846091151*16113479809698295934", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "d3e34382-001a-005a-6e64-51741f000000", - "x-ms-client-request-id" : "a424befb-581a-4c4b-999a-622e88341f75", - "Date" : "Sat, 16 Apr 2022 07:37:40 GMT" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/99cff5e399cff5e3ed313847b9aed6840bb7465e97/testCreateDirectory?restype=directory", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "7a3000d5-48bd-4b8c-befb-549cb8d14d2b" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "x-ms-file-permission-key" : "4445907346579170507*16113479809698295934", - "x-ms-file-id" : "13835128424026341376", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2022-04-16T07:37:41.1745628Z", - "Last-Modified" : "Sat, 16 Apr 2022 07:37:41 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Sat, 16 Apr 2022 07:37:40 GMT", - "x-ms-file-attributes" : "Directory", - "x-ms-file-change-time" : "2022-04-16T07:37:41.1745628Z", - "x-ms-file-parent-id" : "0", - "eTag" : "0x8DA1F7BFCF5B35C", - "x-ms-request-id" : "726c5c79-301a-000c-2464-5185f0000000", - "x-ms-client-request-id" : "7a3000d5-48bd-4b8c-befb-549cb8d14d2b", - "x-ms-file-last-write-time" : "2022-04-16T07:37:41.1745628Z" - }, - "Exception" : null - } ], - "variables" : [ "99cff5e399cff5e3ed313847b9aed6840bb7465e97", "2022-04-16T07:37:41.174562800Z", "2022-04-16T07:37:41.174562800Z" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAPITestsCreateIfNotExistsDirectory.json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAPITestsCreateIfNotExistsDirectory.json deleted file mode 100644 index 2bdd8c0609787..0000000000000 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAPITestsCreateIfNotExistsDirectory.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/ab7742c5ab7742c5c633087321a12176be834bbb92?restype=share", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "3c765f1f-f6cf-40b5-8b70-418c3dad13e2" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA1F7BFCEB84FD", - "Last-Modified" : "Sat, 16 Apr 2022 07:37:41 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "6af41a6b-401a-0029-1064-512c8c000000", - "x-ms-client-request-id" : "3c765f1f-f6cf-40b5-8b70-418c3dad13e2", - "Date" : "Sat, 16 Apr 2022 07:37:40 GMT" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/ab7742c5ab7742c5c633087321a12176be834bbb92/testCreateDirectory?restype=directory", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "37f0f4c6-cce1-4a89-91a7-b6fead19de29" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "x-ms-file-permission-key" : "13206157815093487607*16113479809698295934", - "x-ms-file-id" : "13835128424026341376", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2022-04-16T07:37:41.2657241Z", - "Last-Modified" : "Sat, 16 Apr 2022 07:37:41 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Sat, 16 Apr 2022 07:37:41 GMT", - "x-ms-file-attributes" : "Directory", - "x-ms-file-change-time" : "2022-04-16T07:37:41.2657241Z", - "x-ms-file-parent-id" : "0", - "eTag" : "0x8DA1F7BFD039C59", - "x-ms-request-id" : "5b7009b5-101a-0034-3064-512130000000", - "x-ms-client-request-id" : "37f0f4c6-cce1-4a89-91a7-b6fead19de29", - "x-ms-file-last-write-time" : "2022-04-16T07:37:41.2657241Z" - }, - "Exception" : null - } ], - "variables" : [ "ab7742c5ab7742c5c633087321a12176be834bbb92" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAPITestsCreateIfNotExistsDirectoryFilePermission.json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAPITestsCreateIfNotExistsDirectoryFilePermission.json deleted file mode 100644 index 6e2c59bb6f849..0000000000000 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAPITestsCreateIfNotExistsDirectoryFilePermission.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/b8d5f020b8d5f020f5b726443a0fad91415b433f89?restype=share", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "1ba2d078-921e-4930-b4cf-2112bd50793a" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA1F7BFCF0B144", - "Last-Modified" : "Sat, 16 Apr 2022 07:37:41 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "342e1352-301a-007e-0764-5182bf000000", - "x-ms-client-request-id" : "1ba2d078-921e-4930-b4cf-2112bd50793a", - "Date" : "Sat, 16 Apr 2022 07:37:40 GMT" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/b8d5f020b8d5f020f5b726443a0fad91415b433f89/testCreateDirectory?restype=directory", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "f0c84817-71a0-458a-883f-cab55196be63" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "x-ms-file-permission-key" : "4445907346579170507*16113479809698295934", - "x-ms-file-id" : "13835128424026341376", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2022-04-16T07:37:41.2727202Z", - "Last-Modified" : "Sat, 16 Apr 2022 07:37:41 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Sat, 16 Apr 2022 07:37:40 GMT", - "x-ms-file-attributes" : "Directory", - "x-ms-file-change-time" : "2022-04-16T07:37:41.2727202Z", - "x-ms-file-parent-id" : "0", - "eTag" : "0x8DA1F7BFD04ADA2", - "x-ms-request-id" : "726c5c76-301a-000c-2364-5185f0000000", - "x-ms-client-request-id" : "f0c84817-71a0-458a-883f-cab55196be63", - "x-ms-file-last-write-time" : "2022-04-16T07:37:41.2727202Z" - }, - "Exception" : null - } ], - "variables" : [ "b8d5f020b8d5f020f5b726443a0fad91415b433f89" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAPITestsCreateIfNotExistsDirectoryInvalidName.json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAPITestsCreateIfNotExistsDirectoryInvalidName.json deleted file mode 100644 index d1482f8aad89a..0000000000000 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAPITestsCreateIfNotExistsDirectoryInvalidName.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/6f0a1dfc6f0a1dfcf0840584f8b21dda60c64b09ba?restype=share", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "7b0c5ff6-6c3b-43f2-8eb6-568e91de71cf" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA1F7BFCEF97F0", - "Last-Modified" : "Sat, 16 Apr 2022 07:37:41 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "b5ba6645-001a-0007-1664-517e9b000000", - "x-ms-client-request-id" : "7b0c5ff6-6c3b-43f2-8eb6-568e91de71cf", - "Date" : "Sat, 16 Apr 2022 07:37:40 GMT" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/6f0a1dfc6f0a1dfcf0840584f8b21dda60c64b09ba/test%2Fdirectory?restype=directory", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "f5045523-ddd3-441f-aed6-4c4cbaf81d98" - }, - "Response" : { - "content-length" : "224", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-error-code" : "ParentNotFound", - "retry-after" : "0", - "StatusCode" : "404", - "x-ms-request-id" : "6af41a6e-401a-0029-1164-512c8c000000", - "Body" : "ParentNotFoundThe specified parent path does not exist.\nRequestId:6af41a6e-401a-0029-1164-512c8c000000\nTime:2022-04-16T07:37:41.3686890Z", - "x-ms-client-request-id" : "f5045523-ddd3-441f-aed6-4c4cbaf81d98", - "Date" : "Sat, 16 Apr 2022 07:37:40 GMT", - "Content-Type" : "application/xml" - }, - "Exception" : null - } ], - "variables" : [ "6f0a1dfc6f0a1dfcf0840584f8b21dda60c64b09ba" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAPITestsCreateIfNotExistsDirectoryMetadata.json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAPITestsCreateIfNotExistsDirectoryMetadata.json deleted file mode 100644 index 81365b2d9c8cc..0000000000000 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAPITestsCreateIfNotExistsDirectoryMetadata.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/4660e8bf4660e8bf2e6711809c43f06bf185419185?restype=share", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "5ef45283-cbda-4177-a5be-07cff0a849bf" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA1F7BFCEF0E65", - "Last-Modified" : "Sat, 16 Apr 2022 07:37:41 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "a9664202-d01a-0076-7064-5198b0000000", - "x-ms-client-request-id" : "5ef45283-cbda-4177-a5be-07cff0a849bf", - "Date" : "Sat, 16 Apr 2022 07:37:40 GMT" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/4660e8bf4660e8bf2e6711809c43f06bf185419185/testCreateDirectory?restype=directory", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "6df72951-f24c-492a-b58b-b05f9b384601" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "x-ms-file-permission-key" : "13206157815093487607*16113479809698295934", - "x-ms-file-id" : "13835128424026341376", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2022-04-16T07:37:41.2687225Z", - "Last-Modified" : "Sat, 16 Apr 2022 07:37:41 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Sat, 16 Apr 2022 07:37:40 GMT", - "x-ms-file-attributes" : "Directory", - "x-ms-file-change-time" : "2022-04-16T07:37:41.2687225Z", - "x-ms-file-parent-id" : "0", - "eTag" : "0x8DA1F7BFD041179", - "x-ms-request-id" : "342e1355-301a-007e-0864-5182bf000000", - "x-ms-client-request-id" : "6df72951-f24c-492a-b58b-b05f9b384601", - "x-ms-file-last-write-time" : "2022-04-16T07:37:41.2687225Z" - }, - "Exception" : null - } ], - "variables" : [ "4660e8bf4660e8bf2e6711809c43f06bf185419185" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAPITestsCreateIfNotExistsDirectoryMetadataError.json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAPITestsCreateIfNotExistsDirectoryMetadataError.json deleted file mode 100644 index 0e1f8b4510dd9..0000000000000 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAPITestsCreateIfNotExistsDirectoryMetadataError.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/f3b446c4f3b446c49e764922beb6aaabb4cd4537a0?restype=share", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "320924c9-f1af-47e0-ab97-fbb8ac66bdac" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA1F7BFCEA851A", - "Last-Modified" : "Sat, 16 Apr 2022 07:37:41 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "d3e3437f-001a-005a-6d64-51741f000000", - "x-ms-client-request-id" : "320924c9-f1af-47e0-ab97-fbb8ac66bdac", - "Date" : "Sat, 16 Apr 2022 07:37:40 GMT" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/f3b446c4f3b446c49e764922beb6aaabb4cd4537a0/testdirectory?restype=directory", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "d3b94809-820d-4c7c-bddc-3a3babed8b20" - }, - "Response" : { - "content-length" : "278", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-error-code" : "EmptyMetadataKey", - "retry-after" : "0", - "StatusCode" : "400", - "x-ms-request-id" : "a9664205-d01a-0076-7164-5198b0000000", - "Body" : "EmptyMetadataKeyThe key for one of the metadata key-value pairs is empty.\nRequestId:a9664205-d01a-0076-7164-5198b0000000\nTime:2022-04-16T07:37:41.2599449Zvalue", - "x-ms-client-request-id" : "d3b94809-820d-4c7c-bddc-3a3babed8b20", - "Date" : "Sat, 16 Apr 2022 07:37:40 GMT", - "Content-Type" : "application/xml" - }, - "Exception" : null - } ], - "variables" : [ "f3b446c4f3b446c49e764922beb6aaabb4cd4537a0" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAPITestsCreateIfNotExistsDirectoryThatAlreadyExists.json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAPITestsCreateIfNotExistsDirectoryThatAlreadyExists.json deleted file mode 100644 index 11a156c3aca99..0000000000000 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAPITestsCreateIfNotExistsDirectoryThatAlreadyExists.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/2a1753d402a1753d4d95253307cc6dd9897b3439da3b?restype=share", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "21ecaf8f-46de-45d2-9f50-08f9640c0700" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA1F7BFCEF75ED", - "Last-Modified" : "Sat, 16 Apr 2022 07:37:41 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "726c5c73-301a-000c-2264-5185f0000000", - "x-ms-client-request-id" : "21ecaf8f-46de-45d2-9f50-08f9640c0700", - "Date" : "Sat, 16 Apr 2022 07:37:40 GMT" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/2a1753d402a1753d4d95253307cc6dd9897b3439da3b/testCreateDirectory?restype=directory", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "6ab5ed66-b37d-418e-b28b-63d14c251f75" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "x-ms-file-permission-key" : "13206157815093487607*16113479809698295934", - "x-ms-file-id" : "13835128424026341376", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2022-04-16T07:37:41.2677229Z", - "Last-Modified" : "Sat, 16 Apr 2022 07:37:41 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Sat, 16 Apr 2022 07:37:40 GMT", - "x-ms-file-attributes" : "Directory", - "x-ms-file-change-time" : "2022-04-16T07:37:41.2677229Z", - "x-ms-file-parent-id" : "0", - "eTag" : "0x8DA1F7BFD03EA6D", - "x-ms-request-id" : "b5ba6648-001a-0007-1764-517e9b000000", - "x-ms-client-request-id" : "6ab5ed66-b37d-418e-b28b-63d14c251f75", - "x-ms-file-last-write-time" : "2022-04-16T07:37:41.2677229Z" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/2a1753d402a1753d4d95253307cc6dd9897b3439da3b/testCreateDirectory?restype=directory", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "56288267-dbe9-4f7e-8b89-ebeb38e7d44b" - }, - "Response" : { - "content-length" : "228", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-error-code" : "ResourceAlreadyExists", - "retry-after" : "0", - "StatusCode" : "409", - "x-ms-request-id" : "d3e34385-001a-005a-6f64-51741f000000", - "Body" : "ResourceAlreadyExistsThe specified resource already exists.\nRequestId:d3e34385-001a-005a-6f64-51741f000000\nTime:2022-04-16T07:37:41.3311619Z", - "x-ms-client-request-id" : "56288267-dbe9-4f7e-8b89-ebeb38e7d44b", - "Date" : "Sat, 16 Apr 2022 07:37:40 GMT", - "Content-Type" : "application/xml" - }, - "Exception" : null - } ], - "variables" : [ "2a1753d42a1753d4d95176037cb70724779348a8aa", "2a1753d402a1753d4d95253307cc6dd9897b3439da3b" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAPITestsCreateIfNotExistsShare.json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAPITestsCreateIfNotExistsShare.json deleted file mode 100644 index d6bb5a639c8a4..0000000000000 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAPITestsCreateIfNotExistsShare.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.file.core.windows.net/9dfb3cef9dfb3cef0185883558af6fe7ca934d20ad?restype=share", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "8aea219c-18d4-4fd8-b318-fd1d2e6944ee" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA175A56321C8D", - "Last-Modified" : "Tue, 05 Apr 2022 23:16:38 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "325d8e36-201a-0001-7743-49127c000000", - "x-ms-client-request-id" : "8aea219c-18d4-4fd8-b318-fd1d2e6944ee", - "Date" : "Tue, 05 Apr 2022 23:16:38 GMT" - }, - "Exception" : null - } ], - "variables" : [ "9dfb3cef9dfb3cef0185883558af6fe7ca934d20ad" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAPITestsCreateIfNotExistsShareThatAlreadyExists.json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAPITestsCreateIfNotExistsShareThatAlreadyExists.json deleted file mode 100644 index 7010b5cde58b9..0000000000000 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAPITestsCreateIfNotExistsShareThatAlreadyExists.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.file.core.windows.net/911aad980911aad98610868580a48bf5c39c1458d913?restype=share", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "76c211a1-98dd-449b-9787-d466e5936931" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA1C6967E7C85E", - "Last-Modified" : "Tue, 12 Apr 2022 09:47:06 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "8e6e51a1-e01a-006d-5952-4ea6b3000000", - "x-ms-client-request-id" : "76c211a1-98dd-449b-9787-d466e5936931", - "Date" : "Tue, 12 Apr 2022 09:47:06 GMT" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "https://REDACTED.file.core.windows.net/911aad980911aad98610868580a48bf5c39c1458d913?restype=share", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "b2cb02a2-76f0-4f3f-a8a8-5eb7dbb54d7b" - }, - "Response" : { - "content-length" : "222", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-error-code" : "ShareAlreadyExists", - "retry-after" : "0", - "StatusCode" : "409", - "x-ms-request-id" : "8e6e51a5-e01a-006d-5b52-4ea6b3000000", - "Body" : "ShareAlreadyExistsThe specified share already exists.\nRequestId:8e6e51a5-e01a-006d-5b52-4ea6b3000000\nTime:2022-04-12T09:47:06.8682530Z", - "x-ms-client-request-id" : "b2cb02a2-76f0-4f3f-a8a8-5eb7dbb54d7b", - "Date" : "Tue, 12 Apr 2022 09:47:06 GMT", - "Content-Type" : "application/xml" - }, - "Exception" : null - } ], - "variables" : [ "911aad98911aad986104771833f5bdc38bc94af5a1", "911aad980911aad98610868580a48bf5c39c1458d913" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAPITestsCreateIfNotExistsShareWithArgs[0].json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAPITestsCreateIfNotExistsShareWithArgs[0].json deleted file mode 100644 index 789aabf87ed60..0000000000000 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAPITestsCreateIfNotExistsShareWithArgs[0].json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.file.core.windows.net/83ee1a5583ee1a55e3973650cfdbc2273f0b4a94b3?restype=share", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "5f2d2b42-0322-4332-982e-364bd88f409c" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA175A5621BF56", - "Last-Modified" : "Tue, 05 Apr 2022 23:16:38 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "2c65e0b7-c01a-0026-3643-4905b8000000", - "x-ms-client-request-id" : "5f2d2b42-0322-4332-982e-364bd88f409c", - "Date" : "Tue, 05 Apr 2022 23:16:38 GMT" - }, - "Exception" : null - } ], - "variables" : [ "83ee1a5583ee1a55e3973650cfdbc2273f0b4a94b3" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAPITestsCreateIfNotExistsShareWithArgs[1].json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAPITestsCreateIfNotExistsShareWithArgs[1].json deleted file mode 100644 index 81f1ca83cd0d2..0000000000000 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAPITestsCreateIfNotExistsShareWithArgs[1].json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.file.core.windows.net/9af52b149af52b1465424250cec103a8388f44f696?restype=share", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "4ab49a79-4000-4931-9c6a-837d313877c8" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA175A5622ECCC", - "Last-Modified" : "Tue, 05 Apr 2022 23:16:38 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "e8b567b5-201a-0011-3e43-49d714000000", - "x-ms-client-request-id" : "4ab49a79-4000-4931-9c6a-837d313877c8", - "Date" : "Tue, 05 Apr 2022 23:16:37 GMT" - }, - "Exception" : null - } ], - "variables" : [ "9af52b149af52b1465424250cec103a8388f44f696" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAPITestsCreateIfNotExistsShareWithArgs[2].json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAPITestsCreateIfNotExistsShareWithArgs[2].json deleted file mode 100644 index 25f45b6016938..0000000000000 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAPITestsCreateIfNotExistsShareWithArgs[2].json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.file.core.windows.net/b1d878d7b1d878d7c4c28138a33ea3919bfa40c797?restype=share", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "fd8b1f01-7ab0-43a3-a37b-c9b9586835b2" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA175A5621D7E3", - "Last-Modified" : "Tue, 05 Apr 2022 23:16:38 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f5d101d8-b01a-0013-6e43-4969ac000000", - "x-ms-client-request-id" : "fd8b1f01-7ab0-43a3-a37b-c9b9586835b2", - "Date" : "Tue, 05 Apr 2022 23:16:38 GMT" - }, - "Exception" : null - } ], - "variables" : [ "b1d878d7b1d878d7c4c28138a33ea3919bfa40c797" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAPITestsCreateIfNotExistsShareWithArgs[3].json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAPITestsCreateIfNotExistsShareWithArgs[3].json deleted file mode 100644 index 48feb9912c4ac..0000000000000 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAPITestsCreateIfNotExistsShareWithArgs[3].json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.file.core.windows.net/a8c34996a8c3499601b99975aadd0143d6e940c0a0?restype=share", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "d8a648e7-73f3-4684-bbdb-89606f9557a0" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA175A56219DC7", - "Last-Modified" : "Tue, 05 Apr 2022 23:16:38 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "ae2a2dcb-801a-008e-2743-499b16000000", - "x-ms-client-request-id" : "d8a648e7-73f3-4684-bbdb-89606f9557a0", - "Date" : "Tue, 05 Apr 2022 23:16:38 GMT" - }, - "Exception" : null - } ], - "variables" : [ "a8c34996a8c3499601b99975aadd0143d6e940c0a0" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAPITestsCreateIfNotExistsShareWithArgs[4].json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAPITestsCreateIfNotExistsShareWithArgs[4].json deleted file mode 100644 index 9d7cead768d13..0000000000000 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAPITestsCreateIfNotExistsShareWithArgs[4].json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.file.core.windows.net/e782df51e782df513f2532371216b001722242f8b0?restype=share", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "faff0cc5-6ff0-4740-9e0a-bb768cd3a185" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA175A56216AF0", - "Last-Modified" : "Tue, 05 Apr 2022 23:16:38 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "53d5af75-301a-0040-0443-494a98000000", - "x-ms-client-request-id" : "faff0cc5-6ff0-4740-9e0a-bb768cd3a185", - "Date" : "Tue, 05 Apr 2022 23:16:37 GMT" - }, - "Exception" : null - } ], - "variables" : [ "e782df51e782df513f2532371216b001722242f8b0" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAPITestsCreateIfNotExistsShareWithInvalidArgs[0].json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAPITestsCreateIfNotExistsShareWithInvalidArgs[0].json deleted file mode 100644 index 4528e3cac726d..0000000000000 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAPITestsCreateIfNotExistsShareWithInvalidArgs[0].json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.file.core.windows.net/c8200f8fc8200f8fe205230320162ea6c0ae4b888e?restype=share", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "596d2868-449f-4ea1-bcae-a015b766cbd6" - }, - "Response" : { - "content-length" : "278", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-error-code" : "EmptyMetadataKey", - "retry-after" : "0", - "StatusCode" : "400", - "x-ms-request-id" : "9f246804-101a-0035-5f43-4921b4000000", - "Body" : "EmptyMetadataKeyThe key for one of the metadata key-value pairs is empty.\nRequestId:9f246804-101a-0035-5f43-4921b4000000\nTime:2022-04-05T23:16:38.5900402Zvalue", - "x-ms-client-request-id" : "596d2868-449f-4ea1-bcae-a015b766cbd6", - "Date" : "Tue, 05 Apr 2022 23:16:37 GMT", - "Content-Type" : "application/xml" - }, - "Exception" : null - } ], - "variables" : [ "c8200f8fc8200f8fe205230320162ea6c0ae4b888e" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAPITestsCreateIfNotExistsShareWithInvalidArgs[1].json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAPITestsCreateIfNotExistsShareWithInvalidArgs[1].json deleted file mode 100644 index 9b5d142c191c2..0000000000000 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAPITestsCreateIfNotExistsShareWithInvalidArgs[1].json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.file.core.windows.net/d13b3eced13b3eceef65120104e2c649b7984f9d8c?restype=share", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "8b89fb32-1c07-461b-9fa0-98428309a58e" - }, - "Response" : { - "content-length" : "260", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-error-code" : "InvalidMetadata", - "retry-after" : "0", - "StatusCode" : "400", - "x-ms-request-id" : "696b7a71-801a-0055-6e43-495d2b000000", - "Body" : "InvalidMetadataThe metadata specified is invalid. It has characters that are not permitted.\nRequestId:696b7a71-801a-0055-6e43-495d2b000000\nTime:2022-04-05T23:16:38.5840779Z", - "x-ms-client-request-id" : "8b89fb32-1c07-461b-9fa0-98428309a58e", - "Date" : "Tue, 05 Apr 2022 23:16:37 GMT", - "Content-Type" : "application/xml" - }, - "Exception" : null - } ], - "variables" : [ "d13b3eced13b3eceef65120104e2c649b7984f9d8c" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAPITestsCreateIfNotExistsShareWithInvalidArgs[2].json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAPITestsCreateIfNotExistsShareWithInvalidArgs[2].json deleted file mode 100644 index 1a74b9ef93293..0000000000000 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAPITestsCreateIfNotExistsShareWithInvalidArgs[2].json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.file.core.windows.net/fa166d0dfa166d0dda12922832a6610b38ca456ea9?restype=share", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "6978b37a-7eb9-432e-9c52-f016cdee1a50" - }, - "Response" : { - "content-length" : "326", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-error-code" : "InvalidHeaderValue", - "retry-after" : "0", - "StatusCode" : "400", - "x-ms-request-id" : "2009c63b-a01a-000f-7a43-493bcc000000", - "Body" : "InvalidHeaderValueThe value for one of the HTTP headers is not in the correct format.\nRequestId:2009c63b-a01a-000f-7a43-493bcc000000\nTime:2022-04-05T23:16:38.5856432Zx-ms-share-quota6000", - "x-ms-client-request-id" : "6978b37a-7eb9-432e-9c52-f016cdee1a50", - "Date" : "Tue, 05 Apr 2022 23:16:37 GMT", - "Content-Type" : "application/xml" - }, - "Exception" : null - } ], - "variables" : [ "fa166d0dfa166d0dda12922832a6610b38ca456ea9" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAPITestsDeleteFile.json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAPITestsDeleteFile.json index a3d05d4e15270..5d6ecd56696a1 100644 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAPITestsDeleteFile.json +++ b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAPITestsDeleteFile.json @@ -1,73 +1,113 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/e395bcd1e395bcd179a62016524e6c81c66248dea7?restype=share", + "Uri" : "https://REDACTED.file.core.windows.net/e395bcd1e395bcd11d425464bb60aa22c5ea4ae08a?restype=share", "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "e88bbcaf-7ce2-4c8f-b1a8-2a5466f7ab2b" + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "48905db9-ff46-4106-8c57-a63fb8b933c7" }, "Response" : { "content-length" : "0", - "x-ms-version" : "2021-04-10", + "x-ms-version" : "2020-06-12", "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA1F7C594EF1BF", - "Last-Modified" : "Sat, 16 Apr 2022 07:40:16 GMT", + "eTag" : "0x8D910031D6F90DD", + "Last-Modified" : "Wed, 05 May 2021 20:19:41 GMT", "retry-after" : "0", "StatusCode" : "201", - "x-ms-request-id" : "5b700c2d-101a-0034-6f65-512130000000", - "x-ms-client-request-id" : "e88bbcaf-7ce2-4c8f-b1a8-2a5466f7ab2b", - "Date" : "Sat, 16 Apr 2022 07:40:15 GMT" + "x-ms-request-id" : "dae477ef-a01a-0040-03eb-41cd89000000", + "x-ms-client-request-id" : "48905db9-ff46-4106-8c57-a63fb8b933c7", + "Date" : "Wed, 05 May 2021 20:19:41 GMT" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/e395bcd1e395bcd179a62016524e6c81c66248dea7/testCreateFile", + "Uri" : "https://REDACTED.file.core.windows.net/e395bcd1e395bcd11d425464bb60aa22c5ea4ae08a/testCreateFile", "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "4bf69068-b5aa-4650-9803-e081dd8e2f4e" + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "d37ba958-1196-4f61-a27b-ab82859329c2" }, "Response" : { "content-length" : "0", - "x-ms-version" : "2021-04-10", - "x-ms-file-permission-key" : "8592442312075974896*16113479809698295934", + "x-ms-version" : "2020-06-12", + "x-ms-file-permission-key" : "17737392480967489306*6811422022089678740", "x-ms-file-id" : "13835128424026341376", "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2022-04-16T07:40:16.4295152Z", - "Last-Modified" : "Sat, 16 Apr 2022 07:40:16 GMT", + "x-ms-file-creation-time" : "2021-05-05T20:19:41.5264467Z", + "Last-Modified" : "Wed, 05 May 2021 20:19:41 GMT", "retry-after" : "0", "StatusCode" : "201", "x-ms-request-server-encrypted" : "true", - "Date" : "Sat, 16 Apr 2022 07:40:15 GMT", + "Date" : "Wed, 05 May 2021 20:19:40 GMT", "x-ms-file-attributes" : "Archive", - "x-ms-file-change-time" : "2022-04-16T07:40:16.4295152Z", + "x-ms-file-change-time" : "2021-05-05T20:19:41.5264467Z", "x-ms-file-parent-id" : "0", - "eTag" : "0x8DA1F7C597FB9F0", - "x-ms-request-id" : "7138bd57-f01a-0061-6465-5131bb000000", - "x-ms-client-request-id" : "4bf69068-b5aa-4650-9803-e081dd8e2f4e", - "x-ms-file-last-write-time" : "2022-04-16T07:40:16.4295152Z" + "eTag" : "0x8D910031D7C40D3", + "x-ms-request-id" : "9b3a8aa3-601a-005f-51eb-417e8d000000", + "x-ms-client-request-id" : "d37ba958-1196-4f61-a27b-ab82859329c2", + "x-ms-file-last-write-time" : "2021-05-05T20:19:41.5264467Z" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "http://REDACTED.file.core.windows.net/e395bcd1e395bcd179a62016524e6c81c66248dea7/testCreateFile", + "Uri" : "https://REDACTED.file.core.windows.net/e395bcd1e395bcd11d425464bb60aa22c5ea4ae08a/testCreateFile", "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "eb7c1029-514f-47b2-a994-e9b22069dd6b" + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "bdc4a940-fec2-4263-bf8a-98f96758078e" }, "Response" : { "content-length" : "0", - "x-ms-version" : "2021-04-10", + "x-ms-version" : "2020-06-12", "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "202", - "x-ms-request-id" : "7138bd5f-f01a-0061-6565-5131bb000000", - "x-ms-client-request-id" : "eb7c1029-514f-47b2-a994-e9b22069dd6b", - "Date" : "Sat, 16 Apr 2022 07:40:15 GMT" + "x-ms-request-id" : "c82a9316-701a-0053-37eb-41e985000000", + "x-ms-client-request-id" : "bdc4a940-fec2-4263-bf8a-98f96758078e", + "Date" : "Wed, 05 May 2021 20:19:41 GMT" + }, + "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.file.core.windows.net?comp=list&prefix=e395bcd1&include=", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "dc92d702-a018-42e0-ac57-473ebd1e350a" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "e8d81c18-701a-0021-5eeb-41eeca000000", + "Body" : "e395bcd1e395bcd1e395bcd11d425464bb60aa22c5ea4ae08aWed, 05 May 2021 20:19:41 GMT\"0x8D910031D6F90DD\"unlockedavailable5120TransactionOptimizedWed, 05 May 2021 20:19:41 GMT$account-encryption-keyfalse", + "x-ms-client-request-id" : "dc92d702-a018-42e0-ac57-473ebd1e350a", + "Date" : "Wed, 05 May 2021 20:19:41 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.file.core.windows.net/e395bcd1e395bcd11d425464bb60aa22c5ea4ae08a?restype=share", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "9c3c8a6b-1485-4672-8548-0b711c6adc4f" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "f606c21e-201a-004e-3eeb-41e439000000", + "x-ms-client-request-id" : "9c3c8a6b-1485-4672-8548-0b711c6adc4f", + "Date" : "Wed, 05 May 2021 20:19:41 GMT" }, "Exception" : null } ], - "variables" : [ "e395bcd1e395bcd179a62016524e6c81c66248dea7" ] + "variables" : [ "e395bcd1e395bcd11d425464bb60aa22c5ea4ae08a" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAPITestsDeleteFileError.json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAPITestsDeleteFileError.json index d233c26a08e48..e4097a52e2eea 100644 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAPITestsDeleteFileError.json +++ b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAPITestsDeleteFileError.json @@ -1,47 +1,87 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/f1a6ee8af1a6ee8ae0b600623af1df8c8cd845b783?restype=share", + "Uri" : "https://REDACTED.file.core.windows.net/f1a6ee8af1a6ee8a37f33519966c9c0bd31344239d?restype=share", "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "075f2e42-f4f5-40d9-aabb-6b5fbb111893" + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "cded72a3-8d54-4ae2-baf9-a50a9f632488" }, "Response" : { "content-length" : "0", - "x-ms-version" : "2021-04-10", + "x-ms-version" : "2020-06-12", "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA1F7C594EBC32", - "Last-Modified" : "Sat, 16 Apr 2022 07:40:16 GMT", + "eTag" : "0x8D910031D1D29E4", + "Last-Modified" : "Wed, 05 May 2021 20:19:40 GMT", "retry-after" : "0", "StatusCode" : "201", - "x-ms-request-id" : "a96643be-d01a-0076-1265-5198b0000000", - "x-ms-client-request-id" : "075f2e42-f4f5-40d9-aabb-6b5fbb111893", - "Date" : "Sat, 16 Apr 2022 07:40:15 GMT" + "x-ms-request-id" : "dfc6149a-c01a-0046-56eb-41fe36000000", + "x-ms-client-request-id" : "cded72a3-8d54-4ae2-baf9-a50a9f632488", + "Date" : "Wed, 05 May 2021 20:19:39 GMT" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "http://REDACTED.file.core.windows.net/f1a6ee8af1a6ee8ae0b600623af1df8c8cd845b783/testdirectory", + "Uri" : "https://REDACTED.file.core.windows.net/f1a6ee8af1a6ee8a37f33519966c9c0bd31344239d/testdirectory", "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "4133a8b3-d86e-499d-b81f-80e9d2246a28" + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "460c0a62-6a12-4c3e-ba85-5f4a4a38d34a" }, "Response" : { "content-length" : "223", - "x-ms-version" : "2021-04-10", + "x-ms-version" : "2020-06-12", "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", "x-ms-error-code" : "ResourceNotFound", "retry-after" : "0", "StatusCode" : "404", - "x-ms-request-id" : "342e1578-301a-007e-0565-5182bf000000", - "Body" : "ResourceNotFoundThe specified resource does not exist.\nRequestId:342e1578-301a-007e-0565-5182bf000000\nTime:2022-04-16T07:40:16.2962151Z", - "x-ms-client-request-id" : "4133a8b3-d86e-499d-b81f-80e9d2246a28", - "Date" : "Sat, 16 Apr 2022 07:40:15 GMT", + "x-ms-request-id" : "b95818e3-c01a-0056-5deb-413b5e000000", + "Body" : "ResourceNotFoundThe specified resource does not exist.\nRequestId:b95818e3-c01a-0056-5deb-413b5e000000\nTime:2021-05-05T20:19:40.9778565Z", + "x-ms-client-request-id" : "460c0a62-6a12-4c3e-ba85-5f4a4a38d34a", + "Date" : "Wed, 05 May 2021 20:19:40 GMT", "Content-Type" : "application/xml" }, "Exception" : null + }, { + "Method" : "GET", + "Uri" : "https://REDACTED.file.core.windows.net?comp=list&prefix=f1a6ee8a&include=", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "be6e8742-41da-4159-a3bd-8e5a70774ca8" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "200", + "x-ms-request-id" : "03a9d7b6-001a-0004-0deb-4147b6000000", + "Body" : "f1a6ee8af1a6ee8af1a6ee8a37f33519966c9c0bd31344239dWed, 05 May 2021 20:19:40 GMT\"0x8D910031D1D29E4\"unlockedavailable5120TransactionOptimizedWed, 05 May 2021 20:19:40 GMT$account-encryption-keyfalse", + "x-ms-client-request-id" : "be6e8742-41da-4159-a3bd-8e5a70774ca8", + "Date" : "Wed, 05 May 2021 20:19:40 GMT", + "Content-Type" : "application/xml" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://REDACTED.file.core.windows.net/f1a6ee8af1a6ee8a37f33519966c9c0bd31344239d?restype=share", + "Headers" : { + "x-ms-version" : "2020-06-12", + "User-Agent" : "azsdk-java-azure-storage-file-share/12.10.0-beta.1 (11.0.8; Windows 10; 10.0)", + "x-ms-client-request-id" : "e00c1e1f-db63-4aef-b9f3-17972e62fc97" + }, + "Response" : { + "content-length" : "0", + "x-ms-version" : "2020-06-12", + "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", + "retry-after" : "0", + "StatusCode" : "202", + "x-ms-request-id" : "32e93901-a01a-001d-73eb-41c70d000000", + "x-ms-client-request-id" : "e00c1e1f-db63-4aef-b9f3-17972e62fc97", + "Date" : "Wed, 05 May 2021 20:19:40 GMT" + }, + "Exception" : null } ], - "variables" : [ "f1a6ee8af1a6ee8ae0b600623af1df8c8cd845b783" ] + "variables" : [ "f1a6ee8af1a6ee8a37f33519966c9c0bd31344239d" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAPITestsDeleteIfExistsDirThatWasAlreadyDeleted.json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAPITestsDeleteIfExistsDirThatWasAlreadyDeleted.json deleted file mode 100644 index 2f12ac9930929..0000000000000 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAPITestsDeleteIfExistsDirThatWasAlreadyDeleted.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/a94804950a9480495cc093118dd03615ef2484b60a34?restype=share", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "f428ee9a-3610-4596-99b5-a71ac7e5c717" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA1F7BBB490468", - "Last-Modified" : "Sat, 16 Apr 2022 07:35:50 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "a96640dc-d01a-0076-0264-5198b0000000", - "x-ms-client-request-id" : "f428ee9a-3610-4596-99b5-a71ac7e5c717", - "Date" : "Sat, 16 Apr 2022 07:35:50 GMT" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "http://REDACTED.file.core.windows.net/a94804950a9480495cc093118dd03615ef2484b60a34?restype=share", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "71b56755-2878-4f62-9edb-d89c9935d35f" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "726c5ba1-301a-000c-7464-5185f0000000", - "x-ms-client-request-id" : "71b56755-2878-4f62-9edb-d89c9935d35f", - "Date" : "Sat, 16 Apr 2022 07:35:50 GMT" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "http://REDACTED.file.core.windows.net/a94804950a9480495cc093118dd03615ef2484b60a34?restype=share", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "f11b65a4-5a90-4553-8169-9068040a5026" - }, - "Response" : { - "content-length" : "217", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-error-code" : "ShareNotFound", - "retry-after" : "0", - "StatusCode" : "404", - "x-ms-request-id" : "d3e342bd-001a-005a-1864-51741f000000", - "Body" : "ShareNotFoundThe specified share does not exist.\nRequestId:d3e342bd-001a-005a-1864-51741f000000\nTime:2022-04-16T07:36:36.2070664Z", - "x-ms-client-request-id" : "f11b65a4-5a90-4553-8169-9068040a5026", - "Date" : "Sat, 16 Apr 2022 07:36:35 GMT", - "Content-Type" : "application/xml" - }, - "Exception" : null - } ], - "variables" : [ "a9480495a9480495cc0118733f821e557ad44397b3", "a94804950a9480495cc093118dd03615ef2484b60a34" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAPITestsDeleteIfExistsDirectory.json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAPITestsDeleteIfExistsDirectory.json deleted file mode 100644 index f38b2bd597091..0000000000000 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAPITestsDeleteIfExistsDirectory.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/b2530dc6b2530dc6f91750849bff9515857845418f?restype=share", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "dd11d430-f54d-4a25-b3c7-952330908b1e" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA1F7C594E71DC", - "Last-Modified" : "Sat, 16 Apr 2022 07:40:16 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "6af41c0b-401a-0029-8065-512c8c000000", - "x-ms-client-request-id" : "dd11d430-f54d-4a25-b3c7-952330908b1e", - "Date" : "Sat, 16 Apr 2022 07:40:15 GMT" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/b2530dc6b2530dc6f91750849bff9515857845418f/testCreateDirectory?restype=directory", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "e6fb5bd8-984e-4576-82ce-a9daf2171fb2" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "x-ms-file-permission-key" : "13206157815093487607*16113479809698295934", - "x-ms-file-id" : "13835128424026341376", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2022-04-16T07:40:16.2965911Z", - "Last-Modified" : "Sat, 16 Apr 2022 07:40:16 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Sat, 16 Apr 2022 07:40:15 GMT", - "x-ms-file-attributes" : "Directory", - "x-ms-file-change-time" : "2022-04-16T07:40:16.2965911Z", - "x-ms-file-parent-id" : "0", - "eTag" : "0x8DA1F7C596B7197", - "x-ms-request-id" : "d3e345a7-001a-005a-6365-51741f000000", - "x-ms-client-request-id" : "e6fb5bd8-984e-4576-82ce-a9daf2171fb2", - "x-ms-file-last-write-time" : "2022-04-16T07:40:16.2965911Z" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "http://REDACTED.file.core.windows.net/b2530dc6b2530dc6f91750849bff9515857845418f/testCreateDirectory?restype=directory", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "bf131a31-2984-4123-8721-9343b05fa245" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "5b700c38-101a-0034-7165-512130000000", - "x-ms-client-request-id" : "bf131a31-2984-4123-8721-9343b05fa245", - "Date" : "Sat, 16 Apr 2022 07:40:16 GMT" - }, - "Exception" : null - } ], - "variables" : [ "b2530dc6b2530dc6f91750849bff9515857845418f" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAPITestsDeleteIfExistsDirectoryMin.json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAPITestsDeleteIfExistsDirectoryMin.json deleted file mode 100644 index f4895dc96caf5..0000000000000 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAPITestsDeleteIfExistsDirectoryMin.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/4bd8cf734bd8cf73b2641728a3e8dc9872104d0ca0?restype=share", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "608749fe-9c7d-46cb-8ca9-808433684adc" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA1F7C595323C5", - "Last-Modified" : "Sat, 16 Apr 2022 07:40:16 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "342e1572-301a-007e-0465-5182bf000000", - "x-ms-client-request-id" : "608749fe-9c7d-46cb-8ca9-808433684adc", - "Date" : "Sat, 16 Apr 2022 07:40:15 GMT" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/4bd8cf734bd8cf73b2641728a3e8dc9872104d0ca0/testCreateDirectory?restype=directory", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "80841076-d5c4-492c-bb4b-b3abf75e1152" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "x-ms-file-permission-key" : "13206157815093487607*16113479809698295934", - "x-ms-file-id" : "13835128424026341376", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2022-04-16T07:40:16.2935931Z", - "Last-Modified" : "Sat, 16 Apr 2022 07:40:16 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Sat, 16 Apr 2022 07:40:15 GMT", - "x-ms-file-attributes" : "Directory", - "x-ms-file-change-time" : "2022-04-16T07:40:16.2935931Z", - "x-ms-file-parent-id" : "0", - "eTag" : "0x8DA1F7C596AFC7B", - "x-ms-request-id" : "a96643c4-d01a-0076-1365-5198b0000000", - "x-ms-client-request-id" : "80841076-d5c4-492c-bb4b-b3abf75e1152", - "x-ms-file-last-write-time" : "2022-04-16T07:40:16.2935931Z" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "http://REDACTED.file.core.windows.net/4bd8cf734bd8cf73b2641728a3e8dc9872104d0ca0/testCreateDirectory?restype=directory", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "e534abfd-4f3b-4044-ac99-89b5c1c65bb1" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "6af41c18-401a-0029-0265-512c8c000000", - "x-ms-client-request-id" : "e534abfd-4f3b-4044-ac99-89b5c1c65bb1", - "Date" : "Sat, 16 Apr 2022 07:40:15 GMT" - }, - "Exception" : null - } ], - "variables" : [ "4bd8cf734bd8cf73b2641728a3e8dc9872104d0ca0" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAPITestsDeleteIfExistsDirectoryThatDoesNotExist.json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAPITestsDeleteIfExistsDirectoryThatDoesNotExist.json deleted file mode 100644 index 418122e290777..0000000000000 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAPITestsDeleteIfExistsDirectoryThatDoesNotExist.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/a2d5e0e8a2d5e0e8ff0340334669f4cefd86483db5?restype=share", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "279f09ea-2b82-46ca-adce-fcf48f0029b8" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA1F7C594E5FB2", - "Last-Modified" : "Sat, 16 Apr 2022 07:40:16 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "d3e345a1-001a-005a-6265-51741f000000", - "x-ms-client-request-id" : "279f09ea-2b82-46ca-adce-fcf48f0029b8", - "Date" : "Sat, 16 Apr 2022 07:40:15 GMT" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "http://REDACTED.file.core.windows.net/a2d5e0e8a2d5e0e8ff0340334669f4cefd86483db5/testCreateDirectory?restype=directory", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "6f90d3a6-d722-4264-9f48-a908c0054328" - }, - "Response" : { - "content-length" : "223", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-error-code" : "ResourceNotFound", - "retry-after" : "0", - "StatusCode" : "404", - "x-ms-request-id" : "726c5e0f-301a-000c-1065-5185f0000000", - "Body" : "ResourceNotFoundThe specified resource does not exist.\nRequestId:726c5e0f-301a-000c-1065-5185f0000000\nTime:2022-04-16T07:40:16.2936451Z", - "x-ms-client-request-id" : "6f90d3a6-d722-4264-9f48-a908c0054328", - "Date" : "Sat, 16 Apr 2022 07:40:15 GMT", - "Content-Type" : "application/xml" - }, - "Exception" : null - } ], - "variables" : [ "a2d5e0e8a2d5e0e8ff0340334669f4cefd86483db5" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAPITestsDeleteIfExistsFile.json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAPITestsDeleteIfExistsFile.json deleted file mode 100644 index f93b29f6d2288..0000000000000 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAPITestsDeleteIfExistsFile.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/5438b2975438b29759048502522da2ec657047f78f?restype=share", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "24546cb1-f784-45f1-af0e-6b0dfdf9de62" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA1F7C594DA358", - "Last-Modified" : "Sat, 16 Apr 2022 07:40:16 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "7138bd50-f01a-0061-6365-5131bb000000", - "x-ms-client-request-id" : "24546cb1-f784-45f1-af0e-6b0dfdf9de62", - "Date" : "Sat, 16 Apr 2022 07:40:15 GMT" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/5438b2975438b29759048502522da2ec657047f78f/testCreateFile", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "0fabf6bc-b46a-4b9a-a6c1-e9effe9a58d8" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "x-ms-file-permission-key" : "8592442312075974896*16113479809698295934", - "x-ms-file-id" : "13835128424026341376", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2022-04-16T07:40:16.3095834Z", - "Last-Modified" : "Sat, 16 Apr 2022 07:40:16 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Sat, 16 Apr 2022 07:40:15 GMT", - "x-ms-file-attributes" : "Archive", - "x-ms-file-change-time" : "2022-04-16T07:40:16.3095834Z", - "x-ms-file-parent-id" : "0", - "eTag" : "0x8DA1F7C596D6D1A", - "x-ms-request-id" : "5b700c33-101a-0034-7065-512130000000", - "x-ms-client-request-id" : "0fabf6bc-b46a-4b9a-a6c1-e9effe9a58d8", - "x-ms-file-last-write-time" : "2022-04-16T07:40:16.3095834Z" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "http://REDACTED.file.core.windows.net/5438b2975438b29759048502522da2ec657047f78f/testCreateFile", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "8e27a6b5-1346-4ebc-8044-ee8a3842b3be" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "d3e345ad-001a-005a-6465-51741f000000", - "x-ms-client-request-id" : "8e27a6b5-1346-4ebc-8044-ee8a3842b3be", - "Date" : "Sat, 16 Apr 2022 07:40:15 GMT" - }, - "Exception" : null - } ], - "variables" : [ "5438b2975438b29759048502522da2ec657047f78f" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAPITestsDeleteIfExistsFileMin.json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAPITestsDeleteIfExistsFileMin.json deleted file mode 100644 index 255b1ceed8dc3..0000000000000 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAPITestsDeleteIfExistsFileMin.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/9f9b81b59f9b81b50a69934786485fd6355f4dc3a2?restype=share", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "a9a15a94-ac72-47a6-ab9a-d3a10ed17499" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA1F7C594E7A03", - "Last-Modified" : "Sat, 16 Apr 2022 07:40:16 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "726c5e09-301a-000c-0f65-5185f0000000", - "x-ms-client-request-id" : "a9a15a94-ac72-47a6-ab9a-d3a10ed17499", - "Date" : "Sat, 16 Apr 2022 07:40:15 GMT" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/9f9b81b59f9b81b50a69934786485fd6355f4dc3a2/testCreateFile", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "ae2b291e-58db-456d-8533-924a69253d20" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "x-ms-file-permission-key" : "8592442312075974896*16113479809698295934", - "x-ms-file-id" : "13835128424026341376", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2022-04-16T07:40:16.3105831Z", - "Last-Modified" : "Sat, 16 Apr 2022 07:40:16 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Sat, 16 Apr 2022 07:40:15 GMT", - "x-ms-file-attributes" : "Archive", - "x-ms-file-change-time" : "2022-04-16T07:40:16.3105831Z", - "x-ms-file-parent-id" : "0", - "eTag" : "0x8DA1F7C596D9427", - "x-ms-request-id" : "6af41c11-401a-0029-0165-512c8c000000", - "x-ms-client-request-id" : "ae2b291e-58db-456d-8533-924a69253d20", - "x-ms-file-last-write-time" : "2022-04-16T07:40:16.3105831Z" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "http://REDACTED.file.core.windows.net/9f9b81b59f9b81b50a69934786485fd6355f4dc3a2/testCreateFile", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "ff28be74-cddb-4627-89d6-5095dd8e62bb" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "a96643c9-d01a-0076-1465-5198b0000000", - "x-ms-client-request-id" : "ff28be74-cddb-4627-89d6-5095dd8e62bb", - "Date" : "Sat, 16 Apr 2022 07:40:15 GMT" - }, - "Exception" : null - } ], - "variables" : [ "9f9b81b59f9b81b50a69934786485fd6355f4dc3a2" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAPITestsDeleteIfExistsFileThatDoesNotExist.json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAPITestsDeleteIfExistsFileThatDoesNotExist.json deleted file mode 100644 index a99cfc0919d7e..0000000000000 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAPITestsDeleteIfExistsFileThatDoesNotExist.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/dfd5bfbadfd5bfbad8550586c19f1b5c97574dae9b?restype=share", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "fe86f4ac-9688-4664-a8ac-0cb4359d3e9b" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA1F7C595117C2", - "Last-Modified" : "Sat, 16 Apr 2022 07:40:16 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "b5ba67b1-001a-0007-7a65-517e9b000000", - "x-ms-client-request-id" : "fe86f4ac-9688-4664-a8ac-0cb4359d3e9b", - "Date" : "Sat, 16 Apr 2022 07:40:15 GMT" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "http://REDACTED.file.core.windows.net/dfd5bfbadfd5bfbad8550586c19f1b5c97574dae9b/testCreateFile", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "d32efd0e-08d6-4db5-baa4-daf7ac0a9486" - }, - "Response" : { - "content-length" : "223", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-error-code" : "ResourceNotFound", - "retry-after" : "0", - "StatusCode" : "404", - "x-ms-request-id" : "b5ba67b7-001a-0007-7b65-517e9b000000", - "Body" : "ResourceNotFoundThe specified resource does not exist.\nRequestId:b5ba67b7-001a-0007-7b65-517e9b000000\nTime:2022-04-16T07:40:16.2898025Z", - "x-ms-client-request-id" : "d32efd0e-08d6-4db5-baa4-daf7ac0a9486", - "Date" : "Sat, 16 Apr 2022 07:40:15 GMT", - "Content-Type" : "application/xml" - }, - "Exception" : null - } ], - "variables" : [ "dfd5bfbadfd5bfbad8550586c19f1b5c97574dae9b" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAPITestsDeleteIfExistsShare.json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAPITestsDeleteIfExistsShare.json deleted file mode 100644 index 726e7d5cce729..0000000000000 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAPITestsDeleteIfExistsShare.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/9c022c5d9c022c5d63c4497454821d710b02480f9a?restype=share", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "d8ff38fb-192b-42dd-8d90-f77860e5a1bd" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA1F7BBB4D7DBB", - "Last-Modified" : "Sat, 16 Apr 2022 07:35:51 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "6af41981-401a-0029-5664-512c8c000000", - "x-ms-client-request-id" : "d8ff38fb-192b-42dd-8d90-f77860e5a1bd", - "Date" : "Sat, 16 Apr 2022 07:35:50 GMT" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "http://REDACTED.file.core.windows.net/9c022c5d9c022c5d63c4497454821d710b02480f9a?restype=share", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "98fc095c-f9f6-48d8-90a6-1df32c23188c" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "a96640df-d01a-0076-0364-5198b0000000", - "x-ms-client-request-id" : "98fc095c-f9f6-48d8-90a6-1df32c23188c", - "Date" : "Sat, 16 Apr 2022 07:35:50 GMT" - }, - "Exception" : null - } ], - "variables" : [ "9c022c5d9c022c5d63c4497454821d710b02480f9a" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAPITestsDeleteIfExistsShareDeleteSnapshotOptions.json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAPITestsDeleteIfExistsShareDeleteSnapshotOptions.json deleted file mode 100644 index fefd14e639ec8..0000000000000 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAPITestsDeleteIfExistsShareDeleteSnapshotOptions.json +++ /dev/null @@ -1,134 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/ea80240fea80240f64d540164c986bca79c848d5a5?restype=share", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "509dd364-9660-41ff-bbf7-11484e5e282c" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA1F7BBB49E845", - "Last-Modified" : "Sat, 16 Apr 2022 07:35:50 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "342e11db-301a-007e-4d64-5182bf000000", - "x-ms-client-request-id" : "509dd364-9660-41ff-bbf7-11484e5e282c", - "Date" : "Sat, 16 Apr 2022 07:35:50 GMT" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/ea80240fea80240f64d540164c986bca79c848d5a5?restype=share&comp=snapshot", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "7905d767-e0b1-4a6b-a447-5d0b9bef0e82" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "x-ms-snapshot" : "2022-04-16T07:35:51.0000000Z", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA1F7BBB49E845", - "Last-Modified" : "Sat, 16 Apr 2022 07:35:50 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "342e11de-301a-007e-4e64-5182bf000000", - "x-ms-client-request-id" : "7905d767-e0b1-4a6b-a447-5d0b9bef0e82", - "Date" : "Sat, 16 Apr 2022 07:35:50 GMT" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/ea80240fea80240f64d540164c986bca79c848d5a5?restype=share&comp=snapshot", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "660d7e01-b3b3-4ea0-a42a-a386c99d7369" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "x-ms-snapshot" : "2022-04-16T07:35:52.0000000Z", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA1F7BBB49E845", - "Last-Modified" : "Sat, 16 Apr 2022 07:35:50 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "55360f6c-c01a-007a-3b64-510fb8000000", - "x-ms-client-request-id" : "660d7e01-b3b3-4ea0-a42a-a386c99d7369", - "Date" : "Sat, 16 Apr 2022 07:35:50 GMT" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "http://REDACTED.file.core.windows.net/ea80240fea80240f64d540164c986bca79c848d5a5?restype=share", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "6d36b969-ef99-4ed0-a197-8804beec3174" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "6af41986-401a-0029-5964-512c8c000000", - "x-ms-client-request-id" : "6d36b969-ef99-4ed0-a197-8804beec3174", - "Date" : "Sat, 16 Apr 2022 07:35:50 GMT" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "http://REDACTED.file.core.windows.net/ea80240fea80240f64d540164c986bca79c848d5a5?restype=share&sharesnapshot=2022-04-16T07%3A35%3A51.0000000Z", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "63d2cd29-f7fa-4041-a86c-c20f0428fc2d" - }, - "Response" : { - "content-length" : "217", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "x-ms-error-code" : "ShareNotFound", - "retry-after" : "0", - "StatusCode" : "404", - "x-ms-request-id" : "d3e341f2-001a-005a-5964-51741f000000", - "Body" : "ShareNotFoundThe specified share does not exist.\nRequestId:d3e341f2-001a-005a-5964-51741f000000\nTime:2022-04-16T07:35:51.4805740Z", - "x-ms-client-request-id" : "63d2cd29-f7fa-4041-a86c-c20f0428fc2d", - "Date" : "Sat, 16 Apr 2022 07:35:51 GMT", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "http://REDACTED.file.core.windows.net/ea80240fea80240f64d540164c986bca79c848d5a5?restype=share&sharesnapshot=2022-04-16T07%3A35%3A52.0000000Z", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "240148e1-85e2-4dcd-bdd9-31e55c6d83d6" - }, - "Response" : { - "content-length" : "217", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "x-ms-error-code" : "ShareNotFound", - "retry-after" : "0", - "StatusCode" : "404", - "x-ms-request-id" : "6af41988-401a-0029-5b64-512c8c000000", - "Body" : "ShareNotFoundThe specified share does not exist.\nRequestId:6af41988-401a-0029-5b64-512c8c000000\nTime:2022-04-16T07:35:51.5429800Z", - "x-ms-client-request-id" : "240148e1-85e2-4dcd-bdd9-31e55c6d83d6", - "Date" : "Sat, 16 Apr 2022 07:35:51 GMT", - "Content-Type" : "application/xml" - }, - "Exception" : null - } ], - "variables" : [ "ea80240fea80240f64d540164c986bca79c848d5a5" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAPITestsDeleteIfExistsShareDeleteSnapshotOptionsError.json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAPITestsDeleteIfExistsShareDeleteSnapshotOptionsError.json deleted file mode 100644 index 83b06be43feca..0000000000000 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAPITestsDeleteIfExistsShareDeleteSnapshotOptionsError.json +++ /dev/null @@ -1,91 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/74b83c2b74b83c2b6412770011db1013dcc44de292?restype=share", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "e317167b-5ca5-4e9e-a3c4-af0d74a5c96f" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA1F7BBB457DD1", - "Last-Modified" : "Sat, 16 Apr 2022 07:35:50 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "d3e341e9-001a-005a-5364-51741f000000", - "x-ms-client-request-id" : "e317167b-5ca5-4e9e-a3c4-af0d74a5c96f", - "Date" : "Sat, 16 Apr 2022 07:35:50 GMT" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/74b83c2b74b83c2b6412770011db1013dcc44de292?restype=share&comp=snapshot", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "61e2f9e8-7554-4866-bf21-aa3c78e7bf0a" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "x-ms-snapshot" : "2022-04-16T07:35:51.0000000Z", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA1F7BBB457DD1", - "Last-Modified" : "Sat, 16 Apr 2022 07:35:50 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "55360f6a-c01a-007a-3a64-510fb8000000", - "x-ms-client-request-id" : "61e2f9e8-7554-4866-bf21-aa3c78e7bf0a", - "Date" : "Sat, 16 Apr 2022 07:35:50 GMT" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/74b83c2b74b83c2b6412770011db1013dcc44de292?restype=share&comp=snapshot", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "4a2a3746-a5c5-4ee9-9c53-e768d08fc1eb" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "x-ms-snapshot" : "2022-04-16T07:35:52.0000000Z", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA1F7BBB457DD1", - "Last-Modified" : "Sat, 16 Apr 2022 07:35:50 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "342e11df-301a-007e-4f64-5182bf000000", - "x-ms-client-request-id" : "4a2a3746-a5c5-4ee9-9c53-e768d08fc1eb", - "Date" : "Sat, 16 Apr 2022 07:35:50 GMT" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "http://REDACTED.file.core.windows.net/74b83c2b74b83c2b6412770011db1013dcc44de292?restype=share", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "a170c6e2-6a0a-41da-9832-e7f9d9a3cd2a" - }, - "Response" : { - "content-length" : "250", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-error-code" : "ShareHasSnapshots", - "retry-after" : "0", - "StatusCode" : "409", - "x-ms-request-id" : "d3e341f0-001a-005a-5764-51741f000000", - "Body" : "ShareHasSnapshotsThe share has snapshots and the operation requires no snapshots.\nRequestId:d3e341f0-001a-005a-5764-51741f000000\nTime:2022-04-16T07:35:51.4106126Z", - "x-ms-client-request-id" : "a170c6e2-6a0a-41da-9832-e7f9d9a3cd2a", - "Date" : "Sat, 16 Apr 2022 07:35:51 GMT", - "Content-Type" : "application/xml" - }, - "Exception" : null - } ], - "variables" : [ "74b83c2b74b83c2b6412770011db1013dcc44de292" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAPITestsDeleteIfExistsShareLease.json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAPITestsDeleteIfExistsShareLease.json deleted file mode 100644 index 8f613c78ddd15..0000000000000 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAPITestsDeleteIfExistsShareLease.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/d3115115d3115115a2f00138915e830fbb7a49699e?restype=share", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "a4b78bb8-0554-4bf1-84de-e73e88ab0e43" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA1F7BBB481B3F", - "Last-Modified" : "Sat, 16 Apr 2022 07:35:50 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "b5ba655c-001a-0007-5664-517e9b000000", - "x-ms-client-request-id" : "a4b78bb8-0554-4bf1-84de-e73e88ab0e43", - "Date" : "Sat, 16 Apr 2022 07:35:50 GMT" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/d3115115d3115115a2f00138915e830fbb7a49699e?comp=lease&restype=share", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "f2524ef5-2551-4c7f-b02a-b8397f2b25b8" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-lease-id" : "9a3a0d0b-c669-426f-bffe-f5c80c20fd0a", - "eTag" : "0x8DA1F7BBB481B3F", - "Last-Modified" : "Sat, 16 Apr 2022 07:35:50 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "d3e341ec-001a-005a-5464-51741f000000", - "x-ms-client-request-id" : "f2524ef5-2551-4c7f-b02a-b8397f2b25b8", - "Date" : "Sat, 16 Apr 2022 07:35:50 GMT" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "http://REDACTED.file.core.windows.net/d3115115d3115115a2f00138915e830fbb7a49699e?restype=share", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "4dd62258-c12c-47cb-9569-1ea7abdb8128" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "d3e341ee-001a-005a-5564-51741f000000", - "x-ms-client-request-id" : "4dd62258-c12c-47cb-9569-1ea7abdb8128", - "Date" : "Sat, 16 Apr 2022 07:35:51 GMT" - }, - "Exception" : null - } ], - "variables" : [ "d3115115d3115115a2f00138915e830fbb7a49699e" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAPITestsDeleteIfExistsShareLeaseError.json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAPITestsDeleteIfExistsShareLeaseError.json deleted file mode 100644 index b18bf0f95a67d..0000000000000 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAPITestsDeleteIfExistsShareLeaseError.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/f05cbcdbf05cbcdb0d1765605a8c891901f6409e89?restype=share", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "2ac06f5e-5489-4740-9b83-61796a8aa3f2" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA1F7BBB4929C5", - "Last-Modified" : "Sat, 16 Apr 2022 07:35:50 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "726c5b9e-301a-000c-7364-5185f0000000", - "x-ms-client-request-id" : "2ac06f5e-5489-4740-9b83-61796a8aa3f2", - "Date" : "Sat, 16 Apr 2022 07:35:50 GMT" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "http://REDACTED.file.core.windows.net/f05cbcdbf05cbcdb0d1765605a8c891901f6409e89?restype=share", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "2578f4b6-1f77-49f8-9268-34ae69b68ff2" - }, - "Response" : { - "content-length" : "252", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-error-code" : "LeaseNotPresentWithContainerOperation", - "retry-after" : "0", - "StatusCode" : "412", - "x-ms-request-id" : "5b700844-101a-0034-7764-512130000000", - "Body" : "LeaseNotPresentWithContainerOperationThere is currently no lease on the file share.\nRequestId:5b700844-101a-0034-7764-512130000000\nTime:2022-04-16T07:35:51.1881618Z", - "x-ms-client-request-id" : "2578f4b6-1f77-49f8-9268-34ae69b68ff2", - "Date" : "Sat, 16 Apr 2022 07:35:51 GMT", - "Content-Type" : "application/xml" - }, - "Exception" : null - } ], - "variables" : [ "f05cbcdbf05cbcdb0d1765605a8c891901f6409e89" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAPITestsDeleteIfExistsShareMin.json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAPITestsDeleteIfExistsShareMin.json deleted file mode 100644 index 88e0d258dda0f..0000000000000 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAPITestsDeleteIfExistsShareMin.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/2a6deccd2a6deccde3878191624669e6d65f458f82?restype=share", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "e301504d-eb2e-424e-85b4-bf6c89126067" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA1F7BBB489B9E", - "Last-Modified" : "Sat, 16 Apr 2022 07:35:50 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "5b700841-101a-0034-7664-512130000000", - "x-ms-client-request-id" : "e301504d-eb2e-424e-85b4-bf6c89126067", - "Date" : "Sat, 16 Apr 2022 07:35:50 GMT" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "http://REDACTED.file.core.windows.net/2a6deccd2a6deccde3878191624669e6d65f458f82?restype=share", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "ec9e15a1-c5fc-459e-9c3c-97ebbb2944e3" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "6af41984-401a-0029-5764-512c8c000000", - "x-ms-client-request-id" : "ec9e15a1-c5fc-459e-9c3c-97ebbb2944e3", - "Date" : "Sat, 16 Apr 2022 07:35:50 GMT" - }, - "Exception" : null - } ], - "variables" : [ "2a6deccd2a6deccde3878191624669e6d65f458f82" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAPITestsDeleteIfExistsShareThatDoesNotExists.json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAPITestsDeleteIfExistsShareThatDoesNotExists.json deleted file mode 100644 index dce5cd41de90e..0000000000000 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAPITestsDeleteIfExistsShareThatDoesNotExists.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "DELETE", - "Uri" : "http://REDACTED.file.core.windows.net/25e0ce40025e0ce4048d14770f4fbd02acd7b4326bf4?restype=share", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "7adb4a43-dd70-40ab-8ab2-013ea4c0db37" - }, - "Response" : { - "content-length" : "217", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-error-code" : "ShareNotFound", - "retry-after" : "0", - "StatusCode" : "404", - "x-ms-request-id" : "55360f68-c01a-007a-3964-510fb8000000", - "Body" : "ShareNotFoundThe specified share does not exist.\nRequestId:55360f68-c01a-007a-3964-510fb8000000\nTime:2022-04-16T07:35:50.9919306Z", - "x-ms-client-request-id" : "7adb4a43-dd70-40ab-8ab2-013ea4c0db37", - "Date" : "Sat, 16 Apr 2022 07:35:50 GMT", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "http://REDACTED.file.core.windows.net/25e0ce40025e0ce4048d14770f4fbd02acd7b4326bf4?restype=share", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "25e8e29f-d012-44e9-9770-ce0356b37c6c" - }, - "Response" : { - "content-length" : "217", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "x-ms-error-code" : "ShareNotFound", - "retry-after" : "0", - "StatusCode" : "404", - "x-ms-request-id" : "b5ba655f-001a-0007-5764-517e9b000000", - "Body" : "ShareNotFoundThe specified share does not exist.\nRequestId:b5ba655f-001a-0007-5764-517e9b000000\nTime:2022-04-16T07:35:51.1818788Z", - "x-ms-client-request-id" : "25e8e29f-d012-44e9-9770-ce0356b37c6c", - "Date" : "Sat, 16 Apr 2022 07:35:50 GMT", - "Content-Type" : "application/xml" - }, - "Exception" : null - } ], - "variables" : [ "25e0ce4025e0ce4048d31656b707e35cbb6b40bb80", "25e0ce40025e0ce4048d14770f4fbd02acd7b4326bf4" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAsyncAPITestsCreateIfNotExistsDirectory.json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAsyncAPITestsCreateIfNotExistsDirectory.json deleted file mode 100644 index 918e774477d66..0000000000000 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAsyncAPITestsCreateIfNotExistsDirectory.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/01c39ecd01c39ecd3569544675ae77cf3e1f4ea78f?restype=share", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "d6c4ace6-5096-4e5f-9194-1b3740dd2175" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA1367F9AA0836", - "Last-Modified" : "Thu, 31 Mar 2022 22:44:11 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "2ef20ac0-601a-0063-3250-458f03000000", - "x-ms-client-request-id" : "d6c4ace6-5096-4e5f-9194-1b3740dd2175", - "Date" : "Thu, 31 Mar 2022 22:44:11 GMT" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/01c39ecd01c39ecd3569544675ae77cf3e1f4ea78f/testCreateDirectory?restype=directory", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "cf45c7e8-b8f5-4752-ae88-e0e0aad35463" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "x-ms-file-permission-key" : "12789134125989540127*15683512651994179222", - "x-ms-file-id" : "13835128424026341376", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2022-03-31T22:44:11.9571761Z", - "Last-Modified" : "Thu, 31 Mar 2022 22:44:11 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Thu, 31 Mar 2022 22:44:11 GMT", - "x-ms-file-attributes" : "Directory", - "x-ms-file-change-time" : "2022-03-31T22:44:11.9571761Z", - "x-ms-file-parent-id" : "0", - "eTag" : "0x8DA1367F9C87D31", - "x-ms-request-id" : "058a0d27-a01a-007c-1150-453c07000000", - "x-ms-client-request-id" : "cf45c7e8-b8f5-4752-ae88-e0e0aad35463", - "x-ms-file-last-write-time" : "2022-03-31T22:44:11.9571761Z" - }, - "Exception" : null - } ], - "variables" : [ "01c39ecd01c39ecd3569544675ae77cf3e1f4ea78f" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAsyncAPITestsCreateIfNotExistsDirectoryFilePermission.json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAsyncAPITestsCreateIfNotExistsDirectoryFilePermission.json deleted file mode 100644 index 342f1dd3cf974..0000000000000 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAsyncAPITestsCreateIfNotExistsDirectoryFilePermission.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/dcecc5dcdcecc5dc00834767cc025fe5d8af4b27ab?restype=share", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "d89805c2-a7e7-4980-a328-9900b0ed9999" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA1367F9AB33CE", - "Last-Modified" : "Thu, 31 Mar 2022 22:44:11 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "058a0d24-a01a-007c-1050-453c07000000", - "x-ms-client-request-id" : "d89805c2-a7e7-4980-a328-9900b0ed9999", - "Date" : "Thu, 31 Mar 2022 22:44:10 GMT" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/dcecc5dcdcecc5dc00834767cc025fe5d8af4b27ab/testCreateDirectory?restype=directory", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "e587b25a-0696-45cb-b9c7-6d8f852a94e7" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "x-ms-file-permission-key" : "4290410950905655843*15683512651994179222", - "x-ms-file-id" : "13835128424026341376", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2022-03-31T22:44:11.9571761Z", - "Last-Modified" : "Thu, 31 Mar 2022 22:44:11 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Thu, 31 Mar 2022 22:44:11 GMT", - "x-ms-file-attributes" : "Directory", - "x-ms-file-change-time" : "2022-03-31T22:44:11.9571761Z", - "x-ms-file-parent-id" : "0", - "eTag" : "0x8DA1367F9C87D31", - "x-ms-request-id" : "3afb9ec2-001a-0065-2250-45bcbc000000", - "x-ms-client-request-id" : "e587b25a-0696-45cb-b9c7-6d8f852a94e7", - "x-ms-file-last-write-time" : "2022-03-31T22:44:11.9571761Z" - }, - "Exception" : null - } ], - "variables" : [ "dcecc5dcdcecc5dc00834767cc025fe5d8af4b27ab" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAsyncAPITestsCreateIfNotExistsDirectoryFilePermissionKey.json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAsyncAPITestsCreateIfNotExistsDirectoryFilePermissionKey.json deleted file mode 100644 index 6000076956b9c..0000000000000 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAsyncAPITestsCreateIfNotExistsDirectoryFilePermissionKey.json +++ /dev/null @@ -1,75 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/297fac99297fac99399238483faf50c5ce8e4f6aaa?restype=share", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "d19d4474-fb99-496f-96ea-e4915fb5fdda" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA1367F9A9C508", - "Last-Modified" : "Thu, 31 Mar 2022 22:44:11 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "3afb9ebf-001a-0065-2150-45bcbc000000", - "x-ms-client-request-id" : "d19d4474-fb99-496f-96ea-e4915fb5fdda", - "Date" : "Thu, 31 Mar 2022 22:44:11 GMT" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/297fac99297fac99399238483faf50c5ce8e4f6aaa?restype=share&comp=filepermission", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "42869e39-4817-448e-8675-54fe7c13a05f", - "Content-Type" : "application/json" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2021-04-10", - "x-ms-file-permission-key" : "9106501679203185511*15683512651994179222", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "d7f993e5-801a-0036-7750-459f88000000", - "x-ms-client-request-id" : "42869e39-4817-448e-8675-54fe7c13a05f", - "Date" : "Thu, 31 Mar 2022 22:44:11 GMT" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/297fac99297fac99399238483faf50c5ce8e4f6aaa/testCreateDirectory?restype=directory", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "1ae4f958-1822-427c-8ff8-af852bcd38e2" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "x-ms-file-permission-key" : "4290410950905655843*15683512651994179222", - "x-ms-file-id" : "13835128424026341376", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2022-03-31T22:44:12.7924308Z", - "Last-Modified" : "Thu, 31 Mar 2022 22:44:12 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Thu, 31 Mar 2022 22:44:11 GMT", - "x-ms-file-attributes" : "Directory", - "x-ms-file-change-time" : "2022-03-31T22:44:12.7924308Z", - "x-ms-file-parent-id" : "0", - "eTag" : "0x8DA1367FA47F054", - "x-ms-request-id" : "d7f993ea-801a-0036-7a50-459f88000000", - "x-ms-client-request-id" : "1ae4f958-1822-427c-8ff8-af852bcd38e2", - "x-ms-file-last-write-time" : "2022-03-31T22:44:12.7924308Z" - }, - "Exception" : null - } ], - "variables" : [ "297fac99297fac99399238483faf50c5ce8e4f6aaa", "2022-03-31T22:44:12.792430800Z", "2022-03-31T22:44:12.792430800Z" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAsyncAPITestsCreateIfNotExistsDirectoryInvalidName.json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAsyncAPITestsCreateIfNotExistsDirectoryInvalidName.json deleted file mode 100644 index 33f0907a101ad..0000000000000 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAsyncAPITestsCreateIfNotExistsDirectoryInvalidName.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/bee1f9abbee1f9abca558575c0f93fd52f3545d3be?restype=share", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "a8444e4e-8d33-4c30-b647-afd9913432cc" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA1367F9AC47EC", - "Last-Modified" : "Thu, 31 Mar 2022 22:44:11 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "d7f993e2-801a-0036-7650-459f88000000", - "x-ms-client-request-id" : "a8444e4e-8d33-4c30-b647-afd9913432cc", - "Date" : "Thu, 31 Mar 2022 22:44:10 GMT" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/bee1f9abbee1f9abca558575c0f93fd52f3545d3be/test%2Fdirectory?restype=directory", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "f43168d2-f72e-4d6e-9e85-6295cc0ec8de" - }, - "Response" : { - "content-length" : "224", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-error-code" : "ParentNotFound", - "retry-after" : "0", - "StatusCode" : "404", - "x-ms-request-id" : "2ef20ac3-601a-0063-3350-458f03000000", - "Body" : "ParentNotFoundThe specified parent path does not exist.\nRequestId:2ef20ac3-601a-0063-3350-458f03000000\nTime:2022-03-31T22:44:11.9614565Z", - "x-ms-client-request-id" : "f43168d2-f72e-4d6e-9e85-6295cc0ec8de", - "Date" : "Thu, 31 Mar 2022 22:44:11 GMT", - "Content-Type" : "application/xml" - }, - "Exception" : null - } ], - "variables" : [ "bee1f9abbee1f9abca558575c0f93fd52f3545d3be" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAsyncAPITestsCreateIfNotExistsDirectoryMetadata.json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAsyncAPITestsCreateIfNotExistsDirectoryMetadata.json deleted file mode 100644 index d05aa142b9709..0000000000000 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAsyncAPITestsCreateIfNotExistsDirectoryMetadata.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/422a4c6f422a4c6f2fe613616c1377b398e54a9dae?restype=share", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "4b544d7d-9441-45d5-b1a4-4b49e9fbbfbf" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA1367F9AB4949", - "Last-Modified" : "Thu, 31 Mar 2022 22:44:11 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f965ee36-901a-0083-4350-450c9a000000", - "x-ms-client-request-id" : "4b544d7d-9441-45d5-b1a4-4b49e9fbbfbf", - "Date" : "Thu, 31 Mar 2022 22:44:11 GMT" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/422a4c6f422a4c6f2fe613616c1377b398e54a9dae/testCreateDirectory?restype=directory", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "f412e4bb-4388-4e0b-b2dc-dc87eafe51e9" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "x-ms-file-permission-key" : "12789134125989540127*15683512651994179222", - "x-ms-file-id" : "13835128424026341376", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2022-03-31T22:44:11.9571761Z", - "Last-Modified" : "Thu, 31 Mar 2022 22:44:11 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Thu, 31 Mar 2022 22:44:11 GMT", - "x-ms-file-attributes" : "Directory", - "x-ms-file-change-time" : "2022-03-31T22:44:11.9571761Z", - "x-ms-file-parent-id" : "0", - "eTag" : "0x8DA1367F9C87D31", - "x-ms-request-id" : "f965ee39-901a-0083-4450-450c9a000000", - "x-ms-client-request-id" : "f412e4bb-4388-4e0b-b2dc-dc87eafe51e9", - "x-ms-file-last-write-time" : "2022-03-31T22:44:11.9571761Z" - }, - "Exception" : null - } ], - "variables" : [ "422a4c6f422a4c6f2fe613616c1377b398e54a9dae" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAsyncAPITestsCreateIfNotExistsDirectoryMetadataError.json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAsyncAPITestsCreateIfNotExistsDirectoryMetadataError.json deleted file mode 100644 index 62cdb2a780f1d..0000000000000 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAsyncAPITestsCreateIfNotExistsDirectoryMetadataError.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/a1297adda1297adda44082330fbf2974522a4a119e?restype=share", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "f2ce1c41-0de3-47a7-be1f-604545d35eb1" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA1367F9A9CC1B", - "Last-Modified" : "Thu, 31 Mar 2022 22:44:11 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "e08481e7-b01a-0002-4750-45ac40000000", - "x-ms-client-request-id" : "f2ce1c41-0de3-47a7-be1f-604545d35eb1", - "Date" : "Thu, 31 Mar 2022 22:44:11 GMT" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/a1297adda1297adda44082330fbf2974522a4a119e/testdirectory?restype=directory", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "7547f62a-1d63-4db6-b1c9-33df06829e2b" - }, - "Response" : { - "content-length" : "278", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-error-code" : "EmptyMetadataKey", - "retry-after" : "0", - "StatusCode" : "400", - "x-ms-request-id" : "e08481ea-b01a-0002-4850-45ac40000000", - "Body" : "EmptyMetadataKeyThe key for one of the metadata key-value pairs is empty.\nRequestId:e08481ea-b01a-0002-4850-45ac40000000\nTime:2022-03-31T22:44:11.9429282Zvalue", - "x-ms-client-request-id" : "7547f62a-1d63-4db6-b1c9-33df06829e2b", - "Date" : "Thu, 31 Mar 2022 22:44:11 GMT", - "Content-Type" : "application/xml" - }, - "Exception" : null - } ], - "variables" : [ "a1297adda1297adda44082330fbf2974522a4a119e" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAsyncAPITestsCreateIfNotExistsDirectoryThatAlreadyExists.json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAsyncAPITestsCreateIfNotExistsDirectoryThatAlreadyExists.json deleted file mode 100644 index c02f7fca59478..0000000000000 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAsyncAPITestsCreateIfNotExistsDirectoryThatAlreadyExists.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.file.core.windows.net/6bfd93ba06bfd93baf0447621c5a28cf6357148c2b5f?restype=share", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "033e586e-ff15-44ef-bbda-838237cdfac9" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA1C6A1EB1BDD7", - "Last-Modified" : "Tue, 12 Apr 2022 09:52:13 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "c8200e83-001a-004a-5752-4eb177000000", - "x-ms-client-request-id" : "033e586e-ff15-44ef-bbda-838237cdfac9", - "Date" : "Tue, 12 Apr 2022 09:52:12 GMT" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "https://REDACTED.file.core.windows.net/6bfd93ba06bfd93baf0447621c5a28cf6357148c2b5f/testCreateDirectory?restype=directory", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "223d961f-a266-49ad-a2cd-bf7646d1e4af" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "x-ms-file-permission-key" : "13206157815093487607*16113479809698295934", - "x-ms-file-id" : "13835128424026341376", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2022-04-12T09:52:13.5215926Z", - "Last-Modified" : "Tue, 12 Apr 2022 09:52:13 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Tue, 12 Apr 2022 09:52:12 GMT", - "x-ms-file-attributes" : "Directory", - "x-ms-file-change-time" : "2022-04-12T09:52:13.5215926Z", - "x-ms-file-parent-id" : "0", - "eTag" : "0x8DA1C6A1ECD1B36", - "x-ms-request-id" : "c8200e86-001a-004a-5852-4eb177000000", - "x-ms-client-request-id" : "223d961f-a266-49ad-a2cd-bf7646d1e4af", - "x-ms-file-last-write-time" : "2022-04-12T09:52:13.5215926Z" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "https://REDACTED.file.core.windows.net/6bfd93ba06bfd93baf0447621c5a28cf6357148c2b5f/testCreateDirectory?restype=directory", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "3328a8e9-c1ae-414f-8bfe-57a46f737572" - }, - "Response" : { - "content-length" : "228", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-error-code" : "ResourceAlreadyExists", - "retry-after" : "0", - "StatusCode" : "409", - "x-ms-request-id" : "c8200e88-001a-004a-5952-4eb177000000", - "Body" : "ResourceAlreadyExistsThe specified resource already exists.\nRequestId:c8200e88-001a-004a-5952-4eb177000000\nTime:2022-04-12T09:52:13.5931112Z", - "x-ms-client-request-id" : "3328a8e9-c1ae-414f-8bfe-57a46f737572", - "Date" : "Tue, 12 Apr 2022 09:52:13 GMT", - "Content-Type" : "application/xml" - }, - "Exception" : null - } ], - "variables" : [ "6bfd93ba6bfd93baf0445026ea23662e3d9b45ceb3", "6bfd93ba06bfd93baf0447621c5a28cf6357148c2b5f" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAsyncAPITestsCreateIfNotExistsShare.json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAsyncAPITestsCreateIfNotExistsShare.json deleted file mode 100644 index f1a7194ca8f13..0000000000000 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAsyncAPITestsCreateIfNotExistsShare.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/f85e4318f85e4318f8779967fdea94eab1ec46d389?restype=share", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "a4ac6ba8-1b00-479a-bc37-4b8ab1146b66" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA135AF57CCE5F", - "Last-Modified" : "Thu, 31 Mar 2022 21:11:01 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "67e5918b-001a-0038-2243-45b638000000", - "x-ms-client-request-id" : "a4ac6ba8-1b00-479a-bc37-4b8ab1146b66", - "Date" : "Thu, 31 Mar 2022 21:11:01 GMT" - }, - "Exception" : null - } ], - "variables" : [ "f85e4318f85e4318f8779967fdea94eab1ec46d389" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAsyncAPITestsCreateIfNotExistsShareThatAlreadyExists.json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAsyncAPITestsCreateIfNotExistsShareThatAlreadyExists.json deleted file mode 100644 index d3458ff0385d8..0000000000000 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAsyncAPITestsCreateIfNotExistsShareThatAlreadyExists.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "https://REDACTED.file.core.windows.net/c38791810c3879181a20640499a8310e65aa347b6bdd?restype=share", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "678e1d5b-3a55-4001-85a0-ca4539d09035" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA1C69F9997C41", - "Last-Modified" : "Tue, 12 Apr 2022 09:51:11 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "d1f0e892-401a-004b-3d52-4eeeab000000", - "x-ms-client-request-id" : "678e1d5b-3a55-4001-85a0-ca4539d09035", - "Date" : "Tue, 12 Apr 2022 09:51:10 GMT" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "https://REDACTED.file.core.windows.net/c38791810c3879181a20640499a8310e65aa347b6bdd?restype=share", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "0c399c83-a045-4ec0-85ae-423847289964" - }, - "Response" : { - "content-length" : "222", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-error-code" : "ShareAlreadyExists", - "retry-after" : "0", - "StatusCode" : "409", - "x-ms-request-id" : "d1f0e895-401a-004b-3e52-4eeeab000000", - "Body" : "ShareAlreadyExistsThe specified share already exists.\nRequestId:d1f0e895-401a-004b-3e52-4eeeab000000\nTime:2022-04-12T09:51:11.2784907Z", - "x-ms-client-request-id" : "0c399c83-a045-4ec0-85ae-423847289964", - "Date" : "Tue, 12 Apr 2022 09:51:10 GMT", - "Content-Type" : "application/xml" - }, - "Exception" : null - } ], - "variables" : [ "c3879181c3879181a203215105067a2abcef46fa97", "c38791810c3879181a20640499a8310e65aa347b6bdd" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAsyncAPITestsCreateIfNotExistsShareWithArgs[0].json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAsyncAPITestsCreateIfNotExistsShareWithArgs[0].json deleted file mode 100644 index a5f4779b1fe4d..0000000000000 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAsyncAPITestsCreateIfNotExistsShareWithArgs[0].json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/126cdfd3126cdfd323804137db5b0232052041118e?restype=share", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "e502a0e3-ed8d-440a-8224-8db36326eb5f" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA135AF57BC82C", - "Last-Modified" : "Thu, 31 Mar 2022 21:11:01 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "d0b3ee60-b01a-0070-7d43-45ab0f000000", - "x-ms-client-request-id" : "e502a0e3-ed8d-440a-8224-8db36326eb5f", - "Date" : "Thu, 31 Mar 2022 21:11:00 GMT" - }, - "Exception" : null - } ], - "variables" : [ "126cdfd3126cdfd323804137db5b0232052041118e" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAsyncAPITestsCreateIfNotExistsShareWithArgs[1].json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAsyncAPITestsCreateIfNotExistsShareWithArgs[1].json deleted file mode 100644 index 3d0d121c63b6c..0000000000000 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAsyncAPITestsCreateIfNotExistsShareWithArgs[1].json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/0b77ee920b77ee9225534474263ee41ae71e4cc887?restype=share", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "ae2e6e27-b401-4c63-8437-2f99d2bdadc0" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA135AF57BA474", - "Last-Modified" : "Thu, 31 Mar 2022 21:11:01 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "c8f11128-701a-0022-2343-45d7e7000000", - "x-ms-client-request-id" : "ae2e6e27-b401-4c63-8437-2f99d2bdadc0", - "Date" : "Thu, 31 Mar 2022 21:11:00 GMT" - }, - "Exception" : null - } ], - "variables" : [ "0b77ee920b77ee9225534474263ee41ae71e4cc887" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAsyncAPITestsCreateIfNotExistsShareWithArgs[2].json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAsyncAPITestsCreateIfNotExistsShareWithArgs[2].json deleted file mode 100644 index 75c4508a382ce..0000000000000 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAsyncAPITestsCreateIfNotExistsShareWithArgs[2].json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/205abd51205abd51d1542586364c119b2ad041599d?restype=share", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "3d5aa425-a82e-4003-b124-97708ea258e1" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA135AF57C335F", - "Last-Modified" : "Thu, 31 Mar 2022 21:11:01 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "ae18c89e-201a-0062-2743-45d0df000000", - "x-ms-client-request-id" : "3d5aa425-a82e-4003-b124-97708ea258e1", - "Date" : "Thu, 31 Mar 2022 21:11:00 GMT" - }, - "Exception" : null - } ], - "variables" : [ "205abd51205abd51d1542586364c119b2ad041599d" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAsyncAPITestsCreateIfNotExistsShareWithArgs[3].json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAsyncAPITestsCreateIfNotExistsShareWithArgs[3].json deleted file mode 100644 index 990c5907925ce..0000000000000 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAsyncAPITestsCreateIfNotExistsShareWithArgs[3].json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/39418c1039418c102eb15707ed0097b75b2640d093?restype=share", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "de51196b-bbce-4a31-b13d-90fcb4026a03" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA135AF57C3D8A", - "Last-Modified" : "Thu, 31 Mar 2022 21:11:01 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "5862b125-c01a-0018-7d43-45cd9f000000", - "x-ms-client-request-id" : "de51196b-bbce-4a31-b13d-90fcb4026a03", - "Date" : "Thu, 31 Mar 2022 21:11:01 GMT" - }, - "Exception" : null - } ], - "variables" : [ "39418c1039418c102eb15707ed0097b75b2640d093" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAsyncAPITestsCreateIfNotExistsShareWithInvalidArgs[0].json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAsyncAPITestsCreateIfNotExistsShareWithInvalidArgs[0].json deleted file mode 100644 index faecd746d3ab6..0000000000000 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAsyncAPITestsCreateIfNotExistsShareWithInvalidArgs[0].json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/ac193a73ac193a73b12464790c2c81f43f5e40288e?restype=share", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "c060f6a4-f928-402a-b157-8efd0f58f641" - }, - "Response" : { - "content-length" : "278", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-error-code" : "EmptyMetadataKey", - "retry-after" : "0", - "StatusCode" : "400", - "x-ms-request-id" : "baaffba2-601a-005c-7643-4547a0000000", - "Body" : "EmptyMetadataKeyThe key for one of the metadata key-value pairs is empty.\nRequestId:baaffba2-601a-005c-7643-4547a0000000\nTime:2022-03-31T21:11:01.2890972Zvalue", - "x-ms-client-request-id" : "c060f6a4-f928-402a-b157-8efd0f58f641", - "Date" : "Thu, 31 Mar 2022 21:11:00 GMT", - "Content-Type" : "application/xml" - }, - "Exception" : null - } ], - "variables" : [ "ac193a73ac193a73b12464790c2c81f43f5e40288e" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAsyncAPITestsCreateIfNotExistsShareWithInvalidArgs[1].json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAsyncAPITestsCreateIfNotExistsShareWithInvalidArgs[1].json deleted file mode 100644 index 3e5ad6afff8f8..0000000000000 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAsyncAPITestsCreateIfNotExistsShareWithInvalidArgs[1].json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/b5020b32b5020b32c579686740c245cd5d06415a83?restype=share", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "0b43b1bf-92f8-435a-995e-f1482ed0a1b2" - }, - "Response" : { - "content-length" : "260", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-error-code" : "InvalidMetadata", - "retry-after" : "0", - "StatusCode" : "400", - "x-ms-request-id" : "1faa95f0-401a-0064-1a43-45e360000000", - "Body" : "InvalidMetadataThe metadata specified is invalid. It has characters that are not permitted.\nRequestId:1faa95f0-401a-0064-1a43-45e360000000\nTime:2022-03-31T21:11:01.2868384Z", - "x-ms-client-request-id" : "0b43b1bf-92f8-435a-995e-f1482ed0a1b2", - "Date" : "Thu, 31 Mar 2022 21:11:01 GMT", - "Content-Type" : "application/xml" - }, - "Exception" : null - } ], - "variables" : [ "b5020b32b5020b32c579686740c245cd5d06415a83" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAsyncAPITestsCreateIfNotExistsShareWithInvalidArgs[2].json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAsyncAPITestsCreateIfNotExistsShareWithInvalidArgs[2].json deleted file mode 100644 index 56071f7588b90..0000000000000 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAsyncAPITestsCreateIfNotExistsShareWithInvalidArgs[2].json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/9e2f58f19e2f58f1db9857342971298511da45b698?restype=share", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "d7335afa-d0cf-4c0c-9ffc-d9e49a83f7a4" - }, - "Response" : { - "content-length" : "326", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-error-code" : "InvalidHeaderValue", - "retry-after" : "0", - "StatusCode" : "400", - "x-ms-request-id" : "0d7d1a57-f01a-002c-2c43-45fe57000000", - "Body" : "InvalidHeaderValueThe value for one of the HTTP headers is not in the correct format.\nRequestId:0d7d1a57-f01a-002c-2c43-45fe57000000\nTime:2022-03-31T21:11:01.2851165Zx-ms-share-quota6000", - "x-ms-client-request-id" : "d7335afa-d0cf-4c0c-9ffc-d9e49a83f7a4", - "Date" : "Thu, 31 Mar 2022 21:11:01 GMT", - "Content-Type" : "application/xml" - }, - "Exception" : null - } ], - "variables" : [ "9e2f58f19e2f58f1db9857342971298511da45b698" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAsyncAPITestsDeleteIfExistsDirThatWasAlreadyDeleted.json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAsyncAPITestsDeleteIfExistsDirThatWasAlreadyDeleted.json deleted file mode 100644 index ba2b46196b9a9..0000000000000 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAsyncAPITestsDeleteIfExistsDirThatWasAlreadyDeleted.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/5c962b265c962b265d458970ea30bece82ab43e099?restype=share", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "02505a42-3ad2-4df1-8b99-883d9f4c6941" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA1F7CB170B8CC", - "Last-Modified" : "Sat, 16 Apr 2022 07:42:43 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f91b0961-b01a-0002-4d65-51ac40000000", - "x-ms-client-request-id" : "02505a42-3ad2-4df1-8b99-883d9f4c6941", - "Date" : "Sat, 16 Apr 2022 07:42:43 GMT" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "http://REDACTED.file.core.windows.net/5c962b265c962b265d458970ea30bece82ab43e099?restype=share", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "2f5273e0-2e62-4494-8532-dffd3fdccecf" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f91b0965-b01a-0002-4f65-51ac40000000", - "x-ms-client-request-id" : "2f5273e0-2e62-4494-8532-dffd3fdccecf", - "Date" : "Sat, 16 Apr 2022 07:42:43 GMT" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "http://REDACTED.file.core.windows.net/5c962b265c962b265d458970ea30bece82ab43e099?restype=share", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "206742e7-c680-472c-8ec5-05dc07906fe9" - }, - "Response" : { - "content-length" : "217", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-error-code" : "ShareNotFound", - "retry-after" : "0", - "StatusCode" : "404", - "x-ms-request-id" : "7138bf0e-f01a-0061-5865-5131bb000000", - "Body" : "ShareNotFoundThe specified share does not exist.\nRequestId:7138bf0e-f01a-0061-5865-5131bb000000\nTime:2022-04-16T07:43:29.0940578Z", - "x-ms-client-request-id" : "206742e7-c680-472c-8ec5-05dc07906fe9", - "Date" : "Sat, 16 Apr 2022 07:43:28 GMT", - "Content-Type" : "application/xml" - }, - "Exception" : null - } ], - "variables" : [ "5c962b265c962b265d458970ea30bece82ab43e099" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAsyncAPITestsDeleteIfExistsDirectory.json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAsyncAPITestsDeleteIfExistsDirectory.json deleted file mode 100644 index 4f210a2e32ac3..0000000000000 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAsyncAPITestsDeleteIfExistsDirectory.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/91efcf0691efcf06a9d039335e1812562d9e44958c?restype=share", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "67c20786-4383-48e3-9cb0-e35ee4ece2f1" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA1F7D25750D92", - "Last-Modified" : "Sat, 16 Apr 2022 07:45:58 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f91b0b7b-b01a-0002-6866-51ac40000000", - "x-ms-client-request-id" : "67c20786-4383-48e3-9cb0-e35ee4ece2f1", - "Date" : "Sat, 16 Apr 2022 07:45:57 GMT" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/91efcf0691efcf06a9d039335e1812562d9e44958c/testCreateDirectory?restype=directory", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "dcd1dd3a-1ea0-4717-b88f-2681cc9cf200" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "x-ms-file-permission-key" : "13206157815093487607*16113479809698295934", - "x-ms-file-id" : "13835128424026341376", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2022-04-16T07:45:58.7666086Z", - "Last-Modified" : "Sat, 16 Apr 2022 07:45:58 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Sat, 16 Apr 2022 07:45:57 GMT", - "x-ms-file-attributes" : "Directory", - "x-ms-file-change-time" : "2022-04-16T07:45:58.7666086Z", - "x-ms-file-parent-id" : "0", - "eTag" : "0x8DA1F7D258C38A6", - "x-ms-request-id" : "f91b0b7e-b01a-0002-6966-51ac40000000", - "x-ms-client-request-id" : "dcd1dd3a-1ea0-4717-b88f-2681cc9cf200", - "x-ms-file-last-write-time" : "2022-04-16T07:45:58.7666086Z" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "http://REDACTED.file.core.windows.net/91efcf0691efcf06a9d039335e1812562d9e44958c/testCreateDirectory?restype=directory", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "05bba11c-2262-4a1a-8256-1b729315c176" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "d572c2e9-501a-0025-1f66-51bb84000000", - "x-ms-client-request-id" : "05bba11c-2262-4a1a-8256-1b729315c176", - "Date" : "Sat, 16 Apr 2022 07:45:58 GMT" - }, - "Exception" : null - } ], - "variables" : [ "91efcf0691efcf06a9d039335e1812562d9e44958c" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAsyncAPITestsDeleteIfExistsDirectoryThatDoesNotExist.json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAsyncAPITestsDeleteIfExistsDirectoryThatDoesNotExist.json deleted file mode 100644 index 1dd96581fc8d5..0000000000000 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAsyncAPITestsDeleteIfExistsDirectoryThatDoesNotExist.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/f048dcf1f048dcf144790648aa21214083674625be?restype=share", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "4531569d-fa20-4545-bc2f-69fdafd20c1f" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA1F7D25755DDF", - "Last-Modified" : "Sat, 16 Apr 2022 07:45:58 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "d572c2e5-501a-0025-1d66-51bb84000000", - "x-ms-client-request-id" : "4531569d-fa20-4545-bc2f-69fdafd20c1f", - "Date" : "Sat, 16 Apr 2022 07:45:57 GMT" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "http://REDACTED.file.core.windows.net/f048dcf1f048dcf144790648aa21214083674625be/testCreateDirectory?restype=directory", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "2412ebe8-c837-47fe-a5c9-cfb2a52d8418" - }, - "Response" : { - "content-length" : "223", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-error-code" : "ResourceNotFound", - "retry-after" : "0", - "StatusCode" : "404", - "x-ms-request-id" : "d572c2e8-501a-0025-1e66-51bb84000000", - "Body" : "ResourceNotFoundThe specified resource does not exist.\nRequestId:d572c2e8-501a-0025-1e66-51bb84000000\nTime:2022-04-16T07:45:58.7747382Z", - "x-ms-client-request-id" : "2412ebe8-c837-47fe-a5c9-cfb2a52d8418", - "Date" : "Sat, 16 Apr 2022 07:45:57 GMT", - "Content-Type" : "application/xml" - }, - "Exception" : null - } ], - "variables" : [ "f048dcf1f048dcf144790648aa21214083674625be" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAsyncAPITestsDeleteIfExistsFile.json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAsyncAPITestsDeleteIfExistsFile.json deleted file mode 100644 index ed302721856ac..0000000000000 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAsyncAPITestsDeleteIfExistsFile.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/10bed1e810bed1e876e78261ff8da6d9c8ed47c3a0?restype=share", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "66f53a4a-0cd2-4df3-8f97-8e600845c1d8" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA1F7D542D77E0", - "Last-Modified" : "Sat, 16 Apr 2022 07:47:16 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "c7e4060e-101a-0079-5466-51eedc000000", - "x-ms-client-request-id" : "66f53a4a-0cd2-4df3-8f97-8e600845c1d8", - "Date" : "Sat, 16 Apr 2022 07:47:16 GMT" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/10bed1e810bed1e876e78261ff8da6d9c8ed47c3a0/testCreateFile", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "33f6d160-a504-4a56-9477-320a03ffadbe" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "x-ms-file-permission-key" : "8592442312075974896*16113479809698295934", - "x-ms-file-id" : "13835128424026341376", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2022-04-16T07:47:17.1849357Z", - "Last-Modified" : "Sat, 16 Apr 2022 07:47:17 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Sat, 16 Apr 2022 07:47:17 GMT", - "x-ms-file-attributes" : "Archive", - "x-ms-file-change-time" : "2022-04-16T07:47:17.1849357Z", - "x-ms-file-parent-id" : "0", - "eTag" : "0x8DA1F7D5449E88D", - "x-ms-request-id" : "d572c3c2-501a-0025-5c66-51bb84000000", - "x-ms-client-request-id" : "33f6d160-a504-4a56-9477-320a03ffadbe", - "x-ms-file-last-write-time" : "2022-04-16T07:47:17.1849357Z" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "http://REDACTED.file.core.windows.net/10bed1e810bed1e876e78261ff8da6d9c8ed47c3a0/testCreateFile", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "a44cb00c-e423-42ca-8042-6dd2ff035c46" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f924dfde-c01a-0018-4066-51cd9f000000", - "x-ms-client-request-id" : "a44cb00c-e423-42ca-8042-6dd2ff035c46", - "Date" : "Sat, 16 Apr 2022 07:47:17 GMT" - }, - "Exception" : null - } ], - "variables" : [ "10bed1e810bed1e876e78261ff8da6d9c8ed47c3a0" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAsyncAPITestsDeleteIfExistsFileLease.json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAsyncAPITestsDeleteIfExistsFileLease.json deleted file mode 100644 index 1e337cd1f986c..0000000000000 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAsyncAPITestsDeleteIfExistsFileLease.json +++ /dev/null @@ -1,95 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/2448c8382448c83832c570654f3075f781264935a2?restype=share", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "2e5722ad-bd77-4471-91b7-5f9bde339176" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA1F7D5429E6F0", - "Last-Modified" : "Sat, 16 Apr 2022 07:47:16 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f924dfd9-c01a-0018-3e66-51cd9f000000", - "x-ms-client-request-id" : "2e5722ad-bd77-4471-91b7-5f9bde339176", - "Date" : "Sat, 16 Apr 2022 07:47:16 GMT" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/2448c8382448c83832c570654f3075f781264935a2/testCreateFile", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "05845c4c-4b6e-420a-8fb9-4a06c83cf6c0" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "x-ms-file-permission-key" : "8592442312075974896*16113479809698295934", - "x-ms-file-id" : "13835128424026341376", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2022-04-16T07:47:17.1889334Z", - "Last-Modified" : "Sat, 16 Apr 2022 07:47:17 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Sat, 16 Apr 2022 07:47:16 GMT", - "x-ms-file-attributes" : "Archive", - "x-ms-file-change-time" : "2022-04-16T07:47:17.1889334Z", - "x-ms-file-parent-id" : "0", - "eTag" : "0x8DA1F7D544A84B6", - "x-ms-request-id" : "c7e40611-101a-0079-5566-51eedc000000", - "x-ms-client-request-id" : "05845c4c-4b6e-420a-8fb9-4a06c83cf6c0", - "x-ms-file-last-write-time" : "2022-04-16T07:47:17.1889334Z" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/2448c8382448c83832c570654f3075f781264935a2/testCreateFile?comp=lease", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "15795b14-2f4d-4bbd-81df-e554faa75fe2" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-lease-id" : "3e38963c-bf0d-48c9-9aae-9fe31f72909e", - "eTag" : "0x8DA1F7D544A84B6", - "Last-Modified" : "Sat, 16 Apr 2022 07:47:17 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "d572c3c4-501a-0025-5d66-51bb84000000", - "x-ms-client-request-id" : "15795b14-2f4d-4bbd-81df-e554faa75fe2", - "Date" : "Sat, 16 Apr 2022 07:47:17 GMT" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "http://REDACTED.file.core.windows.net/2448c8382448c83832c570654f3075f781264935a2/testCreateFile", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "52b283f8-54fe-4b9a-a631-4eb70dceaec1" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "retry-after" : "0", - "StatusCode" : "202", - "x-ms-request-id" : "f91b0c38-b01a-0002-2366-51ac40000000", - "x-ms-client-request-id" : "52b283f8-54fe-4b9a-a631-4eb70dceaec1", - "Date" : "Sat, 16 Apr 2022 07:47:16 GMT" - }, - "Exception" : null - } ], - "variables" : [ "2448c8382448c83832c570654f3075f781264935a2" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAsyncAPITestsDeleteIfExistsFileLeaseFail.json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAsyncAPITestsDeleteIfExistsFileLeaseFail.json deleted file mode 100644 index 20fed4d7e7dbd..0000000000000 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAsyncAPITestsDeleteIfExistsFileLeaseFail.json +++ /dev/null @@ -1,98 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/8895b21d8895b21d7002908865f12d45f6324f3292?restype=share", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "5f16f01d-9ab5-40b2-8e17-993f1fd10a63" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA1F7D542A0346", - "Last-Modified" : "Sat, 16 Apr 2022 07:47:16 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "d572c3bf-501a-0025-5b66-51bb84000000", - "x-ms-client-request-id" : "5f16f01d-9ab5-40b2-8e17-993f1fd10a63", - "Date" : "Sat, 16 Apr 2022 07:47:15 GMT" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/8895b21d8895b21d7002908865f12d45f6324f3292/testCreateFile", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "29f58f5e-9845-415c-8641-db4e673454a9" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "x-ms-file-permission-key" : "8592442312075974896*16113479809698295934", - "x-ms-file-id" : "13835128424026341376", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-file-creation-time" : "2022-04-16T07:47:17.1849357Z", - "Last-Modified" : "Sat, 16 Apr 2022 07:47:17 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-server-encrypted" : "true", - "Date" : "Sat, 16 Apr 2022 07:47:17 GMT", - "x-ms-file-attributes" : "Archive", - "x-ms-file-change-time" : "2022-04-16T07:47:17.1849357Z", - "x-ms-file-parent-id" : "0", - "eTag" : "0x8DA1F7D5449E88D", - "x-ms-request-id" : "f924dfdc-c01a-0018-3f66-51cd9f000000", - "x-ms-client-request-id" : "29f58f5e-9845-415c-8641-db4e673454a9", - "x-ms-file-last-write-time" : "2022-04-16T07:47:17.1849357Z" - }, - "Exception" : null - }, { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/8895b21d8895b21d7002908865f12d45f6324f3292/testCreateFile?comp=lease", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "b81d6cbb-b315-474e-8d39-864b687495a8" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-lease-id" : "a373610c-55bc-402c-9d6a-7afde995d2df", - "eTag" : "0x8DA1F7D5449E88D", - "Last-Modified" : "Sat, 16 Apr 2022 07:47:17 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "c7e40614-101a-0079-5666-51eedc000000", - "x-ms-client-request-id" : "b81d6cbb-b315-474e-8d39-864b687495a8", - "Date" : "Sat, 16 Apr 2022 07:47:16 GMT" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "http://REDACTED.file.core.windows.net/8895b21d8895b21d7002908865f12d45f6324f3292/testCreateFile", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "33089d15-201f-4641-92ea-ed0518445d30" - }, - "Response" : { - "content-length" : "264", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-error-code" : "LeaseIdMismatchWithFileOperation", - "retry-after" : "0", - "StatusCode" : "412", - "x-ms-request-id" : "f924dfe0-c01a-0018-4166-51cd9f000000", - "Body" : "LeaseIdMismatchWithFileOperationThe lease ID specified did not match the lease ID for the file.\nRequestId:f924dfe0-c01a-0018-4166-51cd9f000000\nTime:2022-04-16T07:47:17.3749515Z", - "x-ms-client-request-id" : "33089d15-201f-4641-92ea-ed0518445d30", - "Date" : "Sat, 16 Apr 2022 07:47:17 GMT", - "Content-Type" : "application/xml" - }, - "Exception" : null - } ], - "variables" : [ "8895b21d8895b21d7002908865f12d45f6324f3292", "18949d86-a360-476c-8b2a-0625e00db4a6" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAsyncAPITestsDeleteIfExistsFileThatDoesNotExist.json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAsyncAPITestsDeleteIfExistsFileThatDoesNotExist.json deleted file mode 100644 index e2b528e19fd96..0000000000000 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAsyncAPITestsDeleteIfExistsFileThatDoesNotExist.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/db9f1b6adb9f1b6ab4316669104155f912ff4c84af?restype=share", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "0dc5ba68-b3d2-4e7e-9f8d-1510e49d0f12" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA1F7D542C7BC2", - "Last-Modified" : "Sat, 16 Apr 2022 07:47:16 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "f91b0c33-b01a-0002-2066-51ac40000000", - "x-ms-client-request-id" : "0dc5ba68-b3d2-4e7e-9f8d-1510e49d0f12", - "Date" : "Sat, 16 Apr 2022 07:47:16 GMT" - }, - "Exception" : null - }, { - "Method" : "DELETE", - "Uri" : "http://REDACTED.file.core.windows.net/db9f1b6adb9f1b6ab4316669104155f912ff4c84af/testCreateFile", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "2d1475e2-9513-4871-b9d4-8b6c5dbb1ec5" - }, - "Response" : { - "content-length" : "223", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-error-code" : "ResourceNotFound", - "retry-after" : "0", - "StatusCode" : "404", - "x-ms-request-id" : "f91b0c36-b01a-0002-2166-51ac40000000", - "Body" : "ResourceNotFoundThe specified resource does not exist.\nRequestId:f91b0c36-b01a-0002-2166-51ac40000000\nTime:2022-04-16T07:47:17.1609994Z", - "x-ms-client-request-id" : "2d1475e2-9513-4871-b9d4-8b6c5dbb1ec5", - "Date" : "Sat, 16 Apr 2022 07:47:16 GMT", - "Content-Type" : "application/xml" - }, - "Exception" : null - } ], - "variables" : [ "db9f1b6adb9f1b6ab4316669104155f912ff4c84af" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAsyncAPITestsDeleteIfExistsShare.json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAsyncAPITestsDeleteIfExistsShare.json deleted file mode 100644 index e19c6b4f4e4ef..0000000000000 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAsyncAPITestsDeleteIfExistsShare.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "PUT", - "Uri" : "http://REDACTED.file.core.windows.net/5cfcc6935cfcc693e861591430a8fe20f16a420ea0?restype=share", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "74ee17a8-d7fe-433e-9fd3-732d280ad2cb" - }, - "Response" : { - "content-length" : "0", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "eTag" : "0x8DA1F7CB14F3837", - "Last-Modified" : "Sat, 16 Apr 2022 07:42:43 GMT", - "retry-after" : "0", - "StatusCode" : "201", - "x-ms-request-id" : "5b700e72-101a-0034-0865-512130000000", - "x-ms-client-request-id" : "74ee17a8-d7fe-433e-9fd3-732d280ad2cb", - "Date" : "Sat, 16 Apr 2022 07:42:43 GMT" - }, - "Exception" : null - } ], - "variables" : [ "5cfcc6935cfcc693e861591430a8fe20f16a420ea0" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAsyncAPITestsDeleteIfExistsShareThatDoesNotExists.json b/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAsyncAPITestsDeleteIfExistsShareThatDoesNotExists.json deleted file mode 100644 index 4fe19d18f77ec..0000000000000 --- a/sdk/storage/azure-storage-file-share/src/test/resources/session-records/ShareAsyncAPITestsDeleteIfExistsShareThatDoesNotExists.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "DELETE", - "Uri" : "http://REDACTED.file.core.windows.net/756368e40756368e4c3b018741992608f05354c7d98b?restype=share", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "7a63a498-f04a-4726-81b0-2aff5faa47f3" - }, - "Response" : { - "content-length" : "217", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-error-code" : "ShareNotFound", - "retry-after" : "0", - "StatusCode" : "404", - "x-ms-request-id" : "7138beaa-f01a-0061-3465-5131bb000000", - "Body" : "ShareNotFoundThe specified share does not exist.\nRequestId:7138beaa-f01a-0061-3465-5131bb000000\nTime:2022-04-16T07:42:43.7399519Z", - "x-ms-client-request-id" : "7a63a498-f04a-4726-81b0-2aff5faa47f3", - "Date" : "Sat, 16 Apr 2022 07:42:42 GMT", - "Content-Type" : "application/xml" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "http://REDACTED.file.core.windows.net/756368e40756368e4c3b018741992608f05354c7d98b?restype=share", - "Headers" : { - "x-ms-version" : "2021-04-10", - "User-Agent" : "azsdk-java-azure-storage-file-share/12.13.0-beta.1 (11.0.14; Windows 10; 10.0)", - "x-ms-client-request-id" : "1e19c69d-2c3c-4c3c-a71b-13781a360da3" - }, - "Response" : { - "content-length" : "217", - "x-ms-version" : "2021-04-10", - "Server" : "Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0", - "Vary" : "Origin", - "x-ms-error-code" : "ShareNotFound", - "retry-after" : "0", - "StatusCode" : "404", - "x-ms-request-id" : "7138beac-f01a-0061-3565-5131bb000000", - "Body" : "ShareNotFoundThe specified share does not exist.\nRequestId:7138beac-f01a-0061-3565-5131bb000000\nTime:2022-04-16T07:42:43.9018595Z", - "x-ms-client-request-id" : "1e19c69d-2c3c-4c3c-a71b-13781a360da3", - "Date" : "Sat, 16 Apr 2022 07:42:42 GMT", - "Content-Type" : "application/xml" - }, - "Exception" : null - } ], - "variables" : [ "756368e4756368e4c3b68601268ce98c679346408c", "756368e40756368e4c3b018741992608f05354c7d98b" ] -} \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-share/swagger/README.md b/sdk/storage/azure-storage-file-share/swagger/README.md index eee7f23e52522..a2abd9f193c27 100644 --- a/sdk/storage/azure-storage-file-share/swagger/README.md +++ b/sdk/storage/azure-storage-file-share/swagger/README.md @@ -16,7 +16,7 @@ autorest --java --use:@autorest/java@4.0.x ### Code generation settings ``` yaml -input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/main/specification/storage/data-plane/Microsoft.FileStorage/preview/2021-06-08/file.json +input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/main/specification/storage/data-plane/Microsoft.FileStorage/preview/2021-04-10/file.json java: true output-folder: ../ namespace: com.azure.storage.file.share @@ -30,7 +30,7 @@ context-client-method-parameter: true default-http-exception-type: com.azure.storage.file.share.models.ShareStorageException models-subpackage: implementation.models custom-types-subpackage: models -custom-types: HandleItem,ShareFileHttpHeaders,ShareServiceProperties,ShareCorsRule,Range,FileRange,ClearRange,ShareFileRangeList,CopyStatusType,ShareSignedIdentifier,SourceModifiedAccessConditions,ShareErrorCode,StorageServiceProperties,ShareMetrics,ShareAccessPolicy,ShareFileDownloadHeaders,LeaseDurationType,LeaseStateType,LeaseStatusType,PermissionCopyModeType,ShareAccessTier,ShareRootSquash,ShareRetentionPolicy,ShareProtocolSettings,ShareSmbSettings,SmbMultichannel,FileLastWrittenMode +custom-types: HandleItem,ShareFileHttpHeaders,ShareServiceProperties,ShareCorsRule,Range,FileRange,ClearRange,ShareFileRangeList,CopyStatusType,ShareSignedIdentifier,SourceModifiedAccessConditions,ShareErrorCode,StorageServiceProperties,ShareMetrics,ShareAccessPolicy,ShareFileDownloadHeaders,LeaseDurationType,LeaseStateType,LeaseStatusType,PermissionCopyModeType,ShareAccessTier,ShareRootSquash,ShareRetentionPolicy,ShareProtocolSettings,ShareSmbSettings,SmbMultichannel customization-class: src/main/java/ShareStorageCustomization.java ``` @@ -248,7 +248,7 @@ directive: $.enum = [ "2019-07-07" ]; ``` -### Convert FileCreationTime and FileLastWriteTime and FileChangeTime to String to Support 'now' +### Convert FileCreationTime and FileLastWriteTime to String to Support 'now' ``` yaml directive: - from: swagger-document @@ -259,10 +259,6 @@ directive: where: $.parameters.FileLastWriteTime transform: > delete $.format; -- from: swagger-document - where: $.parameters.FileChangeTime - transform: > - delete $.format; ``` ### FileRangeWriteFromUrl Constant @@ -379,35 +375,5 @@ directive: delete $["x-ms-pageable"]; ``` -### Remove CopyFileSmbInfoChangeTime from file copy -``` yaml -directive: -- from: swagger-document - where: $["x-ms-paths"] - transform: > - const op = $["/{shareName}/{fileName}?comp=copy"]; - op.put.parameters.splice(11,1); -``` - -### Change PutRange response file-last-write-time to ISO8601 -``` yaml -directive: -- from: swagger-document - where: $["x-ms-paths"] - transform: > - const op = $["/{shareName}/{fileName}?comp=range"]; - op.put.responses["201"].headers["x-ms-file-last-write-time"].format = "date-time"; -``` - -### Change PutRangeFromUrl response file-last-write-time to ISO8601 -``` yaml -directive: -- from: swagger-document - where: $["x-ms-paths"] - transform: > - const op = $["/{shareName}/{fileName}?comp=range&fromURL"]; - op.put.responses["201"].headers["x-ms-file-last-write-time"].format = "date-time"; -``` - ![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-java%2Fsdk%2Fstorage%2Fazure-storage-file-share%2Fswagger%2FREADME.png)